QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#73181#1858. SumlarryzhongAC ✓233ms14920kbC++173.9kb2023-01-22 18:21:042023-01-22 18:21:06

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2ms
memory: 3428kb

input:

1 1 1 97
0

output:

No solution!

result:

ok You are right!

Test #2:

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

input:

3 3 1 97
1 2 3
2 4 6
3 6 9

output:

1 2 3 1 2 3 

result:

ok You are right!

Test #3:

score: 0
Accepted
time: 233ms
memory: 4156kb

input:

301 332 258 1000000007
18894535 383622714 716263210 987288497 290535375 800334670 784889172 408567153 465001559 215171296 869906323 22372790 600116865 422468075 863857835 873395360 659982322 959645087 569266813 646421315 380550504 590982323 724500866 358946392 969376763 475742086 542352358 663357730...

output:

18894535 497342965 107919094 390112079 877621152 766166650 593790136 804269523 80719073 887957077 956103549 155193938 619953665 90527913 690081153 701609051 704327471 248038769 20041087 244987848 738704974 439854615 115347801 446207123 931106616 748638597 695516364 778693628 350568351 91100403 77473...

result:

ok You are right!

Test #4:

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

input:

1 1 20477 1000000007
844625586

output:

844625586 2 
844625586 1 
844625586 1 
844625586 1 
844625586 1 
844625586 1 
844625586 1 
844625586 1 
844625586 1 
844625586 1 
844625586 1 
844625586 1 
844625586 1 
844625586 1 
844625586 1 
844625586 1 
844625586 1 
844625586 1 
844625586 1 
844625586 1 
844625586 1 
844625586 1 
844625586 1 
8...

result:

ok You are right!

Test #5:

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

input:

47529 2 1 2
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
...

output:

No solution!

result:

ok You are right!

Test #6:

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

input:

90156 1 1 1000000007
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0...

output:

No solution!

result:

ok You are right!

Test #7:

score: 0
Accepted
time: 50ms
memory: 4048kb

input:

550 181 40 1000000007
642370688 869675473 553431272 664327799 32082231 714218670 877725594 494118328 248370718 851042363 578169641 83739220 557925334 285469293 504618640 872843005 313362693 658086101 977676376 523526497 290308958 13976769 345452564 78007734 435198953 916127933 208065079 31796600 910...

output:

1 235722667 773173355 678495705 658164454 870021898 3107842 525230601 662284056 441138631 502965948 594619223 110650827 890015495 978341599 728280326 285256067 730471272 130522272 64877468 780823709 22451087 319934979 758577978 1167890 380153320 951122640 734727540 728192837 804775443 245300676 3648...

result:

ok You are right!

Test #8:

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

input:

29860 3 1 2
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
...

output:

No solution!

result:

ok You are right!

Test #9:

score: 0
Accepted
time: 42ms
memory: 4288kb

input:

858 116 73 1000000007
406861903 20589420 885586225 458353470 295316310 975824837 76893827 251976194 923858020 513272453 849239266 669955210 790097808 804184359 544008879 620375843 116085571 966642409 998630849 681654433 306362294 556223577 542684858 348074936 715444116 302344248 150536209 840843473 ...

output:

1 227580205 461871693 129556104 22228869 169811240 60371025 342420629 962817899 686555209 858666273 644354430 413484802 774325410 265676187 176745085 440688713 558419786 928901739 825520562 752214116 150168774 984351333 636880213 547765771 515639780 568312477 410702045 751516649 135496322 576424947 ...

result:

ok You are right!

Test #10:

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

input:

822 121 106 2
1 1 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 1 0 0 1 1 0 1 1 0 0 1 1 0 0 1 0 1 1 1 1 0 1 0 1 0 0 1 0 0 0 1 0 0 1 1 0 1 0 0 1 1 1 0 1 1 1 1 0 0 0 1 0 0 0 1 1 1 1 0 1 1 0 0 1 1 0 0 0 1 1 0 0 1 1 0 1 0 0 0 1 0 0 0 1 1 0 1 0 1 1 0 0 0 1 1 1 0 0 0 1 0 0
0 0 1 0 1 1 0 0 1 1 1 1 0 0 1 0 0 0 0 0 1 0 ...

output:

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

result:

ok You are right!

Test #11:

score: 0
Accepted
time: 104ms
memory: 4244kb

input:

346 289 251 2
1 0 0 0 1 0 0 1 1 1 1 0 1 1 1 1 0 0 0 0 0 1 1 1 0 0 1 0 1 0 1 1 0 1 0 1 0 1 1 0 1 0 0 0 1 1 1 0 0 1 1 1 1 0 0 0 0 0 1 1 1 0 1 0 1 0 0 1 1 0 0 1 0 1 0 1 0 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 0 1 0 0 1 1 0 1 1 1 1 1 1 1 0 0 0 1 1 1 0 1 1 0 1 0 1 0 0 1 1 1 1 0 1 1 0 0 0 1 0 0 1 1 0 1 1 1 0 ...

output:

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

result:

ok You are right!

Test #12:

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

input:

35081 2 1 1000000007
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0...

output:

No solution!

result:

ok You are right!

Test #13:

score: 0
Accepted
time: 77ms
memory: 4316kb

input:

774 129 129 1000000007
946235372 385981952 130067865 726244125 158539165 210106783 350596868 804480046 101400814 833650975 212428406 67021285 43894403 179692251 950025502 970422970 174595960 368312011 48852962 525897796 879136304 61485759 827012283 113203513 910323139 966079374 574200932 121675217 8...

output:

1 560082863 826096312 164752336 643317027 639150508 412044838 267080168 156509266 234052975 441282260 257593859 948739542 725990392 698367130 902711080 377360737 83848161 256035823 750110712 639131725 575085743 378871689 482566322 403858694 612335107 771718727 227493438 857632060 61902566 127762770 ...

result:

ok You are right!

Test #14:

score: 0
Accepted
time: 31ms
memory: 4040kb

input:

117 854 63 2
0 1 1 0 0 1 1 0 1 0 1 1 0 1 1 0 0 1 1 1 1 1 0 0 1 1 1 0 1 0 0 0 0 1 1 0 1 1 0 1 0 1 1 1 0 1 0 0 1 1 1 0 0 1 0 0 1 1 1 1 1 0 1 0 1 0 0 1 1 1 0 1 1 1 0 1 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 1 0 1 1 1 1 0 0 1 1 0 0 0 1 0 0 1 1 0 0 0 1 0 1 0 0 0 1 1 0 1 0 0 0 1 0 0...

output:

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

result:

ok You are right!

Test #15:

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

input:

18915 5 1 1000000007
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0...

output:

No solution!

result:

ok You are right!

Test #16:

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

input:

20919 4 4 1000000007
326249534 849951427 687543290 716346967
729119960 815645057 665549733 55054651
159299681 15056429 29690021 194568946
599659368 443940977 933421469 778366831
838878721 121273656 621699687 107354942
533536262 54545619 589183192 851753273
826509772 598840225 803698864 869088764
751...

output:

1 960055486 395346735 246421836 460361635 390020399 650083400 699028316 540921235 801044825 762552136 662886499 115565579 247039432 804883186 121918369 428906251 122139755 293038512 445912850 42010955 400064145 168576000 727409873 551160443 957259198 841377094 552330203 368663190 722811496 173608668...

result:

ok You are right!

Test #17:

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

input:

48946 2 2 2
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
...

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok You are right!

Test #18:

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

input:

67661 1 1 1000000007
184899031
877109097
78252988
49498056
434672455
431998408
892859600
865741312
110995390
405202647
921959228
723269123
362011150
822353573
442081657
941212375
102809010
679708654
925917629
185789476
586389858
98859335
746234404
44985564
980942186
271725737
233346501
790335526
563...

output:

1 783158982 899494672 578645887 438609946 438773684 512706757 664121559 254854848 142080499 680842653 131804476 694275019 730957042 331655891 884875541 350596405 264425745 354677426 374581004 41605738 732362589 301022038 322071063 51790223 74480057 457217214 235307026 96881128 580202284 974219717 13...

result:

ok You are right!

Test #19:

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

input:

919 108 4 1000000007
474518067 417426307 980424431 383759542 25082944 435191335 916925509 657483070 4050187 191567666 899420441 635082973 490464302 353915823 685019869 66243540 911639592 262003249 421399941 109047757 64944163 587580756 599623491 307008074 596328480 878622736 872387834 635355539 9815...

output:

1 494075335 464791309 140786264 31108698 530619806 635631025 317565835 952346885 338203312 584183845 56701561 794729382 747440445 176057290 14381675 392365416 309567392 179898959 127597613 654043132 321006895 45073760 451290315 906666730 251453911 449869439 875940907 226066677 736001589 742340757 99...

result:

ok You are right!

Test #20:

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

input:

23504 4 3 1000000007
901006047 41092093 945253190 362091035
227872646 454288038 97313688 384255295
695805700 691836982 610077607 715586672
309968042 621607392 936438035 39454064
390080616 738727685 584188553 18088297
322954635 533419405 432137310 863479863
855605624 36092916 866439565 761111555
7560...

output:

1 268680412 273608809 656560927 86976293 882174279 248712460 196175023 512489316 542236328 842775960 484939757 30498460 995627017 228586533 122503060 448629509 805186059 376707209 93979633 392021973 753794480 409240662 619783403 898413807 771973746 794041599 15396343 224965835 310738854 529989177 37...

result:

ok You are right!

Test #21:

score: 0
Accepted
time: 82ms
memory: 4000kb

input:

560 178 156 1000000007
77439083 526341954 546074829 18155349 199676170 671873166 211001098 975008548 572330163 44871582 363264354 917712483 183365049 843007094 386933761 227295312 735193409 106967056 351445397 96242790 862230378 296130063 12697731 12624012 521303696 994252966 328793570 289267164 678...

output:

1 550977355 782893530 118218501 961530204 546393221 882026135 950803719 985956707 694568238 67722039 805346806 114719144 256260367 137345355 394103560 448299392 340880082 621811482 828177298 222349700 646241986 109542547 991609015 899046401 358915405 465970159 970184245 988909013 41674377 415152170 ...

result:

ok You are right!

Test #22:

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

input:

31381 3 2 1000000007
970648174 816557836 221795988
835009074 123717054 619030467
197767713 291973933 878816880
490612532 326303839 59983081
728810824 888147436 260539418
139398710 244446645 732743327
270640782 598608664 38485065
968264943 275179014 643153868
14205681 388765005 104514507
88061669 585...

output:

1 965159190 146948977 200120570 416473491 541347042 930943799 29051066 416275572 82451407 167783636 659202445 816113388 667839674 960122473 162271252 380758855 729063995 500982330 681949269 511993599 800057024 27898934 858839240 298998579 239321707 420880012 413405749 122014536 316782097 990304933 6...

result:

ok You are right!

Test #23:

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

input:

3703 27 27 2
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0...

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok You are right!

Test #24:

score: 0
Accepted
time: 135ms
memory: 4036kb

input:

491 203 185 1000000007
656699684 692957010 50943985 1909454 299456032 682207888 242759099 419002483 4529808 571838879 872522437 309463803 431167248 968396209 310231488 988603756 396244975 645306119 213189717 27469283 720848545 113169320 909035829 807659525 708760301 633853766 45454550 186121592 9610...

output:

1 497219809 514045062 547593559 175225298 711962761 96611702 177905204 139949136 230220561 224846776 458310253 922719825 616456950 424053640 979181212 627020427 362126882 657735887 744311588 91944905 531319384 619800594 683445543 245511308 893539194 95038301 732454196 968145679 898275513 904829100 5...

result:

ok You are right!

Test #25:

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

input:

194 515 189 1000000007
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok You are right!

Test #26:

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

input:

1 1 20648 1000000007
948738783

output:

948738783 2 
948738783 1 
948738783 1 
948738783 1 
948738783 1 
948738783 1 
948738783 1 
948738783 1 
948738783 1 
948738783 1 
948738783 1 
948738783 1 
948738783 1 
948738783 1 
948738783 1 
948738783 1 
948738783 1 
948738783 1 
948738783 1 
948738783 1 
948738783 1 
948738783 1 
948738783 1 
9...

result:

ok You are right!

Test #27:

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

input:

96748 1 1 2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

No solution!

result:

ok You are right!

Test #28:

score: 0
Accepted
time: 24ms
memory: 3992kb

input:

109 917 37 2
0 1 0 0 1 1 0 0 0 1 0 1 0 0 1 1 1 1 0 0 0 1 1 0 0 0 0 1 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 0 1 1 0 1 0 1 1 1 0 0 0 0 1 1 0 1 0 1 0 1 1 1 1 1 0 0 0 0 1 0 0 0 1 0 0 1 0 0 1 1 0 1 1 0 1 1 0 1 0 1 1 1 0 1 0 1 0 0 0 1 1 0 0 0 0 1 1 1 0 1 1 1 1 1 1 0 1...

output:

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

result:

ok You are right!

Test #29:

score: 0
Accepted
time: 24ms
memory: 4864kb

input:

8394 11 9 1000000007
552190293 408298859 377673219 529857763 846334409 82884509 293001030 629755661 516567106 921240728 883223157
898740083 360254547 942346369 41079921 834059646 325723333 102874878 175696388 17472865 776873718 714001370
250597469 942756515 542227204 64195229 951491365 499184617 507...

output:

1 298920329 862151015 407902766 610749078 801556539 339248924 104146416 470208918 315088219 851070536 179163309 620771337 39400507 144941723 567028053 804254251 502876376 995110446 584436275 879995330 697464112 864154499 311683828 85660080 462891747 737950070 992502383 339235038 684531930 94289134 3...

result:

ok You are right!

Test #30:

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

input:

40936 2 2 2
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
...

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok You are right!

Test #31:

score: 0
Accepted
time: 4ms
memory: 3500kb

input:

1 1 67362 2
0

output:

1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
1 1
...

result:

ok You are right!

Test #32:

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

input:

348 287 1 2
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

No solution!

result:

ok You are right!

Test #33:

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

input:

29462 3 2 2
0 0 0
1 0 1
0 0 0
1 0 1
0 0 1
0 0 1
1 0 0
0 0 1
1 0 1
0 0 0
1 0 1
0 0 1
1 0 0
1 0 0
1 0 0
0 0 1
0 0 0
0 0 0
0 0 0
1 0 0
1 0 1
1 0 0
1 0 1
1 0 0
0 0 1
0 0 1
0 0 1
0 0 1
1 0 0
1 0 1
0 0 1
1 0 1
0 0 0
1 0 1
1 0 0
1 0 1
1 0 0
0 0 0
1 0 1
0 0 1
1 0 0
1 0 1
0 0 1
0 0 1
0 0 0
0 0 1
1 0 0
0 0 0
...

output:

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

result:

ok You are right!

Test #34:

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

input:

71023 1 1 1000000007
730198460
530228070
270834736
376681002
29173916
120511635
849321099
998248099
624824133
67706824
65150433
931786533
954477564
222457060
325851365
937845000
131860842
136059335
953771708
122913348
149125221
179586731
266241717
235129973
220297721
932484344
95739738
229628707
437...

output:

1 829038334 314705832 832645030 744757714 444196770 901807008 789078613 745990214 662775448 972125285 398381125 743436836 600454407 375347145 831482807 223605587 381936956 361594790 52730235 451419412 108892352 254351085 866243741 115357704 236715824 815119783 266185580 486028275 477348322 976143335...

result:

ok You are right!

Test #35:

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

input:

562 177 35 1000000007
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok You are right!

Test #36:

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

input:

408 245 1 1000000007
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

No solution!

result:

ok You are right!

Test #37:

score: 0
Accepted
time: 75ms
memory: 4064kb

input:

452 221 193 2
1 1 0 0 1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 1 0 0 0 0 1 1 0 0 1 1 1 1 1 0 0 1 0 1 0 1 1 1 0 0 0 1 1 1 1 0 1 1 1 0 1 0 0 0 0 1 0 1 0 1 0 0 1 0 1 1 1 0 0 0 0 1 0 0 1 1 1 1 0 0 1 1 1 0 1 0 0 0 1 0 1 0 0 1 0 0 1 1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1 1 1 1 1 0 1 1 0 0 1 1 0 1 0 1 1 ...

output:

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

result:

ok You are right!

Test #38:

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

input:

60329 1 1 1000000007
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0...

output:

No solution!

result:

ok You are right!

Test #39:

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

input:

816 122 90 2
1 1 1 0 0 1 0 0 0 0 1 0 0 1 1 0 1 0 1 1 0 1 1 1 1 1 0 1 0 1 1 0 1 1 0 0 0 0 1 0 1 1 0 1 0 1 1 0 1 0 0 0 1 0 0 1 1 1 1 0 0 1 0 1 1 1 0 1 0 1 0 0 1 0 1 0 0 0 1 0 1 0 1 0 1 0 0 0 1 0 1 1 0 1 0 0 1 0 1 0 1 1 1 1 1 1 0 0 0 0 0 1 1 0 0 0 1 0 0 1 1 0
0 0 0 0 0 0 0 1 0 1 1 1 0 0 1 1 1 1 0 1 0 1...

output:

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

result:

ok You are right!

Test #40:

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

input:

41051 2 1 2
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
0 0
...

output:

No solution!

result:

ok You are right!

Test #41:

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

input:

84025 1 1 2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

No solution!

result:

ok You are right!

Test #42:

score: 0
Accepted
time: 31ms
memory: 4008kb

input:

95 1052 94 2
1 0 0 0 1 1 0 1 0 0 0 1 1 0 0 0 0 1 1 0 1 0 0 0 0 1 1 1 0 1 1 1 1 0 1 1 1 0 1 0 0 1 1 0 1 1 1 0 1 0 0 0 0 1 0 1 0 0 0 0 1 0 1 1 0 0 1 1 1 0 0 0 0 0 0 1 1 1 1 0 0 1 0 0 0 1 1 0 0 1 0 0 0 1 1 1 1 0 0 1 1 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 0 1 1 1 0 0 1 1 0 0 1 0 1 1 1 0 0 0 0 0 1 1 1 1 1 1 0 0...

output:

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

result:

ok You are right!

Test #43:

score: 0
Accepted
time: 167ms
memory: 4100kb

input:

375 266 160 1000000007
665229625 311086081 632197771 499612917 883095465 786347251 881814341 692401999 719669461 320851359 308552168 339968038 29165950 828866603 540044345 984601821 199416271 38167001 254625273 455045630 462241457 877152212 674262759 224803008 864176770 585465873 135730725 837716892...

output:

1 49356341 430279481 782631014 555144856 422050309 774781015 502129631 427751035 98940122 912779762 210559804 503976427 890178202 235491986 792114371 159502850 784863052 656892099 87499114 411193088 117882069 514665624 778984412 526892954 796326140 328118680 71385063 492066548 104108196 297609879 98...

result:

ok You are right!

Test #44:

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

input:

81608 1 1 2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

No solution!

result:

ok You are right!

Test #45:

score: 0
Accepted
time: 55ms
memory: 4288kb

input:

806 124 51 1000000007
789443102 270242310 189650527 559275913 640408242 78622510 322504808 563281153 267640213 492363381 791240399 20912152 385906729 394412203 225388825 890031580 936412624 574161811 227200865 688781512 41779343 389077796 113367729 463981679 811880450 903694208 86753107 897437984 93...

output:

1 918287887 911322198 270113609 102779399 64887771 839517806 300673065 856999105 484352390 558431867 459261399 834845652 574998390 554126269 304368005 595665865 864802675 721153295 925523380 986322018 677326139 443565618 770234940 508257308 82888716 852522270 261016103 35788356 456958954 649817674 7...

result:

ok You are right!

Test #46:

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

input:

124 806 1 2
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

No solution!

result:

ok You are right!

Test #47:

score: 0
Accepted
time: 52ms
memory: 4000kb

input:

472 211 89 2
0 1 1 1 0 1 0 0 1 1 1 0 1 1 1 0 1 0 0 0 1 0 0 0 1 0 0 1 0 1 0 0 1 1 1 0 1 1 1 0 1 0 0 1 1 1 0 1 1 0 1 1 1 1 0 0 1 0 0 1 0 1 0 1 0 0 0 1 1 0 1 1 1 1 0 0 1 1 1 0 0 1 0 1 0 0 1 0 1 1 1 0 1 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 1 1 1 0 1 0 1 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 1 1 1 0 1 1 1 0 1 1 0...

output:

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

result:

ok You are right!

Test #48:

score: 0
Accepted
time: 37ms
memory: 4004kb

input:

135 740 70 2
0 1 0 0 0 0 0 0 1 0 1 1 1 0 1 0 0 0 1 0 1 1 0 1 1 1 1 0 0 1 1 1 1 1 1 1 0 1 0 1 1 1 0 1 0 0 0 1 1 0 1 0 1 1 1 0 0 1 1 1 1 0 0 1 1 0 0 0 1 1 0 1 0 0 1 0 1 0 1 1 0 0 1 1 1 0 0 1 0 0 1 1 0 0 1 0 0 0 1 0 1 0 1 1 0 0 0 0 1 1 1 1 1 0 1 1 0 1 0 1 1 1 1 0 1 0 0 0 1 1 0 1 0 1 1 0 1 0 0 1 0 1 0 0...

output:

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

result:

ok You are right!

Test #49:

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

input:

22911 4 2 2
0 1 0 1
1 1 0 1
1 1 0 1
1 1 0 1
0 1 0 1
0 0 0 0
0 0 0 0
1 0 0 0
0 1 0 1
1 1 0 1
1 1 0 1
1 1 0 1
0 1 0 1
0 0 0 0
0 0 0 0
0 0 0 0
0 1 0 1
1 0 0 0
0 0 0 0
0 1 0 1
0 1 0 1
1 1 0 1
0 1 0 1
0 1 0 1
0 0 0 0
1 1 0 1
1 0 0 0
0 0 0 0
1 0 0 0
1 1 0 1
1 0 0 0
0 1 0 1
0 1 0 1
0 0 0 0
0 0 0 0
1 1 0 1
...

output:

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

result:

ok You are right!

Test #50:

score: 0
Accepted
time: 108ms
memory: 4068kb

input:

286 349 209 2
0 0 0 1 1 1 1 1 1 0 0 1 1 1 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 0 0 1 0 1 1 1 1 0 1 0 0 1 0 0 0 0 0 0 1 0 0 1 0 1 1 1 1 1 1 1 1 1 0 1 1 0 1 1 1 0 1 1 0 0 1 0 1 0 0 0 0 0 1 0 0 0 1 1 1 0 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 1 0 0 1 0 1 0 1 1 1 1 0 1 1 1 1 0 0 1 0 0 0 1 0 0 1 1 ...

output:

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

result:

ok You are right!

Test #51:

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

input:

1 1 99999 2
0

output:

No solution!

result:

ok You are right!

Test #52:

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

input:

1 1 100000 2
1

output:

No solution!

result:

ok You are right!

Test #53:

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

input:

1 1 1 2
0

output:

No solution!

result:

ok You are right!

Test #54:

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

input:

1 1 1 2
1

output:

1 1

result:

ok You are right!

Test #55:

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

input:

1 1 2 2
1

output:

No solution!

result:

ok You are right!

Test #56:

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

input:

1 1 2 2
0

output:

1 1
1 1

result:

ok You are right!

Test #57:

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

input:

5 5 1 2
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0

output:

No solution!

result:

ok You are right!

Test #58:

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

input:

1 3 3 2
0 0 0

output:

1 1 1 1 
1 0 1 1 
1 1 0 0 

result:

ok You are right!

Test #59:

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

input:

3 1 3 2
0
0
0

output:

1 1 1 1 
0 1 1 1 
1 0 0 1 

result:

ok You are right!

Test #60:

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

input:

2 1 2 2
1
0

output:

1 1 1 
0 1 1 

result:

ok You are right!

Test #61:

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

input:

5 5 1 998244353
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0

output:

No solution!

result:

ok You are right!

Test #62:

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

input:

2 2 1 998244353
1 2
499122177 1

output:

1 499122177 1 2 

result:

ok You are right!

Test #63:

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

input:

1 1 14 13
0

output:

1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 1 
1 2 
1 12 

result:

ok You are right!

Test #64:

score: 0
Accepted
time: 24ms
memory: 14848kb

input:

100000 1 1 1000000007
655148169
80378305
493071225
324727373
687487969
837135466
918953522
914955003
286477319
117684458
792214578
668298853
775774673
837339772
560211451
867899627
123600549
209449141
632586082
676423190
988270752
364627712
982686597
934719890
592096271
54847098
403666204
650868062
...

output:

1 446658672 70014876 468951335 787869532 326295909 875653205 397249369 906836857 274450805 217485875 385402856 798536623 429007382 395807864 908468095 384606243 858460551 610671383 494355186 847747748 138317691 944681850 190587024 512519100 678962864 612816676 822202529 823106613 720333387 741174637...

result:

ok You are right!

Test #65:

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

input:

1 100000 1 1000000007
742216761 836378195 189843545 936704966 151715231 730747310 815263697 484119358 8903151 223302649 148975297 173957811 507591000 466555528 112481914 531314004 96457233 793922958 679157386 240820873 758087801 19289931 124917156 521602699 871068158 301396104 130936293 672015452 22...

output:

742216761 1 821904755 911355552 920802288 110065877 348013881 293996774 341001766 300416116 266546086 111664825 204397811 300460667 580168715 604857373 570462118 142602670 43006322 688302228 148683856 221899885 139616650 958593157 848278984 840823661 735353961 244197737 533328998 297049562 96486892 ...

result:

ok You are right!

Test #66:

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

input:

100000 1 1 2
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1...

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok You are right!

Test #67:

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

input:

1 100000 1 2
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok You are right!

Test #68:

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

input:

100000 1 1 1000000007
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

No solution!

result:

ok You are right!

Test #69:

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

input:

1 100000 1 1000000007
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

No solution!

result:

ok You are right!

Test #70:

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

input:

100000 1 1 2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0...

output:

No solution!

result:

ok You are right!

Test #71:

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

input:

1 100000 1 2
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

No solution!

result:

ok You are right!

Test #72:

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

input:

71394 1 1 1000000007
499327447
717648730
919250950
969040858
953182474
593218844
475171747
409983246
883303228
262946348
653440858
291308751
371055991
2195270
538606612
106893705
195792686
771051380
357151275
982227365
647421387
836802717
328326421
562343700
484367
949948067
174754541
293579212
8399...

output:

1 529839924 479000029 166602407 359743826 215902170 452279514 632562607 442773386 799160726 343157561 907083216 444977680 592707082 296678365 288700495 438722704 694224548 836648143 347939570 161026402 579286894 806332517 158354634 266557532 768042616 875827279 811437716 748389412 592623527 65147213...

result:

ok You are right!

Test #73:

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

input:

21 4761 17 1000000007
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok You are right!