結果
問題 |
No.158 奇妙なお使い
|
ユーザー |
👑 |
提出日時 | 2015-02-27 01:25:45 |
言語 | C90 (gcc 12.3.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 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 27 |
コンパイルメッセージ
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); }