結果

問題 No.2072 Anatomy
ユーザー tailstails
提出日時 2022-09-16 22:06:13
言語 cLay
(20220312-1)
結果
AC  
実行時間 19 ms / 2,000 ms
コード長 170 bytes
コンパイル時間 3,462 ms
使用メモリ 10,000 KB
最終ジャッジ日時 2023-01-11 07:07:39
合計ジャッジ時間 4,360 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 2 ms
4,904 KB
testcase_01 AC 2 ms
6,948 KB
testcase_02 AC 2 ms
4,904 KB
testcase_03 AC 2 ms
4,904 KB
testcase_04 AC 2 ms
4,904 KB
testcase_05 AC 2 ms
4,904 KB
testcase_06 AC 1 ms
6,948 KB
testcase_07 AC 2 ms
4,904 KB
testcase_08 AC 16 ms
9,152 KB
testcase_09 AC 14 ms
9,596 KB
testcase_10 AC 16 ms
8,756 KB
testcase_11 AC 16 ms
9,396 KB
testcase_12 AC 13 ms
8,168 KB
testcase_13 AC 17 ms
9,780 KB
testcase_14 AC 12 ms
7,628 KB
testcase_15 AC 10 ms
7,788 KB
testcase_16 AC 19 ms
9,804 KB
testcase_17 AC 15 ms
9,656 KB
testcase_18 AC 8 ms
7,336 KB
testcase_19 AC 18 ms
9,932 KB
testcase_20 AC 18 ms
10,000 KB
testcase_21 AC 15 ms
9,920 KB
testcase_22 AC 18 ms
9,920 KB
testcase_23 AC 17 ms
9,944 KB
testcase_24 AC 16 ms
9,876 KB
testcase_25 AC 19 ms
9,876 KB
testcase_26 AC 2 ms
4,900 KB
testcase_27 AC 17 ms
9,876 KB
testcase_28 AC 15 ms
9,944 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