結果

問題 No.1637 Easy Tree Query
ユーザー tailstails
提出日時 2021-08-12 09:20:55
言語 cLay
(20231016-1)
結果
AC  
実行時間 20 ms / 2,000 ms
コード長 128 bytes
コンパイル時間 3,379 ms
コンパイル使用メモリ 162,556 KB
実行使用メモリ 9,848 KB
最終ジャッジ日時 2023-09-19 02:34:09
合計ジャッジ時間 6,784 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,432 KB
testcase_01 AC 2 ms
5,392 KB
testcase_02 AC 16 ms
9,740 KB
testcase_03 AC 2 ms
5,440 KB
testcase_04 AC 9 ms
8,640 KB
testcase_05 AC 14 ms
7,204 KB
testcase_06 AC 10 ms
7,096 KB
testcase_07 AC 6 ms
6,596 KB
testcase_08 AC 7 ms
6,352 KB
testcase_09 AC 14 ms
9,676 KB
testcase_10 AC 8 ms
6,832 KB
testcase_11 AC 17 ms
9,612 KB
testcase_12 AC 16 ms
9,444 KB
testcase_13 AC 5 ms
6,040 KB
testcase_14 AC 12 ms
9,320 KB
testcase_15 AC 17 ms
9,612 KB
testcase_16 AC 15 ms
9,848 KB
testcase_17 AC 7 ms
6,428 KB
testcase_18 AC 13 ms
7,268 KB
testcase_19 AC 13 ms
7,280 KB
testcase_20 AC 17 ms
9,428 KB
testcase_21 AC 11 ms
9,340 KB
testcase_22 AC 18 ms
9,708 KB
testcase_23 AC 7 ms
6,440 KB
testcase_24 AC 10 ms
9,164 KB
testcase_25 AC 13 ms
7,132 KB
testcase_26 AC 17 ms
9,460 KB
testcase_27 AC 20 ms
9,652 KB
testcase_28 AC 11 ms
7,116 KB
testcase_29 AC 14 ms
9,396 KB
testcase_30 AC 9 ms
8,664 KB
testcase_31 AC 10 ms
6,932 KB
testcase_32 AC 9 ms
7,020 KB
testcase_33 AC 12 ms
7,020 KB
testcase_34 AC 8 ms
9,224 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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