QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#543835#4905. 交朋友egypt_ioi2024_0398.046157 0ms0kb/1204.2kb2024-09-01 21:41:542024-09-01 21:41:54

Details

Tip: Click on the bar to expand more detailed information

Pretests


Final Tests

Test #1:

score: 4
Accepted

input:

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

output:

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

result:

ok Correct

Test #2:

score: 8
Accepted

input:

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

output:

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

result:

ok Correct

Test #3:

score: 6
Accepted

input:

50 321
1 4
1 7
1 14
1 15
1 20
1 27
1 40
1 42
1 43
2 4
2 7
2 8
2 11
2 14
2 24
2 27
2 30
2 32
2 40
2 42
2 43
2 46
2 47
3 4
3 5
3 11
3 14
3 15
3 24
3 27
3 30
3 32
3 37
3 42
4 10
4 13
4 16
4 17
4 22
4 25
4 35
4 38
4 41
4 49
5 10
5 12
5 22
5 23
5 25
5 33
5 35
5 36
5 38
5 39
5 41
5 49
5 50
6 14
6 19
6 20
...

output:

321
2 16 28 
2 17 28 
2 21 28 
2 22 28 
2 23 28 
2 28 33 
2 28 35 
2 28 36 
2 28 39 
2 14 34 
2 18 34 
2 24 34 
2 29 34 
2 30 34 
2 31 34 
2 32 34 
2 34 37 
2 34 40 
2 34 43 
2 34 45 
2 34 47 
2 12 45 
2 13 45 
2 21 45 
2 23 45 
2 26 45 
2 35 45 
2 38 45 
2 39 45 
2 41 ...

result:

ok Correct

Test #4:

score: 9
Accepted

input:

100 1593
1 3
1 11
1 15
1 17
1 19
1 20
1 22
1 25
1 32
1 35
1 36
1 38
1 39
1 46
1 51
1 52
1 54
1 57
1 60
1 62
1 67
1 77
1 82
1 86
1 89
1 94
1 95
2 10
2 11
2 12
2 17
2 18
2 25
2 30
2 43
2 44
2 45
2 50
2 53
2 56
2 59
2 62
2 63
2 64
2 66
2 68
2 72
2 73
2 74
2 77
2 79
2 81
2 84
2 87
2 88
2 90
2 91
2 94
2 ...

output:

288
4 11 18 26 97 
2 6 89 
4 22 27 62 96 
4 35 41 83 91 
6 29 36 48 54 62 84 
4 37 41 46 67 
5 14 45 55 57 70 
4 3 7 33 77 
4 2 10 12 17 
4 14 23 39 59 
4 34 40 41 100 
3 29 31 97 
6 7 53 64 88 92 93 
4 24 70 72 95 
4 60 67 77 86 
5 7 41 51 72 100 
5 7 64 77 86 90 
5 25 70 82 93 98...

result:

ok Correct

Test #5:

score: 9
Accepted

input:

100 2477
1 5
1 6
1 8
1 9
1 12
1 15
1 16
1 19
1 20
1 21
1 25
1 28
1 29
1 30
1 31
1 32
1 33
1 38
1 41
1 43
1 44
1 46
1 47
1 48
1 52
1 54
1 57
1 58
1 61
1 63
1 70
1 71
1 72
1 76
1 78
1 79
1 80
1 81
1 86
1 87
1 90
1 92
1 94
1 95
1 96
1 98
1 99
1 100
2 3
2 6
2 7
2 8
2 12
2 13
2 16
2 18
2 19
2 21
2 28
2 3...

output:

208
4 85 98 43 58 
7 5 55 94 84 74 52 14 
7 67 68 22 100 25 20 84 
7 92 85 68 91 83 95 79 
4 66 33 19 43 
5 73 88 99 56 42 
6 94 60 41 98 43 8 
5 99 88 77 79 94 
6 95 84 11 14 61 55 
6 52 69 31 10 76 79 
5 6 82 98 51 75 
5 65 30 70 68 80 
7 71 12 94 72 1 38 9 
7 63 31 44 19 7 86 2 
6 ...

result:

ok Correct

Test #6:

score: 10.9415
Acceptable Answer

input:

500 24984
1 3
1 8
1 14
1 28
1 32
1 36
1 44
1 49
1 53
1 58
1 59
1 71
1 73
1 79
1 84
1 89
1 94
1 96
1 97
1 113
1 118
1 120
1 123
1 124
1 129
1 134
1 135
1 150
1 152
1 154
1 159
1 167
1 168
1 171
1 175
1 176
1 179
1 181
1 184
1 189
1 193
1 196
1 198
1 204
1 205
1 207
1 208
1 214
1 216
1 228
1 232
1 238...

output:

3942
4 111 452 468 312 
4 55 367 25 391 
6 327 457 239 171 429 493 
4 194 211 351 100 
5 201 364 273 339 246 
4 292 222 237 383 
5 258 221 42 488 376 
4 73 41 452 152 
4 212 29 91 395 
5 368 172 3 12 97 
4 3 427 422 39 
5 347 94 105 364 88 
5 269 437 131 278 78 
5 337 250 397 244 401 
...

result:

points 0.99468220920 Correct

Test #7:

score: 11
Accepted

input:

500 62352
1 5
1 6
1 8
1 9
1 12
1 15
1 16
1 19
1 20
1 21
1 25
1 28
1 29
1 30
1 31
1 32
1 33
1 38
1 41
1 43
1 44
1 46
1 47
1 48
1 52
1 54
1 57
1 58
1 61
1 63
1 70
1 71
1 72
1 76
1 78
1 79
1 80
1 81
1 86
1 87
1 90
1 92
1 94
1 95
1 96
1 98
1 99
1 100
1 101
1 104
1 105
1 106
1 110
1 111
1 114
1 116
1 117...

output:

2621
10 418 446 152 114 11 411 198 346 166 267 
9 179 296 277 345 149 327 303 242 156 
9 27 489 255 171 127 318 52 399 30 
10 137 346 200 66 420 196 292 173 286 495 
9 388 117 336 389 266 126 148 145 25 
9 89 169 72 126 333 191 354 266 171 
9 412 500 153 389 105 437 309 28 168 
10 480 52 429...

result:

ok Correct

Test #8:

score: 12.5119
Acceptable Answer

input:

1000 99869
1 3
1 8
1 14
1 28
1 32
1 36
1 44
1 49
1 53
1 58
1 59
1 71
1 73
1 79
1 84
1 89
1 94
1 96
1 97
1 113
1 118
1 120
1 123
1 124
1 129
1 134
1 135
1 150
1 152
1 154
1 159
1 167
1 168
1 171
1 175
1 176
1 179
1 181
1 184
1 189
1 193
1 196
1 198
1 204
1 205
1 207
1 208
1 214
1 216
1 228
1 232
1 23...

output:

12545
4 461 607 60 357 
5 642 57 747 995 673 
6 450 479 357 178 457 521 
6 25 894 150 456 698 792 
5 140 768 644 757 273 
4 281 96 276 730 
5 498 419 90 896 320 
4 905 347 886 987 
5 114 71 782 987 916 
5 611 726 620 758 488 
5 319 261 94 823 867 
6 802 726 69 583 372 560 
4 622 839 637...

result:

points 0.96245676630 Correct

Test #9:

score: 12.3114
Acceptable Answer

input:

1000 165993
1 3
1 11
1 15
1 17
1 19
1 20
1 22
1 25
1 32
1 35
1 36
1 38
1 39
1 46
1 51
1 52
1 54
1 57
1 60
1 62
1 67
1 77
1 82
1 86
1 89
1 94
1 95
1 108
1 109
1 110
1 115
1 116
1 123
1 128
1 141
1 142
1 143
1 148
1 151
1 154
1 157
1 160
1 161
1 162
1 164
1 166
1 170
1 171
1 172
1 175
1 177
1 179
1 18...

output:

11403
6 180 528 964 368 97 451 
7 945 240 134 598 920 362 48 
7 348 460 291 483 573 17 523 
7 415 12 722 570 786 391 462 
7 214 972 621 155 354 445 992 
8 727 792 514 925 576 11 953 793 
7 305 910 399 474 541 215 976 
6 170 579 34 189 254 728 
3 638 121 595 
6 222 867 822 75 729 679 
7 14...

result:

points 0.947030610 Correct

Test #10:

score: 15.2813
Acceptable Answer

input:

1000 249529
1 5
1 6
1 8
1 9
1 12
1 15
1 16
1 19
1 20
1 21
1 25
1 28
1 29
1 30
1 31
1 32
1 33
1 38
1 41
1 43
1 44
1 46
1 47
1 48
1 52
1 54
1 57
1 58
1 61
1 63
1 70
1 71
1 72
1 76
1 78
1 79
1 80
1 81
1 86
1 87
1 90
1 92
1 94
1 95
1 96
1 98
1 99
1 100
1 101
1 104
1 105
1 106
1 110
1 111
1 114
1 116
1 1...

output:

8617
11 689 234 460 393 409 963 932 617 896 479 667 
11 849 822 481 180 931 48 78 640 472 875 756 
9 240 35 398 739 478 921 924 16 965 
11 197 469 915 540 842 930 159 736 514 800 349 
14 63 350 886 376 365 509 173 709 769 441 227 740 620 260 
10 700 838 322 839 907 398 76 704 794 563 
8 899 6...

result:

points 0.95508231510 Correct