結果

問題 No.1390 Get together
ユーザー tailstails
提出日時 2021-02-12 21:33:36
言語 cLay
(20231016-1)
結果
AC  
実行時間 16 ms / 2,000 ms
コード長 160 bytes
コンパイル時間 2,185 ms
コンパイル使用メモリ 161,880 KB
実行使用メモリ 9,052 KB
最終ジャッジ日時 2023-09-19 02:10:59
合計ジャッジ時間 6,229 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
7,440 KB
testcase_01 AC 2 ms
7,380 KB
testcase_02 AC 2 ms
7,468 KB
testcase_03 AC 2 ms
7,400 KB
testcase_04 AC 2 ms
7,448 KB
testcase_05 AC 2 ms
7,596 KB
testcase_06 AC 2 ms
7,396 KB
testcase_07 AC 2 ms
7,600 KB
testcase_08 AC 2 ms
7,516 KB
testcase_09 AC 2 ms
7,432 KB
testcase_10 AC 2 ms
7,628 KB
testcase_11 AC 3 ms
7,432 KB
testcase_12 AC 3 ms
7,424 KB
testcase_13 AC 2 ms
7,432 KB
testcase_14 AC 2 ms
7,440 KB
testcase_15 AC 2 ms
7,640 KB
testcase_16 AC 12 ms
8,112 KB
testcase_17 AC 12 ms
8,884 KB
testcase_18 AC 11 ms
8,132 KB
testcase_19 AC 16 ms
8,908 KB
testcase_20 AC 15 ms
8,916 KB
testcase_21 AC 16 ms
8,884 KB
testcase_22 AC 14 ms
8,940 KB
testcase_23 AC 15 ms
8,932 KB
testcase_24 AC 15 ms
9,052 KB
testcase_25 AC 16 ms
8,892 KB
testcase_26 AC 16 ms
8,928 KB
testcase_27 AC 16 ms
8,884 KB
testcase_28 AC 16 ms
8,888 KB
testcase_29 AC 16 ms
8,892 KB
testcase_30 AC 16 ms
9,020 KB
testcase_31 AC 16 ms
8,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

unionFind u;

int d[3d5];

{
	int @n,@m;
	int z=0;
	u.walloc(m+1,1);
	rep(n){
		int @b,@c;
		if(d[c]==0){
			d[c]=b;
		}else{
			z+=u(d[c],b);
		}
	}
	wt(z);
}
0