QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#312090#4550. 魔法小程序ahihi1234100 ✓163ms13580kbC++142.0kb2024-01-23 12:50:432024-01-23 12:50:43

詳細信息

Test #1:

score: 2
Accepted
time: 1ms
memory: 5540kb

input:

1
1000000000
1
-936011409

output:

1
1000000000 
1
-936011409 

result:

ok 4 lines

Test #2:

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

input:

100
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1
-721990965

output:

100
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
1
-721990965 

result:

ok 4 lines

Test #3:

score: 2
Accepted
time: 1ms
memory: 5596kb

input:

1
6
23
55820894 -293906948 148612069 -584163534 -911708346 24543426 187290992 435107981 626805047 -248228938 -383874185 363187370 -353805453 375550326 647803595 -407628381 -898991039 -304856739 191645789 1124066752 680974642 -811712993 -2088860541

output:

1
6 
23
55820894 -349727842 442519017 -732775603 -327544812 936251772 131470098 597544831 -250821951 -142258382 191899565 -189190217 -541096445 481538790 80556203 -180397991 -355717411 -152927255 545451242 203065184 -715345379 -437255659 -785784890 

result:

ok 4 lines

Test #4:

score: 2
Accepted
time: 1ms
memory: 5700kb

input:

99
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
100
445810606 1031631641 702231761 1534897157 1047717922 1659464837 2312474051 1439397240 745467972...

output:

99
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
100
445810606 585821035 -329399880 832665396 -487179235 611746915 653009214 -873076811 -693929268 ...

result:

ok 4 lines

Test #5:

score: 4
Accepted
time: 1ms
memory: 5544kb

input:

2
2 3
100
-686129665 35876103 -488216812 -124054881 -1029428388 -1314932665 -1092700247 587763457 -1736527511 526245832 -2278717991 -888183008 -508509558 1485157690 -2014492982 1221276186 -3410794048 -1730304272 401100001 1420756355 -1618185352 -7934377 -3781919754 -4519428233 -306143832 825355160 -...

output:

2
2 3 
100
-686129665 722005768 197912853 -357843837 -541211576 -649666208 -406570582 958457936 -841740117 940153476 -978904 -222572152 584190689 313203544 -862156160 659792281 -854110586 -683041032 909609559 -974010894 -513301929 -651507299 -767433336 -792480062 -707243833 111842638 435179564 -3655...

result:

ok 4 lines

Test #6:

score: 4
Accepted
time: 1ms
memory: 5888kb

input:

3
96 17 5
100
744557150 312956205 -232481466 622053556 964503221 -19888238 95601348 476374815 1218083889 525923910 615110966 1285853725 557956221 417508356 877856576 591643207 1432424631 886186008 1785588008 1671778983 2045301406 1863496730 2563886140 3318560220 2554355320 2565783914 2192316381 1599...

output:

3
96 17 5 
100
744557150 -431600945 -545437671 854535022 342449665 -984391459 115489586 380773467 741709074 -692159979 89187056 670742759 -727897504 -140447865 460348220 -286213369 840781424 -546238623 899402000 -113809025 373522423 -181804676 700389410 754674080 -764204900 11428594 -373467533 -5932...

result:

ok 4 lines

Test #7:

score: 5
Accepted
time: 1ms
memory: 5672kb

input:

100
3 1 2 2 1 2 1 1 1 2 2 2 2 3 2 3 1 3 3 3 1 1 2 1 3 3 3 3 2 2 1 2 3 1 1 2 1 1 1 2 2 3 3 2 2 3 2 3 2 1 3 2 2 3 1 3 2 1 3 1 2 1 2 3 2 1 1 3 1 1 3 2 3 3 3 1 1 1 1 2 2 1 3 3 2 1 3 2 2 3 1 2 2 1 1 3 2 1 1 2
100
31809228 -604221725 382299234 -653857460 -1624950875 -1291171930 -480603653 -1554880466 3731...

output:

100
3 1 2 2 1 2 1 1 1 2 2 2 2 3 2 3 1 3 3 3 1 1 2 1 3 3 3 3 2 2 1 2 3 1 1 2 1 1 1 2 2 3 3 2 2 3 2 3 2 1 3 2 2 3 1 3 2 1 3 1 2 1 2 3 2 1 1 3 1 1 3 2 3 3 3 1 1 1 1 2 2 1 3 3 2 1 3 2 2 3 1 2 2 1 1 3 2 1 1 2 
100
31809228 -636030953 986520959 -685666688 -335062462 -652742014 -512412881 -438245860 941491...

result:

ok 4 lines

Test #8:

score: 5
Accepted
time: 1ms
memory: 5776kb

input:

100
2 4 3 2 4 3 2 2 3 3 2 3 3 3 4 2 4 4 2 3 2 4 3 4 4 2 3 4 2 3 3 3 2 4 3 2 3 3 4 2 2 4 2 4 3 3 2 3 3 4 4 4 4 2 3 4 3 2 2 3 2 2 4 4 3 4 3 4 4 2 4 2 2 3 3 3 4 4 3 3 3 3 4 2 3 2 2 3 4 2 4 3 4 4 2 3 3 2 2 3
100
-875645333 -1311177210 -1317960106 -2118530243 -2205946577 -2272768465 -1982014317 -16280738...

output:

100
2 4 3 2 4 3 2 2 3 3 2 3 3 3 4 2 4 4 2 3 2 4 3 4 4 2 3 4 2 3 3 3 2 4 3 2 3 3 4 2 2 4 2 4 3 3 2 3 3 4 4 4 4 2 3 4 3 2 2 3 2 2 4 4 3 4 3 4 4 2 4 2 2 3 3 3 4 4 3 3 3 3 4 2 3 2 2 3 4 2 4 3 4 4 2 3 3 2 2 3 
100
-875645333 -435531877 -442314773 -365038260 -887986471 733748249 223932260 420762338 -95772...

result:

ok 4 lines

Test #9:

score: 3
Accepted
time: 1ms
memory: 5892kb

input:

1000
98 52 28 92 92 18 100 38 3 97 87 8 82 95 23 40 63 16 60 29 59 64 85 18 49 48 12 5 97 75 74 31 44 60 37 3 4 12 94 68 65 43 59 28 99 73 77 34 49 17 19 96 35 91 80 69 58 18 86 60 89 19 87 32 82 16 57 92 63 35 5 7 37 5 55 89 82 45 63 6 56 93 18 73 93 79 24 62 7 33 19 93 80 87 64 40 79 82 51 21 39 5...

output:

1000
98 52 28 92 92 18 100 38 3 97 87 8 82 95 23 40 63 16 60 29 59 64 85 18 49 48 12 5 97 75 74 31 44 60 37 3 4 12 94 68 65 43 59 28 99 73 77 34 49 17 19 96 35 91 80 69 58 18 86 60 89 19 87 32 82 16 57 92 63 35 5 7 37 5 55 89 82 45 63 6 56 93 18 73 93 79 24 62 7 33 19 93 80 87 64 40 79 82 51 21 39 5...

result:

ok 4 lines

Test #10:

score: 3
Accepted
time: 1ms
memory: 5604kb

input:

5
4 1 3 1 3
1000
531784716 786474104 3294886 -290673213 -136514704 30427191 -365955965 199469692 -505429005 -3884504 -746650108 -1103793657 -174829337 480327131 -340390021 332146782 -1313147940 -1574754413 -1799978323 -1053346405 -1986097362 -2723225288 -3978103117 -4256389199 -874381027 -284914709 ...

output:

5
4 1 3 1 3 
1000
531784716 254689388 -783179218 -293968099 -668299420 -87747493 386796062 859393756 -368914301 334602606 -346382448 -922569206 -706614053 400467080 -37537934 966504902 -470019183 -829015448 208697180 -785298641 -304035121 -810124059 -683271471 -102348794 -699551690 -65690150 -440254...

result:

ok 4 lines

Test #11:

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

input:

2333
2 1 2 1 2 2 1 1 1 2 2 2 1 2 1 2 1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 2 1 3 2 3 2 1 1 3 2 2 3 3 1 3 2 1 2 2 3 2 3 1 3 2 3 3 1 3 2 3 2 1 1 1 2 2 3 2 2 1 1 1 1 3 3 1 3 2 3 3 1 2 3 1 3 2 1 2 3 2 1 2 1 2 2 1 2 1 3 2 1 3 3 3 3 2 3 3 1 3 2 1 2 1 2 2 2 1 3 2 3 3 2 ...

result:

ok 4 lines

Test #13:

score: 3
Accepted
time: 2ms
memory: 5572kb

input:

2
67 66
10000
717178592 978529922 1682088483 1515309741 1804878600 1724398443 2505508150 1773771027 1415090402 1599306704 2450073043 2618175452 2711471607 2969977794 2532461679 2810749493 2527568619 2289634006 1959800539 1998501472 1272267821 1819129380 928943578 257782351 -26345422 -783818330 -8958...

output:

2
67 66 
10000
717178592 261351330 703558561 -166778742 289568859 -80480157 781109707 -731737123 -358680625 184216302 850766339 168102409 93296155 258506187 -437516115 278287814 -283180874 -237934613 -329833467 38700933 -726233651 546861559 -890185802 -671161227 -284127773 -757472908 -112056664 9718...

result:

ok 4 lines

Test #14:

score: 6
Accepted
time: 86ms
memory: 9716kb

input:

19
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
524288
552335194 1389253654 201358551 130225760 713430652 1725449296 258591030 -324013641 465939412 939246697 509972292 737422039 537492510 283219860 919125447 -508979343 1420804123 2355277437 309551846 -270575227 1319426927 2195282145 287274560 -1064019808 4...

output:

19
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 
524288
552335194 836918460 -350976643 -908051251 161095458 175100184 -103862979 -686572064 -86395782 -363611175 395009523 662193713 -89542360 -902680119 441463036 -241402538 868468929 97554854 -760275634 -606549136 -262472654 -233718280 182962889 -25977135 -...

result:

ok 4 lines

Test #15:

score: 6
Accepted
time: 39ms
memory: 7652kb

input:

18
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
262144
-515422490 -704571742 254353376 941427801 -275340791 -1145113615 79290239 -600795866 -823681972 -42732257 -848025723 1583120909 -1270935560 -510081274 -1687437181 984433466 105830154 -207210163 394695931 371431893 233145103 -865241447 -326664957 -2365929...

output:

18
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 
262144
-515422490 -189149252 769775866 876223677 240081699 -680623572 -415144836 -686536958 -308259482 970098967 -794119617 773973240 -687335287 660528143 22986966 947356402 621252644 -123891065 -480910089 -586447398 -112766750 -104722661 -433531001 -544117494...

result:

ok 4 lines

Test #16:

score: 5
Accepted
time: 21ms
memory: 7752kb

input:

17
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
131072
363420092 1160749574 -478151648 -457657331 1240884523 2485505923 1137012090 799672780 74151987 667665609 -581677072 -1265321553 1044464462 2784540910 1734361393 500378989 -234415123 -149410320 -2015901780 -3370603517 756086200 1520401049 -961165087 -234139...

output:

17
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 
131072
363420092 797329482 -841571740 -776835165 877464431 447291918 737699307 -805125545 -289268105 -203815860 185742681 -500322938 92848044 699270908 608026683 -891775204 -597835215 -712324679 -939914917 -662871375 113036892 232018128 -673463937 100291196 3257...

result:

ok 4 lines

Test #17:

score: 4
Accepted
time: 12ms
memory: 7660kb

input:

16
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
65536
294624324 810749436 -446283984 270508213 367996656 1052762871 47547701 313969143 1229987300 2328875080 292257102 936135662 1416530422 2924839563 1829321643 1575705697 -401891429 -602463356 -1137260582 -2123344198 -669743149 157187856 -1417721861 -2154935804 6...

output:

16
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 
65536
294624324 516125112 -740908308 200667085 73372332 168641103 420459353 -619011858 935362976 582762668 -196821890 -655676305 113170790 240780258 930062066 -687904009 -696515753 -716697039 5539155 -986178774 -341224052 858861829 -433068912 -159621401 72516993 2...

result:

ok 4 lines

Test #18:

score: 3
Accepted
time: 144ms
memory: 13580kb

input:

10000
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:

10000
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 ...

result:

ok 4 lines

Test #19:

score: 3
Accepted
time: 146ms
memory: 12828kb

input:

13
2 2 2 2 2 2 2 2 2 2 2 2 2
999999
-994337690 -246781496 -1052248372 -653695756 -230663576 1048869011 -774582303 954377013 -1232434202 -537366938 -1057605511 177549072 305539066 905693826 297634786 2157090219 -1700793999 -1486207583 -1226171788 -931085524 -673296709 -371515715 -1038423490 -47491810...

output:

13
2 2 2 2 2 2 2 2 2 2 2 2 2 
999999
-994337690 747556194 -57910682 -349003578 763674114 531976393 -486008045 798430307 -238096512 -52488930 232739373 889090897 774299154 -626888897 303275074 -79216953 -706456309 -532969778 532532893 429503426 263823176 -444781815 -353740947 -617205761 928532125 749...

result:

ok 4 lines

Test #20:

score: 3
Accepted
time: 115ms
memory: 13284kb

input:

1
2
999997
-667197524 -610441318 -1643674055 -1101418604 -1292420040 56083565 -1640147905 675881188 -2392433781 -614177218 -2436179308 -1606075030 -1616721577 -1140095119 -2594090316 -2086776731 -1903222418 -1032185617 -1148383334 -257779946 -1825213697 -1458500680 -1006893062 -885084029 -1856941140...

output:

1
2 
999997
-667197524 56756206 -976476531 485499245 351254015 806248154 -347727865 967525488 -752285876 -537772530 -43745527 -948152285 819457731 -353477820 -977368739 30687127 690867898 363723216 754839084 19566587 -676830363 -523890371 818320635 -244903984 -850048078 225677384 367409679 -34900102...

result:

ok 4 lines

Test #21:

score: 2
Accepted
time: 117ms
memory: 12072kb

input:

1
1
1000000
966113398 419453551 1182013173 377554376 -516341987 -1496374512 -1768958356 -1691757133 -1699977377 -1203999609 -1273224865 -1812522481 -1689589437 -2392197064 -1533436506 -830973509 -252303538 -623603037 -479358083 385681847 -346683685 -576499268 -51205549 104330966 904894107 545973494 ...

output:

1
1 
1000000
966113398 -546659847 762559622 -804458797 -893896363 -980032525 -272583844 77201223 -8220244 495977768 -69225256 -539297616 122933044 -702607627 858760558 702462997 578669971 -371299499 144244954 865039930 -732365532 -229815583 525293719 155536515 800563141 -358920613 -775162888 -789878...

result:

ok 4 lines

Test #22:

score: 3
Accepted
time: 112ms
memory: 13364kb

input:

1
233
999999
-335456592 -583302109 -639533971 -1321212978 -1068899842 -646202276 -1470862778 -1768148954 -1371463181 -841871775 85660712 837457495 1157084883 163704572 1105342728 1170386061 380300068 852553844 655279238 1465229075 836589937 1609994598 2499224517 2587483734 3494135425 3377788110 3632...

output:

1
233 
999999
-335456592 -247845517 -56231862 -681679007 252313136 422697566 -824660502 -297286176 396685773 529591406 927532487 751796783 319627388 -993380311 941638156 65043333 -790085993 472253776 -197274606 809949837 -628639138 773404661 889229919 88259217 906651691 -116347315 254835041 62325069...

result:

ok 4 lines

Test #23:

score: 2
Accepted
time: 116ms
memory: 11620kb

input:

1
10000007
999999
-347980385 -564749761 -409241339 -87031054 421398204 -130869571 -696437484 -34969775 788081716 3572127 -501255872 274416316 -407345128 -950978231 -158532372 -711084471 205041281 -140732114 -356126543 450368803 -446445212 -1355223037 -1975643625 -1098024256 -1448318343 -1011220907 -...

output:

1
10000007 
999999
-347980385 -216769376 155508422 322210285 508429258 -552267775 -565567913 661467709 823051491 -784509589 -504827999 775672188 -681761444 -543633103 792445859 -552552099 916125752 -345773395 -215394429 806495346 -896814015 -908777825 -620420588 877619369 -350294087 437097436 251689...

result:

ok 4 lines

Test #24:

score: 3
Accepted
time: 163ms
memory: 12492kb

input:

20
3 2 2 1 1 3 2 1 2 2 2 3 3 1 3 3 1 3 3 2
1000000
-138157754 -10842188 537919043 -1105591108 -896343041 22235074 562649824 900858774 1206405451 -344626469 9159331 1291440647 243657985 699699010 1059195784 -754715584 390327921 1059260074 884621277 770042960 1483470963 -14506265 706550569 2650405457 ...

output:

20
3 2 2 1 1 3 2 1 2 2 2 3 3 1 3 3 1 3 3 2 
1000000
-138157754 127315566 548761231 -967433354 81932501 369816884 700807578 210893384 -243214554 60157061 -66355651 606917755 381815739 328725459 -189264457 -30940215 607069979 -60381505 -59844286 -781512726 597145783 39088966 212988322 314073751 -21115...

result:

ok 4 lines

Test #25:

score: 3
Accepted
time: 118ms
memory: 11908kb

input:

20
59 21 99 19 58 46 40 26 95 64 85 97 31 1 45 45 35 65 7 75
999999
67848731 92645766 -566632702 -1548337206 -2176199998 -2959899083 -2491791800 -2735774158 -3503331522 -2697411094 -3235916293 -3782525296 -4763315058 -4030859871 -4254362229 -3413307235 -3590899706 -3326494185 -3232314532 -3947453001...

output:

20
59 21 99 19 58 46 40 26 95 64 85 97 31 1 45 45 35 65 7 75 
999999
67848731 24797035 -659278468 -981704504 -627862792 -783699085 468107283 -243982358 -767557364 805920428 -538505199 -546609003 -980789762 732455187 -223502358 841054994 -177592471 264405521 94179653 -715138469 10274581 335785322 908...

result:

ok 4 lines

Test #26:

score: 3
Accepted
time: 127ms
memory: 12644kb

input:

20
49 30 76 14 47 62 36 69 76 32 57 27 89 86 44 21 13 38 66 24
999999
113765594 842253008 1815546881 2182267648 1397025164 448416973 280860758 220833962 -599781764 -138546581 -263542785 -882427017 73518275 27584214 -788994250 -786540591 -1674812592 -2495772936 -3233389473 -3844676672 -3881854446 -39...

output:

20
49 30 76 14 47 62 36 69 76 32 57 27 89 86 44 21 13 38 66 24 
999999
113765594 728487414 973293873 366720767 -785242484 -948608191 -167556215 -60026796 -820615726 461235183 -124996204 -618884232 955945292 -45934061 -816578464 2453659 -888272001 -820960344 -737616537 -611287199 -37177774 -95892838 ...

result:

ok 4 lines

Test #27:

score: 3
Accepted
time: 110ms
memory: 11708kb

input:

20
100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000
999996
437179795 558694858 -103917023 -383840669 381242183 -302651101 550940867 296441756 -22522569 -345945240 -383689095 141315001 1003757191 562280866 1330...

output:

20
100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 
999996
437179795 121515063 -662611881 -279923646 765082852 -683893284 853591968 -254499111 -318964325 -323422671 -37743855 525004096 862442190 -441476325 76...

result:

ok 4 lines

Test #28:

score: 4
Accepted
time: 144ms
memory: 13196kb

input:

10000
1 2 1 2 1 1 1 2 2 1 1 2 1 1 2 1 2 2 2 2 1 2 2 1 2 1 2 1 1 1 1 1 1 1 1 1 2 2 1 1 1 2 1 2 2 1 1 1 2 1 2 2 1 1 1 2 1 2 1 2 2 2 1 2 2 1 1 1 1 1 1 2 1 1 2 1 2 2 2 2 2 2 2 2 2 1 1 2 2 2 2 2 2 1 2 1 2 2 2 2 1 2 1 1 2 1 2 1 2 2 2 1 2 2 1 2 2 2 2 1 2 1 1 2 2 2 2 1 1 2 2 2 1 2 2 2 2 1 1 1 2 1 2 2 2 2 2 ...

output:

10000
1 2 1 2 1 1 1 2 2 1 1 2 1 1 2 1 2 2 2 2 1 2 2 1 2 1 2 1 1 1 1 1 1 1 1 1 2 2 1 1 1 2 1 2 2 1 1 1 2 1 2 2 1 1 1 2 1 2 1 2 2 2 1 2 2 1 1 1 1 1 1 2 1 1 2 1 2 2 2 2 2 2 2 2 2 1 1 2 2 2 2 2 2 1 2 1 2 2 2 2 1 2 1 1 2 1 2 1 2 2 2 1 2 2 1 2 2 2 2 1 2 1 1 2 2 2 2 1 1 2 2 2 1 2 2 2 2 1 1 1 2 1 2 2 2 2 2 ...

result:

ok 4 lines

Test #29:

score: 2
Accepted
time: 113ms
memory: 12428kb

input:

10000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

10000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 4 lines

Test #30:

score: 5
Accepted
time: 153ms
memory: 12424kb

input:

10000
2 2 2 2 2 3 3 3 2 3 2 3 3 2 3 3 2 3 3 2 2 2 2 3 3 3 3 2 2 3 2 3 3 3 2 3 2 3 2 3 2 2 2 2 2 3 3 3 2 3 3 2 2 2 3 3 3 2 3 3 3 2 3 3 3 2 3 2 2 2 3 2 3 3 2 2 2 3 2 3 2 2 3 3 3 3 3 3 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