QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#307591#7997. 树 V 图Little09TL 1306ms75044kbC++142.3kb2024-01-18 20:50:022024-01-18 20:50:02

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 15ms
memory: 39264kb

input:

10
15 2
10 5
3 5
12 5
10 9
11 7
3 8
2 4
7 1
15 14
8 13
15 6
2 1
4 8
11 15
1 1 1 1 2 1 1 1 2 2 1 2 1 1 1
15 3
8 11
12 8
1 3
13 15
5 9
10 13
6 12
14 4
4 9
15 5
11 10
2 14
7 2
6 3
3 2 3 2 2 3 2 1 2 1 1 3 1 2 1
15 5
1 7
5 2
11 9
6 8
13 3
14 12
3 1
8 9
5 10
10 11
5 1
12 13
10 15
11 4
3 3 3 2 3 2 1 2 2 2 ...

output:

11
15
8
9
5
2
1
0
15
18

result:

ok 10 numbers

Test #2:

score: 0
Accepted
time: 17ms
memory: 39280kb

input:

10
15 2
7 10
10 3
11 4
9 7
4 15
14 8
7 1
8 15
13 4
2 1
15 9
11 6
2 12
5 6
2 2 2 1 1 1 2 1 2 2 1 2 1 1 1
15 3
4 10
12 3
7 3
9 1
6 7
9 11
11 7
10 8
13 15
14 2
14 7
5 15
12 13
11 10
1 2 3 3 3 3 3 3 1 3 3 3 3 2 3
15 5
12 9
6 8
13 2
6 10
2 3
14 15
10 5
4 15
14 13
5 7
11 10
14 12
1 5
13 8
2 4 1 3 2 2 5 3 ...

output:

21
4
5
2
13
17
6
0
0
0

result:

ok 10 numbers

Test #3:

score: 0
Accepted
time: 1306ms
memory: 75004kb

input:

10
3000 2
2052 2631
688 2422
2401 352
654 1669
1566 2157
1187 334
179 178
948 1821
1084 99
878 793
410 336
2218 865
2558 236
2808 430
799 1238
1468 226
312 268
1860 991
2946 96
2540 241
2242 1103
299 1527
788 2026
1885 2104
229 1627
2461 2649
498 2642
1354 98
113 980
947 2790
1281 2232
2682 713
1841...

output:

2420
21248
731916691
864589674
3936
9543168
561554568
0
0
0

result:

ok 10 numbers

Test #4:

score: 0
Accepted
time: 1297ms
memory: 75044kb

input:

10
3000 2
1962 622
2353 451
2284 659
848 1392
2032 111
2647 1540
706 1072
2158 461
887 1075
178 481
2350 2658
2309 96
753 1572
1703 2171
365 1286
2540 2487
2687 194
1585 1241
2147 1247
1720 701
507 2127
2207 812
1568 2621
725 1342
1385 245
2819 2731
2357 450
467 672
2549 1243
1517 702
1808 2415
76 8...

output:

2252
21504
217815511
420767421
3008
36864
187077271
0
0
0

result:

ok 10 numbers

Test #5:

score: -100
Time Limit Exceeded

input:

10
3000 2
774 1607
49 867
1384 2838
247 454
1369 2077
2145 1433
1057 1845
1940 2195
1869 967
2830 2829
739 2783
1474 1047
1688 2054
2958 1044
1041 135
768 1621
667 257
1309 1336
2456 2605
2402 1425
1572 1275
2327 1438
1111 1265
607 2583
2557 2788
2694 1378
2332 1848
107 1749
1804 236
2585 309
2761 4...

output:


result: