結果

問題 No.9 モンスターのレベル上げ
ユーザー 👑 hos.lyrichos.lyric
提出日時 2015-03-01 13:41:47
言語 C90
(gcc 11.4.0)
結果
TLE  
実行時間 -
コード長 346 bytes
コンパイル時間 657 ms
コンパイル使用メモリ 25,156 KB
実行使用メモリ 4,500 KB
最終ジャッジ日時 2023-09-06 05:49:57
合計ジャッジ時間 27,052 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2,517 ms
4,376 KB
testcase_03 AC 1,779 ms
4,380 KB
testcase_04 AC 753 ms
4,376 KB
testcase_05 AC 416 ms
4,380 KB
testcase_06 AC 101 ms
4,380 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 151 ms
4,376 KB
testcase_09 AC 2,394 ms
4,380 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 TLE -
testcase_12 AC 2,420 ms
4,376 KB
testcase_13 AC 2,450 ms
4,380 KB
testcase_14 AC 2,396 ms
4,380 KB
testcase_15 AC 2,124 ms
4,376 KB
testcase_16 AC 10 ms
4,376 KB
testcase_17 AC 1,234 ms
4,380 KB
testcase_18 AC 921 ms
4,380 KB
testcase_19 AC 5 ms
4,380 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:2:1: warning: data definition has no type or storage class
 N,A[M],B[M],h,i,j,k,x[M],y[M],s,t;
 ^
main.c:2:1: warning: type defaults to ‘int’ in declaration of ‘N’ [-Wimplicit-int]
main.c:2:3: warning: type defaults to ‘int’ in declaration of ‘A’ [-Wimplicit-int]
 N,A[M],B[M],h,i,j,k,x[M],y[M],s,t;
   ^
main.c:2:8: warning: type defaults to ‘int’ in declaration of ‘B’ [-Wimplicit-int]
 N,A[M],B[M],h,i,j,k,x[M],y[M],s,t;
        ^
main.c:2:13: warning: type defaults to ‘int’ in declaration of ‘h’ [-Wimplicit-int]
 N,A[M],B[M],h,i,j,k,x[M],y[M],s,t;
             ^
main.c:2:15: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int]
 N,A[M],B[M],h,i,j,k,x[M],y[M],s,t;
               ^
main.c:2:17: warning: type defaults to ‘int’ in declaration of ‘j’ [-Wimplicit-int]
 N,A[M],B[M],h,i,j,k,x[M],y[M],s,t;
                 ^
main.c:2:19: warning: type defaults to ‘int’ in declaration of ‘k’ [-Wimplicit-int]
 N,A[M],B[M],h,i,j,k,x[M],y[M],s,t;
                   ^
main.c:2:21: warning: type defaults to ‘int’ in declaration of ‘x’ [-Wimplicit-int]
 N,A[M],B[M],h,i,j,k,x[M],y[M],s,t;
                     ^
main.c:2:26: warning: type defaults to ‘int’ in declaration of ‘y’ [-Wimplicit-int]
 N,A[M],B[M],h,i,j,k,x[M],y[M],s,t;
                          ^
main.c:2:31: warning: type defaults to ‘int’ in declaration of ‘s’ [-Wimplicit-int]
 N,A[M],B[M],h,i,j,k,x[M],y[M],s,t;
                               ^
main.c:2:33: warning: type defaults to ‘int’ in declaration of ‘t’ [-Wimplicit-int]
 N,A[M],B[M],h,i,j,k,x[M],y[M],s,t;
                                 ^
main.c:3:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 main(z){
 ^~~~
main.c: In function ‘main’:
main.c:3:1: warning: type of ‘z’ defaults to ‘int’ [-Wimplicit-int]
main.c:4:2: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
  scanf("%d",&N);
  ^~~~

ソースコード

diff #

enum{M=1500};
N,A[M],B[M],h,i,j,k,x[M],y[M],s,t;
main(z){
	scanf("%d",&N);
	for(i=N;i--;)scanf("%d",A+i);
	for(i=N;i--;)scanf("%d",B+i);
	for(z=h=N;h--;){
		for(i=N;i--;)x[i]=A[i]<<11;
		for(k=N;k--;){
			for(i=N;i--;)if(x[j]>x[i])j=i;
			x[j]+=B[(h+k)%N]/2<<11|1;
		}
		for(t=0,i=N;i--;t<s&&(t=s))s=x[i]&2047;
		if(z>t)z=t;
	}
	printf("%d",z);
}
0