QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#504211#6664. 학생들HuangHanSheng27 15ms4208kbC++201.1kb2024-08-04 10:21:362024-08-04 10:21:36

详细

Subtask #1:

score: 12
Accepted

Test #1:

score: 12
Accepted
time: 0ms
memory: 3796kb

input:

10 10
4 4
7 7
1 1
6 6
7 7
2 2
4 4
4 4
7 7
6 6

output:

5
1 2 4 6 7 

result:

ok 2 lines

Test #2:

score: 12
Accepted
time: 0ms
memory: 3800kb

input:

10 10
4 4
8 8
4 4
3 3
1 1
7 7
3 3
6 6
7 7
4 4

output:

6
1 3 4 6 7 8 

result:

ok 2 lines

Test #3:

score: 12
Accepted
time: 0ms
memory: 3860kb

input:

10 10
2 2
0 0
2 2
5 5
2 2
3 3
6 6
4 4
2 2
1 1

output:

7
0 1 2 3 4 5 6 

result:

ok 2 lines

Test #4:

score: 12
Accepted
time: 0ms
memory: 3804kb

input:

10 10
8 8
0 2
7 7
5 5
0 3
5 5
9 9
7 7
6 6
3 3

output:

7
0 1 2 3 5 6 7 8 9 

result:

ok 2 lines

Test #5:

score: 12
Accepted
time: 0ms
memory: 3724kb

input:

10 10
3 3
1 1
2 2
3 3
6 9
2 2
2 3
4 4
1 4
2 2

output:

5
1 2 3 4 6 7 8 9 

result:

ok 2 lines

Test #6:

score: 12
Accepted
time: 0ms
memory: 3772kb

input:

10 10
0 6
0 7
0 5
6 6
0 8
3 4
0 6
5 5
6 6
0 2

output:

4
0 1 2 3 4 5 6 

result:

ok 2 lines

Test #7:

score: 12
Accepted
time: 0ms
memory: 4052kb

input:

5 3
0 4
1 1
3 3

output:

2
1 3 

result:

ok 2 lines

Test #8:

score: 12
Accepted
time: 0ms
memory: 3856kb

input:

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

output:

4
2 3 4 5 6 7 8 9 

result:

ok 2 lines

Test #9:

score: 12
Accepted
time: 0ms
memory: 4056kb

input:

10 5
3 3
4 4
6 7
7 8
8 9

output:

4
3 4 6 7 8 9 

result:

ok 2 lines

Test #10:

score: 12
Accepted
time: 0ms
memory: 3792kb

input:

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

output:

6
1 2 3 4 5 6 7 8 9 

result:

ok 2 lines

Test #11:

score: 12
Accepted
time: 0ms
memory: 4060kb

input:

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

output:

3
1 2 3 4 5 6 7 8 9 

result:

ok 2 lines

Test #12:

score: 12
Accepted
time: 0ms
memory: 4056kb

input:

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

output:

2
1 2 3 4 

result:

ok 2 lines

Test #13:

score: 12
Accepted
time: 0ms
memory: 3792kb

input:

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

output:

1
2 

result:

ok 2 lines

Test #14:

score: 12
Accepted
time: 0ms
memory: 4064kb

input:

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

output:

2
0 2 3 4 

result:

ok 2 lines

Test #15:

score: 12
Accepted
time: 0ms
memory: 3796kb

input:

5 5
2 3
2 3
2 4
2 3
0 4

output:

1
2 3 

result:

ok 2 lines

Test #16:

score: 12
Accepted
time: 0ms
memory: 3796kb

input:

5 5
1 1
4 4
1 2
0 0
2 4

output:

3
0 1 4 

result:

ok 2 lines

Test #17:

score: 12
Accepted
time: 0ms
memory: 4068kb

input:

10 10
1 5
0 1
0 7
1 8
1 6
3 7
0 1
3 6
1 6
2 3

output:

2
0 1 3 

result:

ok 2 lines

Test #18:

score: 12
Accepted
time: 0ms
memory: 3764kb

input:

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

output:

3
2 3 5 6 7 8 9 

result:

ok 2 lines

Test #19:

score: 12
Accepted
time: 0ms
memory: 3868kb

input:

10 10
0 3
0 7
3 3
3 7
2 4
1 4
0 5
0 1
5 6
1 5

output:

3
0 1 3 5 6 

result:

ok 2 lines

Test #20:

score: 12
Accepted
time: 0ms
memory: 3796kb

input:

10 10
4 7
3 6
0 5
0 1
3 9
0 6
3 5
0 7
0 3
2 7

output:

2
0 1 4 5 

result:

ok 2 lines

Test #21:

score: 12
Accepted
time: 0ms
memory: 4068kb

input:

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

output:

4
0 2 3 4 5 7 8 

result:

ok 2 lines

Subtask #2:

score: 0
Time Limit Exceeded

Test #22:

score: 6
Accepted
time: 14ms
memory: 3940kb

input:

2500 2500
436 436
48 48
971 971
2223 2223
2046 2046
1706 1706
1847 1847
1739 1739
2398 2398
525 525
2479 2479
490 490
1434 1434
2160 2160
2049 2049
771 771
1758 1758
1651 1651
1496 1496
538 538
586 586
2141 2141
198 198
895 895
1231 1231
1478 1478
923 923
1398 1398
1103 1103
1226 1226
723 723
48 48
...

output:

1574
2 3 4 7 8 9 10 11 12 14 18 20 22 24 25 26 29 35 36 37 39 40 42 43 44 45 46 47 48 49 50 52 53 55 56 57 60 61 62 63 65 66 69 70 72 73 76 78 79 80 81 83 88 89 90 92 93 94 95 96 97 99 101 103 104 107 109 110 111 112 113 116 117 119 120 123 125 126 128 129 131 132 134 135 138 140 141 142 146 147 148...

result:

ok 2 lines

Test #23:

score: 6
Accepted
time: 15ms
memory: 3860kb

input:

2500 2500
1360 1360
1596 1596
716 716
1701 1701
1904 1904
483 483
1330 1330
523 523
1962 1962
2207 2207
623 623
234 234
1525 1525
889 889
1564 1564
1188 1188
1980 1980
1709 1709
2014 2014
2483 2483
1231 1231
2215 2215
207 207
278 278
292 292
1686 1686
1632 1632
1055 1055
212 212
1096 1096
2246 2246
...

output:

1559
1 5 6 7 8 9 10 11 12 14 16 17 19 21 22 23 25 26 27 29 30 31 32 33 37 38 39 44 45 46 47 49 50 51 53 57 58 59 60 63 64 66 67 68 69 71 74 75 76 77 78 80 81 86 87 88 89 90 91 92 95 96 97 98 99 100 101 102 103 105 106 107 108 109 112 114 115 116 117 118 120 121 122 123 125 126 129 130 131 132 134 14...

result:

ok 2 lines

Test #24:

score: 6
Accepted
time: 15ms
memory: 3868kb

input:

2500 2500
2488 2488
1044 1044
1474 1474
1383 1383
1157 1157
1760 1760
5 5
2215 2215
1117 1117
1593 1593
1062 1062
785 785
1819 1819
630 630
1887 1887
797 797
1598 1598
1163 1163
236 236
1724 1724
2479 2479
2492 2492
217 217
2161 2161
1649 1649
2099 2099
853 853
1119 1119
2228 2228
762 762
1676 1676
...

output:

1564
1 2 4 5 6 7 9 11 12 13 14 15 17 19 20 21 22 30 31 36 38 39 40 41 42 43 45 46 47 52 53 54 55 56 57 62 65 67 68 69 72 73 75 77 78 79 81 82 83 85 86 87 89 90 91 92 93 94 96 97 98 99 100 102 103 104 105 106 107 108 110 112 113 118 124 125 129 130 131 134 136 137 139 141 143 145 147 153 155 157 159 ...

result:

ok 2 lines

Test #25:

score: 0
Time Limit Exceeded

input:

250000 250000
61398 61398
65187 65187
31467 31467
25406 25406
186007 186007
190060 190060
218634 218634
163756 163756
18209 18209
219280 219280
144182 144182
708 708
240134 240134
244318 244318
140483 140483
31782 31782
223740 223740
200601 200601
244554 244554
231146 231146
236029 236029
1529 1529
...

output:

Unauthorized output

result:


Subtask #3:

score: 15
Accepted

Dependency #1:

100%
Accepted

Test #28:

score: 15
Accepted
time: 11ms
memory: 4208kb

input:

2500 2500
1601 1601
2106 2106
1705 1705
2092 2092
2033 2033
1544 1544
1656 1656
2381 2381
1202 1202
514 514
1029 1029
1574 1574
2476 2478
1367 1367
1392 1392
356 356
2178 2179
1091 1162
1734 1734
1665 1665
2468 2468
1594 1594
370 370
636 636
1286 1291
1320 1320
862 865
2202 2202
2173 2173
509 509
17...

output:

1902
235 236 237 238 239 240 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 312 313 314 315 316 317 319 320 321 322 323 331 332 333 334 335 336 337...

result:

ok 2 lines

Test #29:

score: 15
Accepted
time: 13ms
memory: 3936kb

input:

2500 2500
1108 1111
1761 1761
1192 1192
1549 1549
1916 1917
1152 1152
1420 1426
1480 1481
1671 1671
1020 1021
1413 1413
1685 1685
1433 1433
1179 1179
1055 1055
2411 2411
2413 2414
2345 2345
957 960
2198 2198
1119 1122
956 961
997 997
1043 1043
1015 1015
1352 1352
2360 2361
966 966
2397 2414
1465 146...

output:

1088
930 931 932 933 934 935 936 937 938 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1...

result:

ok 2 lines

Test #30:

score: 15
Accepted
time: 14ms
memory: 3912kb

input:

2500 2500
1854 1854
1281 1281
1795 1812
1367 1371
1256 1257
1925 1925
1973 1973
1711 1711
1299 1299
1492 1492
1314 1391
1176 1176
1030 1030
1065 1065
1255 1255
1918 1918
1476 1482
1413 1413
1676 1680
1950 1992
1662 1662
1729 1730
1701 1701
1343 1343
449 2316
1017 1018
1766 1766
1452 1458
1182 1182
1...

output:

991
659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 ...

result:

ok 2 lines

Test #31:

score: 15
Accepted
time: 7ms
memory: 3920kb

input:

2500 2115
1 3
3 4
4 5
5 7
6 9
8 10
9 11
10 12
13 13
14 14
17 17
18 20
21 21
23 23
24 26
27 29
29 30
30 31
31 32
32 35
34 38
35 39
37 40
40 41
41 43
42 45
43 47
44 49
46 51
47 52
48 53
49 55
50 56
51 57
52 60
53 62
55 64
56 67
58 68
59 69
60 70
61 73
63 74
68 76
70 77
71 78
72 79
78 80
79 81
80 84
83...

output:

133
1 2 3 4 5 6 7 8 9 10 11 12 13 14 17 18 19 20 21 23 24 25 26 27 28 29 30 31 32 33 34 35 37 38 39 40 41 42 43 44 45 46 47 48 49 51 52 53 54 55 56 60 61 62 63 64 65 66 67 68 71 72 73 74 75 76 77 79 80 83 84 85 86 87 88 91 92 93 94 95 96 97 100 101 102 103 104 105 106 110 111 112 113 114 115 116 117...

result:

ok 2 lines

Test #32:

score: 15
Accepted
time: 7ms
memory: 3860kb

input:

2500 1988
2 2
3 5
6 6
7 8
9 10
10 11
12 15
13 16
15 19
18 22
19 24
24 25
25 26
26 27
28 29
29 30
31 32
32 33
33 35
35 36
37 40
39 41
41 43
47 47
50 52
52 53
53 55
54 56
55 57
57 58
58 59
59 60
60 61
61 62
62 67
67 68
68 69
73 74
74 75
76 77
80 80
82 83
85 85
86 89
87 90
88 94
89 95
90 96
91 100
93 1...

output:

460
2 3 4 5 6 7 8 10 13 14 15 18 19 20 21 22 24 25 26 27 29 32 35 37 38 39 40 41 42 43 47 52 55 58 60 62 68 74 76 77 80 82 83 85 86 87 88 89 90 91 92 93 94 95 96 100 101 102 103 104 105 106 107 108 109 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 13...

result:

ok 2 lines

Test #33:

score: 15
Accepted
time: 3ms
memory: 3812kb

input:

2500 1799
4 6
5 7
7 8
8 9
10 10
11 16
12 17
14 18
15 19
17 22
19 24
20 26
21 27
22 29
24 33
26 35
27 39
28 42
29 47
34 49
35 51
41 54
46 58
47 59
49 60
50 62
51 63
52 69
54 71
56 72
60 73
61 77
62 78
65 80
68 85
70 86
72 89
73 91
75 92
80 93
82 94
84 95
85 96
86 97
87 100
88 101
93 103
94 109
96 112...

output:

186
5 6 8 10 15 16 21 22 29 30 31 32 33 49 62 80 94 112 131 149 151 152 158 159 170 174 176 177 185 188 194 195 199 200 201 207 208 209 210 211 224 225 226 227 228 229 230 231 232 233 253 254 255 256 257 258 259 260 261 262 263 278 279 280 281 282 283 284 285 286 287 288 297 298 299 300 301 302 303 ...

result:

ok 2 lines

Test #34:

score: 15
Accepted
time: 5ms
memory: 3940kb

input:

2500 1496
1 1
5 5
6 6
8 9
10 10
11 12
14 20
15 22
17 23
24 27
27 33
28 35
29 36
33 41
37 43
38 47
41 48
42 54
43 56
45 57
54 58
61 68
67 69
70 72
75 84
76 91
83 99
87 102
88 108
90 109
92 112
93 113
99 115
105 116
108 120
110 122
115 133
117 135
119 136
120 141
122 142
123 143
127 144
129 148
137 15...

output:

255
1 5 6 8 9 10 11 12 17 18 19 20 24 25 26 27 29 30 31 32 33 34 35 41 42 43 54 55 56 57 67 68 70 71 72 75 76 77 78 79 80 81 82 83 84 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 105 106 107 108 109 110 111 112 113 114 115 116 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135...

result:

ok 2 lines

Test #35:

score: 15
Accepted
time: 2ms
memory: 3848kb

input:

2500 1334
0 1
1 2
2 5
5 6
6 10
10 12
12 14
14 17
17 19
19 20
20 23
23 24
24 27
27 29
29 30
30 31
31 34
34 37
37 38
38 39
39 40
40 41
41 42
42 43
43 44
44 45
45 46
46 48
48 49
49 52
52 53
53 56
56 58
58 59
59 60
60 61
61 62
62 66
66 67
67 68
68 71
71 73
73 77
77 78
78 80
80 82
82 84
84 86
86 89
89 90...

output:

667
1 5 10 14 19 23 27 30 34 38 40 42 44 46 49 53 58 60 62 67 71 77 80 84 89 91 93 97 100 105 111 117 120 122 127 131 135 138 145 148 152 157 161 163 165 167 172 179 182 186 191 194 198 202 205 208 211 217 224 229 232 239 241 244 248 250 252 254 258 261 264 269 272 275 281 283 287 293 298 302 305 31...

result:

ok 2 lines

Test #36:

score: 15
Accepted
time: 8ms
memory: 3936kb

input:

2500 2500
775 1397
526 676
1220 2116
1168 1958
920 1704
908 1298
628 2415
977 1191
2014 2488
488 1462
64 1714
172 1467
1614 1617
430 2093
866 1238
293 1816
121 916
60 1193
487 1490
680 1056
688 2291
835 1349
875 1039
141 190
77 598
124 739
253 465
583 1155
1111 2023
234 534
953 1965
308 2455
416 698...

output:

63
43 44 45 46 47 48 49 50 51 93 94 114 115 116 117 118 119 120 121 122 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 168 169 170 171 172 173 195 196 197 198 199 200 201 202 203 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 310 311 312 313 314 315 335 336 337 ...

result:

ok 2 lines

Test #37:

score: 15
Accepted
time: 8ms
memory: 4196kb

input:

2500 2500
428 2321
154 271
1370 1688
360 429
306 860
652 1941
1018 1857
288 1608
210 2073
906 1006
504 1312
1248 2284
474 2027
1750 2151
550 737
2019 2087
1258 1515
1005 2160
420 1565
418 963
2111 2380
289 2334
1518 1564
1681 2205
31 1012
534 2495
250 1573
1125 1347
232 1113
1346 1389
558 1476
290 1...

output:

55
34 35 85 86 87 88 89 90 91 92 93 94 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 230 231 232 233 234 235 236 237 238 239 240 241 242 279 280 281 282 2...

result:

ok 2 lines

Test #38:

score: 15
Accepted
time: 5ms
memory: 3904kb

input:

2500 2500
949 1568
825 1324
261 623
117 1848
219 1989
192 689
1108 1803
815 1217
1527 2125
955 1728
265 781
631 2294
543 2239
1168 1611
466 607
437 665
1102 2190
68 818
150 1640
156 1678
21 1184
1423 1640
102 561
721 2121
998 2438
739 1147
394 1048
1064 1539
204 1853
1854 2448
179 1176
68 1330
647 2...

output:

55
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 1...

result:

ok 2 lines

Test #39:

score: 15
Accepted
time: 5ms
memory: 3936kb

input:

2500 2500
616 1669
571 801
685 1538
836 2100
967 2079
924 2435
532 1198
126 1635
255 1585
400 2246
1059 1513
2303 2310
751 1096
389 868
273 2483
936 1960
689 826
427 2168
1511 2380
1788 2393
636 1477
1094 2204
1250 1390
1433 2465
352 1157
1965 2290
226 629
798 2139
1178 1591
2158 2291
985 2191
653 6...

output:

59
32 33 34 35 36 99 100 101 102 103 104 105 106 107 203 204 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304...

result:

ok 2 lines

Test #40:

score: 15
Accepted
time: 7ms
memory: 4200kb

input:

2500 2500
297 1961
483 1328
2007 2438
571 2324
353 1234
1568 1975
273 1288
449 2256
478 1039
264 2345
1954 2145
620 1693
959 2453
525 1303
144 1591
1186 1206
685 1759
76 1728
1586 2110
1695 2131
78 1854
485 549
1938 2473
744 1505
970 2123
1342 2375
618 1342
532 2331
478 1991
647 770
1098 1602
0 431
...

output:

58
30 31 32 33 34 104 131 132 133 134 135 136 137 138 139 140 141 203 204 205 206 207 208 209 210 211 215 229 230 231 232 233 234 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 335 336 337 338 339 340 341 342 343 344 345 34...

result:

ok 2 lines

Subtask #4:

score: 0
Time Limit Exceeded

Test #41:

score: 0
Time Limit Exceeded

input:

250000 250000
159526 159526
198590 198590
55199 55199
129454 129454
149248 149248
230920 230920
158933 158936
215937 215937
173724 173724
151808 151808
168086 168086
218032 218035
153365 153365
70475 70475
68770 68779
121856 121856
143399 143400
124906 124906
92405 92405
149057 149057
124739 124739
...

output:

Unauthorized output

result:


Subtask #5:

score: 0
Time Limit Exceeded

Test #47:

score: 0
Time Limit Exceeded

input:

250000 212688
1 4
2 5
3 9
4 12
6 13
7 14
10 16
11 17
13 19
14 20
15 21
20 22
21 23
23 24
24 26
25 28
26 29
31 31
32 32
35 36
36 37
37 38
38 42
39 43
41 44
42 45
43 47
44 52
45 55
46 56
49 58
50 60
51 61
52 63
54 64
55 68
57 69
58 70
59 72
61 74
63 75
64 76
65 77
66 78
68 80
69 81
72 83
73 85
74 86
7...

output:

Unauthorized output

result:


Subtask #6:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

0%