結果
| 問題 | No.9 モンスターのレベル上げ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-03-01 13:54:56 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 320 bytes |
| コンパイル時間 | 103 ms |
| コンパイル使用メモリ | 20,992 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-24 00:30:50 |
| 合計ジャッジ時間 | 16,286 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 WA * 1 |
コンパイルメッセージ
main.c:2:1: warning: data definition has no type or storage class
2 | N,A[M],B[M],h,k,i,x[M],y[M],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]
2 | N,A[M],B[M],h,k,i,x[M],y[M],t;
| ^
main.c:2:8: warning: type defaults to ‘int’ in declaration of ‘B’ [-Wimplicit-int]
2 | N,A[M],B[M],h,k,i,x[M],y[M],t;
| ^
main.c:2:13: warning: type defaults to ‘int’ in declaration of ‘h’ [-Wimplicit-int]
2 | N,A[M],B[M],h,k,i,x[M],y[M],t;
| ^
main.c:2:15: warning: type defaults to ‘int’ in declaration of ‘k’ [-Wimplicit-int]
2 | N,A[M],B[M],h,k,i,x[M],y[M],t;
| ^
main.c:2:17: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int]
2 | N,A[M],B[M],h,k,i,x[M],y[M],t;
| ^
main.c:2:19: warning: type defaults to ‘int’ in declaration of ‘x’ [-Wimplicit-int]
2 | N,A[M],B[M],h,k,i,x[M],y[M],t;
| ^
main.c:2:24: warning: type defaults to ‘int’ in declaration of ‘y’ [-Wimplicit-int]
2 | N,A[M],B[M],h,k,i,x[M],y[M],t;
| ^
main.c:2:29: warning: type defaults to ‘int’ in declaration of ‘t’ [-Wimplicit-int]
2 | N,A[M],B[M],h,k,i,x[M],y[M],t;
| ^
main.c:3:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
3 | main(z){
| ^~~~
main.c: In function ‘main’:
main.c:3:1: warning: type of ‘z’ defaults to ‘int’ [-Wimplicit-int]
main.c:4:13: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
4 | for(scanf("%d",&N);i<N;)scanf("%d",A+i++);for(;~scanf("%d",B+--i););
| ^~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
+++ |+#include <stdio.h>
1 | enum{M=15
ソースコード
enum{M=1500};
N,A[M],B[M],h,k,i,x[M],y[M],t;
main(z){
for(scanf("%d",&N);i<N;)scanf("%d",A+i++);for(;~scanf("%d",B+--i););
for(z=h=N;h--;z>t?z=t:0){
for(i=N;i--;)x[i]=A[i]<<11;
for(k=N;k--;x[t]+=B[(h+k)%N]/2<<11|1)for(i=N;i--;)x[t]>x[i]?t=i:0;
for(t=i=0;i<N;t<k?t=k:0)k=x[i++]&2047;
}
printf("%d",z);exit(0);
}