Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
100429 赵德明 [HNOI2008]越狱 C++ 内存超限 10 2000 MS 131316 KB 370 2023-08-25 20:11:16

Tests(1/10):


#include<bits/stdc++.h> using namespace std; long long m,n,cnt=0; void stf(long x,long last,int was){ if(n+1==x){ return; } int boo=0; for(int i=1;i<=m;i++) { if(i==last) { cnt = (cnt+int(pow(m,n-x)))%100003; } else { stf(x+1,i,boo); } } return; } int main(){ cin>>m>>n; stf(1,-1,0); cout<<cnt%100003; return 0; }


测评信息: