QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#357782#5235. Podwyżki [B]ucup-team233510 ✓53ms9896kbC++141.3kb2024-03-19 11:31:202024-03-19 11:31:20

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 1
Accepted

Test #1:

score: 1
Accepted
time: 0ms
memory: 7780kb

input:

20 3
500000006 500000017 500000029 500000035 500000043 500000059 500000193 500000072 500000086 500000093 500000102 500000113 500000128 500000138 500000148 500000156 500000161 500000176 500000185 500000193

output:

TAK
6 7

result:

ok good solution

Test #2:

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

input:

19 3
500000005 500000018 500000026 500000034 500000043 500000053 500000065 500000076 500000087 500000099 500000108 500000117 500000005 500000139 500000149 500000151 500000161 500000179 500000187

output:

TAK
12 13

result:

ok good solution

Test #3:

score: 0
Accepted
time: 1ms
memory: 5904kb

input:

20 4
999999991 999999992 999999991 999999995 999999995 999999990 999999998 999999990 999999994 1000000000 999999994 999999994 999999995 999999993 999999990 999999991 999999991 999999994 999999994 999999991

output:

TAK
1 2 3 

result:

ok good solution

Test #4:

score: 0
Accepted
time: 1ms
memory: 5900kb

input:

20 5
2 1 2 3 1 3 4 1 1 3 2 3 1 3 3 1 1 1 2 4

output:

TAK
1 2 3 4 

result:

ok good solution

Test #5:

score: 0
Accepted
time: 1ms
memory: 5704kb

input:

20 10
3 4 3 3 3 4 3 2 1 1 4 6 4 5 5 5 4 2 4 2

output:

TAK
1 2 3 4 5 6 7 8 9 

result:

ok good solution

Test #6:

score: 0
Accepted
time: 1ms
memory: 5836kb

input:

20 20
999999999 1000000000 1000000000 999999999 1000000000 1000000000 999999997 999999999 999999997 1000000000 999999998 999999997 999999998 999999999 999999998 999999997 1000000000 999999998 999999997 999999999

output:

TAK
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 

result:

ok good solution

Test #7:

score: 0
Accepted
time: 1ms
memory: 5740kb

input:

20 4
500000006 500000013 500000023 500000038 500000045 500000057 500000063 500000074 500000083 500000099 500000107 500000114 500000128 500000137 500000141 500000157 500000168 500000177 500000181 500000196

output:

NIE

result:

ok no solution

Test #8:

score: 0
Accepted
time: 1ms
memory: 5768kb

input:

20 4
500000013 500000007 500000029 500000039 500000049 500000051 500000061 500000071 500000089 500000099 500000105 500000113 500000128 500000131 500000142 500000152 500000166 500000171 500000182 500000192

output:

TAK
1 2 3 

result:

ok good solution

Test #9:

score: 0
Accepted
time: 1ms
memory: 5724kb

input:

20 4
4 15 27 38 44 58 68 75 87 94 103 119 128 138 144 160 167 174 194 185

output:

TAK
1 18 19 

result:

ok good solution

Test #10:

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

input:

20 4
5007 5018 5023 5036 5043 5055 5061 5077 5084 5092 5113 5108 5129 5138 5144 5154 5166 5178 5187 5199

output:

TAK
10 11 12 

result:

ok good solution

Test #11:

score: 0
Accepted
time: 1ms
memory: 5692kb

input:

20 3
1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3

output:

NIE

result:

ok no solution

Test #12:

score: 0
Accepted
time: 1ms
memory: 7884kb

input:

20 2
758909419 916375477 900968368 884526052 918212590 783145228 896553723 939428508 845283294 806205428 811008095 968754661 939795666 758909419 928453743 945547159 799573295 909853336 968754661 617655967

output:

TAK
19

result:

ok good solution

Test #13:

score: 0
Accepted
time: 1ms
memory: 7876kb

input:

20 2
4 4 5 2 3 3 4 2 4 3 4 1 1 1 2 3 2 2 4 3

output:

TAK
3

result:

ok good solution

Test #14:

score: 0
Accepted
time: 1ms
memory: 7748kb

input:

20 3
4 2 4 3 3 2 4 2 1 3 3 2 4 4 3 4 3 4 4 2

output:

TAK
1 2

result:

ok good solution

Subtask #2:

score: 1
Accepted

Test #15:

score: 1
Accepted
time: 1ms
memory: 5792kb

input:

513 3
500000008 500000018 500000028 500000031 500000049 500000057 500000068 500000073 500000088 500000096 500000109 500000117 500000121 500000135 500000149 500000155 500000162 500000175 500000183 500000193 500000206 500000215 500000221 500000239 500000244 500000256 500000265 500000279 500000289 5000...

output:

TAK
230 231

result:

ok good solution

Test #16:

score: 0
Accepted
time: 1ms
memory: 5720kb

input:

512 3
500000004 500000013 500000025 500000039 500000043 500000054 500000068 500000078 500000089 500000092 500000101 500000111 500000125 500000136 500000141 500000153 500000162 500000179 500000185 500000199 500000208 500000218 500000226 500000239 500000246 500000253 500000268 500000278 500000282 5000...

output:

TAK
428 429

result:

ok good solution

Test #17:

score: 0
Accepted
time: 1ms
memory: 7820kb

input:

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

output:

TAK
1 2

result:

ok good solution

Test #18:

score: 0
Accepted
time: 1ms
memory: 5708kb

input:

500 4
999999995 999999992 999999993 999999991 1000000000 999999999 999999997 999999999 999999994 999999994 999999998 999999993 999999999 999999999 999999995 999999994 999999996 999999995 999999990 999999997 1000000000 999999999 999999995 999999995 999999991 999999992 999999998 1000000000 1000000000 ...

output:

TAK
1 2 3 

result:

ok good solution

Test #19:

score: 0
Accepted
time: 1ms
memory: 5728kb

input:

500 480
269 320 954 88 39 570 80 475 550 695 987 691 322 385 792 651 376 343 967 609 985 78 299 123 210 21 384 687 572 740 501 746 622 478 972 496 176 835 878 955 222 31 999 565 18 335 519 592 577 541 208 56 329 191 378 387 995 374 402 158 697 281 322 325 636 278 346 536 247 225 618 144 183 260 106 ...

output:

TAK
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok good solution

Test #20:

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

input:

500 4
500000005 500000012 500000026 500000039 500000049 500000059 500000064 500000077 500000082 500000098 500000102 500000119 500000129 500000132 500000144 500000156 500000168 500000171 500000182 500000199 500000207 500000216 500000222 500000239 500000248 500000254 500000263 500000272 500000287 5000...

output:

NIE

result:

ok no solution

Test #21:

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

input:

500 4
5008 5018 5025 5037 5049 5057 5064 5076 5088 5098 5102 5111 5124 5132 5148 5157 5163 5174 5182 5198 5209 5218 5222 5232 5246 5254 5261 5279 5281 5299 5301 5312 5328 5335 5341 5351 5364 5372 5388 5394 5403 5418 5423 5436 5449 5456 5468 5478 5487 5498 5508 5512 5525 5537 5549 5557 5561 5576 5585...

output:

TAK
250 251 252 

result:

ok good solution

Test #22:

score: 0
Accepted
time: 1ms
memory: 7756kb

input:

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

output:

NIE

result:

ok no solution

Test #23:

score: 0
Accepted
time: 1ms
memory: 8072kb

input:

500 3
576793709 153193651 146183480 490199076 403245547 560228026 83148702 995802161 647772748 109749815 901120963 423591989 275139692 552465782 291417802 393066267 85988427 29530724 676110969 175366733 543326623 92554622 404064744 140592813 635608283 221438386 334509308 754366988 476474514 35297859...

output:

TAK
1 2

result:

ok good solution

Test #24:

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

input:

500 2
287 397 379 374 309 334 369 397 313 298 379 344 300 317 308 372 316 382 369 307 373 300 331 294 309 321 321 307 322 333 396 394 331 346 292 377 327 352 373 339 350 384 298 371 308 374 335 344 361 334 360 344 328 320 297 292 390 369 332 331 329 320 300 305 287 318 380 295 300 389 303 313 385 39...

output:

TAK
281

result:

ok good solution

Test #25:

score: 0
Accepted
time: 1ms
memory: 7816kb

input:

500 3
410 58 439 60 186 444 46 70 246 318 252 452 248 198 472 490 271 437 278 403 329 452 115 451 155 365 134 57 237 343 14 317 380 398 196 485 389 357 57 314 238 269 106 356 20 351 234 155 209 134 81 190 225 403 244 162 41 4 110 266 39 150 77 483 21 102 192 186 274 309 395 264 100 401 228 96 96 301...

output:

TAK
1 2

result:

ok good solution

Subtask #3:

score: 1
Accepted

Test #26:

score: 1
Accepted
time: 1ms
memory: 8076kb

input:

1025 3
5 15 24 38 48 55 66 72 90 100 105 120 126 132 149 158 164 179 187 192 206 217 223 235 245 258 266 276 286 297 308 317 322 339 349 354 365 379 384 398 410 414 423 433 442 455 469 480 484 495 506 520 526 533 546 556 565 580 587 599 607 617 628 634 646 658 667 675 686 700 709 714 729 740 744 760...

output:

TAK
312 313

result:

ok good solution

Test #27:

score: 0
Accepted
time: 1ms
memory: 8048kb

input:

2000 3
500000003 500000018 500000029 500000036 500000047 500000057 500000068 500000074 500000086 500000099 500000101 500000114 500000124 500000138 500000149 500000151 500000163 500000171 500000188 500000197 500000205 500000212 500000226 500000239 500000248 500000256 500000263 500000274 500000282 500...

output:

TAK
1472 1473

result:

ok good solution

Test #28:

score: 0
Accepted
time: 1ms
memory: 7956kb

input:

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

output:

TAK
1 2

result:

ok good solution

Test #29:

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

input:

2000 4
999999993 999999991 999999995 999999996 1000000000 999999999 999999994 999999992 999999996 999999992 999999990 999999992 999999998 999999992 999999994 999999992 999999997 999999994 999999996 999999998 999999996 999999994 999999994 999999999 999999996 999999993 999999990 999999993 999999993 99...

output:

TAK
1 2 3 

result:

ok good solution

Test #30:

score: 0
Accepted
time: 1ms
memory: 5852kb

input:

2000 2000
1654 1473 3200 3918 2351 1292 55 423 2393 768 1678 2884 3714 3119 618 1441 3499 3953 1004 2817 3524 2313 857 1896 2592 2754 555 3714 1114 1266 2591 3633 1799 2300 1901 3175 2608 2518 3445 3207 3473 1146 1957 886 698 2458 272 3015 2167 2212 1976 2260 3980 3082 3268 2863 703 193 2859 3838 24...

output:

TAK
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok good solution

Test #31:

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

input:

2000 4
500000006 500000013 500000025 500000033 500000048 500000052 500000066 500000076 500000081 500000095 500000109 500000119 500000127 500000131 500000149 500000152 500000165 500000179 500000182 500000196 500000206 500000217 500000227 500000237 500000246 500000251 500000261 500000276 500000284 500...

output:

NIE

result:

ok no solution

Test #32:

score: 0
Accepted
time: 1ms
memory: 6100kb

input:

2000 4
1000006 1000019 1000028 1000034 1000048 1000053 1000063 1000075 1000082 1000091 1000105 1000115 1000125 1000132 1000145 1000153 1000167 1000173 1000181 1000199 1000204 1000214 1000227 1000239 1000242 1000257 1000261 1000277 1000282 1000299 1000306 1000314 1000325 1000337 1000344 1000358 10003...

output:

TAK
1000 1001 1002 

result:

ok good solution

Test #33:

score: 0
Accepted
time: 1ms
memory: 7768kb

input:

2000 3
1 2 4 6 4 9 6 3 6 4 2 6 7 4 3 8 3 7 7 8 3 8 5 2 6 3 3 7 8 4 5 6 8 7 5 4 3 3 3 2 5 8 7 4 2 9 7 2 5 6 6 2 9 2 5 7 4 9 3 3 8 2 5 6 3 3 2 2 7 6 3 3 8 5 9 4 7 2 5 2 5 4 8 3 4 7 2 6 9 6 9 2 8 4 9 6 8 5 9 5 8 4 5 4 6 8 2 5 5 9 3 9 4 9 5 9 4 7 3 5 6 8 8 6 8 6 6 4 2 6 9 5 6 3 4 8 2 3 6 2 3 5 8 9 9 2 4...

output:

NIE

result:

ok no solution

Test #34:

score: 0
Accepted
time: 1ms
memory: 7820kb

input:

2000 2
172 354 216 370 325 309 257 266 183 246 226 234 357 185 390 240 219 176 228 238 303 355 339 324 318 289 296 377 190 212 273 382 347 175 234 305 318 270 274 209 347 369 188 258 345 181 251 391 315 291 288 174 242 288 215 206 283 304 217 275 246 360 286 302 258 202 389 202 376 319 376 213 226 3...

output:

TAK
499

result:

ok good solution

Test #35:

score: 0
Accepted
time: 1ms
memory: 7860kb

input:

2000 3
555 1675 685 94 1498 1666 1317 1722 1089 1391 943 145 1472 1968 947 1280 79 694 462 1611 1275 1391 820 928 1037 1949 1637 584 483 165 640 1500 1761 1035 1238 813 136 687 624 1955 1321 1235 564 1326 587 474 1338 578 1152 1805 1349 1894 708 145 1134 1285 860 563 1714 1446 1812 1363 1884 144 35 ...

output:

TAK
3 4

result:

ok good solution

Test #36:

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

input:

2000 3
22328390 657120564 703172726 169402906 590158508 967311397 931382677 65853277 67304887 537946239 812756007 872059182 56154916 845333052 584072277 275082408 796426550 498002981 902174006 580213237 986558809 131241561 972118949 296271050 784910129 65499006 260925775 77570015 680661577 899151412...

output:

TAK
160 161

result:

ok good solution

Test #37:

score: 0
Accepted
time: 1ms
memory: 7888kb

input:

1999 3
100008 100018 100024 100033 100046 100055 100062 100073 100087 100092 100108 100114 100128 100137 100142 100159 100161 100173 100186 100196 100204 100211 100223 100236 100244 100259 100263 100274 100284 100296 100302 100316 100322 100334 100345 100353 100369 100378 100386 100398 100403 100417...

output:

TAK
1997 1998

result:

ok good solution

Subtask #4:

score: 1
Accepted

Test #38:

score: 1
Accepted
time: 1ms
memory: 8048kb

input:

1024 3
9 15 30 37 45 58 69 78 84 97 108 112 122 140 148 154 166 176 185 195 208 213 227 235 243 252 264 274 284 299 310 317 325 338 348 359 364 375 384 400 410 419 425 439 448 459 468 477 487 498 504 516 525 538 549 558 563 574 583 594 602 613 622 634 648 658 668 674 686 697 702 713 728 738 742 754 ...

output:

TAK
858 859

result:

ok good solution

Test #39:

score: 0
Accepted
time: 1ms
memory: 7764kb

input:

2000 3
500000001 500000016 500000026 500000036 500000044 500000052 500000064 500000076 500000083 500000093 500000104 500000119 500000122 500000135 500000149 500000156 500000169 500000176 500000182 500000199 500000207 500000214 500000229 500000235 500000242 500000254 500000263 500000278 500000282 500...

output:

TAK
1452 1453

result:

ok good solution

Test #40:

score: 0
Accepted
time: 1ms
memory: 7852kb

input:

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

output:

TAK
1 2

result:

ok good solution

Test #41:

score: 0
Accepted
time: 1ms
memory: 7824kb

input:

2000 2
569858831 450911919 863304159 885312393 109683305 110364551 266840379 860043848 397780790 465717343 101092307 613324906 575484525 22329315 831790930 758295276 134402417 51539346 68434131 25519620 799961117 102110878 231917973 782986177 244847850 91945531 897107420 157212537 50003910 683767290...

output:

NIE

result:

ok no solution

Test #42:

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

input:

2000 4
999999995 999999999 1000000000 999999998 999999992 999999992 999999996 999999995 999999999 999999994 999999992 999999991 999999996 999999996 999999992 999999991 999999991 999999996 999999997 999999997 999999998 999999997 999999998 999999997 999999994 999999998 999999999 999999991 999999999 10...

output:

TAK
2 3 4 

result:

ok good solution

Test #43:

score: 0
Accepted
time: 1ms
memory: 5784kb

input:

1024 1004
506 533 1730 122 238 1681 1213 1748 782 480 562 1501 1855 595 26 653 526 972 241 1257 2006 521 857 232 637 191 1666 1235 861 1143 115 1221 1907 1574 466 1840 815 837 98 1767 841 1223 1613 795 802 1512 959 1241 1473 213 705 114 314 1918 1285 1448 851 1126 386 689 1842 195 19 809 1759 456 19...

output:

TAK
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok good solution

Test #44:

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

input:

2000 4
500000009 500000018 500000023 500000038 500000044 500000059 500000062 500000077 500000085 500000099 500000105 500000118 500000123 500000134 500000149 500000153 500000166 500000177 500000189 500000193 500000204 500000215 500000224 500000238 500000249 500000255 500000267 500000277 500000284 500...

output:

NIE

result:

ok no solution

Test #45:

score: 0
Accepted
time: 1ms
memory: 5736kb

input:

2000 4
1000001 1000018 1000029 1000039 1000044 1000052 1000068 1000075 1000082 1000096 1000109 1000111 1000125 1000132 1000141 1000157 1000166 1000179 1000181 1000194 1000208 1000212 1000228 1000238 1000249 1000259 1000267 1000276 1000284 1000296 1000307 1000316 1000324 1000331 1000346 1000354 10003...

output:

TAK
1000 1001 1002 

result:

ok good solution

Test #46:

score: 0
Accepted
time: 1ms
memory: 5848kb

input:

2000 4
1000005 1000019 1000026 1000038 1000044 1000059 1000062 1000078 1000088 1000096 1000107 1000119 1000124 1000133 1000142 1000152 1000168 1000172 1000183 1000191 1000206 1000215 1000224 1000236 1000244 1000251 1000261 1000278 1000284 1000294 1000309 1000316 1000324 1000334 1000349 1000353 10003...

output:

TAK
1 1998 1999 

result:

ok good solution

Test #47:

score: 0
Accepted
time: 1ms
memory: 7952kb

input:

2000 3
1 36811680 190639701 570987233 640071083 135413909 365577186 107617576 961334923 28070371 428883654 149627314 755126830 974361292 967900129 907151252 252929431 734653269 371975446 494403481 552011663 882731395 993845839 189055128 514361182 776665591 262734314 840150227 897391882 539139677 633...

output:

NIE

result:

ok no solution

Test #48:

score: 0
Accepted
time: 1ms
memory: 7784kb

input:

2000 2
118 268 306 172 224 311 387 309 128 223 340 280 357 311 241 314 232 394 154 296 232 235 327 394 273 221 229 290 304 244 284 127 218 341 187 354 318 305 290 192 166 316 274 182 195 148 289 214 285 256 269 307 385 387 282 375 163 270 135 372 324 291 177 243 347 208 150 303 396 305 164 303 187 3...

output:

TAK
145

result:

ok good solution

Test #49:

score: 0
Accepted
time: 1ms
memory: 7784kb

input:

1025 3
996 677 1767 877 295 820 1019 644 288 31 1707 1165 728 231 1953 148 410 1059 1404 1643 1583 4 1380 1351 1109 474 1746 291 1280 43 1372 547 1128 1246 1961 531 1834 340 624 1005 479 351 144 1477 196 324 992 518 480 96 666 821 585 1960 38 1920 803 789 1095 52 256 1540 1040 1820 1842 993 1398 248...

output:

TAK
1 2

result:

ok good solution

Subtask #5:

score: 1
Accepted

Test #50:

score: 1
Accepted
time: 21ms
memory: 9400kb

input:

500000 2
96733 385679 36496 58364 157924 262087 114368 369679 399487 243135 300007 400425 143873 238383 376606 221831 362277 5424 143882 7322 83891 13321 464051 2125 317534 223350 355391 142109 446781 2753 377049 387945 57663 418272 16684 482728 300347 313882 41088 40295 38933 317354 168907 234092 2...

output:

NIE

result:

ok no solution

Test #51:

score: 0
Accepted
time: 32ms
memory: 9568kb

input:

500000 2
117389272 687154217 170919241 601221880 776757285 253352169 897265377 801718066 23223989 393553983 389363071 354656166 242297781 51907467 932025936 241442608 472378284 605075711 87145073 765793299 908330721 367947491 639266180 417184951 409818275 265875703 533223529 384404244 271797058 7634...

output:

NIE

result:

ok no solution

Test #52:

score: 0
Accepted
time: 15ms
memory: 9524kb

input:

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

output:

TAK
499999

result:

ok good solution

Test #53:

score: 0
Accepted
time: 15ms
memory: 9572kb

input:

500000 2
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

output:

TAK
1

result:

ok good solution

Test #54:

score: 0
Accepted
time: 23ms
memory: 9640kb

input:

500000 2
108603 474541 261977 447513 285402 383780 239206 497512 475159 380581 317915 169919 340077 380992 471386 463330 429671 113679 496283 173043 449384 156244 319985 135355 282262 345239 218012 367654 219736 305927 307901 427184 271860 204339 150715 188313 216277 157300 222028 310633 404004 1446...

output:

TAK
221241

result:

ok good solution

Test #55:

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

input:

500000 2
22 24 30 30 27 22 24 26 26 25 30 26 27 28 30 29 22 25 28 27 22 25 28 28 28 26 23 23 22 24 23 29 23 22 24 26 23 22 29 30 30 28 30 26 29 23 22 27 29 23 26 27 25 24 28 24 24 22 30 29 27 24 30 27 27 28 26 25 26 26 27 27 24 24 30 24 30 27 25 30 29 22 30 29 24 23 25 29 28 29 29 22 30 22 24 29 24 ...

output:

TAK
485762

result:

ok good solution

Test #56:

score: 0
Accepted
time: 26ms
memory: 9492kb

input:

500000 2
1000010 1000019 1000032 1000041 1000051 1000059 1000070 1000078 1000089 1000097 1000110 1000120 1000131 1000139 1000148 1000156 1000166 1000176 1000187 1000199 1000210 1000217 1000234 1000240 1000247 1000261 1000267 1000282 1000287 1000303 1000311 1000317 1000328 1000342 1000346 1000358 100...

output:

TAK
499999

result:

ok good solution

Test #57:

score: 0
Accepted
time: 23ms
memory: 9664kb

input:

499999 2
100014 100002 100023 100039 100043 100056 100068 100076 100084 100091 100106 100114 100121 100138 100141 100153 100162 100172 100185 100194 100208 100219 100222 100233 100241 100256 100263 100273 100285 100299 100304 100314 100328 100335 100348 100355 100362 100379 100387 100394 100402 1004...

output:

NIE

result:

ok no solution

Subtask #6:

score: 1
Accepted

Test #58:

score: 1
Accepted
time: 31ms
memory: 9524kb

input:

500000 3
500000003 500000017 500000027 500000036 500000043 500000054 500000066 500000078 500000082 500000094 500000104 500000114 500000123 500000133 500000147 500000158 500000169 500000178 500000181 500000191 500000203 500000212 500000221 500000235 500000247 500000254 500000266 500000271 500000283 5...

output:

TAK
5105 5106

result:

ok good solution

Test #59:

score: 0
Accepted
time: 26ms
memory: 9524kb

input:

500000 3
8 18 25 36 46 52 64 73 86 95 102 117 122 135 149 154 170 173 184 198 202 219 227 235 243 255 265 274 284 298 302 314 323 333 342 356 362 379 383 400 406 415 422 433 450 460 462 478 482 494 509 518 523 532 549 553 570 572 582 592 604 615 625 633 643 659 666 673 683 696 704 720 726 737 743 75...

output:

TAK
227755 227756

result:

ok good solution

Test #60:

score: 0
Accepted
time: 26ms
memory: 9828kb

input:

500000 3
76142 184713 162332 231317 253409 149983 403631 443598 294194 383351 452080 198956 441905 449265 391601 353022 432725 69532 324491 434497 237660 162995 192517 457126 420577 158438 5850 130789 3683 11345 204100 323809 484964 332197 218478 95950 356909 352741 157449 279980 57783 290708 278063...

output:

TAK
17 18

result:

ok good solution

Test #61:

score: 0
Accepted
time: 26ms
memory: 9412kb

input:

500000 2
514352328 419469602 69028724 932894833 551820066 136805601 384554640 230759153 376618696 893194199 618515144 942421993 275644998 788618349 739540931 695090150 804883196 690139819 732309331 101220474 278500843 300129869 625978295 190672784 425421318 300777959 242923171 435876571 994370313 14...

output:

NIE

result:

ok no solution

Test #62:

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

input:

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

output:

TAK
1 2

result:

ok good solution

Test #63:

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

input:

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

output:

NIE

result:

ok no solution

Test #64:

score: 0
Accepted
time: 26ms
memory: 9404kb

input:

500000 3
1 198265967 513475945 700860821 751064997 294702285 7206959 177826037 44853414 360642971 532149946 596346948 363717178 814225874 634480125 455271233 6324984 174750277 982876662 335110143 390117660 934734740 602513555 997456115 436668936 963105153 964055824 87395066 424621837 393654281 96129...

output:

NIE

result:

ok no solution

Test #65:

score: 0
Accepted
time: 17ms
memory: 9896kb

input:

500000 2
241 266 250 256 290 244 315 393 294 294 306 324 318 296 279 306 303 354 400 317 365 251 371 318 300 338 252 252 379 382 395 366 299 352 334 346 293 337 341 288 245 357 395 362 332 372 263 330 309 363 316 253 375 304 343 350 246 360 269 260 341 334 380 346 369 396 281 335 267 311 324 363 248...

output:

TAK
30884

result:

ok good solution

Test #66:

score: 0
Accepted
time: 25ms
memory: 9840kb

input:

499987 3
5000067 218 226 232 244 253 266 277 282 292 308 311 324 332 341 359 365 373 385 398 401 414 429 436 442 453 466 479 488 494 502 517 522 539 549 557 568 578 587 592 609 619 627 632 642 657 667 674 683 699 701 713 723 738 745 758 761 778 786 795 809 818 821 836 841 851 865 879 888 897 906 916...

output:

TAK
1 2

result:

ok good solution

Subtask #7:

score: 1
Accepted

Test #67:

score: 1
Accepted
time: 11ms
memory: 8736kb

input:

200000 3
2 20 22 38 44 53 70 76 82 100 102 120 128 137 148 159 168 178 186 199 203 218 222 232 242 255 270 275 287 293 308 318 329 340 345 356 368 377 390 394 407 415 428 436 442 452 463 478 485 493 510 515 524 539 549 555 565 573 588 595 608 618 622 640 642 653 662 673 689 700 710 713 727 735 748 7...

output:

TAK
147546 147547

result:

ok good solution

Test #68:

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

input:

200000 3
4 19 25 36 47 57 65 76 89 97 104 112 129 137 148 152 169 176 183 196 208 217 224 239 245 259 270 276 287 294 303 318 326 335 346 359 368 373 390 398 407 420 424 440 447 460 470 474 484 500 504 515 526 536 544 559 563 573 589 594 602 612 629 637 642 655 663 680 689 693 708 713 725 737 750 75...

output:

TAK
1382 1383

result:

ok good solution

Test #69:

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

input:

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

output:

TAK
1 2

result:

ok good solution

Test #70:

score: 0
Accepted
time: 9ms
memory: 6672kb

input:

200000 4
999999990 1000000000 999999990 999999995 999999991 999999991 999999997 999999996 999999994 999999995 999999996 999999995 999999990 999999998 999999991 999999990 999999993 999999990 999999996 1000000000 999999994 999999996 999999997 999999996 999999995 999999998 999999994 999999991 999999999...

output:

TAK
1 2 3 

result:

ok good solution

Test #71:

score: 0
Accepted
time: 18ms
memory: 6980kb

input:

200000 200000
248273 149424 149980 240028 231110 142867 376104 338951 358805 41152 255859 389241 53020 343686 227043 66860 287453 124695 272549 308558 273391 117560 106055 130571 172810 146327 358771 351410 140913 157028 80917 166774 127883 44099 336183 252104 292628 113255 269541 101190 354482 3597...

output:

TAK
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok good solution

Test #72:

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

input:

200000 4
500000007 500000013 500000024 500000036 500000045 500000053 500000065 500000078 500000081 500000093 500000104 500000115 500000127 500000131 500000141 500000151 500000161 500000173 500000186 500000194 500000207 500000218 500000227 500000237 500000242 500000252 500000264 500000278 500000286 5...

output:

NIE

result:

ok no solution

Test #73:

score: 0
Accepted
time: 11ms
memory: 6392kb

input:

200000 4
1000003 1000017 1000027 1000034 1000043 1000054 1000065 1000074 1000082 1000093 1000103 1000116 1000124 1000135 1000142 1000152 1000169 1000176 1000186 1000198 1000201 1000219 1000221 1000238 1000249 1000257 1000266 1000276 1000287 1000294 1000302 1000315 1000328 1000336 1000346 1000359 100...

output:

TAK
100000 100001 100002 

result:

ok good solution

Test #74:

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

input:

200000 3
1 2 4 3 3 2 4 3 3 3 2 4 3 4 5 5 3 6 3 4 4 4 4 6 5 3 2 6 3 3 5 3 2 6 5 5 5 2 6 4 2 5 6 4 5 3 3 2 3 5 6 4 2 5 6 2 2 5 5 3 5 4 4 4 3 3 2 3 6 5 4 2 3 5 4 2 2 2 5 3 4 3 3 4 3 4 3 5 6 4 4 2 2 5 3 2 2 6 2 6 6 6 4 3 2 2 5 2 2 6 3 3 6 3 5 2 6 3 4 6 2 6 5 6 2 2 2 6 6 3 2 3 6 6 2 4 3 4 5 3 2 3 2 2 2 5...

output:

NIE

result:

ok no solution

Test #75:

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

input:

200000 2
253 301 276 287 336 372 253 274 393 279 369 297 321 306 366 315 380 321 397 258 304 369 257 296 291 373 339 298 319 400 283 399 367 289 399 400 311 379 370 370 328 281 373 364 327 270 394 389 384 332 316 322 376 267 370 379 389 381 341 346 348 396 351 265 289 391 344 298 386 354 378 343 270...

output:

TAK
1323

result:

ok good solution

Test #76:

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

input:

200000 3
144605 78447 83092 162229 162834 94764 2541 178278 72881 134659 170272 114201 181930 118045 185877 38142 21605 114728 8623 102924 174013 168579 94387 188397 74938 185698 84434 9234 43307 194780 91459 193115 64802 140435 105482 199491 81919 19656 102473 170266 71878 144030 36945 100169 19244...

output:

TAK
1 2

result:

ok good solution

Test #77:

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

input:

200000 3
959887009 628494755 626083506 464615016 591249378 543888972 232788615 300875805 796150835 173841440 677633835 390889186 761692926 81485619 32195406 577171827 810288615 158612076 105921551 506066978 721733029 338816808 899065204 51383725 869755996 292322228 169405174 759079598 346106559 5480...

output:

TAK
1 2

result:

ok good solution

Test #78:

score: 0
Accepted
time: 11ms
memory: 8556kb

input:

200000 3
1000015 1000006 1000027 1000037 1000046 1000056 1000066 1000071 1000088 1000092 1000105 1000116 1000128 1000137 1000148 1000152 1000163 1000176 1000181 1000198 1000208 1000212 1000223 1000236 1000241 1000251 1000267 1000275 1000285 1000291 1000304 1000319 1000325 1000332 1000341 1000354 100...

output:

TAK
1 2

result:

ok good solution

Test #79:

score: 0
Accepted
time: 11ms
memory: 6380kb

input:

200000 12345
1000015 1000005 1000021 1000038 1000046 1000053 1000063 1000077 1000085 1000099 1000109 1000111 1000121 1000138 1000149 1000156 1000163 1000175 1000183 1000195 1000206 1000217 1000222 1000232 1000242 1000259 1000264 1000274 1000287 1000295 1000302 1000319 1000322 1000337 1000344 1000353...

output:

TAK
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok good solution

Subtask #8:

score: 1
Accepted

Test #80:

score: 1
Accepted
time: 14ms
memory: 9096kb

input:

262145 3
6 13 24 38 49 58 62 78 88 96 102 117 130 139 147 152 169 179 184 199 206 217 222 237 245 260 264 279 286 296 303 312 330 336 345 357 362 379 390 399 405 415 425 432 450 453 467 480 488 497 505 520 523 535 548 559 565 576 585 600 608 617 630 636 648 652 662 677 684 700 706 715 726 738 747 75...

output:

TAK
42092 42093

result:

ok good solution

Test #81:

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

input:

299999 3
5 19 27 40 44 52 70 75 85 99 108 112 129 140 148 156 166 172 188 196 204 214 227 235 249 257 267 272 288 294 305 312 326 339 344 359 370 374 390 397 405 415 426 436 450 456 466 479 483 498 509 515 524 535 546 555 568 574 582 596 610 620 623 636 645 653 664 673 683 694 702 712 727 738 743 76...

output:

TAK
232708 232709

result:

ok good solution

Test #82:

score: 0
Accepted
time: 9ms
memory: 9124kb

input:

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

output:

TAK
1 2

result:

ok good solution

Test #83:

score: 0
Accepted
time: 18ms
memory: 6728kb

input:

300000 4
999999994 999999992 999999992 999999998 999999995 999999999 999999996 1000000000 1000000000 999999999 999999990 999999997 999999994 999999994 999999995 999999997 999999997 999999998 999999995 999999996 999999997 999999997 999999996 999999998 999999998 999999990 999999990 999999993 999999997...

output:

TAK
1 2 3 

result:

ok good solution

Test #84:

score: 0
Accepted
time: 33ms
memory: 7692kb

input:

300000 299980
127682 64809 375816 512981 293891 330763 465367 329221 553512 481368 324283 587772 116588 520104 142038 430755 76012 388803 236807 535733 443513 299938 50874 552868 175853 114119 58413 56441 197815 232916 7968 84525 537073 258024 236217 532622 549190 352114 151438 140875 22389 16790 40...

output:

TAK
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok good solution

Test #85:

score: 0
Accepted
time: 17ms
memory: 6372kb

input:

300000 4
500000007 500000013 500000029 500000031 500000048 500000057 500000068 500000077 500000086 500000092 500000108 500000115 500000121 500000134 500000141 500000154 500000162 500000178 500000186 500000198 500000203 500000214 500000222 500000236 500000246 500000253 500000264 500000274 500000287 5...

output:

NIE

result:

ok no solution

Test #86:

score: 0
Accepted
time: 15ms
memory: 6896kb

input:

300000 4
100007 100017 100023 100031 100048 100059 100068 100075 100087 100099 100104 100116 100128 100131 100144 100155 100169 100172 100182 100198 100206 100212 100222 100238 100244 100253 100264 100272 100286 100291 100304 100318 100326 100335 100344 100359 100365 100378 100386 100395 100407 1004...

output:

TAK
150000 150001 150002 

result:

ok good solution

Test #87:

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

input:

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

output:

NIE

result:

ok no solution

Test #88:

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

input:

300000 2
138 201 197 267 205 352 219 225 394 181 337 225 164 375 339 205 178 368 385 270 229 256 140 322 339 288 168 199 375 198 213 235 299 253 330 367 373 253 352 226 333 372 317 373 172 385 238 362 360 309 265 273 359 290 205 151 365 205 214 249 393 233 390 166 235 310 153 346 294 353 210 380 210...

output:

TAK
278532

result:

ok good solution

Test #89:

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

input:

300000 3
106583 259715 59301 40804 111038 203137 26869 166873 153744 119991 22844 264680 4346 227417 28367 265890 8592 105897 235433 108176 239968 132312 58837 23196 258298 204963 87495 238847 80480 10872 180481 224856 35035 59112 289201 172964 66254 268043 134617 91030 100941 232879 209994 106537 2...

output:

TAK
2 3

result:

ok good solution

Test #90:

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

input:

300000 3
209366418 213326493 376709342 648804320 71344863 427276868 867495989 24949724 149545542 673481656 906785908 683687717 942523790 818196501 134677697 178303018 142859063 243676184 751085809 841494153 944419502 565966482 33260966 824871558 737875390 327290020 879039280 663068278 216163461 2289...

output:

TAK
4 5

result:

ok good solution

Test #91:

score: 0
Accepted
time: 15ms
memory: 6400kb

input:

300000 123
1000011 1000019 1000030 1000040 1000050 1000060 1000067 1000082 1000087 1000100 1000110 1000123 1000129 1000144 1000147 1000158 1000169 1000183 1000193 1000202 1000214 1000216 1000229 1000244 1000250 1000257 1000274 1000278 1000290 1000301 1000309 1000316 1000331 1000340 1000350 1000357 1...

output:

TAK
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok good solution

Subtask #9:

score: 1
Accepted

Test #92:

score: 1
Accepted
time: 14ms
memory: 8860kb

input:

262146 3
5 19 27 40 44 52 70 75 85 99 108 112 129 140 148 156 166 172 188 196 204 214 227 235 249 257 267 272 288 294 305 312 326 339 344 359 370 374 390 397 405 415 426 436 450 456 466 479 483 498 509 515 524 535 546 555 568 574 582 596 610 620 623 636 645 653 664 673 683 694 702 712 727 738 743 76...

output:

TAK
38377 38378

result:

ok good solution

Test #93:

score: 0
Accepted
time: 21ms
memory: 9148kb

input:

400000 3
6 13 24 38 49 58 62 78 88 96 102 117 130 139 147 152 169 179 184 199 206 217 222 237 245 260 264 279 286 296 303 312 330 336 345 357 362 379 390 399 405 415 425 432 450 453 467 480 488 497 505 520 523 535 548 559 565 576 585 600 608 617 630 636 648 652 662 677 684 700 706 715 726 738 747 75...

output:

TAK
314714 314715

result:

ok good solution

Test #94:

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

input:

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

output:

TAK
1 2

result:

ok good solution

Test #95:

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

input:

400000 4
999999994 999999992 999999997 999999993 999999998 999999994 999999996 999999995 999999995 999999996 999999994 999999990 999999993 999999990 999999990 999999992 999999996 999999996 999999995 999999994 1000000000 999999991 1000000000 999999995 999999992 999999995 999999996 999999995 999999997...

output:

TAK
1 2 3 

result:

ok good solution

Test #96:

score: 0
Accepted
time: 43ms
memory: 8848kb

input:

400000 400000
290738 96547 201652 502285 73023 351491 38277 770308 348219 754288 676356 386303 63805 230986 289865 278297 613756 252911 717416 181021 213635 649612 112172 407869 178896 481911 158055 445121 720253 425157 400555 620389 80727 704653 638011 245844 122103 758269 149686 115024 657592 7720...

output:

TAK
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok good solution

Test #97:

score: 0
Accepted
time: 23ms
memory: 5948kb

input:

400000 4
500000001 500000013 500000026 500000034 500000048 500000054 500000062 500000072 500000082 500000094 500000103 500000115 500000121 500000139 500000143 500000152 500000162 500000175 500000182 500000191 500000201 500000214 500000223 500000232 500000248 500000251 500000261 500000279 500000284 5...

output:

NIE

result:

ok no solution

Test #98:

score: 0
Accepted
time: 21ms
memory: 6708kb

input:

400000 4
100008 100017 100028 100035 100044 100054 100066 100079 100083 100094 100108 100116 100122 100134 100144 100159 100161 100177 100182 100191 100202 100212 100226 100234 100246 100251 100261 100277 100287 100296 100304 100313 100321 100339 100341 100357 100367 100376 100386 100399 100405 1004...

output:

TAK
200000 200001 200002 

result:

ok good solution

Test #99:

score: 0
Accepted
time: 15ms
memory: 9092kb

input:

400000 3
1 8 64 74 81 31 88 98 88 94 9 7 94 56 62 63 48 65 82 35 9 15 70 53 29 33 62 45 27 7 22 57 43 41 34 73 29 36 84 20 22 28 34 82 34 57 27 23 54 69 87 52 14 77 7 4 35 89 95 67 61 67 70 5 6 71 33 95 66 11 10 22 56 38 31 69 62 7 89 84 60 97 25 93 96 76 60 12 78 68 98 81 91 54 50 7 29 3 20 75 42 6...

output:

NIE

result:

ok no solution

Test #100:

score: 0
Accepted
time: 15ms
memory: 9148kb

input:

400000 2
234 322 373 344 341 395 246 270 263 328 254 262 249 327 369 374 298 294 328 265 246 356 243 247 265 279 281 323 324 288 361 361 246 287 307 299 312 310 350 349 335 331 269 317 279 281 384 380 349 306 379 288 315 325 381 255 308 372 282 256 368 347 371 285 280 302 239 316 296 285 275 365 309...

output:

TAK
267824

result:

ok good solution

Test #101:

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

input:

400000 3
335175 258749 285137 313757 90170 391033 350596 140792 32100 194671 74917 330507 167914 5595 208898 13432 397151 270005 399691 69815 310090 98337 52839 178197 277692 389106 321601 327527 235622 386760 373068 377071 178689 173037 189235 153482 155520 23255 216514 147068 370608 339065 35503 5...

output:

TAK
1 2

result:

ok good solution

Test #102:

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

input:

400000 3
311427714 240609174 274818825 980477273 846473180 310664764 354785252 454056347 207972953 173121872 135937981 976551784 975871007 554907383 942258228 484466913 770396807 476158403 248766418 29372145 314589624 498148860 725005785 303326559 753478433 362192276 441255275 566991422 938736716 76...

output:

TAK
1 2

result:

ok good solution

Test #103:

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

input:

400000 3
4000097 118 126 132 144 153 166 177 182 192 208 211 224 232 241 259 265 273 285 298 301 314 329 336 342 353 366 379 388 394 402 417 422 439 449 457 468 478 487 492 509 519 527 532 542 557 567 574 583 599 601 613 623 638 645 658 661 678 686 695 709 718 721 736 741 751 765 779 788 797 806 816...

output:

TAK
1 2

result:

ok good solution

Test #104:

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

input:

400000 5
103 117 128 133 144 156 163 171 188 191 205 215 222 233 242 254 263 272 288 295 308 319 323 333 342 359 366 378 388 393 404 417 422 433 441 455 461 479 487 499 509 516 529 536 541 551 568 574 582 596 603 611 624 633 643 657 666 673 681 693 705 712 723 735 747 752 764 775 787 793 809 813 825...

output:

TAK
1 225663 225664 225665 

result:

ok good solution

Test #105:

score: 0
Accepted
time: 15ms
memory: 9272kb

input:

400000 3
10000011 10000023 10000030 10000039 10000051 10000062 10000069 10000078 10000091 10000097 10000111 10000123 10000127 10000140 10000149 10000162 10000170 10000181 10000190 10000202 10000206 10000220 10000233 10000237 10000254 10000262 10000266 10000278 10000287 10000299 10000311 10000317 100...

output:

TAK
399998 399999

result:

ok good solution

Subtask #10:

score: 1
Accepted

Test #106:

score: 1
Accepted
time: 27ms
memory: 9896kb

input:

499999 3
6 13 24 38 49 58 62 78 88 96 102 117 130 139 147 152 169 179 184 199 206 217 222 237 245 260 264 279 286 296 303 312 330 336 345 357 362 379 390 399 405 415 425 432 450 453 467 480 488 497 505 520 523 535 548 559 565 576 585 600 608 617 630 636 648 652 662 677 684 700 706 715 726 738 747 75...

output:

TAK
341906 341907

result:

ok good solution

Test #107:

score: 0
Accepted
time: 30ms
memory: 9508kb

input:

500000 3
413423474 972924559 25444661 17117394 179085016 194118196 842074515 178130266 708851309 377794792 217671941 269350315 861734575 291683801 44740519 938114455 250385366 561222511 893930676 659766616 684694210 430331238 859267083 76748856 769147012 544643715 150954917 323496453 808859154 97589...

output:

TAK
2 3

result:

ok good solution

Test #108:

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

input:

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

output:

TAK
1 2

result:

ok good solution

Test #109:

score: 0
Accepted
time: 26ms
memory: 7188kb

input:

500000 4
999999995 999999992 999999995 999999999 999999992 999999995 999999996 999999997 999999990 999999993 999999990 999999994 999999996 999999997 999999997 999999991 999999993 999999993 999999994 999999990 999999993 999999992 999999990 999999999 999999997 999999998 1000000000 999999998 999999996 ...

output:

TAK
1 2 3 

result:

ok good solution

Test #110:

score: 0
Accepted
time: 53ms
memory: 9180kb

input:

500000 499980
235683 811932 511135 575238 768508 339387 527540 76931 742926 194504 828429 617666 294669 109164 204860 809488 285964 917019 81674 608196 983757 231990 140638 928406 247475 616999 141346 233801 409859 101045 127606 239900 824381 653042 956156 126362 778665 713481 966047 772822 943610 1...

output:

TAK
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...

result:

ok good solution

Test #111:

score: 0
Accepted
time: 25ms
memory: 7844kb

input:

500000 4
500000005 500000016 500000022 500000038 500000041 500000058 500000065 500000078 500000087 500000091 500000104 500000113 500000124 500000135 500000143 500000156 500000163 500000171 500000188 500000191 500000206 500000212 500000226 500000232 500000249 500000252 500000269 500000272 500000283 5...

output:

NIE

result:

ok no solution

Test #112:

score: 0
Accepted
time: 10ms
memory: 7468kb

input:

500000 4
100016 100008 100025 100035 100048 100058 100066 100074 100088 100091 100109 100114 100124 100139 100148 100153 100169 100174 100187 100191 100204 100217 100225 100239 100241 100254 100267 100274 100285 100293 100306 100316 100327 100338 100343 100357 100369 100373 100385 100395 100404 1004...

output:

TAK
1 2 3 

result:

ok good solution

Test #113:

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

input:

500000 3
1 7 44 32 60 46 56 48 79 39 53 52 43 29 70 56 14 3 63 54 72 29 7 5 64 23 46 89 91 81 72 56 97 22 5 49 73 49 86 3 35 35 64 35 70 94 94 30 83 78 9 7 53 7 62 12 97 23 20 74 63 58 16 12 66 93 36 23 81 39 75 52 94 74 9 22 98 3 63 54 59 6 87 91 40 9 44 74 75 97 35 79 79 8 12 66 5 67 87 13 72 63 6...

output:

NIE

result:

ok no solution

Test #114:

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

input:

500000 2
330 364 390 370 377 378 387 368 381 397 387 370 363 344 398 393 349 396 335 338 398 394 344 373 334 352 363 367 367 347 340 330 400 358 336 337 378 379 396 391 366 399 334 336 385 366 330 354 357 356 397 369 373 395 351 332 340 361 370 351 355 336 358 348 375 351 391 340 340 339 392 345 376...

output:

TAK
401125

result:

ok good solution

Test #115:

score: 0
Accepted
time: 25ms
memory: 9704kb

input:

500000 3
147288 74134 94620 19414 485655 11761 423506 347415 26807 467591 43341 94574 498778 482013 91189 377327 434895 168577 413132 496990 480212 380715 464954 16847 80735 24194 21243 250671 492524 62648 398359 412935 122343 3313 123733 301168 395729 462114 249226 488513 405811 228770 261012 42782...

output:

TAK
1 2

result:

ok good solution

Test #116:

score: 0
Accepted
time: 25ms
memory: 9560kb

input:

500000 3
5000093 118 126 132 144 153 166 177 182 192 208 211 224 232 241 259 265 273 285 298 301 314 329 336 342 353 366 379 388 394 402 417 422 439 449 457 468 478 487 492 509 519 527 532 542 557 567 574 583 599 601 613 623 638 645 658 661 678 686 695 709 718 721 736 741 751 765 779 788 797 806 816...

output:

TAK
1 2

result:

ok good solution

Test #117:

score: 0
Accepted
time: 25ms
memory: 7260kb

input:

500000 5
103 117 128 133 144 156 163 171 188 191 205 215 222 233 242 254 263 272 288 295 308 319 323 333 342 359 366 378 388 393 404 417 422 433 441 455 461 479 487 499 509 516 529 536 541 551 568 574 582 596 603 611 624 633 643 657 666 673 681 693 705 712 723 735 747 752 764 775 787 793 809 813 825...

output:

TAK
1 323332 323333 323334 

result:

ok good solution

Test #118:

score: 0
Accepted
time: 25ms
memory: 9892kb

input:

500000 3
5000089 107 117 128 136 142 151 167 171 189 192 207 211 223 235 241 251 267 272 287 294 302 314 321 331 349 359 367 373 384 394 401 413 426 434 447 459 463 474 485 494 508 511 522 533 543 559 564 576 585 593 609 613 629 639 641 651 666 673 681 693 704 719 723 734 744 758 768 771 785 796 803...

output:

TAK
1 2

result:

ok good solution

Extra Test:

score: 0
Extra Test Passed