結果

問題 No.1094 木登り / Climbing tree
ユーザー tailstails
提出日時 2020-07-03 16:41:44
言語 cLay
(20231016-1)
結果
AC  
実行時間 192 ms / 2,000 ms
コード長 178 bytes
コンパイル時間 4,619 ms
コンパイル使用メモリ 177,984 KB
実行使用メモリ 25,864 KB
最終ジャッジ日時 2023-08-08 01:18:01
合計ジャッジ時間 9,863 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
7,408 KB
testcase_01 AC 190 ms
25,656 KB
testcase_02 AC 24 ms
23,712 KB
testcase_03 AC 15 ms
9,796 KB
testcase_04 AC 47 ms
16,732 KB
testcase_05 AC 119 ms
23,512 KB
testcase_06 AC 52 ms
14,344 KB
testcase_07 AC 184 ms
25,716 KB
testcase_08 AC 170 ms
25,668 KB
testcase_09 AC 175 ms
25,652 KB
testcase_10 AC 168 ms
25,640 KB
testcase_11 AC 188 ms
25,784 KB
testcase_12 AC 187 ms
25,864 KB
testcase_13 AC 192 ms
25,784 KB
testcase_14 AC 189 ms
25,852 KB
testcase_15 AC 23 ms
12,136 KB
testcase_16 AC 40 ms
19,132 KB
testcase_17 AC 30 ms
14,576 KB
testcase_18 AC 27 ms
14,356 KB
testcase_19 AC 37 ms
18,956 KB
testcase_20 AC 185 ms
25,628 KB
testcase_21 AC 32 ms
16,648 KB
testcase_22 AC 179 ms
25,716 KB
testcase_23 AC 168 ms
25,780 KB
testcase_24 AC 168 ms
25,652 KB
testcase_25 AC 177 ms
25,672 KB
testcase_26 AC 178 ms
25,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

wgraph<int>g;HLD h;int n,s,t,a[2d5],b[2d5],c[3d5];{rd(n,(a--,b--,c)(n-1));g.setEdge(n,n-1,a,b,c);g.getDist(0,c);h.init(g.g);rd(n);rep(n)rd(s--,t--),wt(c[s]+c[t]-2c[h.lca(s,t)]);}
0