QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#274507#7603. Mex on DAGMaMengQiTL 1690ms20112kbC++171.8kb2023-12-03 16:28:522023-12-03 16:28:52

详细

Test #1:

score: 100
Accepted
time: 1ms
memory: 4092kb

input:

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

output:

4

result:

ok 1 number(s): "4"

Test #2:

score: 0
Accepted
time: 1ms
memory: 4136kb

input:

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

output:

3

result:

ok 1 number(s): "3"

Test #3:

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

input:

2
1 2
1 2
1 2
1 2

output:

1

result:

ok 1 number(s): "1"

Test #4:

score: 0
Accepted
time: 1ms
memory: 6028kb

input:

3
1 2
1 2
2 3
1 3
2 3
1 3

output:

2

result:

ok 1 number(s): "2"

Test #5:

score: 0
Accepted
time: 1ms
memory: 4048kb

input:

4
1 2
1 3
1 2
2 3
2 4
3 4
1 2
1 2

output:

3

result:

ok 1 number(s): "3"

Test #6:

score: 0
Accepted
time: 1ms
memory: 4084kb

input:

5
3 4
3 4
1 3
1 4
1 5
2 3
4 5
2 3
4 5
4 5

output:

2

result:

ok 1 number(s): "2"

Test #7:

score: 0
Accepted
time: 1ms
memory: 4088kb

input:

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

output:

2

result:

ok 1 number(s): "2"

Test #8:

score: 0
Accepted
time: 1ms
memory: 5884kb

input:

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

output:

1

result:

ok 1 number(s): "1"

Test #9:

score: 0
Accepted
time: 1ms
memory: 4032kb

input:

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

output:

3

result:

ok 1 number(s): "3"

Test #10:

score: 0
Accepted
time: 1ms
memory: 4088kb

input:

10
8 10
9 10
9 10
8 9
9 10
8 9
8 9
4 9
6 7
2 3
8 10
7 9
2 10
3 6
2 10
1 10
7 9
9 10
3 7
4 8

output:

2

result:

ok 1 number(s): "2"

Test #11:

score: 0
Accepted
time: 1ms
memory: 6184kb

input:

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

output:

3

result:

ok 1 number(s): "3"

Test #12:

score: 0
Accepted
time: 1ms
memory: 4112kb

input:

30
16 22
23 29
25 27
15 20
12 28
6 24
9 26
11 18
18 22
12 20
4 11
13 17
22 26
29 30
25 30
7 14
22 28
15 24
23 30
20 26
8 29
15 28
16 30
29 30
8 23
8 30
2 4
1 24
28 29
23 26
12 26
3 5
6 17
22 26
5 16
12 21
1 27
25 29
2 28
11 16
24 28
20 29
29 30
14 29
20 24
16 26
9 10
20 21
5 22
1 29
3 8
3 15
8 9
19 ...

output:

1

result:

ok 1 number(s): "1"

Test #13:

score: 0
Accepted
time: 1ms
memory: 6128kb

input:

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

output:

3

result:

ok 1 number(s): "3"

Test #14:

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

input:

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

output:

1

result:

ok 1 number(s): "1"

Test #15:

score: 0
Accepted
time: 1ms
memory: 6308kb

input:

60
57 60
45 54
45 55
27 46
7 41
42 50
11 12
9 26
6 23
38 48
54 58
32 44
39 56
48 54
30 58
23 46
46 47
56 58
19 33
28 58
37 48
25 60
45 52
35 37
34 54
44 53
7 30
5 51
33 43
7 53
34 49
36 43
31 41
1 53
34 51
44 48
31 38
33 56
40 60
2 56
45 55
12 14
38 44
1 13
50 57
53 58
34 38
12 53
17 38
42 54
11 54
...

output:

2

result:

ok 1 number(s): "2"

Test #16:

score: 0
Accepted
time: 1ms
memory: 4288kb

input:

70
23 52
40 44
48 50
21 29
59 64
6 9
26 37
16 69
9 33
11 27
2 28
48 56
42 49
46 65
1 11
52 55
63 64
5 23
2 51
38 59
33 34
36 50
43 54
23 66
53 54
58 70
58 66
59 69
62 67
55 62
24 47
65 69
66 69
31 59
40 47
33 67
36 63
59 70
7 69
50 53
41 45
50 57
1 69
23 38
42 49
12 34
38 39
58 61
17 26
68 70
14 60
...

output:

1

result:

ok 1 number(s): "1"

Test #17:

score: 0
Accepted
time: 1ms
memory: 4388kb

input:

80
35 58
46 60
11 21
66 70
73 74
24 47
60 77
22 28
23 72
17 38
33 48
21 52
64 77
63 76
72 77
59 60
71 76
10 28
12 17
27 66
24 40
16 60
38 77
23 68
10 59
64 78
30 71
75 76
62 65
33 40
62 78
12 61
24 35
66 78
22 30
21 53
9 46
77 79
77 80
5 9
47 61
11 22
57 63
11 70
3 43
26 59
73 74
62 67
47 63
62 70
5...

output:

1

result:

ok 1 number(s): "1"

Test #18:

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

input:

90
48 64
85 88
10 13
76 77
74 78
89 90
33 75
45 71
79 90
39 71
65 71
85 89
13 40
16 38
64 69
40 84
25 73
67 90
10 18
33 62
9 16
88 90
1 62
37 72
64 80
24 39
60 75
76 81
31 64
87 89
16 59
28 31
88 90
36 52
54 61
87 88
54 73
1 90
20 39
31 82
28 58
39 43
25 60
34 59
12 52
73 84
87 89
27 71
13 85
43 57
...

output:

3

result:

ok 1 number(s): "3"

Test #19:

score: 0
Accepted
time: 2ms
memory: 6068kb

input:

100
71 85
64 73
13 55
75 93
22 28
4 92
12 24
34 46
28 77
87 96
71 97
84 85
46 78
54 93
14 98
46 95
29 90
71 89
98 100
57 84
43 89
51 54
92 100
18 25
13 85
53 84
11 15
61 92
12 96
78 81
28 33
5 63
90 95
20 59
61 82
27 38
85 90
91 92
60 99
35 93
8 78
3 4
2 60
13 46
49 75
42 56
95 100
9 98
8 68
30 39
7...

output:

1

result:

ok 1 number(s): "1"

Test #20:

score: 0
Accepted
time: 4ms
memory: 6032kb

input:

200
163 179
37 124
104 139
16 193
53 109
106 116
196 199
115 167
107 169
90 158
46 148
90 176
188 195
53 189
142 144
170 194
48 128
37 140
2 100
101 187
152 158
75 151
145 158
107 111
133 190
62 98
196 200
95 183
19 183
170 194
42 187
104 168
159 175
28 154
8 199
11 28
176 187
85 187
40 52
125 140
9...

output:

1

result:

ok 1 number(s): "1"

Test #21:

score: 0
Accepted
time: 8ms
memory: 8368kb

input:

300
258 275
105 132
153 200
147 243
205 257
295 299
86 94
55 175
264 273
150 151
269 276
68 191
64 160
66 113
187 190
113 159
50 236
117 164
177 207
205 264
152 275
296 298
128 152
29 145
227 291
212 243
279 290
256 289
81 255
31 78
125 225
49 133
231 292
253 255
199 205
81 162
154 285
58 214
136 18...

output:

3

result:

ok 1 number(s): "3"

Test #22:

score: 0
Accepted
time: 15ms
memory: 9112kb

input:

400
109 161
338 370
332 346
167 268
323 373
171 321
365 376
5 179
317 349
227 361
365 381
252 268
282 325
124 202
21 257
199 339
62 63
200 387
390 395
34 328
252 308
2 295
250 301
266 292
140 280
377 392
154 290
108 260
268 273
99 267
119 132
3 76
232 372
148 160
322 366
379 384
192 250
124 232
170 ...

output:

2

result:

ok 1 number(s): "2"

Test #23:

score: 0
Accepted
time: 23ms
memory: 11184kb

input:

500
215 311
75 384
6 19
330 429
304 435
263 500
86 192
346 470
148 254
100 344
491 493
270 355
86 196
136 250
364 421
258 319
90 494
202 482
90 376
242 359
286 493
329 446
154 427
103 393
385 434
11 198
83 270
29 407
382 436
49 111
55 324
427 464
418 499
295 364
383 390
365 383
93 442
375 450
240 24...

output:

1

result:

ok 1 number(s): "1"

Test #24:

score: 0
Accepted
time: 26ms
memory: 11288kb

input:

600
466 494
548 569
530 584
326 395
169 423
517 593
349 409
197 505
229 323
437 528
171 269
380 422
98 578
56 270
506 559
271 441
111 246
130 496
207 367
514 561
298 390
229 600
103 153
283 332
430 507
235 344
464 476
199 358
570 581
250 531
232 441
584 597
588 598
77 537
112 522
585 594
201 350
130...

output:

1

result:

ok 1 number(s): "1"

Test #25:

score: 0
Accepted
time: 44ms
memory: 11196kb

input:

700
289 645
210 439
319 537
434 672
163 478
131 160
115 587
184 453
186 630
644 657
526 541
369 621
308 685
209 457
580 601
355 363
611 681
364 588
93 620
9 569
361 473
348 449
695 697
484 674
357 588
383 601
360 472
147 220
90 556
103 485
515 579
464 700
635 685
45 273
256 367
300 538
26 266
447 69...

output:

1

result:

ok 1 number(s): "1"

Test #26:

score: 0
Accepted
time: 66ms
memory: 11520kb

input:

800
751 776
711 721
541 561
459 540
743 763
250 317
611 650
346 477
224 336
189 370
218 334
593 608
385 416
321 354
327 611
75 790
359 652
403 786
790 799
127 709
311 491
7 112
529 581
489 677
201 527
733 751
393 566
331 334
401 484
141 374
542 599
754 765
81 459
550 777
530 582
666 755
107 334
773 ...

output:

1

result:

ok 1 number(s): "1"

Test #27:

score: 0
Accepted
time: 91ms
memory: 11460kb

input:

900
605 646
202 660
156 594
75 228
568 809
303 563
444 640
623 683
861 889
471 808
134 843
605 807
696 807
813 818
184 281
374 376
884 885
478 639
475 522
899 900
809 849
311 677
687 872
840 894
459 607
4 450
874 892
744 866
742 892
874 895
642 767
132 447
26 784
283 662
722 732
370 788
761 818
206 ...

output:

1

result:

ok 1 number(s): "1"

Test #28:

score: 0
Accepted
time: 111ms
memory: 15808kb

input:

1000
884 961
256 504
896 951
301 377
637 749
584 696
912 978
105 458
78 340
104 122
648 992
769 973
509 610
649 815
46 349
892 983
698 883
820 916
697 808
68 348
772 986
1 508
919 929
284 451
303 365
19 523
636 657
58 764
64 124
425 902
180 842
672 965
840 985
384 645
261 548
691 788
462 545
48 386
...

output:

1

result:

ok 1 number(s): "1"

Test #29:

score: 0
Accepted
time: 532ms
memory: 20112kb

input:

2000
1420 1715
1721 1770
1506 1817
209 1938
566 787
442 779
879 1646
657 1189
1003 1897
887 1190
1879 1897
357 1913
1288 1317
1111 1320
805 1467
482 1016
802 1310
1015 1614
155 1465
1662 1935
126 1426
888 922
1101 1322
1919 1942
1255 1346
552 625
921 1848
61 1636
316 1328
1609 1858
1510 1989
593 625...

output:

1

result:

ok 1 number(s): "1"

Test #30:

score: 0
Accepted
time: 1690ms
memory: 6208kb

input:

100
1 2
2 3
4 5
1 2
4 5
3 5
4 5
3 4
5 6
5 6
4 5
8 10
5 7
5 6
10 12
10 11
8 10
7 8
9 11
8 10
11 12
13 15
10 12
10 11
14 15
11 13
16 17
12 13
14 15
16 18
14 15
14 16
19 20
15 16
16 17
17 19
17 18
20 21
19 21
22 23
23 25
20 21
23 24
24 26
25 27
24 26
23 24
25 26
25 26
23 24
28 30
28 29
29 30
26 27
26 2...

output:

5

result:

ok 1 number(s): "5"

Test #31:

score: 0
Accepted
time: 796ms
memory: 6016kb

input:

100
1 2
1 2
4 6
5 8
5 8
3 4
2 5
4 7
7 8
2 3
7 10
7 9
5 6
10 13
10 11
9 10
6 8
11 13
9 12
12 15
13 14
11 13
13 15
10 12
12 14
10 11
16 19
15 18
14 15
17 18
14 15
19 20
20 23
20 23
18 21
16 18
16 18
16 19
22 25
19 21
22 24
22 24
21 24
20 23
22 23
21 22
24 25
23 26
25 28
27 30
26 27
24 25
28 29
30 33
2...

output:

3

result:

ok 1 number(s): "3"

Test #32:

score: -100
Time Limit Exceeded

input:

200
3 4
1 3
1 2
4 5
5 7
2 3
4 6
2 4
3 5
4 5
8 9
4 5
8 10
9 11
7 9
8 10
7 8
7 8
10 12
9 11
13 15
11 12
12 13
11 13
15 17
13 14
14 15
15 17
17 19
14 15
16 18
18 20
19 20
16 18
18 20
16 17
21 22
17 18
18 20
19 21
22 23
20 21
21 23
23 24
23 24
23 24
23 24
26 28
27 28
24 26
28 29
28 29
25 27
28 29
27 28
...

output:


result: