QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#423560#8730. Particijamonstersqwq100 ✓141ms56816kbC++175.0kb2024-05-28 09:47:442024-05-28 09:47:44

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 7
Accepted

Test #1:

score: 7
Accepted
time: 0ms
memory: 32292kb

input:

751 0
5
5 5 5 5 5
1 2 3 4 5
6
1 2 2 6 4 5
3 6 3 4 3 3
8
5 8 6 5 4 3 6 6
3 4 4 3 2 6 6 2
5
1 1 1 1 1
5 5 4 3 3
8
5 7 3 7 8 2 7 5
4 2 6 3 6 2 5 6
8
5 8 7 3 4 6 5 2
3 3 3 3 3 3 1 3
6
2 1 3 1 3 6
5 5 3 6 3 5
8
8 6 2 4 7 7 4 1
7 7 3 3 7 7 3 3
5
2 1 4 4 2
1 2 1 4 1
6
2 2 2 2 2 2
5 3 2 1 4 6
7
4 1 7 4 2 3 ...

output:

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

result:

ok 751 numbers

Subtask #2:

score: 23
Accepted

Dependency #1:

100%
Accepted

Test #2:

score: 23
Accepted
time: 23ms
memory: 32420kb

input:

10000 0
1
1
1
22
3 20 22 15 8 18 14 19 15 11 18 15 15 19 20 14 10 20 19 4 18 20
22 19 9 17 2 17 8 9 22 22 8 2 15 9 19 6 15 17 9 22 22 1
6
4 1 4 1 4 4
2 2 3 3 3 2
2
1 1
2 2
65
16 27 7 58 30 4 58 59 30 45 27 58 65 15 20 26 58 48 58 25 4 39 4 16 28 28 28 33 59 30 59 19 48 41 59 58 4 65 25 20 59 42 45 5...

output:

1
9
2
1
22
1
15
3
10
1
1
2
1
2
1
10
1
2
5
3
1
17
4
4
1
5
22
1
1
2
11
5
9
4
6
2
2
7
4
8
1
1
1
1
1
6
3
4
8
9
21
1
2
1
1
2
5
5
5
1
1
3
5
5
1
6
1
4
3
1
2
1
10
1
1
11
1
1
1
17
38
2
11
4
5
1
4
1
4
2
16
5
4
25
4
23
8
9
5
6
5
1
3
1
1
1
2
2
1
1
1
2
2
3
38
24
5
5
2
4
4
2
9
7
1
6
35
4
1
3
8
8
12
4
12
2
6
2
4
1...

result:

ok 10000 numbers

Test #3:

score: 0
Accepted
time: 19ms
memory: 30592kb

input:

10000 0
5
2 4 5 3 1
3 3 3 3 3
39
3 5 24 31 18 26 12 18 16 27 1 2 20 20 4 34 4 20 14 38 2 34 13 10 25 31 23 20 2 31 30 35 22 31 6 36 29 21 22
22 4 30 11 35 14 11 10 14 21 18 10 10 22 10 10 18 29 9 4 4 9 10 10 21 36 35 13 16 34 16 18 29 31 34 10 29 9 20
42
12 13 22 25 13 11 11 3 11 13 19 41 3 20 38 11...

output:

1
16
6
12
23
24
3
4
6
3
21
5
15
3
7
7
2
10
6
8
1
2
5
3
15
2
9
3
1
19
3
15
9
1
7
1
2
2
1
6
1
9
1
2
3
8
4
11
3
12
10
14
1
2
1
2
5
14
3
4
1
24
9
3
4
9
5
5
13
1
9
3
1
1
7
1
11
9
14
3
4
6
3
6
1
5
5
1
14
8
4
5
13
4
21
4
1
18
1
1
7
1
21
29
2
12
6
4
2
1
1
1
7
4
1
1
25
2
3
3
4
4
23
2
8
1
1
14
5
3
3
10
7
2
5
...

result:

ok 10000 numbers

Test #4:

score: 0
Accepted
time: 22ms
memory: 30560kb

input:

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

output:

6
1
1
2
4
7
17
7
2
2
2
2
1
6
19
11
7
2
13
1
10
2
1
15
2
8
2
1
3
2
2
1
1
5
1
7
4
5
1
17
6
11
8
1
16
1
2
5
1
12
4
1
17
1
1
4
4
12
2
1
1
32
22
5
1
1
51
1
1
3
5
5
1
5
5
8
1
7
2
4
2
3
4
9
1
1
1
1
5
2
6
2
1
4
1
16
3
3
1
3
11
6
2
4
6
12
1
1
6
4
1
7
1
5
1
5
1
4
2
6
5
1
1
2
4
4
14
1
26
1
2
10
2
5
10
2
11
1
2...

result:

ok 10000 numbers

Test #5:

score: 0
Accepted
time: 81ms
memory: 45492kb

input:

1 0
200000
187537 18767 101813 163606 48410 170649 76822 130218 89330 118401 172319 59998 23511 38330 144493 25491 8802 151268 189229 12042 4447 90944 3117 74158 20010 127637 161507 144844 81563 30958 14332 56186 135755 152121 71529 70034 79871 110696 85775 153001 135318 169390 85445 93814 32413 848...

output:

51015

result:

ok 1 number(s): "51015"

Test #6:

score: 0
Accepted
time: 67ms
memory: 46012kb

input:

1 0
200000
35028 121987 18839 127027 111261 194927 82719 113384 153997 35176 27076 183194 48387 128670 189053 112598 195273 194243 41109 180804 108702 177398 9342 45879 199964 197302 37350 17230 49346 57628 41197 170195 92073 107978 94705 171598 61622 70349 81374 111639 31947 13890 51348 79679 785 1...

output:

55719

result:

ok 1 number(s): "55719"

Test #7:

score: 0
Accepted
time: 62ms
memory: 47196kb

input:

1 0
200000
138519 168476 183840 134736 190461 5116 13667 159468 133786 4190 119815 130598 141492 33050 40906 139150 151429 101609 18214 120314 164914 138694 108838 154071 80487 94010 93009 38605 112559 140771 141675 16819 76448 113377 36185 115247 139527 117111 15998 148912 177636 29482 177219 17397...

output:

44165

result:

ok 1 number(s): "44165"

Test #8:

score: 0
Accepted
time: 69ms
memory: 45748kb

input:

1 0
200000
3513 67285 198547 32776 5797 143977 34496 176480 75284 72200 82905 116098 40986 199651 70240 90517 147287 14722 26032 90245 19925 80740 150300 91991 162748 29580 104389 127295 84353 172689 90217 126969 189559 117484 90336 153782 192791 125420 172800 48998 130350 43857 173431 23110 143590 ...

output:

47160

result:

ok 1 number(s): "47160"

Test #9:

score: 0
Accepted
time: 76ms
memory: 46260kb

input:

1 0
200000
83034 29934 7639 53738 86571 112470 188606 151239 174639 115197 160615 90066 70477 69825 71274 13167 157710 175588 184042 9329 195761 54008 133119 126080 123098 53084 22530 29648 108438 4312 105264 184797 71622 172887 184926 79439 143700 79447 174229 193304 64335 6959 12576 100452 94876 3...

output:

59514

result:

ok 1 number(s): "59514"

Test #10:

score: 0
Accepted
time: 79ms
memory: 47408kb

input:

1 0
200000
71735 59782 40990 159955 158396 61677 120140 108108 90472 120033 93945 159982 173388 111158 91048 38935 137669 127656 185936 153538 178865 4112 11119 21865 127899 8673 24290 154377 160836 139774 67706 95473 106305 94872 182031 185824 1449 173005 67567 184610 91139 142203 8189 20355 80902 ...

output:

59388

result:

ok 1 number(s): "59388"

Test #11:

score: 0
Accepted
time: 60ms
memory: 45568kb

input:

1 0
200000
75179 83698 165139 112108 56661 40923 34829 22484 96146 29060 71444 119149 21277 50989 105192 160539 1085 167863 131915 182220 57630 196589 4991 84041 49825 102945 192364 186625 72791 154368 185326 88337 96848 70737 40769 100184 111261 115171 65620 198383 18518 154456 106359 116713 110737...

output:

48580

result:

ok 1 number(s): "48580"

Test #12:

score: 0
Accepted
time: 70ms
memory: 46484kb

input:

1 0
200000
186148 38986 30647 142364 182882 35923 161993 54055 116406 23087 153956 22532 142684 60155 64145 9603 5183 17445 159714 12970 185475 54218 24157 84518 45909 47548 91423 158033 122406 28216 165342 12747 12658 42337 103290 29555 164211 197186 181766 122891 178563 5498 15663 157410 181528 16...

output:

21886

result:

ok 1 number(s): "21886"

Test #13:

score: 0
Accepted
time: 84ms
memory: 46932kb

input:

1 0
200000
130206 46063 98170 21224 6304 60015 55867 151125 157945 191346 117918 133897 94404 113743 181378 3827 92280 122192 90462 40961 30650 82537 30753 42205 66585 184818 173919 151847 16997 121028 113142 25101 37747 85759 98605 48681 126382 48717 158856 34089 5221 20482 107091 92811 90437 32241...

output:

50093

result:

ok 1 number(s): "50093"

Subtask #3:

score: 15
Accepted

Test #14:

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

input:

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

output:

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

result:

ok 719 numbers

Test #15:

score: 0
Accepted
time: 6ms
memory: 30296kb

input:

4998 1
8
8 6 4 7 7 2 2 4
4 4 4 5 5 7 7 4
9
6 1 7 7 2 9 3 6 5
8 8 8 8 8 8 8 8 8
3
3 2 1
2 2 2
17
12 12 11 3 16 11 12 17 12 16 12 10 12 6 17 3 17
5 6 5 8 11 6 10 11 11 1 8 16 14 5 8 1 2
21
12 21 4 21 12 9 4 8 3 12 5 12 5 16 11 12 9 3 21 5 12
18 17 17 2 3 21 17 21 14 12 5 12 15 8 11 18 11 14 2 21 18
7
...

output:

3
1
1
6
8
2
2
4
1
1
1
1
2
1
1
1
1
5
2
3
10
1
3
1
4
5
1
1
3
3
1
4
2
1
1
6
4
2
1
1
1
1
2
1
17
3
8
4
7
1
1
1
5
5
6
3
1
1
1
1
1
4
2
6
1
1
1
1
4
5
10
2
1
1
21
1
5
1
1
14
1
1
2
1
4
1
1
2
2
1
8
1
8
4
3
1
1
1
1
4
1
2
1
1
6
2
1
4
3
4
4
5
1
4
5
5
1
3
3
5
2
20
2
1
7
2
1
1
1
2
1
8
4
1
1
2
2
4
1
5
4
1
2
6
2
1
1
...

result:

ok 4998 numbers

Test #16:

score: 0
Accepted
time: 13ms
memory: 30492kb

input:

4996 1
12
3 11 8 12 10 10 8 9 5 10 12 7
9 6 9 1 7 5 6 11 7 12 8 9
5
1 3 2 2 4
1 1 1 3 3
2
1 2
2 1
4
3 1 1 4
4 4 2 4
2
1 2
1 1
1
1
1
5
4 5 2 3 1
2 5 2 1 2
7
4 2 5 4 7 5 7
2 6 7 5 2 6 1
3
3 2 1
3 1 1
2
1 2
1 1
1
1
1
1
1
1
15
15 12 3 6 5 10 2 10 11 4 9 1 10 11 14
14 11 5 4 4 11 11 5 11 5 4 4 9 14 11
7
...

output:

5
2
1
1
1
1
2
3
1
1
1
1
4
1
1
1
1
5
1
2
2
2
3
2
1
2
5
2
31
1
2
19
1
2
2
1
1
3
8
1
4
20
8
3
1
7
2
2
5
1
1
1
1
1
6
4
3
1
6
1
2
2
3
2
3
3
1
5
1
2
3
1
11
4
2
4
1
2
1
1
15
4
3
1
3
1
1
2
6
1
2
4
5
3
3
10
2
1
4
1
1
5
1
2
11
1
1
6
1
5
1
7
1
5
1
2
1
6
3
5
5
2
6
2
4
2
7
2
6
1
7
11
1
1
2
3
3
8
2
3
7
1
1
1
2
7
...

result:

ok 4996 numbers

Test #17:

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

input:

5000 1
4
4 1 1 1
1 1 1 1
8
6 8 3 5 6 5 3 6
2 8 4 2 8 5 6 6
18
2 2 13 11 16 11 11 14 11 13 13 11 16 11 17 7 4 13
11 1 16 12 12 4 11 10 3 8 10 14 9 9 1 11 11 11
4
2 4 3 3
2 2 2 2
4
3 4 4 3
3 1 3 4
2
2 2
2 2
2
1 1
1 1
2
2 1
2 2
10
5 2 6 6 6 5 4 6 6 6
10 7 1 7 1 3 7 9 7 10
4
3 3 3 3
4 4 4 4
9
7 3 5 7 3 ...

output:

1
3
7
1
2
1
1
1
3
1
3
1
7
5
3
1
1
1
3
3
1
1
3
4
5
2
1
4
1
3
1
2
1
1
1
3
9
1
2
1
1
1
1
1
1
1
5
1
2
1
4
2
2
6
3
1
1
4
4
2
6
3
1
1
7
1
5
1
1
1
13
3
1
1
1
7
2
2
1
4
2
11
1
2
1
3
8
1
1
1
1
10
1
1
2
1
1
2
3
2
1
2
2
3
1
2
1
1
6
2
1
5
3
13
3
3
5
2
1
2
1
2
1
1
7
3
5
1
1
2
1
1
1
2
1
1
15
2
1
2
1
1
2
1
2
1
1
1...

result:

ok 5000 numbers

Test #18:

score: 0
Accepted
time: 3ms
memory: 30276kb

input:

1 1
1000
633 994 363 66 897 652 945 525 339 813 479 735 9 729 294 9 655 424 633 387 476 315 193 343 640 331 561 841 652 960 946 388 106 273 485 344 797 691 719 787 279 37 215 982 975 945 323 596 311 591 331 385 395 786 221 157 243 786 864 256 732 395 82 802 117 423 208 968 365 935 362 459 443 121 33...

output:

248

result:

ok 1 number(s): "248"

Test #19:

score: 0
Accepted
time: 3ms
memory: 30268kb

input:

1 1
1000
179 574 133 562 425 802 55 15 889 624 248 622 628 800 34 579 776 789 404 550 351 226 167 83 623 580 15 945 499 793 455 777 862 733 37 410 571 70 64 308 581 127 335 239 169 550 675 462 814 710 326 462 297 601 698 682 169 198 280 793 549 273 550 836 269 193 258 239 705 135 714 378 870 427 956...

output:

278

result:

ok 1 number(s): "278"

Test #20:

score: 0
Accepted
time: 6ms
memory: 30288kb

input:

1 1
1000
898 691 835 424 7 666 117 986 612 789 467 4 172 789 385 1 986 353 352 928 967 384 129 46 410 575 385 835 114 998 900 298 163 966 772 302 51 939 53 327 842 651 944 351 528 338 774 587 332 53 545 762 715 183 708 837 636 247 829 836 504 210 219 450 836 254 772 308 176 424 443 708 953 308 434 8...

output:

207

result:

ok 1 number(s): "207"

Test #21:

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

input:

1 1
1000
741 709 192 79 802 741 571 530 597 387 826 351 684 704 276 220 383 36 251 382 269 340 201 794 841 64 579 511 424 983 647 938 17 611 80 950 53 106 294 904 396 511 192 692 500 602 98 592 64 581 464 213 633 30 627 168 157 530 600 112 678 954 962 674 637 922 209 597 773 765 206 171 568 846 370 ...

output:

233

result:

ok 1 number(s): "233"

Test #22:

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

input:

1 1
1000
240 83 712 773 844 867 597 292 483 939 212 444 418 234 610 599 348 319 80 24 163 55 573 851 664 740 274 491 260 17 890 141 720 840 653 900 958 180 739 517 837 14 399 352 405 734 904 253 230 757 90 594 908 129 588 40 731 67 653 653 14 464 975 811 842 84 1 530 696 775 797 420 846 533 463 65 8...

output:

263

result:

ok 1 number(s): "263"

Test #23:

score: 0
Accepted
time: 5ms
memory: 30280kb

input:

1 1
1000
790 545 546 830 38 741 712 434 192 729 837 417 350 944 905 478 722 960 70 480 327 103 474 313 729 481 391 494 155 166 253 15 97 553 192 15 329 326 396 329 419 287 247 960 120 746 969 553 403 202 662 247 208 674 851 474 881 647 674 232 712 958 72 87 653 162 976 433 2 222 110 326 440 572 881 ...

output:

341

result:

ok 1 number(s): "341"

Test #24:

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

input:

1 1
1000
90 30 659 547 306 39 69 539 758 339 72 549 115 348 561 213 95 47 990 329 994 836 619 565 78 3 927 622 613 505 233 881 32 407 578 562 239 776 22 498 302 686 147 596 121 247 544 211 935 609 807 78 322 904 340 87 808 544 284 690 264 265 360 704 792 425 661 651 567 983 703 469 747 995 944 615 7...

output:

249

result:

ok 1 number(s): "249"

Test #25:

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

input:

1 1
1000
554 963 963 226 756 601 650 771 846 300 651 98 756 313 165 877 952 650 637 70 79 846 165 313 70 884 795 342 19 650 922 841 587 952 631 910 340 663 884 627 517 474 580 846 846 383 782 877 587 895 663 949 342 515 70 70 474 313 895 782 909 739 55 19 739 739 846 795 841 841 342 474 70 958 696 6...

output:

95

result:

ok 1 number(s): "95"

Test #26:

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

input:

1 1
1000
500 687 186 491 239 925 191 835 279 26 428 999 403 610 333 886 233 438 876 736 297 957 443 80 296 231 921 629 687 526 202 427 936 39 357 730 982 324 876 857 994 581 589 471 631 203 540 911 903 97 471 833 541 225 604 388 696 382 581 629 428 203 810 952 952 288 480 913 604 116 662 408 756 722...

output:

473

result:

ok 1 number(s): "473"

Subtask #4:

score: 16
Accepted

Dependency #3:

100%
Accepted

Test #27:

score: 16
Accepted
time: 0ms
memory: 30420kb

input:

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

output:

2
2
3
3
2
3
2
2
2
3
1
1
1
2
1
3
2
2
2
3
1
1
2
1
2
2
2
2
2
3
3
1
2
3
1
2
1
2
1
1
1
1
2
3
3
1
1
1
1
3
2
2
2
2
2
1
2
1
2
3
3
2
2
2
3
2
2
2
2
1
1
2
2
2
1
1
2
2
2
2
1
1
2
3
1
3
1
2
2
3
1
2
1
1
2
1
2
1
1
3
1
2
1
3
2
2
1
2
2
1
3
2
2
1
2
2
1
1
2
2
3
2
2
2
1
2
1
3
2
2
1
2
1
1
2
2
1
2
2
1
2
1
1
2
3
2
2
1
2
2
...

result:

ok 736 numbers

Test #28:

score: 0
Accepted
time: 29ms
memory: 30620kb

input:

10000 1
1
1
1
92
3 74 7 4 40 5 9 56 70 64 1 6 56 47 9 17 67 92 2 9 72 48 28 9 9 77 82 45 9 53 63 24 9 90 9 69 84 79 10 65 41 14 32 34 60 19 12 21 80 18 9 59 9 47 71 32 42 9 23 9 9 30 46 28 45 11 29 83 28 79 36 9 37 89 81 14 9 46 68 75 9 38 5 8 43 22 82 44 6 9 85 91
45 45 37 37 26 82 58 35 45 37 37 3...

output:

1
11
11
6
4
5
1
12
3
1
13
1
8
1
2
1
3
9
3
5
9
7
1
2
2
3
3
13
10
1
1
2
6
3
11
1
2
2
1
1
5
1
3
2
30
5
4
4
4
5
1
1
5
6
2
7
5
1
1
2
9
3
2
2
1
16
30
19
8
6
1
6
9
4
5
1
1
4
2
9
2
13
30
2
1
1
1
7
2
1
3
21
5
1
6
2
2
1
2
1
9
3
5
3
1
1
3
8
7
9
2
1
1
1
1
1
6
16
4
1
2
1
1
3
4
5
4
2
2
17
5
5
3
2
3
2
1
1
16
10
15...

result:

ok 10000 numbers

Test #29:

score: 0
Accepted
time: 29ms
memory: 30608kb

input:

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

output:

13
2
4
8
8
5
2
4
2
5
19
1
6
10
1
32
2
9
1
2
9
7
1
1
8
1
11
5
7
14
3
7
1
1
19
5
16
3
7
2
2
1
3
1
11
2
2
2
6
22
5
7
1
11
7
2
2
1
2
1
2
6
1
19
8
15
4
15
23
34
1
8
3
3
8
8
1
1
3
1
5
8
4
4
1
2
1
1
8
13
11
15
1
2
8
1
12
5
17
2
6
1
4
11
3
2
1
4
1
2
7
1
3
10
2
7
1
15
2
5
2
13
2
3
15
4
1
1
4
3
1
5
14
1
2
1
2...

result:

ok 10000 numbers

Test #30:

score: 0
Accepted
time: 27ms
memory: 30408kb

input:

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

output:

1
3
4
3
1
3
6
1
6
14
1
1
1
1
2
1
2
12
6
1
9
1
13
4
9
8
10
1
6
12
1
1
2
14
2
5
1
3
6
11
1
1
4
1
5
1
4
6
4
2
13
1
1
2
2
15
7
7
17
11
34
2
4
1
6
2
1
3
12
10
4
1
11
1
1
1
9
6
1
1
1
2
6
4
9
3
34
2
11
6
6
3
1
4
6
29
8
1
3
12
3
1
1
1
1
3
1
1
3
2
1
18
3
1
1
2
8
6
4
5
1
1
4
12
6
26
1
1
6
5
3
18
2
2
1
4
11
3
...

result:

ok 10000 numbers

Test #31:

score: 0
Accepted
time: 88ms
memory: 46512kb

input:

1 1
200000
152716 61247 110532 28736 162558 10205 149834 38265 148755 106426 122820 30352 88550 100163 116927 99364 31104 99401 185496 123827 169456 15660 128395 112719 82779 117942 36568 34830 116661 64044 9157 26775 20146 23713 172346 70146 141692 103196 58439 63131 187620 121200 98786 21101 17547...

output:

50848

result:

ok 1 number(s): "50848"

Test #32:

score: 0
Accepted
time: 93ms
memory: 47444kb

input:

1 1
200000
79408 71299 9709 91315 136219 21079 65255 187194 155800 179436 6085 138759 132393 168454 144574 23207 55025 140485 169719 175481 145738 139751 154654 174764 181620 122865 116184 182067 59757 88140 102136 4554 39678 85258 138693 45173 98603 102038 86879 32734 191328 23861 154912 52080 8722...

output:

55224

result:

ok 1 number(s): "55224"

Test #33:

score: 0
Accepted
time: 90ms
memory: 46440kb

input:

1 1
200000
126216 2827 154559 187802 81950 4595 183581 166973 157942 168327 26522 44001 69156 73722 189942 7637 43365 150222 193995 18331 147607 197974 136123 122325 30673 34712 61801 22400 7293 130511 28920 46636 164316 156823 76919 98417 10403 195790 44278 56959 63172 63299 75751 130676 103432 124...

output:

38065

result:

ok 1 number(s): "38065"

Test #34:

score: 0
Accepted
time: 86ms
memory: 46600kb

input:

1 1
200000
106929 194533 90264 38304 13117 187726 67748 32162 60832 100003 180178 180303 166173 190804 54627 35729 148106 197338 23637 180092 31476 105800 13517 1983 104661 119058 96321 15134 194429 59438 117523 156947 58804 8153 14839 70418 21636 181451 130748 61192 9802 178424 195417 38073 15666 1...

output:

33795

result:

ok 1 number(s): "33795"

Test #35:

score: 0
Accepted
time: 93ms
memory: 46820kb

input:

1 1
200000
189965 30507 148210 111730 47313 181835 171929 37857 161390 8544 30077 120819 160591 42393 105251 116340 104384 93734 57914 114389 145376 39620 87729 158798 170907 69782 137907 129939 94680 53552 17150 177162 42663 157177 141319 192357 79453 69828 133983 108921 22223 158314 178564 2189 18...

output:

53965

result:

ok 1 number(s): "53965"

Test #36:

score: 0
Accepted
time: 89ms
memory: 46172kb

input:

1 1
200000
66833 175249 86731 46951 63249 57675 21990 51882 70840 184957 139350 157419 18817 168128 78684 144390 39163 184865 34998 91604 151753 180200 165159 68651 39017 71793 123502 32055 190881 119493 4603 9482 175249 183599 102162 120044 55746 89639 128562 73921 37158 152977 159988 164809 150710...

output:

28431

result:

ok 1 number(s): "28431"

Test #37:

score: 0
Accepted
time: 103ms
memory: 45184kb

input:

1 1
200000
13548 51166 39297 77082 2831 146102 33920 2535 45889 42509 174941 132682 44671 36691 186936 116239 59472 172171 182840 126446 105134 183334 159596 191586 58057 144278 48362 95043 83781 62123 9834 143316 96103 12726 68048 70645 160872 64844 191570 146919 125116 111523 50882 50860 174776 16...

output:

95873

result:

ok 1 number(s): "95873"

Test #38:

score: 0
Accepted
time: 85ms
memory: 45436kb

input:

1 1
200000
61686 79794 30914 179831 116905 148884 130231 169435 144863 45286 56480 158325 87460 151161 159800 113099 106547 94662 62485 165357 130604 145593 199784 178429 141202 94669 168072 44143 169632 111985 57474 113655 6215 143894 46316 48734 160398 89004 46224 120453 108735 131195 48026 157758...

output:

81109

result:

ok 1 number(s): "81109"

Test #39:

score: 0
Accepted
time: 85ms
memory: 46488kb

input:

1 1
200000
198099 95670 36890 40716 87639 184338 91215 136831 52451 194978 154523 29005 145217 1680 150761 31010 74811 187132 152251 26629 69928 168496 32612 88716 143170 52169 180352 65604 134072 56852 76824 142310 199020 170148 193522 36860 60694 109272 151484 115493 103327 8572 84605 199660 16133...

output:

66044

result:

ok 1 number(s): "66044"

Subtask #5:

score: 19
Accepted

Test #40:

score: 19
Accepted
time: 3ms
memory: 30276kb

input:

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

output:

4
3
3
2
4
4
3
3
3
4
3
5
3
3
4
2
3
5
3
3
2
3
3
3
3
4
5
2
3
3
3
5
5
2
3
3
4
4
4
4
4
4
2
3
3
3
3
3
5
4
2
5
3
2
4
2
4
3
4
3
4
3
3
2
3
4
3
4
2
3
3
5
2
4
3
3
4
4
3
4
4
4
3
5
2
3
4
4
4
3
4
4
2
4
2
3
4
5
2
3
4
2
4
2
3
3
4
4
4
3
3
4
2
3
4
3
5
3
4
3
5
3
2
2
3
2
2
4
2
2
4
5
2
2
4
2
4
2
4
3
2
3
3
3
4
3
3
4
3
4
...

result:

ok 704 numbers

Test #41:

score: 0
Accepted
time: 14ms
memory: 30364kb

input:

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

output:

10
5
2
8
3
3
4
4
1
3
1
3
10
1
2
10
2
1
2
6
7
1
4
1
1
2
12
2
2
1
4
10
9
4
3
8
3
1
6
2
11
1
1
1
1
1
4
2
2
2
2
9
2
3
1
4
7
4
2
3
2
2
3
3
4
2
4
2
2
1
3
2
15
3
6
1
3
11
2
4
1
1
7
6
1
3
3
6
5
8
11
6
3
4
5
4
3
3
1
2
5
4
4
6
1
12
8
7
6
2
7
1
3
6
4
2
4
2
2
1
2
2
2
1
2
1
1
4
3
1
1
1
3
1
6
3
4
5
1
1
1
7
5
1
5
...

result:

ok 4996 numbers

Test #42:

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

input:

4993 2
17
17 9 13 15 5 7 9 14 3 15 14 15 2 11 17 1 6
6 17 13 4 4 13 13 7 13 13 13 11 13 13 11 11 6
2
1 2
2 2
14
1 2 5 3 8 6 8 13 12 11 2 10 5 9
12 12 4 12 9 5 12 9 12 9 5 12 12 9
5
1 1 5 5 5
3 5 1 2 3
15
2 15 8 6 10 12 1 14 6 3 14 10 4 14 13
6 6 6 11 8 6 6 8 7 6 7 10 6 3 6
31
25 23 5 24 23 31 5 5 8 ...

output:

7
2
5
3
6
13
6
3
8
1
8
3
6
2
3
3
8
5
7
11
2
18
6
6
10
1
7
2
12
2
3
7
1
6
2
4
2
3
18
4
2
2
3
2
5
7
1
3
2
3
2
5
7
3
7
2
19
6
1
3
2
5
5
11
2
3
2
4
3
4
3
10
3
6
3
2
8
3
3
6
3
2
13
3
5
10
3
7
7
5
2
3
2
2
4
7
6
5
4
5
2
3
4
8
6
6
1
11
1
2
1
2
8
6
8
5
3
8
4
2
10
2
3
5
4
1
3
12
5
7
3
11
9
6
7
5
3
6
2
8
1
5
8...

result:

ok 4993 numbers

Test #43:

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

input:

5000 2
6
3 2 2 3 2 2
3 3 3 5 5 5
1
1
1
5
5 3 2 1 4
5 5 5 5 5
7
1 1 5 1 1 5 1
3 1 3 2 6 4 7
3
1 2 3
1 1 1
1
1
1
46
36 2 2 2 1 33 19 44 1 1 1 2 44 36 19 1 2 44 1 1 19 2 1 2 19 1 33 2 44 2 2 44 1 1 33 19 33 44 1 1 19 1 44 2 1 1
5 41 36 15 45 33 42 25 38 21 31 10 7 15 2 12 8 4 30 17 8 44 37 29 13 14 38 ...

output:

2
1
2
3
2
1
7
2
6
2
3
5
2
4
1
9
1
2
1
1
1
3
3
3
2
3
3
2
1
1
1
1
1
1
4
4
2
1
2
6
3
2
1
3
9
2
2
2
1
1
1
1
11
9
6
2
22
3
3
6
1
6
3
2
10
3
2
1
2
3
1
2
4
15
11
2
4
7
2
1
3
4
7
1
2
2
2
4
2
2
6
2
6
2
3
4
2
2
1
4
3
4
4
4
2
2
1
6
5
2
7
11
1
6
6
2
2
5
6
2
4
2
9
8
3
2
2
2
2
2
1
2
1
3
5
3
8
2
4
1
2
5
8
2
2
2
2
...

result:

ok 5000 numbers

Test #44:

score: 0
Accepted
time: 3ms
memory: 30372kb

input:

1 2
1000
246 481 902 933 615 815 67 564 616 604 339 43 79 227 684 789 33 659 795 628 828 195 208 273 543 428 337 564 188 537 945 827 161 789 625 999 612 733 225 825 259 789 825 598 126 154 645 852 158 520 438 996 120 207 441 543 583 760 782 196 237 957 675 819 257 24 366 316 564 765 788 362 66 161 1...

output:

288

result:

ok 1 number(s): "288"

Test #45:

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

input:

1 2
1000
892 745 411 443 538 802 348 558 395 608 889 889 915 611 524 456 8 955 736 560 516 258 316 917 737 363 571 395 999 608 868 385 27 796 579 462 919 910 949 883 931 152 602 374 158 34 32 494 203 93 802 206 598 315 32 769 693 49 611 66 446 254 773 277 949 648 623 424 395 115 236 611 123 716 377 ...

output:

300

result:

ok 1 number(s): "300"

Test #46:

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

input:

1 2
1000
740 343 166 721 674 749 115 68 171 785 845 919 168 41 736 922 239 227 672 92 894 560 275 171 742 962 984 15 68 70 419 532 437 692 63 800 358 489 314 590 303 284 827 740 471 324 431 84 431 385 31 680 692 886 46 83 330 343 484 991 55 699 33 130 919 476 939 844 54 395 105 155 40 231 482 55 309...

output:

369

result:

ok 1 number(s): "369"

Test #47:

score: 0
Accepted
time: 3ms
memory: 30408kb

input:

1 2
1000
473 592 430 505 246 505 211 631 186 92 534 667 751 740 333 321 674 613 775 239 902 867 346 768 740 770 715 67 971 941 848 246 920 817 755 798 22 668 542 24 603 937 777 495 337 702 278 102 147 944 508 900 254 839 631 376 13 514 666 829 740 26 629 43 432 581 740 501 505 265 166 914 534 167 86...

output:

285

result:

ok 1 number(s): "285"

Test #48:

score: 0
Accepted
time: 7ms
memory: 30412kb

input:

1 2
1000
307 234 336 811 277 890 296 418 207 576 202 307 836 277 103 611 811 619 319 272 537 774 937 647 307 519 384 650 811 588 307 430 108 727 102 650 350 693 314 165 161 387 90 694 759 13 562 619 918 958 378 307 238 365 818 956 762 813 500 842 735 835 115 873 480 493 123 363 132 67 697 183 243 73...

output:

346

result:

ok 1 number(s): "346"

Test #49:

score: 0
Accepted
time: 5ms
memory: 30332kb

input:

1 2
1000
876 729 932 496 496 876 328 643 509 785 932 334 932 500 974 500 797 876 797 509 496 496 197 509 197 460 932 500 504 974 876 500 455 729 974 592 197 504 197 460 500 276 328 328 974 932 197 509 496 496 736 500 328 496 643 649 736 649 334 932 460 932 496 334 876 460 592 797 197 736 328 504 328...

output:

21

result:

ok 1 number(s): "21"

Test #50:

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

input:

1 2
1000
873 806 865 303 627 931 839 313 946 811 770 219 151 832 545 50 693 462 370 476 845 59 729 883 759 768 228 762 828 115 464 888 508 781 676 840 819 628 822 305 490 601 947 873 894 959 626 368 77 48 630 764 311 417 657 67 339 570 211 642 190 87 943 620 795 506 141 985 103 592 267 475 610 35 29...

output:

140

result:

ok 1 number(s): "140"

Test #51:

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

input:

1 2
1000
717 437 130 458 765 946 461 253 946 259 303 954 797 74 322 296 892 336 483 612 93 124 4 837 716 186 161 807 740 100 338 677 369 63 893 183 966 903 479 902 672 748 63 998 793 641 199 326 738 667 259 310 674 831 913 822 921 754 152 188 297 517 988 560 716 788 845 703 587 753 68 982 224 125 91...

output:

457

result:

ok 1 number(s): "457"

Test #52:

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

input:

1 2
1000
63 748 826 895 153 791 363 171 423 831 808 881 684 156 628 111 446 369 544 457 916 824 756 73 107 748 628 849 44 286 213 983 510 210 924 790 56 149 214 864 119 574 999 19 43 606 54 469 805 550 492 568 200 418 985 517 461 920 719 259 91 768 195 396 68 20 19 221 372 496 337 52 990 51 719 829 ...

output:

382

result:

ok 1 number(s): "382"

Subtask #6:

score: 20
Accepted

Dependency #5:

100%
Accepted

Test #53:

score: 20
Accepted
time: 0ms
memory: 30204kb

input:

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

output:

3
3
4
3
4
3
3
3
5
4
4
3
3
2
2
2
3
4
2
3
5
3
4
2
3
3
3
4
3
3
4
3
4
3
3
3
4
4
4
2
3
2
2
4
4
3
4
2
2
4
4
3
4
3
3
4
4
4
4
4
2
5
3
3
2
3
4
3
4
3
3
4
2
2
3
5
3
2
5
2
3
3
4
3
4
4
2
3
3
3
3
4
4
4
3
5
4
3
5
3
4
3
4
4
3
3
2
4
5
4
2
5
3
4
4
3
4
4
3
3
2
4
2
4
2
3
4
2
3
4
2
2
2
4
4
3
3
3
3
3
3
3
4
4
2
2
5
2
4
2
...

result:

ok 735 numbers

Test #54:

score: 0
Accepted
time: 46ms
memory: 30392kb

input:

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

output:

15
2
10
11
6
1
1
9
4
3
13
2
9
3
2
11
4
1
5
1
4
6
3
10
9
2
2
2
4
4
40
9
4
2
5
4
2
4
5
3
2
12
1
19
3
22
6
14
3
5
5
17
35
11
1
1
3
2
3
6
4
7
17
4
10
3
6
5
4
5
1
1
15
2
8
1
14
3
14
5
2
3
1
2
5
13
2
3
6
10
3
2
9
2
1
1
2
6
23
12
2
4
1
6
1
3
30
3
1
10
4
3
4
2
4
9
2
3
3
5
5
7
6
2
11
5
20
2
1
15
6
5
15
5
15
...

result:

ok 10000 numbers

Test #55:

score: 0
Accepted
time: 41ms
memory: 30328kb

input:

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

output:

18
9
2
11
6
4
5
13
2
7
4
11
9
4
3
4
14
6
6
15
2
12
3
2
4
2
5
7
9
7
5
3
2
3
2
7
2
1
7
16
6
3
17
9
3
20
3
13
3
13
1
2
5
3
4
6
10
2
3
21
3
1
3
3
2
7
7
2
2
3
2
1
3
20
7
2
9
10
7
12
2
6
10
9
1
2
3
9
9
12
10
4
15
2
2
3
6
7
11
9
2
12
4
13
3
3
4
8
10
3
17
14
2
15
5
2
8
4
13
7
40
10
4
14
22
7
2
2
3
4
3
28
4
...

result:

ok 10000 numbers

Test #56:

score: 0
Accepted
time: 40ms
memory: 30572kb

input:

10000 2
4
3 1 1 1
4 4 2 1
18
14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14
12 1 16 2 8 13 6 5 3 17 9 14 3 18 7 4 11 10
2
2 2
1 1
9
9 7 2 4 1 3 8 7 8
7 8 7 8 8 8 8 7 7
48
35 35 5 5 35 35 35 5 35 35 35 35 35 5 35 5 5 35 35 5 5 5 35 35 5 5 35 35 5 35 35 35 5 35 35 5 5 5 35 35 35 35 35 35 35 35 ...

output:

3
2
1
3
3
3
1
2
2
3
2
3
4
3
5
4
6
7
2
1
3
4
1
1
1
15
5
25
1
24
6
6
3
14
2
2
5
19
3
7
13
6
20
19
6
2
1
13
13
2
13
4
5
6
2
4
27
4
3
3
13
3
14
7
16
10
7
2
1
7
5
1
6
1
13
17
7
5
2
57
2
1
39
2
2
6
2
1
2
1
5
3
3
2
3
3
5
3
7
5
12
7
6
10
5
4
2
1
4
2
2
12
2
2
6
2
17
3
10
4
26
6
3
2
2
1
1
4
23
6
2
3
11
7
2
6
...

result:

ok 10000 numbers

Test #57:

score: 0
Accepted
time: 131ms
memory: 55500kb

input:

1 2
200000
158445 122387 57438 21584 118138 153610 55600 58524 136935 59198 151397 26957 97358 109255 50980 72121 191409 79748 62032 72567 106554 42562 119995 43919 100146 132484 133698 159098 2080 163114 170002 32415 109251 165151 153730 103695 96828 179535 194894 141038 56397 126127 144976 170680 ...

output:

50695

result:

ok 1 number(s): "50695"

Test #58:

score: 0
Accepted
time: 124ms
memory: 55868kb

input:

1 2
200000
166044 54709 172447 134673 125922 90624 81060 126633 182018 198162 43402 101857 40372 96261 175962 116346 170223 191101 75427 138536 96211 123136 185355 109721 81418 40907 163081 164113 158667 195288 30787 96053 167148 111976 172852 75165 164023 28881 176464 17217 93796 198015 132511 6488...

output:

55168

result:

ok 1 number(s): "55168"

Test #59:

score: 0
Accepted
time: 123ms
memory: 55288kb

input:

1 2
200000
44414 127907 144945 104324 61547 8841 42706 125014 80527 18238 169975 123217 135448 78321 102997 166153 19038 97613 136121 171757 178359 106314 8940 164580 16729 170070 71535 12947 25024 104239 29045 11804 14757 143957 110042 61811 50214 132053 115860 21418 155393 156160 137566 178070 446...

output:

55419

result:

ok 1 number(s): "55419"

Test #60:

score: 0
Accepted
time: 113ms
memory: 55624kb

input:

1 2
200000
51560 95430 141893 172250 182256 162751 182494 53104 95079 63233 110245 57936 163963 88331 43207 31095 195887 171146 82570 48657 150031 119105 35558 156367 131039 51219 181232 191638 19101 174922 28902 188154 5237 1588 141638 112223 11781 148560 14776 164708 9872 55088 177672 178890 16237...

output:

71935

result:

ok 1 number(s): "71935"

Test #61:

score: 0
Accepted
time: 109ms
memory: 56816kb

input:

1 2
200000
80112 72427 114752 192460 140517 12032 101448 104828 101605 69439 177774 161331 64759 60974 178487 174768 193271 69098 88134 112940 180992 108781 148652 153966 111055 146924 189982 145898 157238 35125 153658 90651 90545 188541 56134 70090 73777 112919 84745 31404 199096 38452 53901 2551 1...

output:

79426

result:

ok 1 number(s): "79426"

Test #62:

score: 0
Accepted
time: 138ms
memory: 56364kb

input:

1 2
200000
49025 132329 42420 64366 183177 61120 196810 29935 131562 7630 124362 24455 58086 122900 80766 103433 43197 125314 22812 92716 137538 179482 52366 18625 194261 25323 172264 67675 143062 92857 93783 154838 40668 165362 154889 31563 72121 18917 192615 193718 192907 12706 13161 97200 191219 ...

output:

87011

result:

ok 1 number(s): "87011"

Test #63:

score: 0
Accepted
time: 141ms
memory: 55408kb

input:

1 2
200000
98675 194092 75403 88546 142002 124799 41258 186630 18121 195598 191764 6352 14110 19152 110406 129338 92815 60201 1169 101567 137717 109780 160607 12528 1570 9494 25203 177243 89802 144876 18765 118401 166994 7928 186213 111082 154380 1968 9879 125165 956 37080 47186 10013 155999 42220 2...

output:

82118

result:

ok 1 number(s): "82118"

Test #64:

score: 0
Accepted
time: 125ms
memory: 56104kb

input:

1 2
200000
38401 192958 170851 179191 168191 192276 180815 123501 11740 190453 54722 43526 86779 86667 142019 116263 137414 168666 60761 82757 151408 89308 123910 169476 54766 117403 10178 172089 107441 94976 192727 195288 24207 162683 158197 158880 30237 77083 116660 172108 104342 79029 163130 4852...

output:

50768

result:

ok 1 number(s): "50768"

Test #65:

score: 0
Accepted
time: 107ms
memory: 56124kb

input:

1 2
200000
78166 52813 158406 90283 114890 70853 99707 69883 40724 45742 96256 65474 52285 114081 17135 118257 88778 80038 102320 142098 62309 145981 106268 89319 67605 133932 67830 115635 160695 169348 138955 120374 72444 154839 112480 103463 68274 59182 18071 199202 104656 54457 178852 193655 1731...

output:

14894

result:

ok 1 number(s): "14894"

Extra Test:

score: 0
Extra Test Passed