結果

問題 No.2072 Anatomy
ユーザー tailstails
提出日時 2022-09-16 22:06:13
言語 cLay
(20240104-1)
結果
AC  
実行時間 18 ms / 2,000 ms
コード長 170 bytes
コンパイル時間 3,470 ms
コンパイル使用メモリ 161,568 KB
実行使用メモリ 10,040 KB
最終ジャッジ日時 2023-08-23 15:39:46
合計ジャッジ時間 5,281 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,384 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 16 ms
9,156 KB
testcase_09 AC 13 ms
9,528 KB
testcase_10 AC 16 ms
8,764 KB
testcase_11 AC 15 ms
9,344 KB
testcase_12 AC 12 ms
8,076 KB
testcase_13 AC 16 ms
9,684 KB
testcase_14 AC 11 ms
7,584 KB
testcase_15 AC 9 ms
7,748 KB
testcase_16 AC 18 ms
9,672 KB
testcase_17 AC 15 ms
9,704 KB
testcase_18 AC 8 ms
7,248 KB
testcase_19 AC 17 ms
9,808 KB
testcase_20 AC 17 ms
9,980 KB
testcase_21 AC 15 ms
9,996 KB
testcase_22 AC 17 ms
9,840 KB
testcase_23 AC 15 ms
9,988 KB
testcase_24 AC 15 ms
9,996 KB
testcase_25 AC 17 ms
10,040 KB
testcase_26 AC 1 ms
4,380 KB
testcase_27 AC 16 ms
9,916 KB
testcase_28 AC 14 ms
9,848 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll@n,@m,j=2m,@--w[j],a[n]{};
unionFind f('m',n,1);
REP(m){
	ll u=f(w[--j]);
	ll v=f(w[--j]);
	if(f(u,v)){
		a[f(u)]=1+max(a[u],a[v]);
	}else{
		++a[u];
	}
}
Wt(a[f(0)]);
0