結果
| 問題 | No.452 横着者のビンゴゲーム |
| コンテスト | |
| ユーザー |
👑 tails
|
| 提出日時 | 2016-12-03 00:29:49 |
| 言語 | C90(gcc15) (gcc 15.2.0) |
| 結果 |
AC
|
| 実行時間 | 396 ms / 3,000 ms |
| コード長 | 1,064 bytes |
| 記録 | |
| コンパイル時間 | 301 ms |
| コンパイル使用メモリ | 39,644 KB |
| 最終ジャッジ日時 | 2026-02-23 23:08:19 |
|
ジャッジサーバー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;
| ^
main.c:1:3: warning: data definition has no type or storage class
1 | n;m;b;d;z;
| ^
main.c:1:5: warning: data definition has no type or storage class
1 | n;m;b;d;z;
| ^
main.c:1:7: warning: data definition has no type or storage class
1 | n;m;b;d;z;
| ^
main.c:1:9: warning: data definition has no type or storage class
1 | n;m;b;d;z;
| ^
main.c:2:1: warning: data definition has no type or storage class
2 | c[200][100][100];
| ^
main.c:3:1: warning: data definition has no type or storage class
3 | u[2000000];
| ^
main.c: In function 'i':
main.c:4:6: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
4 | i(v){scanf("%d",&v);return v;}
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | n;m;b;d;z;
main.c: In function 'main':
main.c:81:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
81 | printf("%d",n+b-1);
| ^~~~~~
main.c:81:9: note: include '<stdio.h>' or provide a declaration of 'printf'
ソースコード
n;m;b;d;z;
c[200][100][100];
u[2000000];
i(v){scanf("%d",&v);return v;}
f(d,e,x,y){
for(d=0;d<m;++d){
if(d-z){
for(y=0;y<n;++y){
e=0;
for(x=0;x<n;++x){
e+=!u[c[d][y][x]];
}
if(b>e)b=e;
}
for(x=0;x<n;++x){
e=0;
for(y=0;y<n;++y){
e+=!u[c[d][y][x]];
}
if(b>e)b=e;
}
{
e=0;
for(y=0;y<n;++y){
e+=!u[c[d][y][y]];
}
}
{
if(b>e)b=e;
e=0;
for(y=0;y<n;++y){
e+=!u[c[d][y][~y+n]];
}
if(b>e)b=e;
}
}
}
}
main(x,y){
b=n=i();m=i();
for(z=0;z<m;++z){
for(y=0;y<n;++y){
for(x=0;x<n;++x){
c[z][y][x]=i();
}
}
}
for(z=0;z<m;++z){
for(y=0;y<n;++y){
bzero(u,sizeof u);
for(x=0;x<n;++x){
u[c[z][y][x]]=1;
}
f(z);
}
for(x=0;x<n;++x){
bzero(u,sizeof u);
for(y=0;y<n;++y){
u[c[z][y][x]]=1;
}
f(z);
}
{
bzero(u,sizeof u);
for(y=0;y<n;++y){
u[c[z][y][y]]=1;
}
f(z);
}
{
bzero(u,sizeof u);
for(y=0;y<n;++y){
u[c[z][y][~y+n]]=1;
}
f(z);
}
}
printf("%d",n+b-1);
return 0;
}
tails