結果

問題 No.158 奇妙なお使い
ユーザー 👑 hos.lyrichos.lyric
提出日時 2015-02-27 01:17:18
言語 C90
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 456 bytes
コンパイル時間 876 ms
コンパイル使用メモリ 25,956 KB
実行使用メモリ 45,252 KB
最終ジャッジ日時 2023-09-06 03:14:39
合計ジャッジ時間 5,753 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
45,228 KB
testcase_01 WA -
testcase_02 AC 121 ms
45,136 KB
testcase_03 AC 114 ms
45,236 KB
testcase_04 WA -
testcase_05 AC 102 ms
45,088 KB
testcase_06 AC 108 ms
45,096 KB
testcase_07 WA -
testcase_08 AC 96 ms
45,236 KB
testcase_09 AC 121 ms
45,232 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 120 ms
45,152 KB
testcase_13 AC 122 ms
45,192 KB
testcase_14 AC 113 ms
45,192 KB
testcase_15 AC 116 ms
45,160 KB
testcase_16 AC 101 ms
45,136 KB
testcase_17 WA -
testcase_18 AC 117 ms
45,136 KB
testcase_19 AC 102 ms
45,144 KB
testcase_20 AC 103 ms
45,236 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 108 ms
45,192 KB
testcase_25 AC 96 ms
45,152 KB
testcase_26 WA -
testcase_27 AC 100 ms
45,092 KB
testcase_28 AC 103 ms
45,028 KB
testcase_29 AC 96 ms
45,152 KB
testcase_30 AC 98 ms
45,036 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
 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]
 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]
 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]
 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]
 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]
 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]
 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]
 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]
 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]
 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:58: warning: type defaults to 

ソースコード

diff #

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){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=Y;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<0||v<0||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);
}
0