結果

問題 No.1637 Easy Tree Query
ユーザー tailstails
提出日時 2021-08-06 21:29:23
言語 cLay
(20231016-1)
結果
AC  
実行時間 19 ms / 2,000 ms
コード長 132 bytes
コンパイル時間 2,282 ms
コンパイル使用メモリ 162,552 KB
実行使用メモリ 11,760 KB
最終ジャッジ日時 2023-09-19 02:34:00
合計ジャッジ時間 8,350 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,412 KB
testcase_01 AC 2 ms
5,480 KB
testcase_02 AC 16 ms
11,676 KB
testcase_03 AC 2 ms
5,404 KB
testcase_04 AC 8 ms
8,824 KB
testcase_05 AC 13 ms
8,892 KB
testcase_06 AC 10 ms
8,924 KB
testcase_07 AC 6 ms
5,940 KB
testcase_08 AC 7 ms
8,472 KB
testcase_09 AC 14 ms
9,356 KB
testcase_10 AC 7 ms
6,460 KB
testcase_11 AC 17 ms
9,428 KB
testcase_12 AC 16 ms
9,308 KB
testcase_13 AC 5 ms
8,088 KB
testcase_14 AC 12 ms
9,416 KB
testcase_15 AC 17 ms
11,540 KB
testcase_16 AC 15 ms
11,640 KB
testcase_17 AC 7 ms
8,264 KB
testcase_18 AC 13 ms
8,900 KB
testcase_19 AC 13 ms
8,996 KB
testcase_20 AC 16 ms
9,340 KB
testcase_21 AC 11 ms
9,096 KB
testcase_22 AC 19 ms
11,716 KB
testcase_23 AC 6 ms
8,424 KB
testcase_24 AC 10 ms
9,032 KB
testcase_25 AC 13 ms
8,908 KB
testcase_26 AC 16 ms
9,268 KB
testcase_27 AC 19 ms
11,760 KB
testcase_28 AC 11 ms
8,984 KB
testcase_29 AC 13 ms
9,152 KB
testcase_30 AC 9 ms
8,900 KB
testcase_31 AC 9 ms
6,576 KB
testcase_32 AC 9 ms
8,724 KB
testcase_33 AC 12 ms
6,696 KB
testcase_34 AC 8 ms
11,736 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

int a[2d5],b[],s[];{graph g;ll@n,@q,r=0;rd((a--,b--)(n-1));g.setEdge(n,n-1,a,b);g.SubTreeSize(0,s);rep(q){ll@p,@x;wt(r+=s[p-1]*x);}}
0