結果
問題 | No.498 ワープクリスタル (給料日編) |
ユーザー | 👑 testestest |
提出日時 | 2017-06-15 00:44:28 |
言語 | C (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 238 ms / 2,000 ms |
コード長 | 376 bytes |
コンパイル時間 | 223 ms |
コンパイル使用メモリ | 30,848 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-24 23:30:11 |
合計ジャッジ時間 | 4,395 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
6,816 KB |
testcase_01 | AC | 1 ms
6,940 KB |
testcase_02 | AC | 1 ms
6,940 KB |
testcase_03 | AC | 2 ms
6,940 KB |
testcase_04 | AC | 234 ms
6,944 KB |
testcase_05 | AC | 1 ms
6,940 KB |
testcase_06 | AC | 234 ms
6,940 KB |
testcase_07 | AC | 238 ms
6,940 KB |
testcase_08 | AC | 233 ms
6,940 KB |
testcase_09 | AC | 234 ms
6,940 KB |
testcase_10 | AC | 1 ms
6,944 KB |
testcase_11 | AC | 233 ms
6,940 KB |
testcase_12 | AC | 1 ms
6,940 KB |
testcase_13 | AC | 234 ms
6,944 KB |
testcase_14 | AC | 2 ms
6,940 KB |
testcase_15 | AC | 14 ms
6,944 KB |
testcase_16 | AC | 1 ms
6,940 KB |
testcase_17 | AC | 15 ms
6,940 KB |
testcase_18 | AC | 234 ms
6,944 KB |
testcase_19 | AC | 234 ms
6,940 KB |
testcase_20 | AC | 234 ms
6,944 KB |
testcase_21 | AC | 235 ms
6,940 KB |
testcase_22 | AC | 234 ms
6,948 KB |
testcase_23 | AC | 234 ms
6,944 KB |
testcase_24 | AC | 233 ms
6,944 KB |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | M=1e9+7; | ^ main.c:1:1: warning: type defaults to 'int' in declaration of 'M' [-Wimplicit-int] main.c:2:1: warning: data definition has no type or storage class 2 | c[9],a[99];long n,i,j,k,t,T,f,p,q,s,S; | ^ main.c:2:1: warning: type defaults to 'int' in declaration of 'c' [-Wimplicit-int] main.c:2:6: warning: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] 2 | c[9],a[99];long n,i,j,k,t,T,f,p,q,s,S; | ^ main.c:3:1: warning: return type defaults to 'int' [-Wimplicit-int] 3 | main(){ | ^~~~ main.c: In function 'main': main.c:4:7: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 4 | for(;~scanf("%d",a+n);n++); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | M=1e9+7; main.c:4:7: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 4 | for(;~scanf("%d",a+n);n++); | ^~~~~ main.c:4:7: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:24:1: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 24 | printf("%d",S%M); | ^~~~~~ main.c:24:1: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:24:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:24:1: note: include '<stdio.h>' or provide a declaration of 'printf'
ソースコード
M=1e9+7; c[9],a[99];long n,i,j,k,t,T,f,p,q,s,S; main(){ for(;~scanf("%d",a+n);n++); for(;i++<1<<n/3*4;){ f=1; T=s=p=q=0; for(j=0;j<n/3;j++){ c[j]=t=i>>j*4&15; p+=t*a[3*j+3]; q+=t*a[3*j+4]; f&=t<=a[3*j+5]; s+=t; } if(p==a[0]&&q==a[1]&&f)for(T=1,j=0;j<n/3;j++){ for(k=0;k++<c[j];){ T=(T*s--)%M; while(T%k)T+=M; T/=k; } } S+=T; } printf("%d",S%M); }