結果

問題 No.1094 木登り / Climbing tree
ユーザー tailstails
提出日時 2020-07-03 16:38:44
言語 cLay
(20240104-1)
結果
AC  
実行時間 142 ms / 2,000 ms
コード長 179 bytes
コンパイル時間 4,601 ms
コンパイル使用メモリ 179,748 KB
実行使用メモリ 25,892 KB
最終ジャッジ日時 2024-04-25 19:17:48
合計ジャッジ時間 10,443 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
7,632 KB
testcase_01 AC 116 ms
23,640 KB
testcase_02 AC 21 ms
21,784 KB
testcase_03 AC 13 ms
8,652 KB
testcase_04 AC 40 ms
15,136 KB
testcase_05 AC 84 ms
21,616 KB
testcase_06 AC 46 ms
12,868 KB
testcase_07 AC 121 ms
25,892 KB
testcase_08 AC 121 ms
23,756 KB
testcase_09 AC 120 ms
23,704 KB
testcase_10 AC 120 ms
23,772 KB
testcase_11 AC 130 ms
23,340 KB
testcase_12 AC 129 ms
23,636 KB
testcase_13 AC 128 ms
23,764 KB
testcase_14 AC 127 ms
23,764 KB
testcase_15 AC 20 ms
12,708 KB
testcase_16 AC 34 ms
19,312 KB
testcase_17 AC 27 ms
15,060 KB
testcase_18 AC 23 ms
12,880 KB
testcase_19 AC 31 ms
17,340 KB
testcase_20 AC 142 ms
23,764 KB
testcase_21 AC 28 ms
16,772 KB
testcase_22 AC 138 ms
23,452 KB
testcase_23 AC 136 ms
25,772 KB
testcase_24 AC 134 ms
25,772 KB
testcase_25 AC 134 ms
23,604 KB
testcase_26 AC 133 ms
23,572 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