QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#33368#1282. Necklacelarryzhong#AC ✓468ms20352kbC++172.1kb2022-05-31 21:46:422022-05-31 21:46:44

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 4ms
memory: 10660kb

input:

4
4
1 1 1 1
1 2 3 4
4
1 1 2 2
1 2 3 4
8
2 6 5 4 3 1 7 7
-1 4 -1 2 10 -1 3 0
6
5 5 3 3 4 6
5 8 0 -1 -2 -7

output:

-1
4
4 2 3 1 
4
7 4 2 5 
4
2 3 1 4 

result:

ok 4 cases.

Test #2:

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

input:

36398
6
4 6 4 4 5 2
7 -9 -9 4 -1 -8
2
1 1
-8 -5
2
2 1
10 7
9
5 6 5 8 2 3 3 7 8
-7 5 -5 7 8 7 -5 -5 8
2
1 2
6 -8
9
2 3 3 5 3 9 3 9 3
5 2 -2 5 -8 -5 -3 6 -2
4
4 2 4 1
-1 -1 10 -4
4
3 1 2 1
-9 -6 4 10
5
4 3 4 1 4
-8 1 6 10 -8
6
2 6 3 5 4 1
1 -7 4 0 6 -6
6
6 6 5 2 1 2
3 1 2 -8 -7 0
10
2 9 10 7 8 7 6 7 6...

output:

4
1 5 4 6 
-1
-1
5
9 6 4 5 2 
-1
4
8 2 4 1 
3
3 4 2 
3
1 4 3 
3
3 4 2 
4
4 3 5 1 
4
1 3 2 6 
5
6 9 4 10 7 
4
2 6 9 3 
6
2 6 3 7 8 4 
5
2 1 6 9 3 
-1
6
5 1 2 8 3 6 
3
1 4 3 
3
2 4 1 
-1
4
3 1 5 2 
-1
4
7 8 2 3 
7
4 7 6 5 3 1 2 
-1
5
2 4 8 7 6 
4
5 6 4 1 
-1
5
3 4 8 1 7 
4
5 2 8 6 
-1
4
3 1 2 4 
3
1 2...

result:

ok 36398 cases.

Test #3:

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

input:

36169
6
6 3 6 4 2 1
1 7 1 4 3 5
1
1
4
8
5 1 6 7 7 3 6 2
10 6 4 9 4 6 9 6
2
2 2
10 9
2
1 1
4 2
5
5 1 2 1 4
1 1 10 7 1
9
7 5 9 1 8 3 2 7 2
9 8 7 1 6 9 6 5 2
2
2 1
5 9
9
4 8 1 6 9 4 1 9 7
9 3 5 4 3 1 5 9 7
8
1 7 2 7 3 3 5 3
6 4 3 10 6 4 7 2
6
4 5 2 5 1 4
7 6 2 3 7 3
4
4 1 2 3
9 3 7 9
10
3 5 8 9 3 2 7 1...

output:

6
1 2 3 5 4 6 
-1
8
4 1 5 6 7 8 3 2 
-1
-1
5
4 5 2 3 1 
9
1 5 8 2 7 6 9 4 3 
-1
9
8 7 5 2 1 9 6 4 3 
8
5 2 6 7 8 3 4 1 
6
2 6 4 3 1 5 
4
1 3 4 2 
10
10 5 8 4 9 3 7 2 1 6 
9
9 1 7 3 6 8 5 4 2 
9
4 1 2 3 7 5 9 6 8 
-1
7
5 2 4 3 6 1 7 
4
1 2 4 3 
7
3 1 6 2 5 7 4 
-1
5
4 5 2 1 3 
8
7 8 6 2 5 3 4 1 
-1
4...

result:

ok 36169 cases.

Test #4:

score: 0
Accepted
time: 59ms
memory: 10160kb

input:

36365
8
3 5 2 3 3 5 8 4
-5 -6 -1 -9 -8 -5 -7 -8
3
1 2 2
-7 -5 -4
5
2 3 1 2 4
-6 -10 -5 -3 -10
2
2 2
-9 -8
7
7 3 3 2 6 5 6
-7 -7 -10 -7 -7 -10 -4
7
6 2 4 6 5 2 5
-9 -8 -10 -1 -6 -3 -6
8
7 4 8 4 6 7 1 6
-4 -4 -6 -4 -4 -10 -6 -2
10
3 6 1 1 4 1 2 8 6 1
-5 -9 -9 -5 -10 -1 -5 -5 -1 -4
4
2 2 3 3
-7 -4 -1 -...

output:

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

result:

ok 36365 cases.

Test #5:

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

input:

6663
19
16 11 18 18 10 17 15 8 9 14 19 2 14 18 17 19 3 17 14
10 9 5 -2 3 -7 2 6 -2 5 -4 3 -6 9 6 7 4 0 -7
41
21 18 26 20 37 38 31 37 12 8 17 2 27 4 39 26 9 32 40 12 2 35 1 31 36 28 41 9 25 1 11 21 30 37 31 36 6 4 21 34 33
-3 0 -9 4 9 5 0 -2 -10 -3 -3 8 -6 7 -7 9 0 3 -2 10 -9 1 2 3 5 -2 6 7 6 -6 -2 5...

output:

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

result:

ok 6663 cases.

Test #6:

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

input:

1343
130
55 112 18 93 56 43 35 39 76 130 10 57 65 9 9 40 19 24 73 119 68 122 74 61 125 48 69 112 79 93 33 113 50 34 58 123 15 85 58 102 130 129 69 9 10 23 103 8 50 105 105 95 47 35 31 78 130 100 34 79 114 50 109 23 49 35 28 32 107 75 45 18 10 62 110 111 56 28 48 70 91 1 50 100 53 58 70 22 7 46 95 12...

output:

60
95 61 21 98 116 76 41 103 10 51 115 40 9 117 80 91 87 81 43 109 27 29 86 70 39 23 97 123 33 12 79 85 26 90 94 16 71 31 66 68 7 55 18 78 120 64 108 100 17 92 42 11 125 15 22 48 105 118 20 104 
85
47 120 154 4 97 127 34 106 16 64 72 114 101 98 41 117 95 94 12 7 90 118 158 70 138 123 87 82 78 67 31 ...

result:

ok 1343 cases.

Test #7:

score: 0
Accepted
time: 183ms
memory: 9052kb

input:

137
1888
459 530 933 1784 1671 1327 610 1409 580 1014 1261 1770 34 1663 97 53 244 1144 298 26 706 34 1226 1667 1832 1488 247 1710 1109 267 1435 1262 1869 1872 1267 10 264 911 433 797 1841 590 250 468 1415 1573 457 1747 1343 480 1162 784 1664 1664 1888 374 453 282 1567 516 1855 1814 562 1004 785 1073...

output:

939
902 699 275 1738 179 553 494 975 448 655 1737 1345 1113 1813 578 1122 934 733 1454 1135 1607 953 1157 1214 88 236 312 1667 769 989 1652 432 375 471 643 31 1078 1683 679 1828 1348 851 1160 1315 658 175 407 792 915 401 550 382 999 855 1665 1830 1799 538 1234 317 861 825 821 194 217 107 1785 475 62...

result:

ok 137 cases.

Test #8:

score: 0
Accepted
time: 305ms
memory: 10152kb

input:

133
1989
1728 1930 1845 787 894 1256 1355 1168 1599 1057 1253 1519 1665 638 540 1269 1704 206 571 458 952 1901 1874 937 147 1016 446 1179 503 904 1800 1607 558 1430 1286 1084 735 690 1770 251 910 187 1427 833 244 280 328 1528 1194 1484 598 421 815 49 1907 1651 1821 924 809 1632 1167 1129 440 476 192...

output:

1989
40 180 307 586 476 1570 1868 1064 932 1039 1085 1887 993 1399 248 181 930 1376 601 318 1517 455 779 1125 1201 88 1475 325 1659 1701 1876 607 1324 1192 72 1398 74 1896 512 1022 1643 635 1858 471 675 165 1649 1059 1080 1134 811 1215 653 271 1898 1779 480 218 459 1230 1530 807 1723 1977 995 520 19...

result:

ok 133 cases.

Test #9:

score: 0
Accepted
time: 159ms
memory: 9564kb

input:

134
1470
823 453 281 76 908 347 944 990 913 585 648 660 991 219 646 422 846 1320 606 541 1324 1454 1152 1032 32 1364 459 879 60 652 1249 476 698 880 762 1098 1413 474 707 1200 935 594 1203 172 179 746 1224 83 259 1 337 431 505 407 1308 763 762 709 169 340 363 1075 845 890 82 322 1270 1044 781 851 90...

output:

920
1097 875 107 712 168 350 525 90 1409 806 22 626 230 802 1131 1297 507 1028 430 789 1235 1310 520 172 253 58 420 931 344 39 825 598 570 676 1233 451 370 1307 601 33 472 1257 624 504 1008 492 666 787 213 375 655 144 37 1299 776 1010 356 1141 615 135 337 1212 521 1303 675 1269 100 93 586 1040 270 3...

result:

ok 134 cases.

Test #10:

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

input:

133
1190
251 1086 819 1186 473 671 186 1112 685 40 436 817 1185 359 278 961 818 304 706 428 448 1013 82 1102 433 706 824 895 601 869 850 859 283 840 929 200 706 821 968 418 1003 902 1108 964 130 257 984 576 923 190 916 5 955 192 128 796 899 358 860 925 1143 122 873 83 824 1183 877 401 285 546 364 40...

output:

3
750 261 180 
3
790 166 962 
3
868 1583 954 
3
1313 153 134 
3
1293 743 1351 
3
209 553 236 
3
1549 1587 1224 
3
528 105 831 
3
657 256 1200 
3
1837 198 160 
3
138 553 861 
3
949 577 930 
3
722 272 915 
3
1178 368 425 
3
235 951 100 
3
389 1062 133 
3
487 1025 585 
3
630 256 74 
3
433 107 243 
3
19...

result:

ok 133 cases.

Test #11:

score: 0
Accepted
time: 119ms
memory: 9244kb

input:

134
1672
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

828
594 1357 808 1029 684 1020 362 1655 666 1612 126 995 147 1010 112 1549 162 1332 151 1539 346 1200 159 1156 791 1527 691 1579 106 1258 647 1365 377 988 59 1610 570 1221 885 1026 630 1422 364 1660 120 1082 496 1282 218 1161 409 1583 69 1283 433 1290 441 1628 153 1068 338 1374 199 1047 357 1203 278...

result:

ok 134 cases.

Test #12:

score: 0
Accepted
time: 246ms
memory: 11636kb

input:

12
18055
16797 6461 5661 258 15361 9217 9880 14473 16352 214 57 8242 16295 4901 8533 17041 13453 14844 17977 8109 17068 8678 7580 1720 1113 1718 10508 15915 2063 9193 3138 724 17043 15873 3164 4858 4654 7380 8811 8952 15967 9649 3576 9425 5004 9380 11990 8967 17597 16447 4348 13906 3299 7178 12969 1...

output:

8961
8181 4839 10787 4147 13813 3985 1574 1103 9076 9919 3826 15446 8019 8895 15526 14159 10146 6492 12381 16680 6012 12496 1425 14575 9646 14052 13227 11375 11395 13990 1323 8941 4454 16867 5774 17251 17366 1392 11024 17844 15449 17813 1624 16100 14431 446 11874 5462 8064 1578 4022 7607 12488 16522...

result:

ok 12 cases.

Test #13:

score: 0
Accepted
time: 445ms
memory: 11584kb

input:

14
17434
9548 3285 2124 13465 5769 15776 17003 212 10049 15889 16817 4989 14153 13830 13062 3670 4025 3284 15928 617 3990 1450 16869 731 1918 10375 9806 12155 11182 847 8356 3496 3746 8923 11735 12340 10439 9343 2388 10754 3015 10844 4555 4572 15134 9060 9591 4313 4873 10529 16805 9835 11013 5647 15...

output:

17434
3568 9569 1859 15463 2201 2581 10510 2200 5865 6112 12773 4533 11711 9478 15687 17108 2489 10192 10437 12367 1024 9937 15199 1077 4495 11266 3300 11384 14578 14693 1422 11594 4662 8347 6968 2513 4105 479 15441 8320 14191 16354 12127 6746 15046 12684 1452 3837 3433 10376 7005 1210 7917 8108 140...

result:

ok 14 cases.

Test #14:

score: 0
Accepted
time: 235ms
memory: 11276kb

input:

12
14655
11411 161 1024 7539 13177 6370 4724 10192 11161 7719 10455 11482 5760 3288 14566 7833 8877 10020 10600 808 3418 4532 587 10094 615 7241 1377 10067 960 10186 4614 1777 7424 8565 1745 6102 10828 11771 4154 13404 7074 8342 3613 363 13116 1831 1796 13398 3046 1879 10337 6921 2467 4112 5735 1220...

output:

9263
8137 8108 14267 980 3500 1887 1326 7075 12895 2517 4315 7948 4457 897 417 8413 1396 7042 529 7803 8827 4725 12349 10476 8443 1368 7083 1736 8063 9250 2835 382 1372 4306 10580 155 5830 12862 2042 10717 1021 362 645 7837 5871 163 9818 6691 10767 3421 4421 1022 13263 11630 1792 13172 341 1388 754 ...

result:

ok 12 cases.

Test #15:

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

input:

14
14034
10803 1737 4691 2728 3742 3502 3140 4884 11294 1581 10643 13426 7023 13376 7237 12200 1462 12551 12040 524 11824 7685 4122 4225 9127 9188 709 6498 9670 554 13326 10381 7789 4277 12503 6045 4994 6543 8010 13513 1135 5044 13759 388 6604 1461 11927 7152 10411 2045 5304 13655 5103 12866 3144 12...

output:

3
5776 13704 8444 
3
10573 1002 14255 
3
3139 8770 10122 
3
9494 1420 5579 
3
14409 6078 1901 
3
6393 8034 12504 
3
5701 2254 808 
3
2517 1063 4605 
3
8579 2725 4334 
3
11907 16013 10153 
3
7044 1002 12895 
3
8058 4820 13696 
3
14861 13562 17497 
3
1145 2857 9192 

result:

ok 14 cases.

Test #16:

score: 0
Accepted
time: 179ms
memory: 10364kb

input:

12
11255
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

5686
1871 10523 2575 8333 5293 9212 2703 7388 5286 10197 3593 6422 3803 7786 4351 6440 1362 10551 2799 9479 2723 9760 5164 10104 3295 9731 3516 9518 87 9816 3937 9321 4860 10296 344 8732 571 9646 1515 10214 1958 7417 4214 7393 735 7970 3688 7559 3886 10327 5433 9430 1756 10875 4873 9669 3962 7858 33...

result:

ok 12 cases.

Test #17:

score: 0
Accepted
time: 359ms
memory: 14688kb

input:

3
58721
24434 9260 24075 48000 15976 20173 35443 51833 19066 41037 54110 1481 19903 51532 3423 31435 3508 11994 15714 163 55971 31702 36494 4158 51738 44184 24638 56542 45429 9219 45527 15074 28047 37930 45584 56610 49878 37478 38487 34277 34534 20191 11345 52669 4052 58673 1053 27733 28790 52960 35...

output:

29420
53009 10485 4707 23968 42340 4808 45871 26652 52533 39754 46827 54989 58709 12099 29254 584 38400 22240 49323 38975 45937 25546 52759 53570 24981 34661 8114 36900 33743 46790 57474 42565 5385 24638 28085 41836 46408 41730 42539 2801 34055 18624 50645 19016 37708 22318 11466 731 9486 58318 1205...

result:

ok 3 cases.

Test #18:

score: 0
Accepted
time: 290ms
memory: 13984kb

input:

2
77676
27968 75961 21244 54489 71767 46141 53503 13873 18582 11076 64477 51679 6938 36146 38280 58457 28777 38269 14895 25463 52274 57117 4973 40172 6470 60885 61948 14050 909 60043 4187 52377 43750 1600 31546 6977 53526 11677 24682 72371 5910 18647 65163 16777 73668 26432 10296 39627 23007 71448 1...

output:

38748
22203 51769 59961 14373 50030 41551 13314 5820 71891 43590 10528 26535 46537 38328 10750 53759 15714 8906 51278 41206 29926 29218 67989 46770 12968 56189 1657 69618 24004 68269 15938 28597 33161 66246 23251 6510 35316 24406 59425 62826 9582 6556 66908 14890 67538 7454 74807 33890 50245 41368 3...

result:

ok 2 cases.

Test #19:

score: 0
Accepted
time: 434ms
memory: 20300kb

input:

1
200000
84638 180660 96676 145207 33392 79870 171900 125536 96004 63088 55821 129766 161448 131134 107191 45727 177392 29632 142432 198535 92403 141810 68401 132218 189131 53237 157976 172219 186777 173068 5956 125297 154368 15264 18156 9572 126885 111293 89928 31940 95413 63059 80790 20899 106847 ...

output:

99872
2791 27637 18285 30763 35444 71109 101304 186356 54307 28843 138474 120698 53756 88473 89337 68547 15832 44937 183251 19086 153528 27972 53203 28305 122184 87465 102942 170636 196914 60137 194671 150168 10132 99287 7495 148822 128612 163040 132444 102659 101366 33417 93280 160885 197189 187031...

result:

ok 1 cases.

Test #20:

score: 0
Accepted
time: 468ms
memory: 20352kb

input:

1
200000
778 193918 126153 94460 79465 19149 155888 59691 186 123527 158668 162560 163689 134161 155108 117642 81846 27650 15185 86475 183284 82023 110081 78779 107852 147458 182837 86532 62456 92294 124739 67588 130504 17373 180052 77006 156960 98530 80039 48041 89336 28839 47948 187599 100635 2993...

output:

99338
159461 133639 89561 67727 80439 7361 125112 62926 47441 90271 140945 142597 102961 22514 126074 142743 86623 144940 122842 119709 32177 25628 134911 76014 4844 9656 92989 27423 41731 120914 133421 29493 84198 106161 10902 130792 54868 36199 99023 39950 69169 179233 16540 138854 121825 194160 1...

result:

ok 1 cases.

Test #21:

score: 0
Accepted
time: 451ms
memory: 20156kb

input:

1
200000
149623 174471 188335 19522 182434 191133 139876 193846 104368 151263 151116 138458 157418 95972 3025 198068 129404 25668 79426 182928 131062 132637 184464 192636 18060 8975 7698 176652 162326 11520 35009 177175 73936 19482 183164 111736 154331 85768 13254 121038 74746 3132 182403 145788 859...

output:

100222
55350 78897 53035 185297 19266 159125 90983 190070 184159 99627 135887 194085 89164 186673 141275 164107 94357 69158 119178 4475 172807 56232 22083 848 6739 197538 32253 57581 42129 32614 199790 147496 181580 193881 130372 103628 32549 67918 183003 187905 136027 893 61106 197602 163565 43371 ...

result:

ok 1 cases.

Test #22:

score: 0
Accepted
time: 435ms
memory: 20280kb

input:

1
200000
98467 179217 17812 1480 61210 20012 123864 160706 8550 20215 78155 138548 159660 98999 50942 69983 33858 56390 9075 46676 78840 40146 50335 139197 128268 103196 89455 58260 62196 154939 88383 62570 50073 54294 145060 170657 184406 48814 170660 104434 68669 168913 141049 136681 79698 96616 1...

output:

100247
18534 71461 85453 32202 86020 44836 21874 182616 1575 198132 100037 50507 55093 24756 136879 56885 80071 110601 150347 17740 109870 81949 28078 194336 35324 48761 97521 164947 78584 41703 129067 122555 42467 76758 4619 102505 67149 31225 172127 198622 95495 192812 78640 165026 70922 22107 113...

result:

ok 1 cases.

Test #23:

score: 0
Accepted
time: 300ms
memory: 16000kb

input:

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

118792
48646 162084 21548 141803 3232 161266 98906 137275 46190 172369 67263 166675 62129 162883 120325 152544 73005 160921 107687 198382 57190 182647 9527 162134 53807 138080 98733 147924 61919 156980 84910 196125 63796 158204 1714 175630 38737 156112 46764 163457 58422 150993 22763 176074 5830 153...

result:

ok 1 cases.

Test #24:

score: 0
Accepted
time: 325ms
memory: 16244kb

input:

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

123120
6353 170813 2682 185599 51037 130918 31237 133069 108854 126534 31670 144634 85997 153206 15370 187285 99467 183025 2491 134975 76489 188519 62441 174758 112198 124950 86821 166479 54243 132190 79338 128748 66835 149688 15706 123964 49409 192780 115981 154350 38405 133544 33342 122025 47111 1...

result:

ok 1 cases.

Test #25:

score: 0
Accepted
time: 338ms
memory: 16500kb

input:

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

129882
69299 130722 41636 150052 51421 139597 40465 182075 45156 146816 79876 127595 101983 141729 13537 105420 90829 199877 1642 115751 44337 175887 19960 162833 26502 117358 65555 129047 13701 149749 13684 111179 11304 135732 44348 128159 51173 128501 11808 156053 6933 150357 6363 118988 45205 111...

result:

ok 1 cases.

Test #26:

score: 0
Accepted
time: 345ms
memory: 16524kb

input:

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

129428
33257 104325 39584 114879 4498 105155 16352 138170 65348 166712 75174 115834 40361 130741 80845 114625 44164 152478 22047 135648 98380 129609 88786 124480 55965 118263 51914 125500 6286 115429 66483 195409 74512 159392 63218 121568 41444 117147 34916 196696 17547 134360 61962 181777 32352 119...

result:

ok 1 cases.