QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#152425#6217. 独特的树叶legenc6y100 ✓75ms13380kbC++141.5kb2023-08-28 08:20:202023-08-28 08:20:20

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 10
Accepted
time: 0ms
memory: 7068kb

input:

7
6 5
5 7
2 7
5 3
6 4
2 1
1 7
6 1
6 8
2 1
7 3
5 8
4 7

output:

3

result:

ok single line: '3'

Test #2:

score: 10
Accepted
time: 1ms
memory: 5972kb

input:

40
30 29
30 39
29 21
21 2
21 14
14 18
29 1
2 28
7 21
26 30
38 1
21 6
20 39
26 23
14 32
22 18
3 32
25 6
30 37
15 38
26 19
11 25
23 34
13 11
25 4
8 18
35 26
18 31
24 20
10 31
24 12
9 15
40 28
8 33
17 33
3 36
1 27
20 16
5 16
3 24
3 34
17 24
29 17
27 17
13 27
24 14
26 29
8 17
3 21
38 14
30 17
34 32
21 3...

output:

18

result:

ok single line: '18'

Test #3:

score: 10
Accepted
time: 2ms
memory: 6604kb

input:

50
44 15
44 1
16 44
15 37
30 16
12 1
22 37
1 14
37 46
23 12
8 22
6 23
9 12
10 44
19 30
11 8
27 16
7 22
40 10
20 15
26 1
26 49
48 6
41 11
32 8
32 34
35 8
3 26
32 42
26 50
39 30
29 41
45 46
6 18
36 35
8 5
2 44
21 22
38 6
4 38
19 47
17 32
2 25
33 21
13 35
24 26
28 34
31 36
13 43
5 17
27 17
19 17
32 5
1...

output:

40

result:

ok single line: '40'

Test #4:

score: 10
Accepted
time: 3ms
memory: 6952kb

input:

2000
1953 509
162 1953
465 509
389 1953
562 389
1277 162
1953 1096
1805 1953
1763 162
636 1805
832 1953
832 324
1915 1953
1805 918
1763 1815
1953 1583
1441 389
389 266
276 1805
509 1982
562 1304
1815 1219
961 276
1769 961
204 1769
1982 1825
1769 803
1662 1583
324 890
1974 465
46 890
1291 1825
1583 1...

output:

368

result:

ok single line: '368'

Test #5:

score: 10
Accepted
time: 1ms
memory: 7152kb

input:

2000
544 1892
1583 544
281 1892
544 1384
226 1892
1153 281
226 146
146 97
912 97
1892 761
807 1153
1405 97
761 521
761 1673
1949 544
1405 1624
226 1980
521 148
765 97
765 1492
838 1384
1659 1892
282 765
683 148
1196 544
97 1915
1980 191
1204 1583
183 148
761 1305
1949 1113
1624 801
835 1196
898 1113...

output:

643

result:

ok single line: '643'

Test #6:

score: 10
Accepted
time: 3ms
memory: 7236kb

input:

2000
753 1294
1283 753
753 310
310 1466
1466 265
261 265
1820 261
1294 24
261 695
1466 422
1605 422
261 1108
753 47
422 648
47 967
242 24
1466 1677
779 1677
335 1466
153 242
1108 178
1131 753
1131 1776
779 1828
135 648
1189 335
1817 135
1776 521
1549 1283
129 1549
397 967
1714 1189
310 1405
700 1131...

output:

1953

result:

ok single line: '1953'

Test #7:

score: 10
Accepted
time: 33ms
memory: 10128kb

input:

50000
15311 36675
21417 15311
36675 48002
15164 15311
21417 41905
48860 15164
21417 34584
36675 13961
43517 21417
12528 15311
48002 26206
44769 36675
31263 26206
15311 20524
41905 30594
31263 48138
25336 34584
5208 15164
20524 23493
30594 25541
25336 16599
37922 34584
30488 5208
35234 15164
48002 42...

output:

18502

result:

ok single line: '18502'

Test #8:

score: 10
Accepted
time: 75ms
memory: 13380kb

input:

100000
77965 29780
77965 76681
77965 77975
4699 77965
77965 39762
72494 77965
77965 71809
77965 25543
77965 9191
30797 77965
91089 77965
77965 41436
77965 77158
37276 77965
77965 37545
66611 77965
77965 88767
86264 77965
77965 90075
77965 57203
77965 8932
8997 77965
95954 77965
77965 30990
77965 760...

output:

1351

result:

ok single line: '1351'

Test #9:

score: 10
Accepted
time: 68ms
memory: 11792kb

input:

100000
9722 51145
9722 60945
88389 9722
99478 9722
78397 9722
9722 83322
9722 99127
84811 9722
68327 9722
92409 9722
9722 52874
9722 97206
9722 78407
80366 9722
98713 9722
87990 9722
9722 89440
9722 66843
9722 96998
97836 9722
62006 9722
9722 98055
9722 79389
9722 69582
24777 9722
9722 55448
9722 32...

output:

78264

result:

ok single line: '78264'

Test #10:

score: 10
Accepted
time: 62ms
memory: 11676kb

input:

100000
99483 65398
82960 99483
99483 85336
99483 97567
27860 99483
38295 99483
99483 68171
99821 99483
97001 99483
99483 94829
73251 99483
70622 99483
99483 49749
78588 99483
99483 31651
74705 99483
75788 99483
92707 99483
99483 85879
82683 99483
52019 99483
86457 99483
99483 79307
99483 90963
85065...

output:

26028

result:

ok single line: '26028'