結果
問題 | No.612 Move on grid |
ユーザー | tails |
提出日時 | 2017-12-12 01:00:18 |
言語 | C (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 221 ms / 2,500 ms |
コード長 | 510 bytes |
コンパイル時間 | 587 ms |
コンパイル使用メモリ | 30,208 KB |
実行使用メモリ | 62,464 KB |
最終ジャッジ日時 | 2024-05-10 03:44:17 |
合計ジャッジ時間 | 3,680 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 1 ms
5,376 KB |
testcase_02 | AC | 1 ms
5,376 KB |
testcase_03 | AC | 12 ms
5,632 KB |
testcase_04 | AC | 221 ms
62,336 KB |
testcase_05 | AC | 182 ms
62,464 KB |
testcase_06 | AC | 179 ms
62,464 KB |
testcase_07 | AC | 202 ms
62,336 KB |
testcase_08 | AC | 180 ms
62,336 KB |
testcase_09 | AC | 181 ms
62,336 KB |
testcase_10 | AC | 70 ms
25,856 KB |
testcase_11 | AC | 18 ms
7,552 KB |
testcase_12 | AC | 98 ms
35,584 KB |
testcase_13 | AC | 32 ms
12,928 KB |
testcase_14 | AC | 135 ms
47,488 KB |
testcase_15 | AC | 19 ms
8,192 KB |
testcase_16 | AC | 179 ms
60,800 KB |
testcase_17 | AC | 33 ms
13,824 KB |
testcase_18 | AC | 133 ms
49,408 KB |
testcase_19 | AC | 82 ms
30,464 KB |
testcase_20 | AC | 166 ms
55,808 KB |
コンパイルメッセージ
main.c:4:1: warning: data definition has no type or storage class 4 | t;a;b;c;d;e;r; | ^ main.c:4:1: warning: type defaults to 'int' in declaration of 't' [-Wimplicit-int] main.c:4:3: warning: data definition has no type or storage class 4 | t;a;b;c;d;e;r; | ^ main.c:4:3: warning: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:4:5: warning: data definition has no type or storage class 4 | t;a;b;c;d;e;r; | ^ main.c:4:5: warning: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:4:7: warning: data definition has no type or storage class 4 | t;a;b;c;d;e;r; | ^ main.c:4:7: warning: type defaults to 'int' in declaration of 'c' [-Wimplicit-int] main.c:4:9: warning: data definition has no type or storage class 4 | t;a;b;c;d;e;r; | ^ main.c:4:9: warning: type defaults to 'int' in declaration of 'd' [-Wimplicit-int] main.c:4:11: warning: data definition has no type or storage class 4 | t;a;b;c;d;e;r; | ^ main.c:4:11: warning: type defaults to 'int' in declaration of 'e' [-Wimplicit-int] main.c:4:13: warning: data definition has no type or storage class 4 | t;a;b;c;d;e;r; | ^ main.c:4:13: warning: type defaults to 'int' in declaration of 'r' [-Wimplicit-int] main.c:5:1: warning: data definition has no type or storage class 5 | s[600][C*2]; | ^ main.c:5:1: warning: type defaults to 'int' in declaration of 's' [-Wimplicit-int] main.c:7:1: warning: return type defaults to 'int' [-Wimplicit-int] 7 | main(u,i){ | ^~~~ main.c: In function 'main': main.c:7:1: warning: type of 'u' defaults to 'int' [-Wimplicit-int] main.c:7:1: warning: type of 'i' defaults to 'int' [-Wimplicit-int] main.c:8:9: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 8 | scanf("%d%d%d%d%d%d",&t,&a,&b,&c,&d,&e); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaratio
ソースコード
#define M 1000000007 #define C 70000 t;a;b;c;d;e;r; s[600][C*2]; main(u,i){ scanf("%d%d%d%d%d%d",&t,&a,&b,&c,&d,&e); s[0][C]=1; for(u=0;u<t;++u){ for(i=u*-60;i<=u*60;++i){ int sui=s[u][C+i]; s[u+1][C+i-a]=(s[u+1][C+i-a]+sui)%M; s[u+1][C+i+a]=(s[u+1][C+i+a]+sui)%M; s[u+1][C+i-b]=(s[u+1][C+i-b]+sui)%M; s[u+1][C+i+b]=(s[u+1][C+i+b]+sui)%M; s[u+1][C+i-c]=(s[u+1][C+i-c]+sui)%M; s[u+1][C+i+c]=(s[u+1][C+i+c]+sui)%M; } } for(i=d;i<=e;++i){ r=(r+s[t][C+i])%M; } printf("%d",r); }