QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#328685#1505. Last Supperahihi123419.457 284ms77064kbC++141.1kb2024-02-16 00:00:092024-02-16 00:00:09

详细

Subtask #1:

score: 8
Accepted

Test #1:

score: 8
Accepted
time: 30ms
memory: 71212kb

input:

4 2 65000
2 0 3 0 

output:

0 1 0 0 1 1 0 0 
2

input:

4 2
2 0 3 0
8
0 1 0 0 1 1 0 0 

output:

P 1
P 2
E

result:

ok correct, Rmax = 8

Test #2:

score: 8
Accepted
time: 40ms
memory: 71268kb

input:

100 30 65000
45 82 25 65 47 7 92 0 58 76 9 73 90 82 21 65 9 83 52 9 17 89 13 64 58 79 55 21 75 70 58 49 88 86 19 99 8 41 2 77 72 33 49 97 50 3 34 69 32 70 86 15 87 50 73 74 79 95 14 19 52 19 70 10 76 15 85 81 5 22 35 35 21 6 58 87 82 3 30 45 13 30 19 41 14 67 52 45 13 76 20 5 38 77 63 75 46 87 21 51 

output:

1 0 1 1 0 1 0 0 1 0 0 1 0 1 1 0 0 1 1 0 0 1 0 0 0 0 0 1 1 1 1 1 0 1 0 1 1 1 0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 0 0 0 0 1 0 1 1 1 0 0 0 1 1 0 0 1 1 0 0 1 0 0 0 1 0 0 1 0 0 1 0 1 0 1 1 0 1 0 1 0 0 1 0 1 1 0 1 0 1 0 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0 1 1 0 0 1 0 1 0 0 1 0 1 1 0 1 0 0 1 0 0 0 1 0 0 0 1 0 0 1 0 0 ...

input:

100 30
45 82 25 65 47 7 92 0 58 76 9 73 90 82 21 65 9 83 52 9 17 89 13 64 58 79 55 21 75 70 58 49 88 86 19 99 8 41 2 77 72 33 49 97 50 3 34 69 32 70 86 15 87 50 73 74 79 95 14 19 52 19 70 10 76 15 85 81 5 22 35 35 21 6 58 87 82 3 30 45 13 30 19 41 14 67 52 45 13 76 20 5 38 77 63 75 46 87 21 51
700
1...

output:

P 29
P 28
P 27
P 26
P 47
P 92
P 25
P 24
P 23
P 90
P 83
P 65
P 89
P 64
P 18
P 55
P 17
P 16
P 12
P 88
P 11
P 99
P 9
P 8
P 72
P 49
P 97
P 33
P 34
P 69
P 86
P 73
P 79
P 95
P 85
P 81
P 82
P 74
P 76
P 77
P 75
P 87
E

result:

ok correct, Rmax = 700

Test #3:

score: 8
Accepted
time: 30ms
memory: 71512kb

input:

5000 1234 65000
2156 1808 2425 808 4913 4077 2344 2112 99 1330 1667 4524 2791 2079 4732 1030 3828 969 628 3568 4335 4473 3265 2660 3009 3282 1040 3779 261 3125 1070 2782 4787 1837 2657 1956 3113 3961 4042 2529 361 388 384 2201 4649 3861 1523 4626 2820 3204 1776 3562 3893 157 3897 3648 2733 3436 1616...

output:

0 0 1 1 0 1 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 1 1 1 0 0 1 0 0 1 1 1 1 0 1 0 0 1 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 0 0 0 1 1 0 0 1 1 0 0 1 1 0 1 1 0 1 1 1 1 1 1 1 0 0 0 0 1 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 1 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 0 1 0 0 1 1 0 0 0 0 0 1 0 1 1 0 0 0 0 1 1 0 1 0 ...

input:

5000 1234
2156 1808 2425 808 4913 4077 2344 2112 99 1330 1667 4524 2791 2079 4732 1030 3828 969 628 3568 4335 4473 3265 2660 3009 3282 1040 3779 261 3125 1070 2782 4787 1837 2657 1956 3113 3961 4042 2529 361 388 384 2201 4649 3861 1523 4626 2820 3204 1776 3562 3893 157 3897 3648 2733 3436 1616 1058 ...

output:

P 1232
P 1231
P 1808
P 1229
P 4913
P 1225
P 1221
P 1218
P 1330
P 1216
P 4524
P 2791
P 1214
P 4732
P 3828
P 3568
P 1213
P 1208
P 1207
P 1206
P 1205
P 3282
P 3779
P 1196
P 1195
P 1190
P 1837
P 1188
P 1956
P 1187
P 3961
P 1185
P 1184
P 1183
P 1182
P 1178
P 1177
P 1176
P 1175
P 3204
P 1173
P 1172
P 1170...

result:

ok correct, Rmax = 65000

Test #4:

score: 8
Accepted
time: 32ms
memory: 71084kb

input:

1000 999 65000
450 31 889 223 156 176 37 388 114 933 670 148 561 235 961 711 930 490 193 780 824 883 640 377 289 202 920 897 804 156 334 931 395 464 185 647 761 911 902 731 604 326 698 891 711 142 679 202 467 959 613 651 137 995 132 579 707 901 807 899 918 315 910 363 419 810 42 292 33 3 366 920 503...

output:

0 1 0 0 0 0 1 1 1 0 1 1 1 1 1 0 0 0 0 0 1 0 0 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 0 1 1 0 1 0 0 1 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 1 0 0 1 0 0 1 1 1 0 0 0 1 0 1 0 0 1 0 1 1 1 0 1 1 1 1 0 0 1 0 1 0 0 1 0 1 0 0 1 0 0 1 0 0 0 1 1 0 0 0 1 1 1 0 1 0 1 1 1 0 0 1 0 0 0 0 0 1 1 1 1 ...

input:

1000 999
450 31 889 223 156 176 37 388 114 933 670 148 561 235 961 711 930 490 193 780 824 883 640 377 289 202 920 897 804 156 334 931 395 464 185 647 761 911 902 731 604 326 698 891 711 142 679 202 467 959 613 651 137 995 132 579 707 901 807 899 918 315 910 363 419 810 42 292 33 3 366 920 503 910 3...

output:

P 998
E

result:

ok correct, Rmax = 10000

Test #5:

score: 8
Accepted
time: 24ms
memory: 71196kb

input:

3000 8 65000
1103 1058 251 2358 2315 837 490 2969 1939 1939 2341 167 830 729 482 1136 1058 702 1886 2885 1642 1927 2209 2642 943 1912 2383 197 176 1927 409 904 1139 1136 929 1572 1912 1985 837 2424 1105 1053 2052 301 1945 75 667 1151 2209 813 1247 2726 177 2315 2052 1148 1912 2209 197 2726 482 2357 ...

output:

1 1 1 1 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 1 0 1 1 0 1 1 1 1 1 0 0 0 0 0 1 1 0 1 1 0 0 1 0 0 1 1 1 0 1 0 0 0 0 1 0 0 1 1 0 1 0 0 0 1 0 1 1 0 0 0 1 0 1 0 1 1 1 1 0 0 0 1 0 0 1 1 0 0 1 1 1 0 1 1 1 0 0 1 0 0 1 1 1 1 0 1 1 0 0 1 0 0 1 1 1 1 0 1 0 1 0 0 1 0 0 1 0 0 1 1 1 1 0 0 1 0 1 0 0 0 0 0 1 1 1 1 1 ...

input:

3000 8
1103 1058 251 2358 2315 837 490 2969 1939 1939 2341 167 830 729 482 1136 1058 702 1886 2885 1642 1927 2209 2642 943 1912 2383 197 176 1927 409 904 1139 1136 929 1572 1912 1985 837 2424 1105 1053 2052 301 1945 75 667 1151 2209 813 1247 2726 177 2315 2052 1148 1912 2209 197 2726 482 2357 430 40...

output:

P 7
P 6
P 5
P 4
P 3
P 2
P 1
P 0
P 490
P 1939
P 2358
P 167
P 830
P 729
P 251
P 1058
P 702
P 1886
P 2341
P 1642
P 1103
P 2969
P 2642
P 943
P 2885
P 2383
P 482
P 176
P 1927
P 904
P 1136
P 929
P 1572
P 1985
P 837
P 1105
P 1053
P 1139
P 301
P 1945
P 2424
P 667
P 1151
P 813
P 1247
P 75
P 2315
P 197
P 1912...

result:

ok correct, Rmax = 36000

Test #6:

score: 8
Accepted
time: 24ms
memory: 71264kb

input:

5000 1 65000
1079 4940 2909 1147 3342 1129 1402 1859 162 4405 1629 208 3886 902 1197 85 2902 3826 2020 1295 821 1729 2888 3772 4516 2167 2992 2366 1537 1707 3506 1533 4835 1552 3480 616 1707 4448 21 68 314 4127 3163 1850 4730 4578 1771 3353 69 1702 4300 3095 1246 1959 3130 4883 2937 4595 1901 4244 2...

output:

1 1 1 0 1 1 0 0 0 0 1 0 0 0 0 1 1 0 0 1 0 1 1 0 0 1 1 0 1 1 1 0 1 0 1 1 0 1 0 1 1 0 1 1 1 1 0 0 0 1 0 0 0 1 1 1 0 0 0 0 1 0 1 1 0 1 0 0 1 0 1 1 0 0 0 1 0 0 0 1 0 1 1 1 1 0 1 0 1 0 0 1 1 0 0 0 0 1 0 1 1 1 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 1 0 1 0 1 1 0 0 1 0 0 0 1 1 0 1 1 1 0 1 0 0 1 1 0 0 0 0 0 0 1 0 1 ...

input:

5000 1
1079 4940 2909 1147 3342 1129 1402 1859 162 4405 1629 208 3886 902 1197 85 2902 3826 2020 1295 821 1729 2888 3772 4516 2167 2992 2366 1537 1707 3506 1533 4835 1552 3480 616 1707 4448 21 68 314 4127 3163 1850 4730 4578 1771 3353 69 1702 4300 3095 1246 1959 3130 4883 2937 4595 1901 4244 2015 16...

output:

P 0
P 1079
P 4940
P 2909
P 1147
P 3342
P 1129
P 1402
P 1859
P 162
P 4405
P 1629
P 208
P 3886
P 902
P 1197
P 85
P 2902
P 3826
P 2020
P 1295
P 821
P 1729
P 2888
P 3772
P 4516
P 2167
P 2992
P 2366
P 1537
P 1707
P 3506
P 1533
P 4835
P 1552
P 3480
P 616
P 1707
P 4448
P 21
P 68
P 314
P 4127
P 3163
P 1850
...

result:

ok correct, Rmax = 65000

Test #7:

score: 8
Accepted
time: 14ms
memory: 71212kb

input:

5000 100 65000
2374 3643 469 746 2078 1092 2469 1147 2264 3703 4768 1677 3204 3704 4653 3119 3469 710 1147 4660 3976 514 3391 1907 1735 261 2370 1444 764 501 165 1511 1033 3441 4901 1611 2842 4023 1519 318 2058 2406 3492 3358 865 4492 1254 2102 3560 4598 4302 2057 3462 1573 77 3213 2394 4 2642 1963 ...

output:

0 1 1 0 0 0 1 0 1 0 0 1 0 1 1 0 1 1 1 0 0 0 1 1 1 0 1 0 1 0 1 0 1 1 1 0 0 0 0 0 1 0 1 0 1 1 1 0 1 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 1 0 1 0 0 1 0 1 1 0 0 1 0 1 1 0 1 1 1 1 0 0 0 1 0 0 0 0 0 1 1 0 1 1 0 0 0 1 0 1 1 1 0 1 1 1 0 0 1 1 1 0 0 0 0 0 0 1 0 1 0 1 0 0 1 1 0 1 1 0 0 0 ...

input:

5000 100
2374 3643 469 746 2078 1092 2469 1147 2264 3703 4768 1677 3204 3704 4653 3119 3469 710 1147 4660 3976 514 3391 1907 1735 261 2370 1444 764 501 165 1511 1033 3441 4901 1611 2842 4023 1519 318 2058 2406 3492 3358 865 4492 1254 2102 3560 4598 4302 2057 3462 1573 77 3213 2394 4 2642 1963 799 38...

output:

P 99
P 96
P 95
P 469
P 93
P 2078
P 90
P 89
P 88
P 81
P 3703
P 4768
P 1677
P 3204
P 3704
P 4653
P 80
P 3469
P 710
P 79
P 3976
P 76
P 71
P 1907
P 1735
P 70
P 69
P 66
P 64
P 63
P 62
P 1511
P 61
P 59
P 4901
P 58
P 2842
P 57
P 56
P 318
P 55
P 2406
P 3492
P 3358
P 865
P 49
P 46
P 45
P 44
P 41
P 39
P 2057
...

result:

ok correct, Rmax = 65000

Test #8:

score: 8
Accepted
time: 30ms
memory: 71424kb

input:

5000 499 65000
231 1062 4423 3924 1816 1503 3750 589 3924 4844 747 845 3054 3886 2221 1307 1607 1280 3975 2203 48 3909 553 4462 3111 2084 1513 4790 4374 4451 269 3980 3682 4411 2587 3404 3046 3416 3728 4692 663 4041 1674 1432 1939 2062 1394 3911 1838 3404 1277 3204 4493 3542 763 3542 4696 1693 4912 ...

output:

1 1 1 0 0 1 1 1 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 1 0 0 1 1 1 0 0 0 1 0 1 0 0 0 1 0 0 1 0 1 0 1 0 1 1 1 1 0 0 0 0 1 1 0 0 0 1 1 1 0 0 1 1 1 1 1 0 1 1 1 0 1 0 0 0 1 1 0 0 1 0 1 0 1 1 1 0 1 0 1 1 0 0 1 0 0 1 0 0 0 0 0 1 0 1 0 1 0 1 1 1 1 0 0 0 1 1 0 1 1 1 0 1 0 0 1 1 1 0 1 0 1 1 1 0 1 0 0 0 1 0 1 1 0 0 1 ...

input:

5000 499
231 1062 4423 3924 1816 1503 3750 589 3924 4844 747 845 3054 3886 2221 1307 1607 1280 3975 2203 48 3909 553 4462 3111 2084 1513 4790 4374 4451 269 3980 3682 4411 2587 3404 3046 3416 3728 4692 663 4041 1674 1432 1939 2062 1394 3911 1838 3404 1277 3204 4493 3542 763 3542 4696 1693 4912 2438 2...

output:

P 498
P 497
P 496
P 495
P 494
P 493
P 491
P 489
P 488
P 486
P 485
P 484
P 483
P 482
P 481
P 480
P 479
P 478
P 477
P 476
P 475
P 474
P 473
P 472
P 471
P 470
P 469
P 468
P 467
P 466
P 465
P 463
P 462
P 461
P 460
P 459
P 458
P 457
P 456
P 455
P 454
P 453
P 452
P 451
P 450
P 448
P 447
P 446
P 444
P 443
...

result:

ok correct, Rmax = 65000

Test #9:

score: 8
Accepted
time: 14ms
memory: 71236kb

input:

5000 1000 65000
2524 1135 1390 1760 853 2969 4160 2390 377 259 2971 1673 2089 2056 2777 433 4272 1712 4542 1776 4962 2355 906 4013 3815 2675 2515 2181 2649 2094 1705 1308 4257 166 938 3708 2161 4084 4672 1815 2811 2587 3146 2885 3499 593 2354 727 4663 878 1151 4670 843 55 721 3209 2464 2286 1564 241...

output:

0 0 1 1 1 0 1 1 1 0 0 1 0 1 1 1 1 0 1 1 0 0 0 1 0 0 0 1 1 1 0 1 1 0 1 0 1 0 0 0 0 0 0 0 1 1 1 0 1 1 0 0 1 0 1 0 1 0 1 0 1 1 0 0 0 1 0 0 1 1 0 0 1 1 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 1 0 1 0 1 0 1 0 0 1 0 1 0 0 1 1 1 1 0 1 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0 0 1 1 0 1 1 0 0 1 1 1 0 1 0 1 0 0 1 0 0 0 ...

input:

5000 1000
2524 1135 1390 1760 853 2969 4160 2390 377 259 2971 1673 2089 2056 2777 433 4272 1712 4542 1776 4962 2355 906 4013 3815 2675 2515 2181 2649 2094 1705 1308 4257 166 938 3708 2161 4084 4672 1815 2811 2587 3146 2885 3499 593 2354 727 4663 878 1151 4670 843 55 721 3209 2464 2286 1564 2419 859 ...

output:

P 2
P 2524
P 1135
P 1390
P 1760
P 2969
P 4160
P 2390
P 2971
P 1673
P 2089
P 2056
P 2777
P 4272
P 1712
P 4542
P 1776
P 4962
P 2355
P 4013
P 3815
P 2675
P 2515
P 2181
P 2649
P 2094
P 1705
P 1308
P 4257
P 3708
P 2161
P 4084
P 4672
P 1815
P 2811
P 2587
P 3146
P 2885
P 3499
P 2354
P 4663
P 1151
P 4670
P ...

result:

ok correct, Rmax = 65000

Test #10:

score: 8
Accepted
time: 22ms
memory: 71492kb

input:

5000 800 65000
3672 3370 1123 3815 1151 1742 1191 694 769 3530 3512 1878 4557 4469 4622 3647 4318 1488 3717 2369 1166 1188 4143 2240 4571 4070 3594 1615 4891 4838 3232 4647 3316 4110 1057 591 323 3962 1548 3521 3304 2848 4729 2084 1512 4547 324 2608 3177 4032 1186 3858 4390 585 3421 2726 3510 3791 4...

output:

0 0 0 1 1 0 1 0 0 1 1 1 0 0 1 0 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0 1 1 0 0 0 1 0 0 1 1 1 0 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 0 0 1 0 0 0 1 1 1 0 0 1 1 0 1 1 0 0 1 1 1 0 0 1 0 1 0 0 1 0 0 0 1 1 0 1 1 0 1 0 1 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 1 0 1 0 0 1 1 1 0 1 1 0 0 0 0 1 1 1 0 1 1 0 1 1 0 0 1 1 0 1 0 1 ...

input:

5000 800
3672 3370 1123 3815 1151 1742 1191 694 769 3530 3512 1878 4557 4469 4622 3647 4318 1488 3717 2369 1166 1188 4143 2240 4571 4070 3594 1615 4891 4838 3232 4647 3316 4110 1057 591 323 3962 1548 3521 3304 2848 4729 2084 1512 4547 324 2608 3177 4032 1186 3858 4390 585 3421 2726 3510 3791 4890 49...

output:

P 799
P 791
P 790
P 786
P 785
P 782
P 781
P 775
P 774
P 773
P 768
P 766
P 763
P 762
P 761
P 759
P 756
P 754
P 752
P 751
P 750
P 748
P 740
P 739
P 736
P 732
P 730
P 728
P 725
P 723
P 722
P 721
P 720
P 717
P 715
P 711
P 710
P 709
P 704
P 698
P 697
P 696
P 695
P 692
P 686
P 683
P 681
P 680
P 677
P 672
...

result:

ok correct, Rmax = 65000

Test #11:

score: 8
Accepted
time: 38ms
memory: 71272kb

input:

5000 2000 65000
3313 1671 1128 4430 1922 3366 3804 3571 280 4529 3608 1792 1511 1427 2805 1268 465 320 4610 1112 4404 318 641 1176 4011 232 2436 1420 2867 2377 324 3704 3414 2279 2270 4392 777 774 1604 777 1106 2108 375 3970 4151 4514 4522 1760 788 4897 4448 2842 4482 3674 3486 127 1132 2787 1088 10...

output:

1 0 0 0 1 1 1 1 0 0 1 1 0 1 1 1 0 0 0 0 1 0 1 1 0 0 0 0 0 1 0 1 1 0 0 0 1 0 0 0 1 1 1 0 0 1 0 1 0 0 0 1 0 1 0 0 0 0 0 1 1 1 1 0 0 0 1 1 0 0 1 0 0 1 0 1 1 0 0 0 1 1 1 0 1 1 0 1 1 1 0 1 1 0 0 1 1 1 1 1 0 1 1 0 0 0 0 1 1 0 0 0 1 0 0 0 0 1 0 0 0 1 1 0 1 1 0 0 0 1 0 0 0 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 ...

input:

5000 2000
3313 1671 1128 4430 1922 3366 3804 3571 280 4529 3608 1792 1511 1427 2805 1268 465 320 4610 1112 4404 318 641 1176 4011 232 2436 1420 2867 2377 324 3704 3414 2279 2270 4392 777 774 1604 777 1106 2108 375 3970 4151 4514 4522 1760 788 4897 4448 2842 4482 3674 3486 127 1132 2787 1088 1096 458...

output:

P 1999
P 1997
P 1996
P 3366
P 1994
P 1990
P 1989
P 1987
P 1983
P 1980
P 1978
P 4011
P 2436
P 1971
P 2377
P 1964
P 3414
P 2279
P 2270
P 1954
P 1953
P 1948
P 4151
P 1946
P 1944
P 4897
P 1943
P 2842
P 1942
P 3674
P 3486
P 2787
P 4586
P 1941
P 1939
P 3293
P 1937
P 1933
P 3178
P 4120
P 4227
P 4123
P 4565...

result:

ok correct, Rmax = 65000

Subtask #2:

score: 9
Accepted

Test #12:

score: 9
Accepted
time: 48ms
memory: 71436kb

input:

10000 2000 2000000
5451 8333 6614 6013 8933 5291 4673 2423 1373 4369 6443 9253 4274 9813 1404 3960 7896 3621 5700 4193 4302 5955 7793 5650 5887 4827 8761 4162 3664 802 6193 1717 1760 677 1893 8480 486 5544 7521 8277 5347 5201 8364 596 1088 9041 9329 4868 3141 7279 5549 1111 754 55 8718 8854 7430 656...

output:

1 1 0 1 0 0 1 0 1 0 1 0 1 0 1 0 1 1 0 0 0 1 0 0 0 0 0 1 0 1 1 0 1 0 1 1 1 0 0 1 1 0 1 0 1 1 1 1 1 0 1 1 1 0 1 0 1 0 1 0 0 1 1 1 0 1 0 0 0 1 1 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 0 0 0 0 1 0 0 1 0 0 1 0 1 1 1 0 1 1 1 0 1 0 0 1 0 0 1 0 1 1 1 0 1 0 1 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 0 1 1 0 1 0 1 0 0 1 0 ...

input:

10000 2000
5451 8333 6614 6013 8933 5291 4673 2423 1373 4369 6443 9253 4274 9813 1404 3960 7896 3621 5700 4193 4302 5955 7793 5650 5887 4827 8761 4162 3664 802 6193 1717 1760 677 1893 8480 486 5544 7521 8277 5347 5201 8364 596 1088 9041 9329 4868 3141 7279 5549 1111 754 55 8718 8854 7430 6563 4096 1...

output:

P 1998
P 1988
P 1987
P 6614
P 1985
P 8933
P 5291
P 1983
P 2423
P 4369
P 6443
P 9253
P 1978
P 9813
P 3960
P 7896
P 1974
P 1972
P 1969
P 1968
P 5955
P 1966
P 1965
P 5887
P 1958
P 1954
P 1951
P 1950
P 6193
P 1947
P 1945
P 1943
P 8277
P 5347
P 1939
P 1932
P 1927
P 1917
P 4868
P 1916
P 7279
P 5549
P 8718...

result:

ok correct, Rmax = 140000

Test #13:

score: 9
Accepted
time: 116ms
memory: 72732kb

input:

50329 3921 2000000
28955 11710 3628 43224 17557 4089 35958 43433 38947 2097 23057 21572 46470 30298 34052 12406 28397 41062 14274 23124 21019 27145 42812 9130 12034 34221 9672 41470 10605 44102 23941 37386 18145 27560 33718 46548 16053 18558 42537 2817 23093 43164 911 21076 42461 46722 41375 30709 4...

output:

1 1 0 1 1 0 0 0 1 0 0 0 1 1 1 0 0 1 1 1 1 1 0 1 1 0 1 1 0 1 0 0 0 0 1 1 0 1 0 0 0 1 1 1 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 1 0 1 0 1 1 0 1 0 1 0 0 1 0 0 1 0 0 0 1 0 1 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 0 1 1 1 0 0 0 1 1 0 0 0 1 1 0 0 1 0 1 0 1 1 0 0 1 0 1 0 1 1 1 0 0 0 1 0 0 0 0 0 1 1 0 0 1 1 0 0 0 1 1 ...

input:

50329 3921
28955 11710 3628 43224 17557 4089 35958 43433 38947 2097 23057 21572 46470 30298 34052 12406 28397 41062 14274 23124 21019 27145 42812 9130 12034 34221 9672 41470 10605 44102 23941 37386 18145 27560 33718 46548 16053 18558 42537 2817 23093 43164 911 21076 42461 46722 41375 30709 42221 494...

output:

P 3920
P 3917
P 3916
P 3915
P 3914
P 3913
P 3912
P 3910
P 3909
P 3907
P 3906
P 3904
P 3903
P 3901
P 3900
P 3898
P 3897
P 3896
P 3894
P 3892
P 3891
P 3890
P 3889
P 3884
P 3883
P 3881
P 3880
P 3879
P 3878
P 3877
P 3876
P 3875
P 3874
P 3873
P 46548
P 3872
P 3871
P 3870
P 3869
P 3868
P 3867
P 3866
P 386...

result:

ok correct, Rmax = 805264

Test #14:

score: 9
Accepted
time: 284ms
memory: 75644kb

input:

99999 34811 2000000
38428 62984 99833 25056 49430 69404 26741 94434 15415 76970 45646 73585 81694 5268 13672 94457 61746 59257 17173 9345 68179 56579 14018 82676 36259 42981 66211 52393 22034 70087 16849 23068 2075 5170 25049 66388 67928 73672 63191 35521 28777 68899 58502 22941 41539 18512 39473 52...

output:

0 0 1 1 1 0 0 0 0 1 1 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 1 1 0 1 1 1 1 0 1 0 0 1 1 1 1 1 1 0 1 0 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 0 0 0 1 1 0 1 0 0 0 1 0 0 0 0 0 1 1 0 0 0 1 1 1 0 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 1 0 0 0 0 1 0 1 1 0 0 0 1 0 0 0 1 1 1 0 0 0 0 1 1 1 0 1 1 1 1 0 1 1 0 0 0 0 1 1 1 1 ...

input:

99999 34811
38428 62984 99833 25056 49430 69404 26741 94434 15415 76970 45646 73585 81694 5268 13672 94457 61746 59257 17173 9345 68179 56579 14018 82676 36259 42981 66211 52393 22034 70087 16849 23068 2075 5170 25049 66388 67928 73672 63191 35521 28777 68899 58502 22941 41539 18512 39473 52646 375 ...

output:

P 34810
P 34809
P 34806
P 34804
P 34798
P 34778
P 34771
P 34767
P 34764
P 34760
P 34759
P 34757
P 34754
P 34745
P 34743
P 34736
P 34714
P 34708
P 34701
P 34700
P 34698
P 34691
P 34682
P 34681
P 34666
P 34655
P 34641
P 34631
P 34625
P 34624
P 34623
P 34618
P 34605
P 34600
P 34595
P 34592
P 34591
P 34...

result:

ok correct, Rmax = 1699983

Test #15:

score: 9
Accepted
time: 222ms
memory: 74312kb

input:

100000 50 2000000
98089 30154 6797 14052 20297 76603 4548 64993 8923 80795 71760 61060 49355 5850 70582 31415 76925 78372 42473 64186 52587 25903 50502 17309 90406 25026 1537 15455 39990 55658 35041 78795 9141 76690 92267 78629 7618 64932 6834 5656 83101 30195 35039 49623 89761 84362 87940 44706 225...

output:

1 0 0 1 0 1 0 0 1 1 1 1 1 1 1 0 1 0 1 0 1 0 0 1 1 1 0 1 0 1 1 1 0 0 1 0 1 1 0 0 0 1 0 1 0 1 1 0 0 0 0 0 0 1 0 0 1 1 1 0 1 1 0 1 1 0 0 0 1 0 0 1 0 0 1 0 1 1 1 1 0 0 1 0 0 1 1 0 1 1 1 0 0 1 1 0 1 0 1 0 0 1 0 0 1 0 0 0 1 1 1 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1 1 1 0 1 1 1 1 1 1 0 1 1 0 1 1 0 1 1 0 1 0 0 0 1 ...

input:

100000 50
98089 30154 6797 14052 20297 76603 4548 64993 8923 80795 71760 61060 49355 5850 70582 31415 76925 78372 42473 64186 52587 25903 50502 17309 90406 25026 1537 15455 39990 55658 35041 78795 9141 76690 92267 78629 7618 64932 6834 5656 83101 30195 35039 49623 89761 84362 87940 44706 2251 21639 ...

output:

P 47
P 46
P 45
P 43
P 39
P 38
P 37
P 36
P 64993
P 33
P 80795
P 32
P 27
P 25
P 5850
P 24
P 22
P 19
P 78372
P 42473
P 16
P 52587
P 25903
P 50502
P 15
P 11
P 25026
P 10
P 8
P 39990
P 7
P 6
P 1
P 9141
P 76690
P 92267
P 78629
P 0
P 44
P 5
P 5656
P 83101
P 30195
P 35039
P 41
P 30154
P 15455
P 87940
P 4470...

result:

ok correct, Rmax = 1700000

Test #16:

score: 9
Accepted
time: 226ms
memory: 74036kb

input:

100000 521 2000000
76580 476 74168 6445 56422 58236 63686 70468 82643 41549 19443 35165 10447 16616 60231 89286 46413 87080 46354 36208 29569 3407 50878 96022 3574 65894 31887 21443 26997 88676 89995 63368 59551 8166 39766 47826 32539 92196 58881 54565 32480 22634 56709 97165 96423 46867 67335 5112 ...

output:

0 0 1 0 0 1 0 0 1 1 0 1 0 1 0 0 1 0 0 1 1 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 1 0 0 0 0 1 0 0 1 1 0 1 1 0 1 0 0 1 0 0 1 1 0 0 0 0 0 1 1 0 0 1 1 0 0 0 1 1 1 0 1 1 0 0 0 1 1 1 1 1 0 1 1 0 0 0 1 1 1 0 0 1 1 0 0 0 1 1 0 0 0 1 1 1 1 1 0 0 0 1 0 0 0 1 0 1 1 0 0 1 0 0 0 1 1 1 0 0 1 0 1 1 0 1 0 0 0 0 ...

input:

100000 521
76580 476 74168 6445 56422 58236 63686 70468 82643 41549 19443 35165 10447 16616 60231 89286 46413 87080 46354 36208 29569 3407 50878 96022 3574 65894 31887 21443 26997 88676 89995 63368 59551 8166 39766 47826 32539 92196 58881 54565 32480 22634 56709 97165 96423 46867 67335 5112 4254 655...

output:

P 520
P 515
P 511
P 509
P 502
P 58236
P 500
P 499
P 496
P 495
P 494
P 489
P 488
P 485
P 479
P 473
P 472
P 471
P 46354
P 470
P 468
P 3407
P 465
P 463
P 462
P 65894
P 461
P 459
P 458
P 457
P 89995
P 456
P 454
P 453
P 39766
P 47826
P 32539
P 451
P 450
P 449
P 32480
P 22634
P 56709
P 97165
P 448
P 446
P...

result:

ok correct, Rmax = 1700000

Test #17:

score: 9
Accepted
time: 242ms
memory: 74272kb

input:

100000 5821 2000000
86718 62917 27635 794 5948 96431 87220 60630 38454 33347 37722 36154 81662 21586 7000 90549 62431 55178 89273 1721 33679 99906 7238 41982 92901 92108 52470 10384 10011 28618 36028 15181 14225 48371 20254 90963 18269 62927 45371 87299 60864 21072 87442 68446 42072 19576 5417 35987...

output:

0 1 1 1 1 1 0 1 0 1 0 0 1 0 1 0 1 1 0 1 0 0 0 1 1 1 0 1 0 1 1 1 1 0 1 1 0 0 1 1 1 1 1 1 0 1 0 1 1 0 0 0 1 0 1 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 1 0 1 0 0 0 0 1 1 1 1 0 1 0 1 0 0 0 1 1 1 1 0 1 0 0 1 0 1 1 0 1 0 0 1 0 1 0 1 0 1 0 1 1 0 1 0 1 1 0 0 1 1 0 1 1 1 0 0 1 1 0 1 1 0 0 0 1 1 0 1 0 ...

input:

100000 5821
86718 62917 27635 794 5948 96431 87220 60630 38454 33347 37722 36154 81662 21586 7000 90549 62431 55178 89273 1721 33679 99906 7238 41982 92901 92108 52470 10384 10011 28618 36028 15181 14225 48371 20254 90963 18269 62927 45371 87299 60864 21072 87442 68446 42072 19576 5417 35987 86229 4...

output:

P 5818
P 5817
P 5810
P 27635
P 5948
P 96431
P 5808
P 5807
P 38454
P 33347
P 37722
P 5806
P 5805
P 5803
P 5802
P 90549
P 5798
P 55178
P 5797
P 5793
P 99906
P 7238
P 5786
P 5785
P 5783
P 5780
P 5778
P 5777
P 5774
P 5772
P 15181
P 5768
P 48371
P 5767
P 5766
P 18269
P 62927
P 5765
P 5761
P 5759
P 5758
P...

result:

ok correct, Rmax = 1700000

Test #18:

score: 9
Accepted
time: 248ms
memory: 75000kb

input:

100000 19288 2000000
47403 92465 45463 29788 17190 32997 84547 58501 16153 21115 13003 25865 48994 74201 9674 96535 28547 54822 36683 95508 98688 65143 72632 70344 54451 34362 99799 26246 96707 30756 99126 68706 11528 51052 16704 92377 88147 95565 38519 52243 32188 3701 31315 45752 32639 30600 72538...

output:

1 1 0 1 0 1 0 0 1 0 0 1 1 1 0 1 0 1 0 0 0 1 1 0 0 1 0 0 1 0 1 1 0 1 1 1 1 0 1 0 0 1 1 0 0 0 1 1 0 1 0 0 0 1 1 1 0 1 0 0 0 1 0 1 1 1 0 0 0 1 1 0 0 1 0 0 1 1 0 0 0 0 1 0 0 1 0 1 0 0 1 1 1 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 1 0 0 1 0 1 0 0 1 0 1 1 0 1 0 0 0 0 1 0 0 1 0 0 1 1 1 0 1 0 0 1 1 0 0 0 1 1 1 1 1 1 ...

input:

100000 19288
47403 92465 45463 29788 17190 32997 84547 58501 16153 21115 13003 25865 48994 74201 9674 96535 28547 54822 36683 95508 98688 65143 72632 70344 54451 34362 99799 26246 96707 30756 99126 68706 11528 51052 16704 92377 88147 95565 38519 52243 32188 3701 31315 45752 32639 30600 72538 70593 8...

output:

P 19286
P 47403
P 19283
P 45463
P 19282
P 19281
P 19276
P 19275
P 19274
P 25865
P 19272
P 19271
P 19268
P 19265
P 54822
P 19262
P 19260
P 19255
P 19252
P 19251
P 70344
P 19247
P 19244
P 99799
P 26246
P 19243
P 19240
P 99126
P 19233
P 19232
P 92377
P 88147
P 95565
P 19231
P 52243
P 32188
P 19230
P 45...

result:

ok correct, Rmax = 1700000

Test #19:

score: 9
Accepted
time: 226ms
memory: 74772kb

input:

84901 23891 2000000
2778 66251 44199 53726 36164 53994 4321 58882 13403 79484 16031 12854 476 79677 35097 32803 71111 56948 55072 5109 19582 22085 381 45474 64064 15026 39641 26493 83567 7089 34132 13459 75522 70397 40615 23340 65858 50706 13647 3649 19974 12876 38215 9764 59297 60542 16515 60936 10...

output:

0 1 0 1 1 0 1 1 0 1 0 1 0 0 0 0 0 1 1 0 1 0 0 1 1 0 1 0 0 0 0 0 0 1 1 1 1 0 0 1 0 1 0 0 1 1 0 1 0 1 0 0 1 1 1 1 0 1 1 1 0 0 0 1 0 1 1 0 0 0 1 0 0 0 1 0 1 0 1 1 0 0 0 1 0 0 1 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 1 0 0 0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 1 1 1 0 1 1 0 1 1 0 1 0 0 0 1 0 1 1 ...

input:

84901 23891
2778 66251 44199 53726 36164 53994 4321 58882 13403 79484 16031 12854 476 79677 35097 32803 71111 56948 55072 5109 19582 22085 381 45474 64064 15026 39641 26493 83567 7089 34132 13459 75522 70397 40615 23340 65858 50706 13647 3649 19974 12876 38215 9764 59297 60542 16515 60936 10429 5867...

output:

P 2778
P 66251
P 44199
P 53726
P 36164
P 53994
P 58882
P 79484
P 79677
P 35097
P 32803
P 71111
P 56948
P 55072
P 45474
P 64064
P 39641
P 26493
P 83567
P 34132
P 75522
P 70397
P 40615
P 65858
P 50706
P 38215
P 59297
P 60542
P 60936
P 58677
P 28911
P 55965
P 30499
P 39696
P 38931
P 63514
P 72912
P 538...

result:

ok correct, Rmax = 1443317

Test #20:

score: 9
Accepted
time: 224ms
memory: 74264kb

input:

98238 11 2000000
56544 21223 1024 26489 96227 90547 78749 29836 50801 79881 71336 70962 87606 47632 94756 51278 31193 23980 24068 81259 50117 23845 47057 54118 24493 22830 13240 64133 38108 92739 8910 43338 22997 69133 42653 32748 39782 36003 36481 79958 50581 25919 48084 55183 13834 62395 93768 825...

output:

0 0 0 0 0 1 1 1 0 0 1 1 1 0 1 1 0 1 1 1 0 0 1 1 1 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 1 1 1 1 0 1 1 1 0 0 1 1 0 0 1 1 0 0 0 1 1 1 1 1 1 0 1 1 1 0 1 1 1 0 0 1 1 0 1 1 0 0 0 0 1 1 0 1 1 0 1 1 1 0 0 1 1 1 0 0 1 1 0 0 1 0 0 1 1 0 0 0 1 0 0 1 0 1 1 1 0 0 1 0 0 0 1 1 1 0 0 1 1 0 0 0 ...

input:

98238 11
56544 21223 1024 26489 96227 90547 78749 29836 50801 79881 71336 70962 87606 47632 94756 51278 31193 23980 24068 81259 50117 23845 47057 54118 24493 22830 13240 64133 38108 92739 8910 43338 22997 69133 42653 32748 39782 36003 36481 79958 50581 25919 48084 55183 13834 62395 93768 82526 34732...

output:

P 10
P 9
P 8
P 7
P 6
P 5
P 4
P 3
P 2
P 0
P 29836
P 90547
P 71336
P 1
P 47632
P 26489
P 51278
P 31193
P 96227
P 24068
P 78749
P 79881
P 23980
P 21223
P 23845
P 70962
P 81259
P 24493
P 64133
P 47057
P 13240
P 8910
P 43338
P 1024
P 69133
P 42653
P 32748
P 87606
P 36003
P 36481
P 38108
P 50581
P 25919
P...

result:

ok correct, Rmax = 1670046

Test #21:

score: 9
Accepted
time: 272ms
memory: 75500kb

input:

100000 29831 2000000
64685 14826 67042 93869 99186 54243 55705 68215 2111 48789 44070 66085 6989 69324 53519 96005 89653 31507 12249 5585 30601 35271 32084 2489 64295 25963 39851 64711 53631 67469 16115 67144 55577 46753 52245 47242 4440 25234 64146 59512 15959 46151 79063 81907 18660 56297 43518 48...

output:

1 0 1 1 0 1 0 1 0 0 1 1 1 1 1 1 0 0 1 0 1 0 1 1 1 1 0 0 1 1 1 0 0 0 0 1 0 0 0 1 1 1 1 0 1 0 0 0 0 0 1 1 0 1 1 0 1 0 1 0 1 1 1 0 1 1 0 1 0 1 0 0 1 1 1 0 1 1 0 0 0 0 0 1 1 1 1 0 0 0 1 1 1 1 1 0 0 1 0 1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 1 0 1 1 1 0 1 1 1 0 0 1 0 1 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 1 0 0 ...

input:

100000 29831
64685 14826 67042 93869 99186 54243 55705 68215 2111 48789 44070 66085 6989 69324 53519 96005 89653 31507 12249 5585 30601 35271 32084 2489 64295 25963 39851 64711 53631 67469 16115 67144 55577 46753 52245 47242 4440 25234 64146 59512 15959 46151 79063 81907 18660 56297 43518 48406 8953...

output:

P 29829
P 64685
P 29827
P 93869
P 29826
P 29824
P 29822
P 29816
P 48789
P 29815
P 29814
P 29813
P 29812
P 29807
P 29802
P 29801
P 30601
P 29799
P 29794
P 29793
P 29790
P 29781
P 53631
P 29778
P 29777
P 55577
P 46753
P 29776
P 29775
P 29773
P 29770
P 46151
P 29768
P 81907
P 29763
P 29757
P 48406
P 29...

result:

ok correct, Rmax = 1700000

Subtask #3:

score: 0
Channel 2 Time Limit Exceeded

Test #22:

score: 9
Accepted
time: 224ms
memory: 74308kb

input:

80394 19021 1500000
72858 39151 63499 33072 48058 70885 51034 68453 51282 39279 36583 50232 45586 73715 50578 26059 67651 16908 63163 78449 68854 25125 72528 8350 19431 76913 65901 29633 11242 23714 51866 33698 53417 20066 74345 34798 46875 41956 13453 28693 52922 71783 11012 40345 61115 31634 34380...

output:

0 1 0 1 1 0 0 1 0 0 1 1 1 0 0 0 1 1 1 1 1 0 1 1 1 0 0 0 1 1 0 0 1 0 1 1 0 1 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 1 0 0 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 0 1 0 1 0 0 1 1 1 0 0 1 0 1 0 0 0 1 0 1 0 1 1 0 1 0 1 1 1 0 0 0 1 1 0 1 0 1 0 0 1 1 0 1 1 0 1 0 0 0 0 1 0 1 0 0 1 0 1 0 0 0 0 1 0 0 ...

input:

80394 19021
72858 39151 63499 33072 48058 70885 51034 68453 51282 39279 36583 50232 45586 73715 50578 26059 67651 16908 63163 78449 68854 25125 72528 8350 19431 76913 65901 29633 11242 23714 51866 33698 53417 20066 74345 34798 46875 41956 13453 28693 52922 71783 11012 40345 61115 31634 34380 491 780...

output:

P 19020
P 19019
P 19016
P 63499
P 19015
P 19009
P 70885
P 51034
P 68453
P 51282
P 19007
P 19003
P 19000
P 45586
P 18999
P 18997
P 18995
P 67651
P 18990
P 18988
P 18986
P 18985
P 18983
P 18980
P 18976
P 65901
P 29633
P 23714
P 51866
P 18975
P 18974
P 20066
P 74345
P 18972
P 18968
P 41956
P 28693
P 52...

result:

ok correct, Rmax = 1366698

Test #23:

score: 0
Channel 2 Time Limit Exceeded

input:

100000 23843 1500000
32344 30023 39489 82866 65923 68597 97138 50695 73488 41227 69661 28890 63001 82574 32523 48120 26329 40973 57946 62565 43454 79295 9621 29333 91189 20045 93545 20861 42107 96993 42558 78999 58709 86238 25414 65991 33395 52912 725 9413 26964 1159 17899 33967 47782 71675 65657 54...

output:

0 0 0 1 1 0 1 0 0 1 1 1 1 1 1 0 0 1 1 1 0 0 0 1 0 1 0 1 0 1 1 1 0 0 1 0 0 0 0 0 1 0 0 1 0 1 1 0 0 1 0 0 1 0 0 1 1 0 1 1 1 0 0 0 0 1 0 1 1 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 1 1 0 1 0 1 1 1 1 1 1 0 1 0 0 0 0 1 0 1 0 0 1 1 1 0 1 1 0 1 1 1 1 0 1 1 1 1 0 0 0 0 0 0 1 1 0 0 0 1 1 0 0 0 0 0 1 0 0 0 1 1 1 1 1 0 ...

input:


output:


result:


Subtask #4:

score: 0
Channel 2 Time Limit Exceeded

Test #32:

score: 0
Channel 2 Time Limit Exceeded

input:

4000 1192 10000
725 88 662 2834 3439 2402 52 606 1033 2124 2600 115 3859 2953 100 2209 2353 641 3833 1247 1971 3330 3754 1100 1734 2009 3397 1326 3455 3636 3203 3327 2403 1914 2815 850 2597 1969 2966 1382 2183 278 793 313 2368 2821 1158 3655 1454 442 2858 716 1115 3263 663 3497 2035 2102 1074 3319 1...

output:

1 0 1 0 1 0 1 1 0 1 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 1 1 0 1 0 0 1 0 1 0 0 0 1 0 0 1 0 0 0 1 1 0 1 1 1 1 1 0 1 1 0 1 0 1 1 0 1 0 0 0 1 1 0 1 0 0 1 0 0 1 0 1 1 0 0 0 0 0 0 0 1 1 1 1 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 1 1 0 0 1 0 0 0 0 1 0 0 0 1 0 1 0 0 0 1 0 1 1 1 0 0 1 1 1 0 0 0 0 0 1 1 0 0 1 0 ...

input:


output:


result:


Subtask #5:

score: 2.457
Acceptable Answer

Test #42:

score: 2.457
Acceptable Answer
time: 234ms
memory: 77024kb

input:

100000 20000 1800000
21950 25220 44873 58672 9201 82569 27154 3312 82627 39771 91142 63204 25601 99930 17095 56663 30188 5056 9784 62200 19645 67214 53098 39607 83027 93403 1986 19889 23908 33429 29687 58256 98136 67907 18950 50288 33509 12296 17883 61477 14065 14037 29485 46063 18544 64149 52349 21...

output:

0 1 1 1 1 1 0 1 1 0 1 0 1 0 1 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 1 1 0 0 1 0 0 1 0 0 1 0 1 1 1 1 0 1 0 1 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 1 0 1 0 0 0 1 1 1 1 1 1 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 1 0 0 0 0 1 0 1 0 1 0 0 1 0 0 0 0 1 0 1 0 1 1 0 0 0 0 0 0 1 1 1 1 0 0 1 1 0 0 0 0 0 1 1 0 0 0 0 1 1 0 1 0 0 0 0 ...

input:

100000 20000
21950 25220 44873 58672 9201 82569 27154 3312 82627 39771 91142 63204 25601 99930 17095 56663 30188 5056 9784 62200 19645 67214 53098 39607 83027 93403 1986 19889 23908 33429 29687 58256 98136 67907 18950 50288 33509 12296 17883 61477 14065 14037 29485 46063 18544 64149 52349 21491 4037...

output:

P 19999
P 21950
P 19997
P 19994
P 19992
P 19991
P 27154
P 19985
P 19979
P 91142
P 19971
P 19965
P 19959
P 56663
P 30188
P 19956
P 67214
P 53098
P 39607
P 19947
P 19946
P 23908
P 33429
P 29687
P 19945
P 19942
P 19941
P 19940
P 33509
P 61477
P 19929
P 19927
P 19925
P 19923
P 19922
P 19919
P 74765
P 62...

result:

points 0.0630 correct, Rmax = 1700000

Test #43:

score: 2.457
Acceptable Answer
time: 248ms
memory: 76988kb

input:

100000 22000 1800000
88404 23641 98817 84778 77470 65590 33886 85203 88380 24626 26803 70645 30070 94300 94509 37704 75146 75400 47436 98140 80949 89258 14735 66171 34826 30882 2714 6631 44077 46633 48380 29562 85417 25128 27871 42137 57161 6002 19726 48998 65277 71400 60615 52079 64259 67589 36036 ...

output:

0 0 1 0 1 0 1 0 1 0 0 1 1 0 1 0 1 1 0 0 1 1 0 1 0 0 0 1 1 1 0 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 1 0 1 0 1 0 0 1 1 0 1 0 0 1 0 1 0 1 1 1 1 0 0 1 0 1 1 1 0 1 0 0 1 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 1 0 1 0 0 0 1 0 0 0 0 1 0 1 1 0 0 1 0 1 1 0 0 1 1 0 0 1 0 1 0 0 1 1 1 1 0 0 1 0 0 1 1 0 ...

input:

100000 22000
88404 23641 98817 84778 77470 65590 33886 85203 88380 24626 26803 70645 30070 94300 94509 37704 75146 75400 47436 98140 80949 89258 14735 66171 34826 30882 2714 6631 44077 46633 48380 29562 85417 25128 27871 42137 57161 6002 19726 48998 65277 71400 60615 52079 64259 67589 36036 50284 68...

output:

P 21998
P 21997
P 23641
P 98817
P 84778
P 77470
P 65590
P 33886
P 85203
P 21990
P 21988
P 26803
P 70645
P 21985
P 94300
P 94509
P 21980
P 21974
P 21973
P 21971
P 98140
P 21970
P 21967
P 66171
P 21965
P 21964
P 21963
P 21961
P 21958
P 29562
P 21957
P 21956
P 21950
P 42137
P 57161
P 48998
P 21948
P 21...

result:

points 0.0630 correct, Rmax = 1700000

Test #44:

score: 2.457
Acceptable Answer
time: 280ms
memory: 76812kb

input:

100000 25000 1800000
18795 57584 68882 53630 55406 14899 54298 16609 89002 88131 72430 34937 61460 10630 19661 22223 65098 1341 70898 19247 32361 34943 10696 40776 54008 24322 2615 313 26497 87618 92712 73683 94491 24393 8572 1686 5519 27339 21635 66080 36730 63075 11885 31952 94217 57872 28651 8562...

output:

1 1 0 1 0 1 1 0 1 0 0 1 0 0 1 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 1 0 0 1 0 0 1 0 0 0 1 0 1 1 0 0 0 0 1 0 1 1 1 1 1 1 0 1 0 0 0 1 0 1 1 0 0 1 1 1 0 1 1 0 0 0 0 1 1 0 1 1 0 1 1 0 0 1 1 0 0 0 1 0 1 1 1 0 0 0 0 1 0 1 1 0 0 0 0 0 1 0 1 0 1 1 0 1 0 0 0 0 1 1 1 0 0 0 0 0 0 1 0 0 0 1 0 1 0 1 0 1 1 1 0 1 1 0 ...

input:

100000 25000
18795 57584 68882 53630 55406 14899 54298 16609 89002 88131 72430 34937 61460 10630 19661 22223 65098 1341 70898 19247 32361 34943 10696 40776 54008 24322 2615 313 26497 87618 92712 73683 94491 24393 8572 1686 5519 27339 21635 66080 36730 63075 11885 31952 94217 57872 28651 85620 92226 ...

output:

P 24999
P 24997
P 24991
P 24988
P 24985
P 24983
P 24982
P 24979
P 24978
P 24976
P 61460
P 24975
P 70898
P 32361
P 24974
P 24971
P 24969
P 26497
P 24968
P 24960
P 73683
P 24959
P 27339
P 24948
P 24947
P 24946
P 24935
P 94217
P 57872
P 24933
P 24931
P 24930
P 24929
P 24926
P 24923
P 24922
P 24921
P 24...

result:

points 0.0630 correct, Rmax = 1700000

Test #45:

score: 2.457
Acceptable Answer
time: 258ms
memory: 76060kb

input:

100000 25000 1800000
15837 86285 92599 8639 3423 37568 3473 20583 50472 15651 67359 24463 22425 44178 35408 87851 24561 6346 96223 6455 54552 67003 84253 70865 80462 37554 39606 5238 75508 89277 24007 3762 18258 8006 16339 77262 19898 41930 85698 35733 60445 46487 91337 74529 23474 86288 39775 62287...

output:

1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 0 0 1 0 1 1 0 0 0 0 1 0 0 0 1 0 1 0 1 1 1 1 0 1 1 0 1 1 0 0 1 0 1 1 0 1 1 1 1 1 1 1 0 1 1 0 0 0 0 1 0 0 0 1 1 1 1 1 0 1 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 1 0 0 1 0 1 0 0 0 1 0 0 1 1 0 1 1 0 0 0 0 0 1 1 1 0 0 1 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 1 0 0 1 0 1 0 0 0 ...

input:

100000 25000
15837 86285 92599 8639 3423 37568 3473 20583 50472 15651 67359 24463 22425 44178 35408 87851 24561 6346 96223 6455 54552 67003 84253 70865 80462 37554 39606 5238 75508 89277 24007 3762 18258 8006 16339 77262 19898 41930 85698 35733 60445 46487 91337 74529 23474 86288 39775 62287 92141 6...

output:

P 24999
P 24997
P 92599
P 24993
P 24992
P 67359
P 44178
P 35408
P 24989
P 96223
P 54552
P 24987
P 84253
P 24986
P 80462
P 37554
P 39606
P 75508
P 24985
P 77262
P 24982
P 85698
P 35733
P 24981
P 24977
P 24975
P 24974
P 24973
P 24971
P 62287
P 92141
P 24966
P 35852
P 24965
P 24959
P 24956
P 78130
P 24...

result:

points 0.0630 correct, Rmax = 1700000

Test #46:

score: 2.457
Acceptable Answer
time: 278ms
memory: 76612kb

input:

100000 25000 1800000
59147 26079 96855 43545 59049 1568 1016 53694 36291 26636 86780 4874 31540 87702 30423 75347 87766 59979 13363 88209 31360 10263 85665 65221 40061 55858 39854 92226 24602 22786 21318 28855 93327 92455 5531 4267 79664 37092 20189 27564 5427 49551 16527 41105 68364 82725 56051 481...

output:

1 1 0 1 0 0 0 0 1 1 1 0 0 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 0 0 1 1 0 0 1 1 1 0 1 0 1 0 0 1 0 1 1 1 1 0 1 1 0 0 1 1 0 0 0 0 1 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 1 0 0 1 1 1 0 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 0 1 1 0 0 0 1 0 1 1 0 1 1 0 0 0 0 1 1 1 0 1 1 0 0 ...

input:

100000 25000
59147 26079 96855 43545 59049 1568 1016 53694 36291 26636 86780 4874 31540 87702 30423 75347 87766 59979 13363 88209 31360 10263 85665 65221 40061 55858 39854 92226 24602 22786 21318 28855 93327 92455 5531 4267 79664 37092 20189 27564 5427 49551 16527 41105 68364 82725 56051 48158 97038...

output:

P 24999
P 24997
P 24995
P 24993
P 24991
P 59049
P 53694
P 24989
P 24985
P 24983
P 24982
P 87702
P 24981
P 24980
P 24979
P 59979
P 88209
P 24978
P 24977
P 65221
P 40061
P 24972
P 24970
P 24962
P 24961
P 24956
P 24955
P 24954
P 24953
P 27564
P 24946
P 41105
P 68364
P 82725
P 56051
P 24945
P 24942
P 24...

result:

points 0.0630 correct, Rmax = 1700000

Test #47:

score: 2.457
Acceptable Answer
time: 244ms
memory: 77064kb

input:

100000 25000 1800000
71894 35265 78879 28798 7593 80664 52201 36079 77372 90216 50994 37643 48092 99451 31591 49823 57263 32936 79828 52614 74959 92586 17033 6930 23622 94288 44529 28428 1751 55042 63174 10081 36018 15955 48488 85431 87575 74283 2965 22447 7993 74461 20224 21307 72415 54028 31018 63...

output:

0 1 1 0 1 0 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 0 0 1 1 1 0 0 1 0 0 0 1 0 1 1 1 1 1 0 0 0 0 0 1 0 1 1 0 0 1 0 1 1 1 1 1 1 0 0 0 0 0 1 1 1 0 0 1 0 0 1 0 1 0 1 1 0 1 1 1 0 0 0 0 0 0 0 1 1 0 0 0 1 1 0 1 1 1 0 0 1 1 0 0 1 0 1 1 1 1 1 0 1 0 0 1 1 0 1 1 1 1 0 1 1 1 0 0 1 1 0 0 0 1 0 0 0 1 1 1 1 0 0 0 1 1 1 0 1 ...

input:

100000 25000
71894 35265 78879 28798 7593 80664 52201 36079 77372 90216 50994 37643 48092 99451 31591 49823 57263 32936 79828 52614 74959 92586 17033 6930 23622 94288 44529 28428 1751 55042 63174 10081 36018 15955 48488 85431 87575 74283 2965 22447 7993 74461 20224 21307 72415 54028 31018 63754 9051...

output:

P 24999
P 24993
P 35265
P 78879
P 24985
P 80664
P 24982
P 36079
P 24974
P 24972
P 24968
P 37643
P 24967
P 24964
P 31591
P 24960
P 57263
P 32936
P 24958
P 52614
P 74959
P 24951
P 94288
P 24950
P 28428
P 55042
P 63174
P 36018
P 24944
P 24943
P 87575
P 74283
P 24940
P 24939
P 24938
P 24928
P 24923
P 24...

result:

points 0.0630 correct, Rmax = 1700000

Test #48:

score: 2.52371
Acceptable Answer
time: 256ms
memory: 76184kb

input:

99839 24989 1800000
46232 7979 38744 11948 69980 11484 36670 48864 47143 89189 98785 75577 32706 73286 84542 53312 32396 92788 18272 35008 76487 62288 60193 96842 93335 99095 12612 11091 47766 44654 81748 98221 26502 3600 13783 93500 27326 54384 73037 57286 52627 73200 71766 80894 71332 17091 23658 ...

output:

0 0 0 1 1 0 0 1 0 0 1 0 1 1 0 1 0 1 1 0 1 0 1 0 0 1 1 1 1 1 0 0 0 0 0 0 0 1 1 0 1 0 1 1 1 0 1 0 0 1 0 0 0 1 1 0 1 0 1 0 1 1 1 0 1 0 0 0 0 0 1 1 1 0 1 0 1 0 0 0 1 0 0 0 1 0 0 1 1 1 0 1 1 0 0 1 1 0 1 0 0 0 0 1 1 1 1 1 0 0 1 1 1 1 0 0 0 1 0 0 0 0 0 0 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 0 0 1 0 0 0 0 0 1 1 1 ...

input:

99839 24989
46232 7979 38744 11948 69980 11484 36670 48864 47143 89189 98785 75577 32706 73286 84542 53312 32396 92788 18272 35008 76487 62288 60193 96842 93335 99095 12612 11091 47766 44654 81748 98221 26502 3600 13783 93500 27326 54384 73037 57286 52627 73200 71766 80894 71332 17091 23658 74374 87...

output:

P 24988
P 46232
P 24986
P 69980
P 36670
P 24981
P 24980
P 24971
P 24969
P 24966
P 32706
P 24964
P 84542
P 24961
P 32396
P 24959
P 24956
P 76487
P 24953
P 60193
P 96842
P 93335
P 24952
P 24950
P 24949
P 81748
P 24946
P 24945
P 24938
P 24933
P 24930
P 24924
P 24923
P 24922
P 24918
P 24916
P 80894
P 24...

result:

points 0.0647106250 correct, Rmax = 1697263

Test #49:

score: 2.457
Acceptable Answer
time: 282ms
memory: 76524kb

input:

100000 24910 1800000
62523 62952 60118 11733 47255 91666 54659 69247 66941 43813 91673 47800 36185 2920 28699 77819 89655 43688 35769 98307 9934 14416 31557 48674 19491 94012 63267 73893 35080 86744 27776 26756 67064 63743 73122 36465 36464 94259 72948 66575 94723 4234 13296 48297 82720 49380 75048 ...

output:

1 1 0 1 1 1 0 0 0 0 1 0 1 1 1 1 0 0 0 0 1 0 1 1 1 1 0 1 0 1 1 1 1 0 0 1 1 0 1 0 1 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 0 1 1 1 0 1 1 0 1 0 0 0 1 1 1 0 1 0 0 1 0 0 0 1 1 1 0 1 0 0 1 0 0 1 0 0 0 0 1 1 0 0 1 1 0 1 1 1 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1 1 1 1 1 1 1 0 0 1 1 1 0 0 0 0 1 1 0 1 1 1 1 1 0 1 0 1 0 0 0 ...

input:

100000 24910
62523 62952 60118 11733 47255 91666 54659 69247 66941 43813 91673 47800 36185 2920 28699 77819 89655 43688 35769 98307 9934 14416 31557 48674 19491 94012 63267 73893 35080 86744 27776 26756 67064 63743 73122 36465 36464 94259 72948 66575 94723 4234 13296 48297 82720 49380 75048 37699 29...

output:

P 24909
P 24908
P 24896
P 24895
P 24892
P 24890
P 54659
P 24888
P 24885
P 43813
P 24880
P 24879
P 24878
P 24875
P 24874
P 24869
P 24867
P 24863
P 98307
P 31557
P 24860
P 24857
P 24855
P 73893
P 24847
P 86744
P 27776
P 24844
P 24843
P 24837
P 24833
P 24832
P 24831
P 94259
P 24830
P 66575
P 24827
P 24...

result:

points 0.0630 correct, Rmax = 1700000

Test #50:

score: 2.457
Acceptable Answer
time: 272ms
memory: 76496kb

input:

100000 25000 1800000
12110 94284 81891 23624 37361 64671 71796 4241 50801 16244 19053 83555 15383 14475 22515 39 48967 18632 56092 64933 14986 54971 60802 34905 39057 95986 58823 46328 81428 88377 32139 61622 18816 90716 82494 86609 41782 20914 42227 89875 51577 45162 61896 51774 96873 14627 29815 2...

output:

0 1 1 1 0 0 1 0 1 1 1 1 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 1 1 1 0 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 0 0 1 0 0 0 1 0 0 1 0 0 0 1 1 1 0 1 0 0 1 0 0 0 1 1 1 1 1 0 0 0 1 0 0 1 0 1 1 1 1 1 0 0 1 0 0 1 1 1 1 1 1 0 0 0 1 0 1 1 1 0 0 0 0 1 1 0 0 0 1 1 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 1 1 0 0 1 1 0 0 0 ...

input:

100000 25000
12110 94284 81891 23624 37361 64671 71796 4241 50801 16244 19053 83555 15383 14475 22515 39 48967 18632 56092 64933 14986 54971 60802 34905 39057 95986 58823 46328 81428 88377 32139 61622 18816 90716 82494 86609 41782 20914 42227 89875 51577 45162 61896 51774 96873 14627 29815 21706 243...

output:

P 24989
P 24988
P 24985
P 24984
P 24983
P 24982
P 24981
P 24979
P 48967
P 24978
P 24974
P 54971
P 60802
P 24972
P 24971
P 24965
P 58823
P 24963
P 81428
P 24961
P 24953
P 24950
P 90716
P 24948
P 24943
P 41782
P 24942
P 24938
P 24936
P 24935
P 24934
P 24930
P 96873
P 24926
P 87166
P 24923
P 24922
P 24...

result:

points 0.0630 correct, Rmax = 1700000

Test #51:

score: 2.457
Acceptable Answer
time: 252ms
memory: 76340kb

input:

100000 25000 1800000
32862 82036 45228 57604 76798 10199 82335 58415 22259 52942 24226 30175 7994 16774 77580 17969 24662 2315 9961 69887 14300 83186 54301 36432 3807 46705 30586 15528 51522 34203 22913 95388 25137 48037 5136 32894 77009 49187 83736 79402 35395 42920 71645 19027 1986 38268 11671 353...

output:

0 1 1 1 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 1 1 0 0 0 0 0 0 0 1 0 1 0 0 1 1 0 1 0 1 0 0 0 0 1 1 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 1 1 0 0 1 1 1 1 1 1 1 1 1 0 1 0 1 0 0 1 1 1 1 0 1 0 1 1 1 1 1 0 0 1 0 0 0 1 1 1 1 1 0 0 1 1 0 0 0 0 0 1 0 1 1 1 1 1 0 1 0 0 0 0 1 0 0 1 1 1 0 1 1 0 0 1 1 1 1 0 1 1 0 1 0 ...

input:

100000 25000
32862 82036 45228 57604 76798 10199 82335 58415 22259 52942 24226 30175 7994 16774 77580 17969 24662 2315 9961 69887 14300 83186 54301 36432 3807 46705 30586 15528 51522 34203 22913 95388 25137 48037 5136 32894 77009 49187 83736 79402 35395 42920 71645 19027 1986 38268 11671 35396 66810...

output:

P 24993
P 24896
P 24870
P 24856
P 24838
P 24778
P 24736
P 24546
P 24540
P 24491
P 24479
P 24452
P 24437
P 24287
P 24167
P 24121
P 23926
P 23893
P 23888
P 23757
P 23622
P 23603
P 23550
P 23490
P 23486
P 23444
P 23405
P 23345
P 23319
P 23143
P 23116
P 23043
P 23037
P 22903
P 22862
P 22841
P 22801
P 22...

result:

points 0.0630 correct, Rmax = 1700000