結果
問題 | No.391 CODING WAR |
ユーザー | 👑 testestest |
提出日時 | 2016-07-17 18:56:27 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 197 ms / 2,000 ms |
コード長 | 211 bytes |
コンパイル時間 | 176 ms |
コンパイル使用メモリ | 22,272 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-15 15:25:19 |
合計ジャッジ時間 | 2,345 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 0 ms
5,248 KB |
testcase_02 | AC | 1 ms
5,248 KB |
testcase_03 | AC | 1 ms
5,248 KB |
testcase_04 | AC | 0 ms
5,248 KB |
testcase_05 | AC | 1 ms
5,248 KB |
testcase_06 | AC | 0 ms
5,248 KB |
testcase_07 | AC | 1 ms
5,248 KB |
testcase_08 | AC | 1 ms
5,248 KB |
testcase_09 | AC | 197 ms
5,248 KB |
testcase_10 | AC | 196 ms
5,248 KB |
testcase_11 | AC | 159 ms
5,248 KB |
testcase_12 | AC | 1 ms
5,248 KB |
testcase_13 | AC | 193 ms
5,248 KB |
testcase_14 | AC | 142 ms
5,248 KB |
testcase_15 | AC | 168 ms
5,248 KB |
testcase_16 | AC | 95 ms
5,248 KB |
testcase_17 | AC | 119 ms
5,248 KB |
testcase_18 | AC | 76 ms
5,248 KB |
testcase_19 | AC | 79 ms
5,248 KB |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | P=1e9+7;long n,s;m,i;long pom(int a,int i){return i?pom(1L*a*a%P,i/2)*(i%2?a:1)%P:1;}main(t){for(scanf("%ld%d",&n,&m);i<m;)s+=(1-i%2*2)*(i?t=t*pom(i,P-2)%P*(m-i+1)%P:1)*pom(m-i++,n%~-P)%P+P;s=!printf("%d",s%P);} | ^ main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘P’ [-Wimplicit-int] main.c:1:18: warning: data definition has no type or storage class 1 | P=1e9+7;long n,s;m,i;long pom(int a,int i){return i?pom(1L*a*a%P,i/2)*(i%2?a:1)%P:1;}main(t){for(scanf("%ld%d",&n,&m);i<m;)s+=(1-i%2*2)*(i?t=t*pom(i,P-2)%P*(m-i+1)%P:1)*pom(m-i++,n%~-P)%P+P;s=!printf("%d",s%P);} | ^ main.c:1:18: warning: type defaults to ‘int’ in declaration of ‘m’ [-Wimplicit-int] main.c:1:20: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int] 1 | P=1e9+7;long n,s;m,i;long pom(int a,int i){return i?pom(1L*a*a%P,i/2)*(i%2?a:1)%P:1;}main(t){for(scanf("%ld%d",&n,&m);i<m;)s+=(1-i%2*2)*(i?t=t*pom(i,P-2)%P*(m-i+1)%P:1)*pom(m-i++,n%~-P)%P+P;s=!printf("%d",s%P);} | ^ main.c:1:86: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | P=1e9+7;long n,s;m,i;long pom(int a,int i){return i?pom(1L*a*a%P,i/2)*(i%2?a:1)%P:1;}main(t){for(scanf("%ld%d",&n,&m);i<m;)s+=(1-i%2*2)*(i?t=t*pom(i,P-2)%P*(m-i+1)%P:1)*pom(m-i++,n%~-P)%P+P;s=!printf("%d",s%P);} | ^~~~ main.c: In function ‘main’: main.c:1:86: warning: type of ‘t’ defaults to ‘int’ [-Wimplicit-int] main.c:1:98: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 1 | P=1e9+7;long n,s;m,i;long pom(int a,int i){return i?pom(1L*a*a%P,i/2)*(i%2?a:1)%P:1;}main(t){for(scanf("%ld%d",&n,&m);i<m;)s+=(1-i%2*2)*(i?t=t*pom(i,P-2)%P*(m-i+1)%P:1)*pom(m-i++,n%~-P)%P+P;s=!printf("%d",s%P);} |
ソースコード
P=1e9+7;long n,s;m,i;long pom(int a,int i){return i?pom(1L*a*a%P,i/2)*(i%2?a:1)%P:1;}main(t){for(scanf("%ld%d",&n,&m);i<m;)s+=(1-i%2*2)*(i?t=t*pom(i,P-2)%P*(m-i+1)%P:1)*pom(m-i++,n%~-P)%P+P;s=!printf("%d",s%P);}