結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
7,372 KB
testcase_01 AC 179 ms
25,716 KB
testcase_02 AC 24 ms
23,584 KB
testcase_03 AC 16 ms
9,944 KB
testcase_04 AC 47 ms
16,636 KB
testcase_05 AC 118 ms
23,380 KB
testcase_06 AC 53 ms
14,324 KB
testcase_07 AC 165 ms
25,800 KB
testcase_08 AC 162 ms
25,704 KB
testcase_09 AC 169 ms
25,800 KB
testcase_10 AC 167 ms
25,776 KB
testcase_11 AC 169 ms
25,676 KB
testcase_12 AC 176 ms
25,676 KB
testcase_13 AC 177 ms
25,708 KB
testcase_14 AC 180 ms
25,716 KB
testcase_15 AC 23 ms
12,128 KB
testcase_16 AC 39 ms
19,136 KB
testcase_17 AC 30 ms
14,704 KB
testcase_18 AC 27 ms
14,392 KB
testcase_19 AC 37 ms
18,928 KB
testcase_20 AC 203 ms
25,668 KB
testcase_21 AC 32 ms
16,656 KB
testcase_22 AC 181 ms
25,672 KB
testcase_23 AC 171 ms
25,884 KB
testcase_24 AC 164 ms
25,796 KB
testcase_25 AC 174 ms
25,884 KB
testcase_26 AC 186 ms
25,664 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]-c[h.lca(s,t)]*2);}
0