結果

問題 No.1098 LCAs
ユーザー tailstails
提出日時 2020-07-08 10:32:20
言語 cLay
(20240104-1)
結果
AC  
実行時間 50 ms / 2,000 ms
コード長 176 bytes
コンパイル時間 2,061 ms
コンパイル使用メモリ 162,120 KB
実行使用メモリ 14,736 KB
最終ジャッジ日時 2023-09-19 00:44:31
合計ジャッジ時間 6,827 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,380 KB
testcase_01 AC 2 ms
5,392 KB
testcase_02 AC 2 ms
5,336 KB
testcase_03 AC 2 ms
5,380 KB
testcase_04 AC 2 ms
5,380 KB
testcase_05 AC 2 ms
5,404 KB
testcase_06 AC 2 ms
5,364 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 2 ms
5,448 KB
testcase_09 AC 2 ms
5,428 KB
testcase_10 AC 2 ms
5,524 KB
testcase_11 AC 2 ms
5,348 KB
testcase_12 AC 2 ms
5,420 KB
testcase_13 AC 3 ms
5,396 KB
testcase_14 AC 2 ms
5,624 KB
testcase_15 AC 2 ms
5,604 KB
testcase_16 AC 2 ms
5,364 KB
testcase_17 AC 2 ms
5,400 KB
testcase_18 AC 36 ms
14,736 KB
testcase_19 AC 35 ms
14,524 KB
testcase_20 AC 35 ms
14,608 KB
testcase_21 AC 36 ms
14,552 KB
testcase_22 AC 36 ms
14,580 KB
testcase_23 AC 25 ms
14,620 KB
testcase_24 AC 24 ms
14,452 KB
testcase_25 AC 23 ms
14,620 KB
testcase_26 AC 24 ms
14,464 KB
testcase_27 AC 24 ms
14,556 KB
testcase_28 AC 48 ms
14,628 KB
testcase_29 AC 50 ms
14,648 KB
testcase_30 AC 50 ms
14,540 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

graph g;int n,a[2d5],b[2d5];{rd(n,(a--,b--)(n-1));g.setEdge(n,n-1,a,b);g.SubTreeSize(0,b);rep(i,n){ll r=(ll)b[i]**2;rep[g.edge[i]](j,g.es[i])r-=b[j]<b[i]?(ll)b[j]**2:0;wt(r);}}
0