結果

問題 No.452 横着者のビンゴゲーム
ユーザー tailstails
提出日時 2016-12-03 01:11:03
言語 C90
(gcc 11.4.0)
結果
AC  
実行時間 59 ms / 3,000 ms
コード長 469 bytes
コンパイル時間 1,193 ms
コンパイル使用メモリ 26,324 KB
実行使用メモリ 8,208 KB
最終ジャッジ日時 2023-08-25 03:02:20
合計ジャッジ時間 4,044 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 AC 1 ms
4,380 KB
testcase_12 AC 1 ms
4,376 KB
testcase_13 AC 1 ms
4,376 KB
testcase_14 AC 59 ms
4,380 KB
testcase_15 AC 57 ms
4,376 KB
testcase_16 AC 34 ms
4,376 KB
testcase_17 AC 8 ms
8,208 KB
testcase_18 AC 6 ms
4,376 KB
testcase_19 AC 6 ms
4,376 KB
testcase_20 AC 6 ms
6,136 KB
testcase_21 AC 14 ms
4,380 KB
testcase_22 AC 5 ms
8,176 KB
testcase_23 AC 22 ms
4,380 KB
testcase_24 AC 5 ms
8,184 KB
testcase_25 AC 3 ms
6,104 KB
testcase_26 AC 14 ms
4,380 KB
testcase_27 AC 12 ms
4,380 KB
testcase_28 AC 6 ms
4,380 KB
testcase_29 AC 5 ms
4,380 KB
testcase_30 AC 18 ms
4,380 KB
testcase_31 AC 4 ms
4,380 KB
testcase_32 AC 4 ms
4,380 KB
testcase_33 AC 9 ms
4,376 KB
testcase_34 AC 7 ms
4,376 KB
testcase_35 AC 7 ms
6,308 KB
testcase_36 AC 4 ms
6,056 KB
testcase_37 AC 4 ms
8,140 KB
testcase_38 AC 55 ms
4,388 KB
testcase_39 AC 35 ms
4,376 KB
testcase_40 AC 35 ms
4,380 KB
testcase_41 AC 35 ms
4,380 KB
testcase_42 AC 35 ms
4,376 KB
testcase_43 AC 35 ms
4,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
 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
 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
 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
 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
 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
 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
 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
 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]
 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]
 i(v){scanf("%d",&v);return v;}
      ^~~~~
main.c:4:6: warning: incompatible implicit declaration of built-in function ‘scanf’
main.c:4:6: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
main.c:1:1:
+#include <stdio.h>
 n;m;b;d;z;k;

ソースコード

diff #

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;
}
0