結果

問題 No.2200 Weird Shortest Path
ユーザー tailstails
提出日時 2023-01-28 23:07:43
言語 cLay
(20240104-1)
結果
AC  
実行時間 48 ms / 2,000 ms
コード長 180 bytes
コンパイル時間 5,282 ms
コンパイル使用メモリ 210,956 KB
実行使用メモリ 14,752 KB
最終ジャッジ日時 2023-09-11 09:41:11
合計ジャッジ時間 9,069 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,384 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 2 ms
4,376 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 AC 1 ms
4,380 KB
testcase_12 AC 1 ms
4,380 KB
testcase_13 AC 2 ms
4,380 KB
testcase_14 AC 2 ms
4,376 KB
testcase_15 AC 2 ms
4,384 KB
testcase_16 AC 1 ms
4,380 KB
testcase_17 AC 15 ms
9,020 KB
testcase_18 AC 25 ms
10,280 KB
testcase_19 AC 41 ms
14,288 KB
testcase_20 AC 39 ms
14,152 KB
testcase_21 AC 16 ms
9,592 KB
testcase_22 AC 22 ms
10,164 KB
testcase_23 AC 41 ms
14,444 KB
testcase_24 AC 9 ms
5,760 KB
testcase_25 AC 40 ms
14,156 KB
testcase_26 AC 41 ms
14,368 KB
testcase_27 AC 16 ms
9,192 KB
testcase_28 AC 33 ms
13,320 KB
testcase_29 AC 42 ms
14,496 KB
testcase_30 AC 42 ms
14,316 KB
testcase_31 AC 26 ms
10,544 KB
testcase_32 AC 43 ms
14,600 KB
testcase_33 AC 42 ms
14,552 KB
testcase_34 AC 43 ms
14,532 KB
testcase_35 AC 42 ms
14,592 KB
testcase_36 AC 43 ms
14,672 KB
testcase_37 AC 43 ms
14,592 KB
testcase_38 AC 43 ms
14,592 KB
testcase_39 AC 22 ms
10,160 KB
testcase_40 AC 31 ms
14,520 KB
testcase_41 AC 20 ms
10,144 KB
testcase_42 AC 32 ms
14,528 KB
testcase_43 AC 48 ms
14,736 KB
testcase_44 AC 48 ms
14,600 KB
testcase_45 AC 48 ms
14,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll@n,@m,a[m],b[],w[],z=0;
rd((a,b,w)(m));
sortA(m,w,a,b);
unionFind u('m',n+1,1);
rep(i,m){
	if(u(a[i])!=u(b[i])){
		z+=w[i]*u.size(a[i])*u.size(b[i]);
		u(a[i],b[i]);
	}
}
wt(z);
0