UOJ Logo

NOI.AC

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#96432#1413. 树的统计zsq2591001146ms8848kbC++3.1kb2020-02-19 22:52:012020-02-19 22:52:11

answer


详细

小提示:点击横条可展开更详细的信息

Test #1:

score: 10
Accepted
time: 15ms
memory: 6484kb

input:

10000
1 2
2 3
1 4
1 5
4 6
6 7
4 8
6 9
4 10
8 11
6 12
7 13
5 14
5 15
10 16
16 17
14 18
13 19
17 20
7 ...

output:

73679
-68864
-29647
28136
51082
20031
62115
-758
24300
23759
26132
25954
-86936
28249
-56479
28817
2...

result:

ok 5935 lines

Test #2:

score: 10
Accepted
time: 185ms
memory: 8224kb

input:

30000
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 ...

output:

-946551
29847
-1156471
-430688
29997
29997
29996
29990
-810444
29465
29996
29990
447441
29997
-76957...

result:

ok 159801 lines

Test #3:

score: 10
Accepted
time: 9ms
memory: 6484kb

input:

10000
798 757
7682 291
9461 5707
5684 6222
3601 7344
7343 7917
7647 981
4062 8293
16 93
6090 1588
85...

output:

26613
29346
28217
29263
29340
26059
29295
29723
29340
29263
25492
269644
28989
25492
29295
29263
254...

result:

ok 5990 lines

Test #4:

score: 10
Accepted
time: 12ms
memory: 6796kb

input:

10000
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 ...

output:

65139
29941
29935
3931
29859
212321
-266086
-740447
29999
29885
29999
-151021
29941
29741
29935
-900...

result:

ok 5994 lines

Test #5:

score: 10
Accepted
time: 135ms
memory: 8848kb

input:

30000
30000 29999
29999 29998
29998 29997
29997 29996
29996 29995
29995 29994
29994 29993
29993 2999...

output:

29996
29999
29999
3270673
29999
29988
29999
29999
29958
29978
-96273
29991
29948
29999
29999
29991
2...

result:

ok 119616 lines

Test #6:

score: 10
Accepted
time: 138ms
memory: 8848kb

input:

30000
30000 29999
29999 29998
29998 29997
29997 29996
29996 29995
29995 29994
29994 29993
29993 2999...

output:

29988
29988
29990
2718698
2159328
29964
-1234119
29996
2881760
29988
2238813
-548793
29996
2221130
2...

result:

ok 120298 lines

Test #7:

score: 10
Accepted
time: 148ms
memory: 7596kb

input:

30000
1 2
2 3
4 5
5 6
1 4
7 8
8 9
4 7
10 11
11 12
7 10
13 14
14 15
10 13
16 17
17 18
13 16
19 20
20 ...

output:

29994
29990
29994
29994
29994
29994
29946
29994
29946
29994
29994
29946
29994
29994
29989
29994
2999...

result:

ok 157626 lines

Test #8:

score: 10
Accepted
time: 150ms
memory: 7596kb

input:

30000
1 2
2 3
4 5
5 6
1 4
7 8
8 9
4 7
10 11
11 12
7 10
13 14
14 15
10 13
16 17
17 18
13 16
19 20
20 ...

output:

29926
29973
29997
1246092
29997
29979
29997
29997
29997
29979
29997
1139507
29997
29997
1326310
-637...

result:

ok 139792 lines

Test #9:

score: 10
Accepted
time: 164ms
memory: 7436kb

input:

29997
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 ...

output:

29973
29983
29983
-1391195
29970
29973
29983
-207669
-1095970
29983
29983
29973
29951
-151580
29983
...

result:

ok 120297 lines

Test #10:

score: 10
Accepted
time: 190ms
memory: 7904kb

input:

30000
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
10 11
11 12
12 13
13 14
14 15
15 16
16 17
17 18
18 19
19 ...

output:

29999
29985
29999
29996
29999
29996
-89160
29934
29996
29894
29996
2491172
29999
29996
-416032
96618...

result:

ok 159849 lines