QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#782029 | #9635. (LIS, LDS) - Coordinates | yeyuzhe | 100 ✓ | 1602ms | 448964kb | C++23 | 8.8kb | 2024-11-25 18:33:12 | 2024-11-25 18:33:12 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 5
Accepted
Test #1:
score: 5
Accepted
time: 7ms
memory: 107936kb
input:
3 9 1 1 1 2 3 1
output:
4 2 1 3 4
result:
ok m = 4
Test #2:
score: 5
Accepted
time: 8ms
memory: 109976kb
input:
3 9 2 2 1 1 3 2
output:
4 1 3 4 2
result:
ok m = 4
Test #3:
score: 5
Accepted
time: 4ms
memory: 107908kb
input:
3 9 1 1 3 2 1 2
output:
4 2 3 4 1
result:
ok m = 4
Test #4:
score: 5
Accepted
time: 6ms
memory: 107832kb
input:
4 12 4 2 1 2 2 1 4 3
output:
7 2 1 3 4 7 6 5
result:
ok m = 7
Test #5:
score: 5
Accepted
time: 3ms
memory: 109560kb
input:
4 12 3 2 4 4 4 1 1 1
output:
8 1 2 4 8 7 6 3 5
result:
ok m = 8
Test #6:
score: 5
Accepted
time: 8ms
memory: 107832kb
input:
4 12 2 3 3 3 3 4 3 1
output:
7 1 5 7 6 2 4 3
result:
ok m = 7
Test #7:
score: 5
Accepted
time: 4ms
memory: 107960kb
input:
4 12 1 2 2 3 4 2 2 4
output:
7 2 5 4 3 6 7 1
result:
ok m = 7
Test #8:
score: 5
Accepted
time: 0ms
memory: 108976kb
input:
4 12 1 4 2 3 3 2 4 4
output:
9 6 1 5 2 4 9 8 7 3
result:
ok m = 9
Subtask #2:
score: 15
Accepted
Test #9:
score: 15
Accepted
time: 0ms
memory: 116080kb
input:
99 9801 34 84 63 38 76 28 35 97 4 38 19 15 77 43 14 20 70 12 55 89 64 39 38 81 33 67 14 66 14 62 27 46 79 63 29 39 1 21 46 4 46 72 68 43 99 35 5 35 46 51 80 84 13 26 52 95 4 51 97 74 72 78 58 67 27 2 88 22 12 55 59 79 58 94 86 61 20 78 47 72 17 33 99 70 53 80 74 48 94 65 58 51 27 84 55 99 91 15 25 3...
output:
276 131 57 1 2 42 161 110 3 4 105 5 6 7 211 148 8 9 10 11 230 168 12 64 186 242 181 13 56 14 15 53 102 16 17 65 18 49 206 19 20 21 234 22 177 23 149 24 107 25 26 218 144 28 29 112 30 31 32 33 192 219 248 188 45 71 72 73 74 210 75 76 78 79 81 82 84 86 197 198 162 194 143 88 89 90 91 92 93 243 94 227 ...
result:
ok m = 276
Test #10:
score: 15
Accepted
time: 0ms
memory: 114024kb
input:
100 10000 32 34 55 75 27 25 46 26 55 81 56 25 90 96 79 21 9 47 8 71 8 100 47 100 12 82 84 50 88 18 17 21 14 45 5 64 36 8 99 15 68 4 62 85 54 60 55 5 79 27 49 68 21 99 16 36 97 58 78 20 74 84 57 54 35 4 51 15 99 84 60 99 28 14 47 57 23 13 8 99 39 20 99 51 46 75 8 24 84 56 62 74 89 99 66 20 28 5 66 93...
output:
279 160 13 14 15 110 190 16 17 142 18 19 263 262 202 112 156 117 47 20 21 22 23 223 224 133 24 25 153 197 214 26 27 136 28 63 242 264 29 30 126 31 32 265 33 34 137 135 35 36 169 37 121 38 114 39 42 43 231 48 220 49 134 50 51 52 54 56 57 58 62 232 64 65 66 67 206 230 68 69 209 267 116 174 70 71 72 19...
result:
ok m = 279
Test #11:
score: 15
Accepted
time: 0ms
memory: 112204kb
input:
98 9604 73 3 27 87 46 32 69 24 42 70 52 13 29 11 97 98 4 95 51 20 90 72 41 96 39 59 56 51 66 15 65 62 94 56 4 18 77 79 16 23 91 48 53 86 88 86 64 16 74 1 49 95 45 89 73 77 14 69 10 39 88 79 8 88 23 31 35 17 63 32 47 27 90 70 23 61 4 14 53 82 63 50 49 26 8 47 65 19 41 26 42 48 75 78 81 84 65 29 20 88...
output:
275 226 37 1 2 254 265 3 21 255 271 154 22 23 64 232 127 24 25 26 116 184 126 27 28 29 220 123 179 225 173 30 31 146 32 39 40 41 42 259 233 43 110 44 45 157 195 104 46 47 48 49 231 50 51 53 54 113 253 55 56 115 57 58 60 66 68 150 272 153 69 135 70 71 267 72 181 130 65 73 74 260 75 256 76 106 77 83 7...
result:
ok m = 275
Test #12:
score: 15
Accepted
time: 11ms
memory: 116180kb
input:
100 10000 6 69 34 11 80 16 8 67 47 35 84 2 22 66 14 72 7 60 7 49 3 54 34 17 85 9 19 48 84 4 31 46 25 75 14 71 51 4 6 92 3 52 1 84 32 46 39 17 67 15 64 11 3 14 17 2 25 49 65 12 13 46 13 66 44 47 4 24 11 8 53 16 46 10 66 9 34 45 17 76 19 82 26 74 6 46 29 65 36 61 39 60 38 12 22 10 27 73 55 22 24 51 54...
output:
260 164 1 2 176 175 171 159 119 94 16 46 142 174 173 172 153 84 141 17 18 79 127 170 169 168 167 166 165 163 136 85 19 20 75 95 43 21 22 23 25 150 26 135 146 145 80 66 27 28 29 30 154 32 33 162 161 160 158 157 156 155 83 52 53 55 137 57 58 93 152 70 87 151 88 149 148 147 144 143 140 139 138 89 96 13...
result:
ok m = 260
Test #13:
score: 15
Accepted
time: 3ms
memory: 112296kb
input:
100 10000 23 9 36 30 66 12 12 51 28 52 24 60 97 3 4 48 10 74 14 25 24 4 68 5 1 70 27 38 80 11 3 57 45 29 44 41 60 18 9 2 31 68 2 87 26 16 53 28 83 15 49 22 54 37 18 72 4 73 33 49 1 81 53 26 85 5 20 43 13 27 64 4 2 35 2 5 5 82 58 27 40 5 50 29 39 62 47 26 29 9 13 61 85 6 52 3 55 37 46 23 25 36 1 30 1...
output:
256 213 220 219 218 217 216 196 72 131 177 202 215 159 161 1 28 2 3 4 133 152 5 60 6 7 195 198 221 214 212 211 210 209 208 207 206 134 151 8 10 132 11 12 168 184 13 153 141 61 53 57 14 15 16 17 18 201 203 180 19 179 20 154 21 22 23 33 183 182 34 162 136 35 43 222 205 204 200 199 197 140 170 44 45 14...
result:
ok m = 256
Test #14:
score: 15
Accepted
time: 0ms
memory: 114024kb
input:
100 10000 1 100 2 99 3 98 4 97 5 96 6 95 7 94 8 93 9 92 10 91 11 90 12 89 13 88 14 87 15 86 16 85 17 84 18 83 19 82 20 81 21 80 22 79 23 78 24 77 25 76 26 75 27 74 28 73 29 72 30 71 31 70 32 69 33 68 34 67 35 66 36 65 37 64 38 63 39 62 40 61 41 60 42 59 43 58 44 57 45 56 46 55 47 54 48 53 49 52 50 5...
output:
297 198 1 197 2 196 3 195 4 194 5 193 6 192 7 191 8 190 9 189 10 188 11 187 12 186 13 185 14 184 15 183 16 182 17 181 18 180 19 179 20 178 21 177 22 176 23 175 24 174 25 173 26 172 27 171 28 170 29 169 30 168 31 167 32 166 33 165 34 164 35 163 36 162 37 161 38 160 39 159 40 158 41 157 42 156 43 155 ...
result:
ok m = 297
Subtask #3:
score: 25
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Test #15:
score: 25
Accepted
time: 16ms
memory: 128480kb
input:
297 891 124 165 59 247 205 128 64 88 264 191 233 113 53 229 43 166 163 167 202 293 268 241 65 8 247 273 75 133 232 185 255 237 18 233 42 130 102 23 37 247 184 200 93 101 187 151 73 133 74 193 187 74 16 230 119 37 233 231 174 110 218 99 291 141 242 102 294 21 162 209 61 104 235 33 172 285 12 244 81 1...
output:
847 622 516 146 485 673 476 1 2 3 348 134 165 4 5 6 464 7 355 477 779 596 345 259 206 8 9 10 11 706 761 504 12 463 13 14 225 613 15 16 598 625 17 584 18 19 20 21 22 23 287 24 209 519 25 26 283 27 28 612 29 263 30 31 32 33 34 35 55 746 56 503 57 58 59 60 406 621 536 467 427 61 62 63 64 65 574 487 66 ...
result:
ok m = 847
Test #16:
score: 25
Accepted
time: 3ms
memory: 126420kb
input:
300 900 246 205 80 177 115 245 190 179 284 245 132 39 86 284 185 233 68 278 88 47 117 22 270 292 49 33 140 104 250 21 59 214 164 85 206 128 234 280 186 48 138 144 110 260 215 242 47 33 42 72 89 100 202 207 180 209 64 83 192 112 25 147 24 283 170 171 21 173 134 119 75 126 91 246 173 185 128 239 275 9...
output:
858 514 310 1 213 2 3 4 5 6 7 8 312 9 10 11 12 13 14 15 644 416 16 17 289 639 320 18 19 20 628 422 21 319 217 22 23 676 24 348 25 26 27 284 692 311 28 29 30 34 437 593 35 198 340 36 37 38 652 39 594 640 40 41 164 560 432 462 42 43 44 212 570 436 45 46 278 47 48 49 675 474 124 51 52 125 273 130 53 54...
result:
ok m = 858
Test #17:
score: 25
Accepted
time: 3ms
memory: 128752kb
input:
300 900 63 82 248 292 240 78 156 298 178 275 167 111 296 295 117 262 240 161 50 233 17 31 9 229 247 76 70 225 255 295 215 155 98 15 60 131 104 82 15 123 131 69 65 25 204 86 58 116 254 275 277 194 84 83 249 164 91 215 106 211 13 132 1 52 219 64 292 282 219 37 290 23 133 298 240 100 174 105 287 203 22...
output:
859 806 191 1 2 14 27 282 750 796 28 29 713 30 231 652 498 31 32 33 34 35 450 36 314 525 439 37 204 38 39 225 47 48 708 49 50 51 477 53 54 442 55 56 277 57 193 58 59 60 125 499 636 61 62 63 64 317 839 568 533 316 65 66 67 68 758 581 69 70 71 72 73 497 552 385 206 262 226 74 75 76 700 77 78 599 79 39...
result:
ok m = 859
Test #18:
score: 25
Accepted
time: 8ms
memory: 129904kb
input:
300 900 53 69 281 1 175 132 263 61 223 52 286 185 254 270 168 270 39 168 232 245 66 298 179 14 74 97 114 85 131 294 145 253 66 152 226 40 36 234 168 202 279 254 191 20 296 10 204 1 199 253 206 97 163 196 155 193 95 120 57 200 202 203 94 231 184 197 250 223 190 1 36 127 19 234 289 137 79 6 187 281 23...
output:
865 638 1 2 3 705 58 392 4 5 253 6 7 276 319 534 8 9 259 10 11 824 12 267 218 68 13 14 15 716 535 517 442 270 131 16 17 155 633 518 391 487 18 45 382 46 47 262 252 48 49 492 70 71 742 339 370 812 72 73 279 74 75 76 77 124 78 79 80 409 634 81 318 82 83 84 437 85 86 87 712 88 89 169 90 91 632 92 93 49...
result:
ok m = 865
Test #19:
score: 25
Accepted
time: 8ms
memory: 126404kb
input:
300 900 225 54 52 233 20 34 100 106 55 202 85 139 68 41 147 55 130 168 123 67 47 71 12 12 33 52 29 68 19 80 156 47 85 99 49 238 243 3 95 30 16 139 6 26 106 143 126 134 74 139 67 49 20 229 26 124 66 114 44 249 37 185 30 157 169 13 107 107 55 88 136 122 240 47 36 97 174 65 110 40 143 76 8 39 168 118 8...
output:
813 1 713 2 3 674 720 719 718 717 716 715 714 712 711 629 260 322 4 5 97 609 634 626 6 7 159 8 9 482 573 710 709 708 707 706 705 704 703 702 701 700 699 698 697 696 695 694 693 692 691 658 467 99 10 11 58 553 690 89 462 564 12 13 14 15 493 611 264 160 16 17 389 479 644 359 18 344 19 151 28 29 499 50...
result:
ok m = 813
Test #20:
score: 25
Accepted
time: 3ms
memory: 130212kb
input:
300 900 41 64 84 34 228 3 48 61 24 151 6 289 69 140 230 19 8 205 92 172 50 40 93 43 61 71 27 175 195 85 238 10 49 38 42 166 195 76 185 106 37 175 19 259 214 11 113 36 151 45 72 225 219 81 17 176 176 107 60 233 101 182 156 129 67 202 12 182 209 58 175 51 1 251 140 44 43 205 75 226 57 194 177 27 135 6...
output:
822 552 568 500 519 430 295 1 258 2 8 9 10 593 592 591 590 589 588 587 586 585 173 439 482 11 78 106 242 584 583 582 581 580 579 578 577 576 575 574 573 572 571 570 526 257 12 13 14 15 16 499 451 296 195 154 107 17 18 21 464 287 238 205 22 23 498 438 37 274 561 492 530 319 470 318 286 55 24 25 40 24...
result:
ok m = 822
Test #21:
score: 25
Accepted
time: 3ms
memory: 128656kb
input:
300 900 165 46 247 37 108 144 91 176 156 131 132 52 11 18 25 37 247 35 63 161 208 50 169 92 94 154 113 149 175 92 100 77 259 31 122 67 99 178 246 14 99 170 99 103 171 23 81 86 78 168 67 7 78 206 261 6 65 168 34 68 198 25 51 64 51 208 176 73 18 15 52 22 200 77 38 227 101 3 109 34 158 69 19 229 21 206...
output:
817 1 446 472 471 470 469 468 467 466 465 464 410 2 3 87 285 13 14 222 370 427 463 462 138 15 16 38 39 83 41 44 155 45 46 109 377 461 460 459 458 457 456 239 47 48 49 378 104 50 52 404 229 358 455 369 303 187 178 53 55 241 56 209 57 58 355 350 121 59 65 66 454 453 452 451 450 449 448 447 445 444 443...
result:
ok m = 817
Test #22:
score: 25
Accepted
time: 15ms
memory: 128636kb
input:
300 900 47 47 55 114 11 109 34 156 120 29 51 46 187 88 10 117 239 40 30 167 217 61 97 16 27 130 50 125 82 153 166 64 15 101 208 44 28 1 167 12 196 36 289 9 95 172 29 70 19 227 159 77 33 230 270 22 121 177 110 131 73 88 170 70 72 106 240 5 42 69 107 80 260 29 54 117 51 38 63 24 70 56 171 12 58 192 64...
output:
832 628 627 626 625 624 623 622 621 620 619 618 617 616 615 614 613 612 611 610 609 608 607 606 605 604 603 602 601 600 599 598 597 596 595 594 593 592 1 510 591 590 589 588 587 586 585 584 246 224 89 212 317 90 2 3 4 285 5 6 533 549 358 7 217 91 8 9 319 496 10 301 88 11 12 13 14 583 582 581 580 579...
result:
ok m = 832
Test #23:
score: 25
Accepted
time: 4ms
memory: 132480kb
input:
300 900 37 108 32 286 37 146 119 163 275 29 226 103 129 56 83 272 63 218 79 59 233 141 169 146 102 166 185 236 23 249 68 33 20 138 12 45 201 27 104 65 195 160 14 54 21 236 167 213 186 61 193 16 19 285 130 43 120 121 68 176 20 35 274 64 220 13 290 37 193 116 80 44 166 170 212 51 256 150 196 34 217 10...
output:
839 489 660 659 658 657 637 319 1 2 603 304 460 3 4 5 606 6 104 7 8 9 520 427 223 10 11 240 389 121 12 13 142 21 22 497 285 23 284 24 25 646 106 323 567 572 590 477 316 122 110 26 28 29 30 31 376 32 33 503 340 63 34 35 299 36 37 647 286 38 39 649 480 502 40 41 419 42 43 45 370 630 332 329 265 46 47 ...
result:
ok m = 839
Test #24:
score: 25
Accepted
time: 8ms
memory: 130464kb
input:
300 900 147 132 71 53 3 234 197 164 248 149 182 124 149 61 149 161 151 32 181 220 253 16 131 61 109 260 239 78 94 155 143 34 244 149 296 11 4 60 191 69 20 132 125 243 126 34 118 188 39 84 231 106 208 128 75 170 4 149 18 241 113 5 8 91 190 91 291 11 29 285 154 164 229 195 225 42 102 200 257 36 104 95...
output:
845 589 1 77 655 627 389 431 346 71 2 65 109 425 697 728 3 4 5 102 6 7 715 221 8 96 706 281 448 594 670 9 10 161 11 76 18 19 329 565 618 165 20 21 22 222 666 267 23 24 233 746 745 744 743 742 741 740 739 738 737 641 347 25 26 27 736 223 28 29 709 30 218 31 32 33 600 731 727 34 35 294 36 37 38 268 39...
result:
ok m = 845
Test #25:
score: 25
Accepted
time: 4ms
memory: 131616kb
input:
300 900 215 209 46 49 177 148 214 199 250 216 56 41 198 157 80 54 84 55 150 66 194 159 199 173 192 146 159 74 291 295 273 270 170 99 8 29 118 66 286 284 199 167 266 244 278 282 188 137 207 189 264 242 109 66 195 149 128 64 95 58 168 81 195 154 164 67 168 93 199 157 293 294 171 100 170 84 292 293 173...
output:
735 33 25 1 24 34 35 36 37 39 40 38 41 42 43 44 45 46 48 49 50 51 54 58 59 60 64 65 66 67 68 69 70 71 72 73 74 76 77 78 79 80 82 83 84 86 88 89 90 118 92 112 106 93 94 96 97 98 99 100 107 113 101 95 102 108 109 119 122 124 126 127 128 129 130 144 131 132 133 134 141 135 136 138 143 145 146 148 149 1...
result:
ok m = 735
Test #26:
score: 25
Accepted
time: 7ms
memory: 105964kb
input:
300 900 6 1 19 9 15 27 4 36 9 4 23 19 12 53 55 64 52 57 51 55 67 90 8 50 46 52 16 30 63 90 36 46 46 69 26 21 24 21 27 23 84 106 85 107 20 16 53 79 22 58 48 74 6 38 33 73 23 62 13 7 18 56 77 100 53 61 62 86 30 67 64 66 57 82 28 24 23 61 31 25 75 99 68 66 28 67 10 6 7 3 20 56 21 33 17 7 19 56 20 15 35...
output:
300 1 2 3 74 75 78 93 97 100 101 103 104 105 109 110 111 112 113 114 116 119 121 125 126 131 132 134 135 137 140 145 147 151 150 149 148 146 144 143 142 139 133 130 129 128 127 124 123 122 120 118 115 108 107 106 102 99 98 96 95 94 83 84 87 89 90 92 91 88 86 85 82 81 80 79 155 156 165 167 168 169 17...
result:
ok m = 300
Test #27:
score: 25
Accepted
time: 4ms
memory: 109944kb
input:
300 900 48 17 63 61 8 3 19 12 107 45 59 59 43 48 80 42 49 55 19 15 87 42 112 47 28 36 41 21 53 33 49 10 67 63 17 8 48 19 56 16 45 6 29 36 38 13 28 18 96 52 58 59 23 16 30 4 36 11 27 17 41 20 32 44 77 75 109 46 22 16 45 17 93 48 45 7 2 1 55 12 54 56 56 57 36 45 73 72 105 43 27 36 10 3 67 62 55 57 99 ...
output:
300 1 4 7 8 10 11 12 9 6 5 14 15 16 18 19 23 24 25 26 29 31 37 38 39 41 42 43 44 46 145 146 151 155 156 158 160 161 162 165 166 167 168 170 171 172 174 175 176 178 180 181 186 187 188 189 190 193 194 197 199 200 201 202 203 204 207 208 209 211 216 217 220 221 222 226 229 231 232 233 236 237 235 234 ...
result:
ok m = 300
Test #28:
score: 25
Accepted
time: 12ms
memory: 130844kb
input:
295 885 1 1 2 1 2 2 3 2 4 2 5 2 5 3 6 3 7 3 7 4 7 5 3 6 3 7 4 7 5 7 6 7 7 7 7 8 7 9 7 10 8 10 9 10 9 11 9 12 9 13 10 13 11 13 11 14 11 15 12 15 13 15 14 9 14 10 15 10 16 10 17 10 17 11 18 11 19 11 20 11 20 12 21 12 22 12 22 13 22 14 23 1 23 2 23 3 23 4 24 4 25 4 25 5 25 6 26 1 26 2 27 2 27 3 27 4 27...
output:
741 1 3 13 14 15 16 20 21 25 26 29 30 31 28 27 24 23 22 33 34 35 37 38 39 41 42 45 44 43 40 36 19 32 18 17 12 4 5 7 8 11 10 49 50 53 52 51 9 48 6 47 55 59 60 62 63 61 58 66 69 70 71 73 74 75 76 79 82 83 85 86 87 88 89 90 84 81 80 93 94 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 11...
result:
ok m = 741
Test #29:
score: 25
Accepted
time: 8ms
memory: 130480kb
input:
300 900 1 1 2 1 2 2 3 2 3 3 3 4 3 5 4 5 5 5 5 6 6 6 6 7 6 8 7 8 8 8 9 8 10 8 11 8 11 9 12 9 13 9 14 9 15 9 16 9 16 10 16 11 17 1 17 2 17 3 17 4 18 4 18 5 19 5 19 6 19 7 19 8 19 9 19 10 19 11 19 12 20 12 21 12 21 13 21 14 22 14 23 14 23 15 24 15 24 16 24 17 25 17 25 18 25 19 25 20 26 20 27 20 27 21 2...
output:
718 1 3 7 8 10 13 14 15 16 17 19 20 21 22 23 26 25 24 18 12 11 9 6 30 32 40 41 44 45 47 50 54 55 58 60 61 62 63 69 71 75 80 83 88 90 91 94 96 98 100 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...
result:
ok m = 718
Test #30:
score: 25
Accepted
time: 11ms
memory: 128692kb
input:
300 900 1 1 1 2 2 2 2 3 2 4 2 5 3 5 4 5 4 6 5 6 6 6 7 6 7 7 7 8 7 9 8 9 8 10 8 11 8 12 9 12 10 12 11 12 6 13 7 13 8 13 9 13 10 13 5 14 6 14 6 15 7 15 8 15 8 16 8 17 9 17 10 17 10 18 10 19 10 20 11 20 12 20 13 20 13 21 13 22 13 23 14 23 15 23 15 24 2 25 2 26 2 27 2 28 2 29 3 29 4 29 5 29 5 30 5 31 6 ...
output:
758 2 53 54 55 58 63 68 71 72 74 75 76 79 78 77 73 82 86 88 91 93 95 98 101 103 105 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 156 157 158 159 160 161 162 ...
result:
ok m = 758
Test #31:
score: 25
Accepted
time: 3ms
memory: 130800kb
input:
300 900 1 1 2 1 3 1 3 2 4 2 5 2 6 2 7 2 8 2 8 3 8 4 8 5 9 5 6 6 7 6 8 6 8 7 9 7 9 8 10 8 11 8 12 8 13 8 14 8 14 9 15 9 15 10 15 11 16 11 16 12 16 13 17 13 17 14 18 14 18 15 18 16 19 6 19 7 19 8 20 8 20 9 19 10 20 10 20 11 21 11 22 11 23 11 24 11 24 12 25 12 26 12 27 12 27 13 27 14 28 14 28 15 29 15 ...
output:
741 1 2 4 5 6 13 14 16 19 20 21 22 79 80 81 83 85 86 87 88 89 92 93 97 98 99 100 96 95 94 91 90 84 82 23 25 28 31 33 36 35 34 32 30 29 27 40 44 45 46 47 49 50 51 54 56 57 59 60 62 63 64 61 66 67 71 72 73 74 75 76 78 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 ...
result:
ok m = 741
Test #32:
score: 25
Accepted
time: 8ms
memory: 131676kb
input:
300 900 1 300 2 299 3 298 4 297 5 296 6 295 7 294 8 293 9 292 10 291 11 290 12 289 13 288 14 287 15 286 16 285 17 284 18 283 19 282 20 281 21 280 22 279 23 278 24 277 25 276 26 275 27 274 28 273 29 272 30 271 31 270 32 269 33 268 34 267 35 266 36 265 37 264 38 263 39 262 40 261 41 260 42 259 43 258 ...
output:
897 598 1 597 2 596 3 595 4 594 5 593 6 592 7 591 8 590 9 589 10 588 11 587 12 586 13 585 14 584 15 583 16 582 17 581 18 580 19 579 20 578 21 577 22 576 23 575 24 574 25 573 26 572 27 571 28 570 29 569 30 568 31 567 32 566 33 565 34 564 35 563 36 562 37 561 38 560 39 559 40 558 41 557 42 556 43 555 ...
result:
ok m = 897
Subtask #4:
score: 25
Accepted
Test #33:
score: 25
Accepted
time: 71ms
memory: 109812kb
input:
4997 14991 28 11 80 63 102 72 93 71 32 35 87 21 92 33 78 40 52 48 27 64 102 64 88 81 64 53 79 50 98 10 7 11 47 82 108 69 29 14 32 64 15 52 93 52 92 99 104 89 103 79 45 47 59 115 19 67 23 106 100 82 55 111 84 48 78 114 2 11 15 3 58 44 2 32 57 34 79 81 37 47 42 73 28 87 92 8 58 112 26 73 97 48 34 23 3...
output:
4997 3317 412 1893 2063 1909 1921 3213 3209 56 169 791 810 1832 3190 1908 1924 2064 3143 2062 1575 435 438 514 1562 1880 1892 1923 2065 3131 1905 1907 1910 2058 1911 809 808 786 807 1550 1829 1900 1559 1574 1831 1901 1906 1922 3186 3325 3214 3216 3215 2066 2061 2067 3208 3212 3217 3189 3191 3211 318...
result:
ok m = 4997
Test #34:
score: 25
Accepted
time: 79ms
memory: 111432kb
input:
4994 14982 63 72 26 41 80 99 99 89 51 75 26 103 92 33 89 52 38 60 39 15 21 10 70 92 56 86 40 65 51 117 51 54 83 97 82 32 45 117 67 84 109 24 41 77 62 92 42 18 80 61 76 102 55 23 26 84 56 77 74 31 126 29 31 96 12 27 72 38 40 118 78 60 14 30 78 17 78 74 14 17 12 31 47 99 85 40 89 90 98 41 43 66 92 78 ...
output:
4994 988 2191 2228 2359 2248 2250 2258 2394 2395 2251 2257 989 2174 2190 984 639 932 987 990 991 2249 1027 2192 2221 2227 2247 2356 2358 2361 2360 2362 2254 2256 2255 2229 1910 2185 952 951 855 52 638 854 933 986 188 193 850 526 641 947 1026 860 931 948 862 930 936 1909 950 985 998 999 2220 2226 234...
result:
ok m = 4994
Test #35:
score: 25
Accepted
time: 80ms
memory: 111752kb
input:
4997 14991 80 71 51 52 97 34 70 51 37 76 120 32 93 88 37 20 66 75 19 15 121 25 55 23 82 21 45 14 59 28 68 72 114 5 100 62 102 79 52 37 79 51 74 85 62 97 82 103 129 8 24 51 81 99 103 37 11 28 37 85 64 72 29 120 87 31 77 18 27 79 111 28 77 103 20 107 62 103 81 103 12 33 71 14 56 82 123 28 12 19 100 78...
output:
4997 618 1023 2467 1028 1077 1091 2833 1659 2479 2528 2832 1090 1084 1089 1658 1078 1079 1083 1088 2480 2764 2765 2532 2538 2763 2834 2766 2831 2531 2533 2468 2470 1657 2442 2428 1087 1093 1645 1646 2429 2478 2537 2830 2839 2838 2762 2530 2464 1660 1086 1085 1092 772 773 317 417 589 633 1067 1029 10...
result:
ok m = 4997
Test #36:
score: 25
Accepted
time: 75ms
memory: 106612kb
input:
4996 14988 76 35 12 24 71 59 24 101 70 94 62 10 22 46 38 85 84 38 77 82 13 17 57 44 66 82 75 69 12 79 52 98 21 97 109 47 106 61 95 42 31 22 26 19 42 103 50 67 53 19 53 86 50 32 90 59 5 87 79 111 48 68 76 99 91 78 46 63 126 50 33 39 107 66 51 35 23 43 109 28 116 30 102 21 78 102 51 47 68 86 48 37 33 ...
output:
4996 480 686 1959 1956 803 1359 1527 1447 1526 1464 1467 1963 2394 2373 2389 2391 2379 2004 2007 1519 1520 1525 1958 1962 2393 2392 1518 1517 1469 1468 769 776 1352 1446 1453 1463 1466 1508 1516 1528 1538 2374 2390 2396 2376 2378 2395 2397 2398 2388 2377 2380 2381 2385 2387 2399 2401 2400 1961 1970 ...
result:
ok m = 4996
Test #37:
score: 25
Accepted
time: 78ms
memory: 106732kb
input:
5000 15000 129 24 126 32 15 68 24 19 16 27 13 52 85 70 40 102 43 19 69 56 87 103 37 63 100 55 39 100 101 23 74 9 68 34 42 81 73 57 49 64 40 110 112 37 11 96 95 94 73 60 119 24 46 76 102 57 47 60 50 58 20 39 56 73 97 10 47 51 121 50 94 78 75 37 64 88 99 98 132 17 91 97 5 66 24 32 39 82 84 64 18 21 56...
output:
5000 203 2155 556 1229 606 572 586 1385 1392 2128 2297 2334 2337 1133 98 109 206 403 582 585 1228 1386 1387 2081 2296 2336 2083 2129 2295 2301 2302 2127 2082 1206 1227 1230 1384 1391 1393 2126 2154 2300 2160 2299 2372 2298 2161 2131 2085 1226 1184 587 1132 1210 1211 1378 1233 1370 1232 1234 1231 123...
result:
ok m = 5000
Test #38:
score: 25
Accepted
time: 87ms
memory: 107868kb
input:
5000 15000 43 24 124 21 95 93 72 106 22 17 27 19 67 86 115 62 51 108 90 76 32 53 5 33 50 34 94 87 42 75 24 45 40 105 28 118 33 12 90 43 81 41 79 107 74 89 47 120 57 38 45 48 63 7 19 12 65 51 10 118 73 100 92 20 53 58 41 51 29 51 58 110 89 31 105 76 84 67 33 48 10 29 6 32 112 58 64 29 21 86 10 7 8 24...
output:
5000 155 412 1476 2296 2295 673 1460 2229 2294 2169 1467 2154 2164 2168 2418 2288 2289 2290 2297 2293 2298 2409 2292 2230 2253 2282 2231 2252 2255 2281 2283 2408 2291 2170 2165 1466 936 669 672 935 1461 973 1443 1445 1468 2167 2166 988 992 994 993 969 972 929 715 373 411 372 374 402 407 663 930 968 ...
result:
ok m = 5000
Test #39:
score: 25
Accepted
time: 79ms
memory: 108456kb
input:
4995 14985 99 91 53 115 60 25 40 70 9 7 20 38 21 90 67 51 72 57 111 65 55 96 115 38 103 53 8 127 67 24 92 76 120 15 81 42 87 62 63 82 79 99 113 52 99 73 81 14 65 97 50 85 119 28 13 16 21 86 52 50 27 115 90 28 54 50 97 74 82 101 83 22 106 80 71 90 84 16 40 110 2 50 8 22 57 112 16 59 45 45 71 64 75 46...
output:
4995 2501 2660 360 2165 2579 2642 2661 2643 2580 2522 361 1255 1262 1261 1260 829 48 355 359 714 837 2641 1254 2578 2581 2637 2640 2521 2565 2577 1264 2520 2525 2576 2583 2657 2659 2639 2582 816 417 423 815 833 834 2502 1265 2168 2564 2575 2574 2584 2658 2561 2563 838 1263 1266 2519 2562 2524 2526 2...
result:
ok m = 4995
Test #40:
score: 25
Accepted
time: 85ms
memory: 111244kb
input:
4999 14997 47 58 54 49 76 68 107 77 69 92 39 16 36 79 91 68 91 74 42 49 80 43 88 61 13 25 46 97 26 12 21 110 89 31 72 71 7 23 42 29 6 3 47 126 128 45 53 80 37 64 61 43 74 43 47 69 39 70 99 90 62 30 34 15 26 83 6 5 58 110 28 51 112 54 113 62 53 71 40 41 40 108 7 126 7 38 116 43 55 69 89 49 82 27 28 1...
output:
4999 757 1798 1845 745 754 758 1723 1861 2787 2784 1844 1848 1858 1683 1688 464 107 212 225 744 1678 927 1388 1398 1679 1852 1860 2786 2785 1859 1851 1797 1687 1720 1722 1721 930 929 490 213 222 489 428 477 697 756 1399 1686 1354 1340 1327 1328 1670 1689 1850 2788 1857 1862 2779 2780 2783 2789 1719 ...
result:
ok m = 4999
Test #41:
score: 25
Accepted
time: 91ms
memory: 109080kb
input:
5000 15000 25 113 49 89 82 22 102 51 90 64 80 44 50 111 30 98 91 85 39 15 29 108 106 40 71 63 48 44 41 47 98 29 10 17 38 18 69 53 30 64 91 72 122 54 64 82 40 35 56 99 17 121 64 2 99 69 106 53 47 80 107 33 48 25 57 61 57 89 66 75 9 105 42 8 51 30 43 57 91 28 37 55 21 41 51 43 71 70 80 46 91 39 49 59 ...
output:
5000 677 1543 1732 1745 1731 1733 1734 1336 1266 1324 1548 1547 1259 55 212 1258 1250 1249 1119 1121 1335 1344 1558 1728 1730 1546 1557 1265 1009 322 977 1008 1045 1123 1545 1337 1544 1542 1345 1261 1264 1267 1556 1735 1744 1323 1555 1729 1743 1716 1346 1343 1128 1252 1260 1263 1322 1271 1321 1330 1...
result:
ok m = 5000
Test #42:
score: 25
Accepted
time: 76ms
memory: 107980kb
input:
4995 14985 101 69 85 81 38 30 14 38 80 53 73 86 54 60 48 111 5 7 82 58 74 63 20 10 75 76 27 88 74 61 83 89 33 128 31 116 28 35 65 40 41 53 105 48 46 72 94 62 54 114 15 97 19 11 65 34 56 63 20 45 14 9 46 69 27 84 76 56 7 21 7 14 44 125 105 7 54 68 53 114 73 99 81 105 36 59 96 62 99 29 54 12 64 98 76 ...
output:
4995 2358 2361 2529 2528 2339 799 968 947 134 10 31 451 982 2338 1824 2334 2337 2527 2340 785 981 786 789 885 798 884 2336 2341 1832 1833 985 517 758 135 180 184 528 493 502 784 788 790 988 2317 2526 2530 2531 1831 2313 2357 2525 2335 948 967 1626 1830 1834 2524 2360 2359 1623 1625 984 987 989 1829 ...
result:
ok m = 4995
Test #43:
score: 25
Accepted
time: 129ms
memory: 124968kb
input:
5000 15000 1067 1050 1259 292 1224 258 340 559 1573 969 1614 633 1682 1082 1630 651 1683 697 858 866 1817 1237 1459 470 1508 921 731 721 96 94 1098 1077 1485 500 1722 732 1467 482 1743 1138 1647 1054 1866 1286 818 818 493 708 1483 498 321 539 1631 1035 126 295 1401 781 441 658 716 703 1412 799 1465 ...
output:
5000 1 4 8 11 14 16 17 18 19 21 23 26 27 28 29 31 32 33 460 462 465 468 470 472 473 475 476 478 480 482 483 484 486 487 489 492 493 494 495 496 497 498 505 507 508 510 511 512 516 517 518 519 520 521 525 527 529 530 531 536 538 540 542 543 545 546 547 548 549 550 551 552 555 556 557 560 562 563 567 ...
result:
ok m = 5000
Test #44:
score: 25
Accepted
time: 131ms
memory: 123236kb
input:
4994 14982 1535 416 986 452 28 639 197 801 863 297 1859 166 567 1111 149 753 649 1187 743 1281 59 670 609 1148 637 1183 1075 326 381 942 975 429 218 230 1161 409 1590 477 1175 440 259 880 1561 451 1635 522 1304 572 1530 408 217 823 105 383 100 511 387 946 356 923 1353 625 239 245 147 552 143 751 225...
output:
4994 4 7 9 824 825 826 828 829 833 834 837 839 840 844 845 846 848 849 850 1255 1256 1258 1262 1266 1270 1273 1275 1283 1284 1286 1288 1289 1290 1292 1293 1296 1297 1300 1301 1302 1305 1306 1307 1309 1312 1314 1316 1320 1321 1324 1325 1326 1334 1336 1338 1340 1341 1343 1346 1348 1351 1352 1353 1354 ...
result:
ok m = 4994
Test #45:
score: 25
Accepted
time: 137ms
memory: 129184kb
input:
4994 14982 208 198 741 720 929 898 510 491 1342 880 1697 810 1611 729 221 215 877 853 1867 964 1877 982 1091 600 1349 893 1095 601 1923 1047 2103 1270 485 1399 1429 717 693 1606 1019 533 1497 783 446 408 426 384 375 344 329 308 742 724 1620 737 878 854 94 111 2055 1214 1362 922 1061 575 1336 872 126...
output:
4994 3 4 14 17 19 20 22 25 28 30 31 35 38 39 41 42 44 46 48 49 50 51 53 59 61 63 64 67 68 70 71 73 75 76 77 80 83 95 96 97 98 99 100 101 104 106 107 108 109 111 113 118 119 123 124 125 126 128 132 135 136 139 141 144 145 146 147 148 149 150 158 159 160 162 163 165 166 173 175 176 179 181 182 184 186...
result:
ok m = 4994
Test #46:
score: 25
Accepted
time: 114ms
memory: 126384kb
input:
4997 14991 572 296 116 124 1492 455 319 119 341 241 1320 1036 1532 493 1340 1060 428 123 1529 489 177 167 571 293 617 396 534 262 519 502 837 603 386 216 566 290 1274 973 365 267 1235 828 604 327 424 119 698 656 277 84 1212 924 1572 544 889 655 144 135 1149 125 1288 287 1286 990 1209 189 1125 729 18...
output:
4997 1 5 7 9 10 28 30 31 32 33 34 35 38 39 41 42 46 48 55 56 57 63 64 65 70 72 74 78 80 82 83 84 91 92 93 95 96 97 98 99 103 104 105 106 107 110 112 114 118 123 130 135 136 139 141 142 143 144 145 146 147 148 152 153 155 156 158 159 160 162 165 166 169 171 173 174 175 176 179 180 181 187 188 189 192...
result:
ok m = 4997
Test #47:
score: 25
Accepted
time: 111ms
memory: 114452kb
input:
5000 15000 190 888 323 1623 137 838 332 1730 468 1414 102 806 142 1441 829 1171 527 475 148 1444 324 376 612 573 259 1556 619 1572 619 581 344 1744 837 1179 103 809 562 916 426 1482 659 1618 716 1672 436 474 400 1458 770 1124 882 1220 213 256 627 1577 358 1068 335 391 706 1048 82 100 728 1080 730 10...
output:
5000 2 3 6 7 8 10 11 13 14 16 17 24 26 28 29 34 35 36 37 38 39 40 42 44 45 46 49 50 52 53 57 58 1568 1569 1571 1579 1580 1582 1583 1584 1585 1588 1590 1591 1593 1594 1595 1598 1601 1605 1606 1609 1610 1613 1614 1617 1620 1623 1624 1626 1628 1630 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1647...
result:
ok m = 5000
Test #48:
score: 25
Accepted
time: 123ms
memory: 127012kb
input:
4998 14994 660 774 1447 755 1345 664 659 444 1868 524 767 884 1855 510 1703 369 753 533 1326 650 748 870 1203 1297 1925 595 64 60 1660 321 334 340 968 1079 1383 704 1228 535 1836 495 201 183 1368 690 1998 673 37 32 1110 1203 389 137 534 623 1085 1183 300 302 1893 547 1481 910 1294 622 844 961 1179 1...
output:
4998 1 2 3 4 7 8 9 10 12 14 17 18 19 20 21 24 25 26 27 31 32 33 37 38 39 41 48 49 54 57 59 60 61 63 65 66 68 71 72 75 84 85 86 93 94 95 96 99 100 101 103 104 105 106 107 108 109 113 116 117 118 121 122 125 129 130 131 132 136 137 141 142 143 145 146 148 149 153 155 156 164 165 166 168 171 172 173 17...
result:
ok m = 4998
Test #49:
score: 25
Accepted
time: 132ms
memory: 127428kb
input:
5000 15000 333 371 2035 648 1304 829 636 1067 263 313 1037 555 1443 931 49 65 681 1101 1762 363 597 1029 152 194 630 826 45 60 419 458 2101 714 795 1189 400 442 1694 305 1700 309 1243 761 232 267 257 293 2085 706 689 889 647 1082 1112 634 698 728 116 155 1542 352 735 760 820 1209 1696 308 744 1147 7...
output:
5000 1 3 6 13 22 23 24 28 29 33 35 37 39 40 44 46 47 50 51 52 54 55 57 59 60 63 64 65 68 69 70 71 72 74 75 76 84 85 86 87 88 104 105 106 108 110 112 114 120 129 134 135 136 139 142 143 144 145 146 147 149 151 152 153 154 158 159 160 161 163 165 170 173 175 176 182 183 185 189 191 192 193 194 200 201...
result:
ok m = 5000
Test #50:
score: 25
Accepted
time: 144ms
memory: 123880kb
input:
5000 15000 589 296 112 115 978 1271 796 943 1001 1288 1104 787 847 1660 559 261 593 298 1293 2078 1151 1949 871 1685 1006 1174 823 1626 472 167 955 617 727 445 1066 1360 57 56 389 136 956 1239 1014 1176 981 1795 1115 1415 774 416 1000 1287 1379 2177 811 461 637 346 838 493 1046 1850 783 420 619 324 ...
output:
5000 3 4 5 9 12 13 15 17 20 25 31 33 35 37 38 39 42 43 44 46 47 49 51 53 57 58 59 61 62 66 69 70 71 74 75 76 77 78 80 81 83 84 88 92 93 96 98 101 102 105 106 107 108 109 110 111 112 114 119 120 122 123 125 128 130 133 136 138 141 142 143 144 149 150 151 157 158 159 160 161 163 164 165 172 175 176 18...
result:
ok m = 5000
Subtask #5:
score: 10
Accepted
Test #51:
score: 10
Accepted
time: 1456ms
memory: 447712kb
input:
5000 15000 3799 2355 3148 1945 2075 2576 234 3151 842 4678 3244 262 2826 526 243 1815 3706 3798 680 4151 453 2906 4012 4999 3843 1570 1945 4955 2768 1409 4037 2471 2597 3513 1475 2741 47 2990 4774 1 3064 215 2920 2779 4172 1224 2063 133 756 2785 4328 4024 4270 4982 4784 3694 2948 4383 1883 2484 4945...
output:
14866 12583 12777 1 2 12283 6775 3431 3 2632 1825 4 5 7316 6 7 11491 12713 8351 8 3500 4184 4744 10042 9 10 11 12 2555 7352 4833 6331 13 14 15 2930 12074 12894 2562 16 17 5912 18 19 3486 9452 20 21 22 11180 9553 2078 8654 5661 2584 1974 23 24 25 11936 26 9589 27 28 29 10473 30 6431 7001 31 4155 32 3...
result:
ok m = 14866
Test #52:
score: 10
Accepted
time: 1484ms
memory: 447880kb
input:
4996 14988 3295 757 4117 1045 1319 4408 3943 762 4423 2781 2336 3325 190 60 2169 4089 3056 775 3391 3678 2978 2701 4117 2731 1929 4126 72 4663 952 2982 305 4522 3962 2860 1926 3014 3290 2140 3563 3235 2377 2603 2750 1221 797 1692 4068 3487 1326 1587 2152 4565 3884 1178 3917 1929 1642 3391 1695 4657 ...
output:
14851 1 6423 2 3 4 5 8422 6 7942 7 8 14170 14497 5089 9 10 11 12 13 14 15 14824 411 7888 11079 11118 16 17 18 19 5662 8257 20 21 4759 8750 14713 10909 22 23 24 25 26 3770 8244 27 28 29 13414 891 30 31 32 33 34 7597 5467 3778 35 36 37 5170 14449 2654 38 39 4695 14809 14825 5490 40 4162 5013 10892 41 ...
result:
ok m = 14851
Test #53:
score: 10
Accepted
time: 1476ms
memory: 447444kb
input:
4999 14997 4036 394 1087 4534 3257 2368 1815 3272 4886 1834 2965 1477 1030 1369 1891 3570 983 2443 4995 1411 1592 3448 1361 3837 104 3684 1135 1937 1953 3139 1397 2063 3649 191 55 994 3548 1327 1089 4279 15 2006 4699 3574 3947 3947 2678 1574 4725 418 652 4233 1592 4301 1652 3791 143 2103 4978 3864 1...
output:
14862 1 12370 12770 2 3 4 5 2873 14573 7228 6 1628 7 8 10079 9 6426 8373 10 11 12 12965 13 11785 14 5726 2766 5456 8666 15 16 17 6515 18 19 20 14294 21 9858 5857 22 4241 23 24 25 26 14839 3992 27 28 29 30 13922 31 11839 10550 32 7220 5594 33 34 3439 11134 3778 6770 5604 35 559 36 37 38 1938 13326 39...
result:
ok m = 14862
Test #54:
score: 10
Accepted
time: 1507ms
memory: 447716kb
input:
4998 14994 1235 4135 2906 3535 2785 689 2621 1658 3550 442 4499 4288 2270 4915 1566 1653 2350 2821 3722 2275 4162 3320 2618 3715 476 1114 59 2472 2583 3538 2675 2684 2173 1388 4073 1590 4272 2807 2234 4486 4335 3320 4527 1198 3395 290 3626 2118 577 3665 3870 4064 4630 3218 4419 2338 1309 3632 1382 4...
output:
14865 600 1 2 3 1455 4 5 12429 12095 6 4301 7 8 4141 8557 14210 9 10 11 12 10137 4836 8679 11309 4052 13 3047 14 15 16 17 7397 18 19 10061 14313 20 21 11647 6036 5603 22 2447 23 457 10745 24 25 4711 12363 26 4660 3659 27 28 6078 29 30 4617 4401 31 32 33 8769 34 2970 10591 14781 8716 53 54 55 56 57 1...
result:
ok m = 14865
Test #55:
score: 10
Accepted
time: 1218ms
memory: 447472kb
input:
4995 14985 1954 1766 3519 3444 821 747 101 69 3042 2968 4248 4308 506 438 8 4 2111 2038 1758 1512 149 112 1328 1099 1281 1070 275 215 2560 2490 593 472 4901 4886 3420 3297 3232 3117 3471 3323 4897 4884 4126 4143 2273 2192 1366 1107 2538 2436 235 169 4417 4468 4382 4440 708 594 1301 1090 4904 4884 43...
output:
12545 54 1 23 67 76 77 78 2 3 53 12 26 4 5 7 27 84 56 79 22 8 15 16 55 17 52 75 57 25 32 33 35 36 68 37 38 70 85 60 40 41 83 80 43 45 72 48 61 82 88 89 101 102 104 105 111 112 113 114 115 116 117 118 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 146 140 141 142 143 145 148 ...
result:
ok m = 12545
Test #56:
score: 10
Accepted
time: 1251ms
memory: 447292kb
input:
5000 15000 2407 2290 1858 1757 326 345 1908 1788 531 508 2373 2223 2007 1864 4854 4862 3048 2965 4252 4190 3293 3139 912 849 3228 3102 1398 1364 2959 2856 3994 3942 379 378 4162 4125 4896 4919 3357 3236 2503 2377 4497 4481 628 582 3067 2981 1522 1436 78 122 4841 4847 2579 2549 2580 2550 916 833 1745...
output:
12569 1 13 16 17 18 20 21 22 33 40 43 44 45 47 49 50 55 56 57 58 69 70 76 71 72 77 78 79 80 81 82 83 85 87 86 88 89 90 91 92 93 100 101 102 103 104 120 109 113 121 135 136 138 142 144 145 147 151 152 156 157 158 161 163 164 183 189 191 192 194 196 261 216 245 234 240 248 257 252 241 200 201 203 215 ...
result:
ok m = 12569
Test #57:
score: 10
Accepted
time: 1260ms
memory: 447340kb
input:
4999 14997 3178 3008 3696 3555 1424 1347 1066 1075 4982 4942 726 697 2648 2566 100 110 2053 1963 4024 4040 4920 4912 3389 3267 4317 4418 2360 2302 1676 1716 2276 2251 2842 2690 3852 3816 2357 2299 4260 4323 2623 2543 4801 4836 2668 2579 2303 2266 3146 2981 4185 4208 614 557 4712 4726 3078 2958 3550 ...
output:
12514 1 2 3 4 5 6 7 8 22 9 21 10 13 27 30 31 32 33 34 35 36 37 38 40 39 41 42 46 47 48 49 50 57 51 56 52 53 60 61 62 71 63 70 64 69 73 65 66 72 87 111 101 107 90 98 91 92 93 112 114 115 174 252 153 121 122 163 177 158 159 155 143 129 140 136 131 123 124 125 176 162 126 161 178 253 142 144 160 145 15...
result:
ok m = 12514
Test #58:
score: 10
Accepted
time: 1243ms
memory: 447236kb
input:
5000 15000 240 245 20 20 3775 4032 1199 1194 3098 3289 1815 2028 578 595 1787 1952 2344 2472 2603 2824 4352 4379 4151 4274 3102 3288 1559 1613 1525 1510 710 745 1893 2186 3007 3233 1888 2181 3483 3743 3520 3778 1820 2056 348 331 775 820 4602 4638 4658 4720 365 325 828 932 2526 2653 3476 3731 414 409...
output:
12586 1 2 3 4 7 8 9 10 11 12 13 14 15 16 17 18 20 37 21 31 48 47 34 36 39 42 70 46 63 50 53 54 57 62 65 136 73 102 74 75 135 128 76 78 144 129 79 113 103 80 81 145 137 112 82 83 139 146 101 104 84 85 86 87 147 127 143 138 88 89 90 91 92 93 94 96 95 97 105 148 150 131 134 106 107 116 130 117 119 122 ...
result:
ok m = 12586
Test #59:
score: 10
Accepted
time: 1281ms
memory: 447320kb
input:
4994 14982 4658 4615 1177 1119 2789 2734 1816 1810 4195 4191 4351 4358 87 72 769 667 783 665 900 809 1256 1219 3454 3320 2151 2218 459 420 1511 1525 4254 4248 2737 2653 2326 2376 3483 3391 1988 2009 704 624 4173 4108 2879 2886 550 479 2508 2502 562 504 382 302 4364 4398 2160 2223 3148 3091 1080 966 ...
output:
12510 4 5 34 38 25 17 6 14 27 28 29 31 62 76 69 73 56 39 40 58 70 79 41 42 47 48 80 49 78 50 51 52 57 63 77 87 88 89 97 90 91 96 92 93 95 94 98 99 100 101 102 131 103 105 128 104 106 107 130 108 109 110 111 112 113 114 115 116 117 118 129 119 120 121 122 123 124 125 161 150 145 134 139 153 144 147 1...
result:
ok m = 12510
Test #60:
score: 10
Accepted
time: 1252ms
memory: 447268kb
input:
4997 14991 680 694 2574 2560 1783 1777 571 552 3541 3511 2286 2177 2352 2299 3786 3778 1942 1886 2848 2675 166 175 3300 3207 2817 2665 4342 4327 4127 4076 2581 2565 2820 2665 2621 2565 71 68 2029 2006 4403 4342 3387 3374 1270 1247 4474 4414 770 723 663 647 37 50 731 724 3589 3564 1758 1744 3348 3269...
output:
12554 1 4 41 10 23 5 6 9 11 12 13 14 16 28 17 18 19 24 40 25 27 26 30 32 33 42 37 39 46 48 50 51 52 53 54 55 93 83 66 79 67 75 101 68 71 86 94 96 124 97 105 108 111 125 104 114 119 127 140 142 156 141 143 144 145 146 147 148 149 150 151 152 158 159 161 163 165 166 167 168 169 170 171 173 174 175 160...
result:
ok m = 12554
Test #61:
score: 10
Accepted
time: 1453ms
memory: 410232kb
input:
5000 15000 672 1006 388 413 547 550 294 1297 87 235 599 2076 444 1070 353 2375 592 2068 10 10 629 957 635 965 726 2217 613 930 341 1790 452 1465 333 1784 444 460 92 238 356 1365 481 826 186 1640 11 15 249 349 413 1864 211 1213 357 695 529 535 448 460 769 2285 264 1270 315 2320 448 790 208 1210 232 1...
output:
11900 1 3 4 8 11 13 15 16 17 20 26 28 31 33 34 37 38 40 41 42 43 45 46 50 51 54 58 59 60 61 66 67 68 70 71 73 74 82 83 87 88 338 340 342 343 345 346 349 351 353 354 355 358 359 360 361 362 365 368 370 372 375 379 380 381 383 384 385 388 397 399 403 404 405 409 410 411 412 413 414 415 416 417 421 423...
result:
ok m = 11900
Test #62:
score: 10
Accepted
time: 1213ms
memory: 400240kb
input:
5000 15000 207 296 1343 874 1199 707 382 737 175 546 873 356 1483 1007 1730 983 1286 807 220 307 211 301 567 925 72 107 1658 914 1445 958 139 170 224 599 1459 969 210 582 193 283 26 49 56 437 1671 923 302 667 550 898 2062 1290 1363 885 205 241 96 132 166 540 944 439 199 577 196 409 1210 718 244 333 ...
output:
11523 1 3 4 5 7 8 12 14 15 17 21 25 28 30 47 50 51 55 59 63 67 68 69 72 74 79 80 84 87 91 92 821 822 823 824 826 832 833 834 835 837 838 839 840 841 842 846 848 849 851 853 855 856 857 858 859 862 863 865 867 869 870 871 874 876 878 880 882 883 884 889 891 892 896 897 900 903 904 905 906 907 911 912...
result:
ok m = 11523
Subtask #6:
score: 20
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
100%
Accepted
Dependency #5:
100%
Accepted
Test #63:
score: 20
Accepted
time: 1478ms
memory: 447708kb
input:
5000 15000 1310 4139 3536 1155 3469 37 2983 2956 2904 232 2057 2023 1185 3884 3215 1483 4198 835 355 2689 187 2511 781 1799 837 4319 4266 2695 4499 1191 1376 1441 4498 2865 3512 2246 654 3530 1867 3020 569 23 840 4619 872 85 1270 440 1238 1675 2006 1058 1408 1012 4934 232 432 4325 4903 3837 1830 209...
output:
14859 13171 1677 6778 1 2 6633 1616 3 4 13781 5 4807 11737 4891 5282 6 883 7 84 85 86 12889 87 11709 88 4808 3803 89 90 10857 8830 1196 6082 7847 8891 10703 11669 4397 91 92 809 93 94 119 1404 10932 120 121 7606 5953 122 123 941 14511 5903 1355 2336 124 125 126 127 1078 1556 13935 128 129 130 131 12...
result:
ok m = 14859
Test #64:
score: 20
Accepted
time: 1450ms
memory: 447504kb
input:
4995 14985 3299 1676 2976 2875 1012 3338 2512 4282 4437 2443 230 914 9 1609 474 1655 320 1475 1605 944 1852 3057 1760 902 1193 631 4437 2013 2838 1540 2248 200 2857 2236 4014 3750 1003 1228 2074 3573 2398 1158 402 4334 3169 4733 500 513 16 4837 603 2006 4813 4819 3144 1250 1704 4886 2114 396 3519 34...
output:
14832 8940 9061 8342 2806 1798 1 2 1914 7467 3 1123 4 5 6 7449 7 8 3344 9 10 12503 10761 11 12 6428 8762 8707 13 14 460 14331 15 16 13501 5702 10153 11506 17 456 4238 1929 1947 6367 18 19 20 1606 21 22 4258 23 24 9408 25 26 12391 27 8885 3543 6457 28 40 5178 13017 12947 4426 41 42 43 1546 8115 14660...
result:
ok m = 14832
Test #65:
score: 20
Accepted
time: 1602ms
memory: 448012kb
input:
5000 15000 2909 3709 2600 2137 299 3638 2657 3365 519 1547 2621 4556 4311 2545 693 3249 1486 1195 4711 1681 2373 52 4007 3042 788 4371 1579 583 4906 4847 2236 1954 1577 1174 2206 1217 406 3842 1026 2637 4345 2091 4247 2857 3632 270 4397 3345 1628 1746 4157 1276 4480 161 1551 12 129 3013 563 1199 308...
output:
14854 11875 1 2 3676 9178 3 1638 254 4 5 6 13431 7 3104 2306 8 509 9862 9 10 11 11125 11207 7792 6011 1972 12 13 2848 2509 495 2052 13433 12198 14 15 16 2430 2442 4587 4329 17 18 2138 19 20 21 13419 22 431 23 24 10817 622 25 26 6744 27 2240 28 29 3193 30 31 14018 32 1927 3897 3286 33 34 35 36 37 38 ...
result:
ok m = 14854
Test #66:
score: 20
Accepted
time: 807ms
memory: 336464kb
input:
5000 15000 2968 189 1839 1380 979 1393 2916 2061 44 1140 2541 1257 389 3379 3209 1762 1127 2338 1911 1578 91 433 1119 2608 639 1802 205 2862 3582 139 4436 9 2079 1434 1502 1827 1800 2507 2280 2157 1840 921 438 209 854 3289 603 2482 2850 1976 152 390 724 1584 101 562 827 1331 528 3563 1010 11 1084 39...
output:
14654 1 9827 10543 10542 10541 10540 10539 10538 10537 10536 10535 10534 10533 10532 10531 10530 10529 10528 10527 10526 10525 10524 10523 10522 10521 10520 2 5495 9357 7837 8675 9415 10296 7838 1261 3538 3 4 2950 4302 5 456 2182 4728 2134 1348 6 443 7 8 659 9 10 11 9563 8681 8565 2241 2356 12 1274 ...
result:
ok m = 14654
Test #67:
score: 20
Accepted
time: 752ms
memory: 335904kb
input:
4994 14982 108 3664 963 1492 2285 336 3332 353 3948 470 671 53 420 236 509 2949 1013 1811 282 981 2733 92 870 407 3584 633 1920 247 2227 1683 2830 1349 1688 2568 918 1390 628 3055 1175 1159 811 79 195 3057 3709 732 329 3303 1598 333 4504 40 956 3504 4916 30 912 11 4346 116 121 3393 3472 563 478 3792...
output:
14640 8694 1780 1 829 2 3 11108 10265 10600 9440 7280 1497 2143 8881 9455 8325 2620 4 5 6 7 8 6501 6611 11244 8746 9341 9406 9246 7916 9 10 5519 2277 1659 11 1511 8894 673 1109 4270 10402 10687 2605 2690 9682 5077 6692 3588 12 13 14 1820 15 16 17 3126 8070 10919 9253 10233 2641 760 18 19 6254 20 21 ...
result:
ok m = 14640
Test #68:
score: 20
Accepted
time: 772ms
memory: 336996kb
input:
5000 15000 429 1052 78 3444 1310 3413 2115 847 2042 724 3625 858 510 1380 39 4428 1736 924 1369 1225 751 375 151 829 937 3982 98 4487 1843 3002 2251 1335 4050 26 3896 112 1828 664 1811 2560 891 2887 366 4347 914 1707 1932 1131 1345 929 3803 256 2865 1070 672 1484 2581 665 2436 2177 1706 1627 817 160...
output:
14659 11519 11548 11911 7493 10337 9806 3513 5533 857 2493 1 2 3 9974 11944 9514 4 80 81 86 11668 11164 11083 9868 1232 8098 10939 7532 7876 9098 11893 11839 11382 7710 5758 87 88 2411 90 91 5368 92 1362 5351 93 94 2927 11338 4422 8187 3972 95 2346 96 97 98 11510 10145 11326 10229 11117 3276 99 100 ...
result:
ok m = 14659
Test #69:
score: 20
Accepted
time: 764ms
memory: 337268kb
input:
5000 15000 838 3690 2263 1673 2477 428 1696 699 2681 1603 800 201 2351 866 2541 2328 3265 196 325 2140 925 2939 968 3557 677 2234 385 1093 963 2200 1074 2816 665 736 1466 3439 3486 414 3080 323 999 3727 1918 2173 3427 764 1445 2278 1145 3546 2239 2189 1815 2735 36 606 4270 341 972 2943 1234 462 513 ...
output:
14661 10167 11341 1 8037 10187 11206 11268 6897 1128 2 3 9781 8546 4256 4 5 9202 3785 6197 11196 9997 10007 6171 6 7 920 8235 8359 7298 3616 2220 8 9 10 8127 3411 2430 11 1497 12 13 8577 8814 14 6150 15 16 11368 17 18 11203 19 10884 20 21 8729 8907 9992 8160 7584 3939 6929 22 2098 23 24 6090 9736 11...
result:
ok m = 14661
Test #70:
score: 20
Accepted
time: 799ms
memory: 335852kb
input:
5000 15000 955 3757 2130 27 1959 12 4068 169 344 32 1420 1842 77 2332 724 645 1176 3316 1620 309 1300 3265 1044 1815 959 888 29 2741 146 3366 1383 2342 1735 2812 2256 1716 2806 518 442 1181 1097 89 594 2235 892 2818 191 406 2577 1728 290 2505 1341 3525 600 1091 3540 275 2095 508 1857 1881 602 1953 1...
output:
14555 8437 10529 9227 8277 737 1222 7804 8290 1 2 1041 6734 532 117 3 4 5 4378 9947 5998 6 36 37 7721 9707 7909 3243 4946 5288 9302 8269 8221 38 39 40 41 293 10278 8694 10026 9296 42 43 2307 8853 10460 8585 44 45 46 3075 7752 4280 3168 1797 47 1512 48 178 9738 8770 9588 49 50 7336 9529 2283 5303 434...
result:
ok m = 14555
Test #71:
score: 20
Accepted
time: 1150ms
memory: 408060kb
input:
5000 15000 3061 1456 266 2931 1154 1800 2122 2611 2436 4172 345 3617 1154 2455 4389 1306 499 2226 955 1219 2207 30 1876 3602 3231 2433 125 2171 2749 968 40 4768 2464 3844 1111 2784 651 138 2541 2545 2731 3088 3750 543 608 2004 1563 3211 1849 3112 485 3943 2934 243 620 1568 1827 4033 2034 181 1199 47...
output:
14790 9615 1 2020 12437 2 3 11173 11929 4340 4 5 8439 6 7 8099 6793 7215 8 3560 2235 1972 9 10 11 7169 12 7122 10761 13 1086 10631 8409 3157 14 949 15 16 6806 12149 11762 1763 3675 17 696 1137 18 19 20 21 9961 6188 6397 7201 22 5466 634 1456 3573 11629 12014 10102 7579 23 24 25 26 27 28 8345 5769 29...
result:
ok m = 14790
Test #72:
score: 20
Accepted
time: 1252ms
memory: 408884kb
input:
4998 14994 4410 2145 3657 2418 3154 98 2839 343 1860 4559 1828 3663 1615 1862 529 2748 1775 4538 508 4406 3341 2520 2212 1406 746 118 4194 2542 2607 348 3482 2417 1893 1385 1971 3317 4429 232 1108 3291 2558 4139 491 3469 2105 615 4429 343 2303 4137 1981 1680 846 2471 3854 355 1195 601 1915 2546 2102...
output:
14777 10179 1 7228 10762 7468 2 676 3 4 7113 6713 5 6 7 8 1094 9899 9 10 7798 6315 11 6000 451 5059 1789 12 13 265 9069 7896 266 3046 10227 5227 6503 2166 267 268 269 4369 10198 6979 271 1406 272 273 5714 274 275 8927 276 7233 277 278 9772 4351 6564 5316 279 2788 280 281 9163 9846 4910 282 284 1192 ...
result:
ok m = 14777
Test #73:
score: 20
Accepted
time: 1209ms
memory: 447360kb
input:
5000 15000 1489 1383 1484 1376 1940 1876 1934 1860 4709 4721 4377 4405 763 711 2019 1917 2816 2734 3258 3233 2537 2421 2314 2207 2689 2603 735 691 2969 2894 1246 1145 192 113 3569 3574 3615 3626 1458 1402 4833 4848 1121 1001 3207 3197 3524 3522 1471 1426 2674 2550 3664 3676 2661 2555 4539 4498 4054 ...
output:
12617 1 2 3 12 4 5 6 7 8 9 21 23 11 13 14 15 16 24 25 26 51 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 52 53 54 59 60 61 62 63 64 65 66 67 71 70 72 73 74 105 99 98 85 76 77 106 78 79 80 94 82 87 88 107 110 112 127 128 129 150 136 137 146 138 139 153 154 155 156 157 184 158 159...
result:
ok m = 12617
Test #74:
score: 20
Accepted
time: 144ms
memory: 131640kb
input:
5000 15000 2154 154 746 321 2469 266 2273 262 1742 245 1036 593 1988 479 2081 275 997 563 887 451 2225 227 1612 97 976 541 2135 125 1496 1035 192 153 422 383 674 260 2007 499 728 308 1511 1039 586 169 1322 891 2293 278 1463 1000 275 229 966 530 849 415 1866 376 417 372 507 456 529 478 1560 52 572 14...
output:
5000 1 2 3 4 5 8 10 11 14 17 18 22 23 24 26 27 29 30 31 32 34 36 37 38 40 41 42 47 50 55 56 59 60 61 63 64 65 67 70 71 72 74 75 76 77 78 79 80 84 85 88 89 90 91 92 93 94 96 95 87 86 83 82 81 73 69 68 98 99 101 105 107 108 109 110 111 114 116 118 119 121 122 123 125 126 129 133 134 135 137 138 139 14...
result:
ok m = 5000
Test #75:
score: 20
Accepted
time: 167ms
memory: 132168kb
input:
4996 14988 631 661 86 88 1663 1583 159 152 7 9 1724 1630 2442 1837 1843 1184 1262 1171 1721 1628 1694 1606 1646 1568 1208 1112 400 396 66 69 1414 1337 1373 1286 1815 1711 1187 1089 2405 1773 1823 1726 2232 1591 2087 1433 1079 1096 511 521 344 344 632 666 92 91 710 741 1558 1490 1077 1094 1141 1031 1...
output:
4996 5 7 8 10 13 14 16 17 18 19 22 23 25 30 31 33 38 40 41 42 44 45 46 47 50 51 52 53 54 55 57 60 61 63 67 69 70 71 73 74 75 76 78 79 80 81 91 96 105 106 108 110 113 114 115 118 121 122 123 125 126 127 128 129 133 134 135 139 142 143 144 145 146 147 148 150 154 155 159 160 161 162 170 171 172 173 17...
result:
ok m = 4996
Test #76:
score: 20
Accepted
time: 1136ms
memory: 405280kb
input:
5000 15000 1 1 1 2 2 2 2 3 3 3 3 4 3 5 4 5 5 5 5 6 5 7 5 8 6 8 6 9 6 10 6 11 7 11 7 12 8 12 9 12 10 12 11 12 12 12 12 13 12 14 13 14 14 14 15 14 15 15 16 15 16 16 17 16 17 17 18 17 19 17 20 17 21 17 22 17 23 17 23 18 23 19 24 19 24 20 25 20 26 20 26 21 26 22 26 23 27 23 28 23 28 24 28 25 29 25 30 25...
output:
12954 2 4 7 8 12 16 344 347 348 349 352 354 355 625 628 632 633 641 645 646 647 648 651 654 655 659 662 665 669 670 673 674 675 677 678 680 684 686 687 689 691 692 693 694 697 700 702 704 705 706 707 710 712 715 716 717 721 723 725 726 728 729 730 731 734 735 736 742 743 744 748 749 750 751 753 755 ...
result:
ok m = 12954
Test #77:
score: 20
Accepted
time: 1127ms
memory: 405444kb
input:
5000 15000 1 1 2 1 3 1 4 1 4 2 4 3 4 4 5 4 6 4 7 4 7 5 7 6 8 6 8 7 9 7 10 7 11 7 12 7 13 7 13 8 14 8 15 8 15 9 15 10 15 11 16 11 16 12 16 13 17 13 18 13 19 13 20 13 21 13 22 13 23 13 24 13 25 13 26 13 27 13 27 14 28 14 29 14 30 14 30 15 30 16 30 17 31 17 32 17 32 18 33 18 33 19 33 20 33 21 33 22 34 ...
output:
12658 1 2 3 7 8 9 12 14 15 16 17 18 20 21 25 28 29 30 31 32 33 34 35 36 37 38 40 41 42 46 47 49 54 56 60 61 64 63 62 59 58 57 65 66 67 71 72 73 74 75 76 80 81 82 83 86 87 88 89 90 92 93 94 95 96 97 98 104 105 110 111 109 108 107 106 103 102 101 100 99 91 85 84 79 78 77 70 69 114 115 116 119 121 126 ...
result:
ok m = 12658
Test #78:
score: 20
Accepted
time: 1046ms
memory: 406408kb
input:
4995 14985 1 1 1 2 2 2 2 3 3 3 4 3 4 4 5 4 6 4 7 4 7 5 7 6 7 7 7 8 7 9 7 10 7 11 8 11 8 12 9 12 9 13 9 14 9 15 10 15 10 16 10 17 10 18 10 19 11 19 11 20 12 20 12 21 13 21 13 22 13 23 13 24 14 24 14 25 15 25 15 26 15 27 15 28 16 28 16 29 16 30 16 31 16 32 16 33 16 34 16 35 17 35 17 36 17 37 17 38 18 ...
output:
12676 2 4 5 7 8 9 17 19 23 28 30 32 36 38 42 50 54 56 57 61 62 64 65 70 71 72 73 74 76 78 79 80 81 84 88 92 94 96 97 99 101 102 105 106 109 110 111 113 119 123 124 126 127 128 129 130 131 134 137 138 140 141 148 149 153 154 155 158 159 160 161 162 163 164 166 167 170 172 173 177 179 180 182 258 259 ...
result:
ok m = 12676
Test #79:
score: 20
Accepted
time: 1195ms
memory: 406544kb
input:
5000 15000 1 1 1 2 2 2 3 2 4 2 4 3 4 4 5 4 5 5 6 5 7 5 7 6 7 7 7 8 8 8 8 9 8 10 8 11 9 11 9 12 9 13 10 13 11 13 11 14 11 15 12 15 13 15 14 15 14 16 14 17 15 17 16 17 17 17 17 18 18 18 18 19 19 19 19 20 19 21 20 21 21 21 22 21 22 22 23 22 24 22 24 23 24 24 24 25 25 25 26 25 26 26 27 26 28 26 29 26 30...
output:
12381 2 3 4 7 9 10 14 18 21 22 25 26 27 30 31 32 34 36 39 40 41 43 44 48 49 51 52 53 54 57 58 59 62 63 65 66 74 75 79 80 83 85 86 88 90 91 92 93 96 97 99 100 104 105 106 109 110 112 114 116 122 125 126 127 130 131 133 137 139 140 141 142 146 149 151 156 157 158 159 161 163 167 169 171 172 174 175 18...
result:
ok m = 12381
Test #80:
score: 20
Accepted
time: 1122ms
memory: 448964kb
input:
5000 15000 1 5000 2 4999 3 4998 4 4997 5 4996 6 4995 7 4994 8 4993 9 4992 10 4991 11 4990 12 4989 13 4988 14 4987 15 4986 16 4985 17 4984 18 4983 19 4982 20 4981 21 4980 22 4979 23 4978 24 4977 25 4976 26 4975 27 4974 28 4973 29 4972 30 4971 31 4970 32 4969 33 4968 34 4967 35 4966 36 4965 37 4964 38...
output:
14997 9998 1 9997 2 9996 3 9995 4 9994 5 9993 6 9992 7 9991 8 9990 9 9989 10 9988 11 9987 12 9986 13 9985 14 9984 15 9983 16 9982 17 9981 18 9980 19 9979 20 9978 21 9977 22 9976 23 9975 24 9974 25 9973 26 9972 27 9971 28 9970 29 9969 30 9968 31 9967 32 9966 33 9965 34 9964 35 9963 36 9962 37 9961 38...
result:
ok m = 14997
Extra Test:
score: 0
Extra Test Passed