結果
| 問題 |
No.452 横着者のビンゴゲーム
|
| コンテスト | |
| ユーザー |
tails
|
| 提出日時 | 2016-12-03 01:11:03 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 47 ms / 3,000 ms |
| コード長 | 469 bytes |
| コンパイル時間 | 367 ms |
| コンパイル使用メモリ | 22,656 KB |
| 実行使用メモリ | 9,704 KB |
| 最終ジャッジ日時 | 2024-12-23 15:03:15 |
| 合計ジャッジ時間 | 2,245 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 41 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
1 | n;m;b;d;z;k;
| ^
main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘n’ [-Wimplicit-int]
main.c:1:3: warning: data definition has no type or storage class
1 | n;m;b;d;z;k;
| ^
main.c:1:3: warning: type defaults to ‘int’ in declaration of ‘m’ [-Wimplicit-int]
main.c:1:5: warning: data definition has no type or storage class
1 | n;m;b;d;z;k;
| ^
main.c:1:5: warning: type defaults to ‘int’ in declaration of ‘b’ [-Wimplicit-int]
main.c:1:7: warning: data definition has no type or storage class
1 | n;m;b;d;z;k;
| ^
main.c:1:7: warning: type defaults to ‘int’ in declaration of ‘d’ [-Wimplicit-int]
main.c:1:9: warning: data definition has no type or storage class
1 | n;m;b;d;z;k;
| ^
main.c:1:9: warning: type defaults to ‘int’ in declaration of ‘z’ [-Wimplicit-int]
main.c:1:11: warning: data definition has no type or storage class
1 | n;m;b;d;z;k;
| ^
main.c:1:11: warning: type defaults to ‘int’ in declaration of ‘k’ [-Wimplicit-int]
main.c:2:1: warning: data definition has no type or storage class
2 | c[200][100][100];
| ^
main.c:2:1: warning: type defaults to ‘int’ in declaration of ‘c’ [-Wimplicit-int]
main.c:3:1: warning: data definition has no type or storage class
3 | u[2000000];
| ^
main.c:3:1: warning: type defaults to ‘int’ in declaration of ‘u’ [-Wimplicit-int]
main.c:4:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
4 | i(v){scanf("%d",&v);return v;}
| ^
main.c: In function ‘i’:
main.c:4:1: warning: type of ‘v’ defaults to ‘int’ [-Wimplicit-int]
main.c:4:6: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration]
4 | i(v){scanf("%d",&v);return v;}
| ^~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘sca
ソースコード
n;m;b;d;z;k;
c[200][100][100];
u[2000000];
i(v){scanf("%d",&v);return v;}
#define L(v,n)for(v=0;v<n;++v)
#define G(a){++k;L(y,n)u[c[z]a]=k;f();}
#define H(a){e=0;L(y,n)e+=u[c[d]a]!=k;if(b>e)b=e;}
f(d,e,x,y){
L(d,m)if(d-z){
L(x,n)H([x][y])
L(x,n)H([y][x])
H([y][y])
H([y][~y+n])
}
}
main(x,y){
b=n=i();m=i();
L(z,m)L(y,n)L(x,n)c[z][y][x]=i();
L(z,m){
L(x,n)G([x][y])
L(x,n)G([y][x])
G([y][y])
G([y][~y+n])
}
printf("%d",n+b-1);
return 0;
}
tails