結果

問題 No.697 池の数はいくつか
ユーザー %20%20
提出日時 2018-06-09 22:21:09
言語 cLay
(20240104-1)
結果
RE  
実行時間 -
コード長 223 bytes
コンパイル時間 2,041 ms
コンパイル使用メモリ 161,420 KB
実行使用メモリ 9,312 KB
最終ジャッジ日時 2023-08-16 22:14:54
合計ジャッジ時間 5,930 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,420 KB
testcase_01 AC 2 ms
5,460 KB
testcase_02 AC 2 ms
5,464 KB
testcase_03 AC 2 ms
5,468 KB
testcase_04 AC 2 ms
5,464 KB
testcase_05 AC 3 ms
5,416 KB
testcase_06 AC 2 ms
5,440 KB
testcase_07 AC 2 ms
5,416 KB
testcase_08 AC 2 ms
5,448 KB
testcase_09 AC 2 ms
5,460 KB
testcase_10 AC 2 ms
5,404 KB
testcase_11 AC 2 ms
5,436 KB
testcase_12 AC 2 ms
5,504 KB
testcase_13 AC 2 ms
5,396 KB
testcase_14 AC 2 ms
5,448 KB
testcase_15 AC 2 ms
5,504 KB
testcase_16 AC 2 ms
5,412 KB
testcase_17 AC 2 ms
5,388 KB
testcase_18 AC 2 ms
5,580 KB
testcase_19 AC 2 ms
5,568 KB
testcase_20 AC 2 ms
5,516 KB
testcase_21 AC 2 ms
5,600 KB
testcase_22 AC 2 ms
5,408 KB
testcase_23 AC 2 ms
5,412 KB
testcase_24 AC 29 ms
8,436 KB
testcase_25 AC 30 ms
8,648 KB
testcase_26 AC 30 ms
8,652 KB
testcase_27 AC 30 ms
8,512 KB
testcase_28 AC 30 ms
8,464 KB
testcase_29 RE -
testcase_30 RE -
testcase_31 RE -
testcase_32 RE -
testcase_33 RE -
testcase_34 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

int A[1d6],H,W,i=4d3,z,t;
int f(int i){
	return A[i]=A[i]-i?f(A[i]):i;
}
{
	rd(H,W);
	rep(y,H){
		rep(x,W){
			rd(t);
			if(A[i]=t*i)rep(j,2)if(t=f(i-1-j*W))A[f(i)]=t;
			++i;
		}
		++i;
	}
	for(;--i;)z+=i==f(i);
	wt(z);
}
0