結果

問題 No.1094 木登り / Climbing tree
ユーザー tailstails
提出日時 2020-07-03 16:41:44
言語 cLay
(20240104-1)
結果
AC  
実行時間 151 ms / 2,000 ms
コード長 178 bytes
コンパイル時間 3,715 ms
コンパイル使用メモリ 180,940 KB
実行使用メモリ 23,336 KB
最終ジャッジ日時 2024-04-25 19:17:58
合計ジャッジ時間 9,213 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
7,624 KB
testcase_01 AC 138 ms
23,000 KB
testcase_02 AC 24 ms
21,540 KB
testcase_03 AC 14 ms
8,528 KB
testcase_04 AC 42 ms
15,084 KB
testcase_05 AC 94 ms
22,720 KB
testcase_06 AC 46 ms
10,752 KB
testcase_07 AC 140 ms
23,040 KB
testcase_08 AC 138 ms
22,912 KB
testcase_09 AC 141 ms
22,912 KB
testcase_10 AC 142 ms
23,008 KB
testcase_11 AC 147 ms
23,336 KB
testcase_12 AC 151 ms
22,912 KB
testcase_13 AC 145 ms
22,912 KB
testcase_14 AC 146 ms
22,784 KB
testcase_15 AC 20 ms
8,960 KB
testcase_16 AC 37 ms
17,536 KB
testcase_17 AC 27 ms
12,544 KB
testcase_18 AC 23 ms
10,752 KB
testcase_19 AC 33 ms
17,020 KB
testcase_20 AC 148 ms
22,912 KB
testcase_21 AC 28 ms
13,312 KB
testcase_22 AC 137 ms
22,912 KB
testcase_23 AC 132 ms
22,624 KB
testcase_24 AC 140 ms
22,656 KB
testcase_25 AC 140 ms
22,656 KB
testcase_26 AC 147 ms
22,620 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