QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#628191#8422. Tree Average Weightucup-team4645#WA 30ms3688kbC++231.1kb2024-10-10 19:03:172024-10-10 19:03:17

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3624kb

input:

5
1 -1 -1 -1 -1

output:

67

result:

ok 1 number(s): "67"

Test #2:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

5
-1 -1 -1 -1 1

output:

52

result:

ok 1 number(s): "52"

Test #3:

score: 0
Accepted
time: 0ms
memory: 3684kb

input:

4
1 1 1 3

output:

42

result:

ok 1 number(s): "42"

Test #4:

score: 0
Accepted
time: 0ms
memory: 3628kb

input:

4
1 1 2 2

output:

38

result:

ok 1 number(s): "38"

Test #5:

score: 0
Accepted
time: 0ms
memory: 3688kb

input:

2
-1 -1

output:

3

result:

ok 1 number(s): "3"

Test #6:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

3
-1 -1 -1

output:

12

result:

ok 1 number(s): "12"

Test #7:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

4
-1 -1 -1 -1

output:

30

result:

ok 1 number(s): "30"

Test #8:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

4
1 -1 -1 -1

output:

34

result:

ok 1 number(s): "34"

Test #9:

score: 0
Accepted
time: 0ms
memory: 3560kb

input:

4
2 -1 -1 -1

output:

26

result:

ok 1 number(s): "26"

Test #10:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

4
3 -1 -1 -1

output:

18

result:

ok 1 number(s): "18"

Test #11:

score: 0
Accepted
time: 0ms
memory: 3560kb

input:

8
-1 -1 -1 -1 -1 -1 -1 -1

output:

252

result:

ok 1 number(s): "252"

Test #12:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

9
-1 -1 -1 -1 -1 -1 -1 -1 -1

output:

360

result:

ok 1 number(s): "360"

Test #13:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

10
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1

output:

495

result:

ok 1 number(s): "495"

Test #14:

score: 0
Accepted
time: 0ms
memory: 3508kb

input:

2
1 1

output:

3

result:

ok 1 number(s): "3"

Test #15:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

2
-1 1

output:

3

result:

ok 1 number(s): "3"

Test #16:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

2
-1 -1

output:

3

result:

ok 1 number(s): "3"

Test #17:

score: 0
Accepted
time: 0ms
memory: 3560kb

input:

100
3 1 1 4 2 3 1 2 3 3 4 2 1 2 1 1 2 1 1 2 2 1 1 2 3 1 2 1 1 2 1 1 1 4 2 2 1 1 1 2 2 3 1 2 2 1 1 2 2 4 1 1 1 1 3 2 6 2 1 3 1 1 1 3 2 2 3 2 1 1 2 2 2 2 2 1 3 2 1 3 2 2 1 2 2 5 4 4 2 2 1 1 2 1 4 3 3 3 2 2

output:

543550

result:

ok 1 number(s): "543550"

Test #18:

score: 0
Accepted
time: 0ms
memory: 3628kb

input:

111
3 1 2 3 2 1 2 -1 1 3 -1 1 3 2 4 1 -1 3 1 1 2 -1 3 2 4 3 4 2 3 2 1 2 2 3 2 1 4 2 3 4 1 1 1 -1 2 1 1 1 2 1 3 1 3 2 1 3 2 1 1 1 3 2 -1 1 -1 2 2 1 -1 1 3 1 1 2 1 2 3 1 -1 2 2 2 -1 -1 2 -1 2 3 2 3 1 1 3 4 1 2 2 3 2 -1 2 2 1 3 1 2 1 4 1 4 1

output:

664813

result:

ok 1 number(s): "664813"

Test #19:

score: 0
Accepted
time: 0ms
memory: 3560kb

input:

111
-1 4 1 3 2 1 2 -1 3 -1 -1 -1 1 -1 -1 -1 -1 -1 1 2 2 3 -1 -1 3 -1 3 -1 1 1 1 3 -1 -1 -1 1 1 -1 -1 -1 2 2 2 1 3 -1 -1 2 1 -1 2 -1 -1 2 1 -1 -1 1 1 -1 2 2 1 -1 -1 -1 3 -1 -1 2 1 -1 -1 1 -1 4 2 -1 -1 -1 2 1 -1 1 2 3 -1 -1 -1 2 1 2 2 -1 -1 2 2 -1 -1 1 -1 -1 -1 -1 1 3 -1 1 2 3 1

output:

665295

result:

ok 1 number(s): "665295"

Test #20:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

113
1 -1 1 -1 2 -1 -1 -1 2 -1 -1 -1 -1 -1 -1 -1 2 1 -1 -1 2 -1 -1 -1 -1 -1 -1 -1 -1 3 -1 -1 -1 -1 -1 -1 -1 -1 3 -1 -1 -1 2 -1 -1 -1 -1 2 -1 -1 -1 3 -1 2 -1 -1 -1 -1 -1 -1 -1 2 -1 -1 -1 -1 1 1 2 -1 -1 -1 -1 2 1 -1 -1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 -1 2 -1 -1 -1 2 -1 -1 2 -1 -1 -1 -1 -1 -1 -1 -...

output:

719191

result:

ok 1 number(s): "719191"

Test #21:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

120
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1...

output:

863940

result:

ok 1 number(s): "863940"

Test #22:

score: 0
Accepted
time: 27ms
memory: 3632kb

input:

1000000
1 2 2 3 2 1 3 2 1 3 4 1 1 2 3 1 2 2 4 1 4 3 1 2 1 2 2 4 1 2 3 2 2 2 1 2 3 1 2 2 2 3 2 2 1 1 2 1 3 2 2 2 1 1 1 2 3 2 3 1 2 1 2 2 1 2 2 4 3 1 1 1 2 2 3 4 2 1 2 2 1 1 2 1 2 3 2 2 4 1 2 4 1 3 3 4 2 2 1 2 1 3 3 2 2 2 2 2 2 2 2 5 2 4 2 2 2 1 3 2 3 3 1 1 5 3 1 1 1 1 2 2 2 1 2 1 2 1 2 1 1 4 4 1 2 2 ...

output:

499668772865500000

result:

ok 1 number(s): "499668772865500000"

Test #23:

score: -100
Wrong Answer
time: 30ms
memory: 3656kb

input:

1000000
-1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -...

output:

1001881602603

result:

wrong answer 1st numbers differ - expected: '499999999999500000', found: '1001881602603'