結果
問題 | No.158 奇妙なお使い |
ユーザー | 👑 hos.lyric |
提出日時 | 2015-02-27 01:25:45 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 95 ms / 5,000 ms |
コード長 | 567 bytes |
コンパイル時間 | 156 ms |
コンパイル使用メモリ | 22,144 KB |
実行使用メモリ | 44,544 KB |
最終ジャッジ日時 | 2024-06-28 22:23:43 |
合計ジャッジ時間 | 3,733 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 95 ms
44,416 KB |
testcase_01 | AC | 85 ms
44,416 KB |
testcase_02 | AC | 87 ms
44,544 KB |
testcase_03 | AC | 91 ms
44,416 KB |
testcase_04 | AC | 84 ms
44,544 KB |
testcase_05 | AC | 90 ms
44,416 KB |
testcase_06 | AC | 84 ms
44,416 KB |
testcase_07 | AC | 87 ms
44,544 KB |
testcase_08 | AC | 81 ms
44,544 KB |
testcase_09 | AC | 88 ms
44,416 KB |
testcase_10 | AC | 86 ms
44,416 KB |
testcase_11 | AC | 86 ms
44,416 KB |
testcase_12 | AC | 90 ms
44,416 KB |
testcase_13 | AC | 88 ms
44,416 KB |
testcase_14 | AC | 86 ms
44,416 KB |
testcase_15 | AC | 90 ms
44,416 KB |
testcase_16 | AC | 85 ms
44,416 KB |
testcase_17 | AC | 85 ms
44,544 KB |
testcase_18 | AC | 85 ms
44,416 KB |
testcase_19 | AC | 84 ms
44,544 KB |
testcase_20 | AC | 87 ms
44,416 KB |
testcase_21 | AC | 87 ms
44,416 KB |
testcase_22 | AC | 85 ms
44,544 KB |
testcase_23 | AC | 86 ms
44,416 KB |
testcase_24 | AC | 87 ms
44,416 KB |
testcase_25 | AC | 82 ms
44,416 KB |
testcase_26 | AC | 84 ms
44,416 KB |
testcase_27 | AC | 85 ms
44,416 KB |
testcase_28 | AC | 87 ms
44,416 KB |
testcase_29 | AC | 81 ms
44,544 KB |
testcase_30 | AC | 86 ms
44,416 KB |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | X=1000,Y=100,a,b,c,d[2],e[2],f[2],g[2],p[11][101][10001],s,t,u,v,w,x,y,z; | ^ main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘X’ [-Wimplicit-int] main.c:1:8: warning: type defaults to ‘int’ in declaration of ‘Y’ [-Wimplicit-int] 1 | X=1000,Y=100,a,b,c,d[2],e[2],f[2],g[2],p[11][101][10001],s,t,u,v,w,x,y,z; | ^ main.c:1:14: warning: type defaults to ‘int’ in declaration of ‘a’ [-Wimplicit-int] 1 | X=1000,Y=100,a,b,c,d[2],e[2],f[2],g[2],p[11][101][10001],s,t,u,v,w,x,y,z; | ^ main.c:1:16: warning: type defaults to ‘int’ in declaration of ‘b’ [-Wimplicit-int] 1 | X=1000,Y=100,a,b,c,d[2],e[2],f[2],g[2],p[11][101][10001],s,t,u,v,w,x,y,z; | ^ main.c:1:18: warning: type defaults to ‘int’ in declaration of ‘c’ [-Wimplicit-int] 1 | X=1000,Y=100,a,b,c,d[2],e[2],f[2],g[2],p[11][101][10001],s,t,u,v,w,x,y,z; | ^ main.c:1:20: warning: type defaults to ‘int’ in declaration of ‘d’ [-Wimplicit-int] 1 | X=1000,Y=100,a,b,c,d[2],e[2],f[2],g[2],p[11][101][10001],s,t,u,v,w,x,y,z; | ^ main.c:1:25: warning: type defaults to ‘int’ in declaration of ‘e’ [-Wimplicit-int] 1 | X=1000,Y=100,a,b,c,d[2],e[2],f[2],g[2],p[11][101][10001],s,t,u,v,w,x,y,z; | ^ main.c:1:30: warning: type defaults to ‘int’ in declaration of ‘f’ [-Wimplicit-int] 1 | X=1000,Y=100,a,b,c,d[2],e[2],f[2],g[2],p[11][101][10001],s,t,u,v,w,x,y,z; | ^ main.c:1:35: warning: type defaults to ‘int’ in declaration of ‘g’ [-Wimplicit-int] 1 | X=1000,Y=100,a,b,c,d[2],e[2],f[2],g[2],p[11][101][10001],s,t,u,v,w,x,y,z; | ^ main.c:1:40: warning: type defaults to ‘int’ in declaration of ‘p’ [-Wimplicit-int] 1 | X=1000,Y=100,a,b,c,d[2
ソースコード
X=1000,Y=100,a,b,c,d[2],e[2],f[2],g[2],p[11][101][10001],s,t,u,v,w,x,y,z; _(r){if(t<r)t=r;} main(i){ for(scanf("%d%d%d%d%d%d%d%d%d%d%d",&a,&b,&c,d,e,f,g,d+1,e+1,f+1,g+1);s<10001;++s)for(x=11;x--;)for(y=101;y--;p[x][y][z]=t){ z=s-x*X-y*Y; t=0; if(z>=0){ y<10||_(p[x+1][y-10][z]); z<Y||_(p[x][y+1][z-Y]); // for(i=2;i--;(u|v|w)<0||_(1+p[u+e[i]][v+f[i]][w+g[i]]))u=x-d[i]/X,v=y-d[i]/Y%10,w=z-d[i]%Y; for(i=2;i--;(u|v|w)<0||_(1+p[u+e[i]][v+f[i]][w+g[i]])){ u=x-d[i]/X,v=y-d[i]/Y%10,w=z-d[i]%Y; } } } printf("%d",p[a][b][c]); exit(0); }