QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#856042#9827. Defective ScriptdXqwq#AC ✓78ms15524kbC++231.7kb2025-01-13 15:17:372025-01-13 15:17:37

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 7844kb

input:

5
4
9 9 6 8
2
3 5
9
9 9 8 2 4 4 3 5 3
3
777 777 777
6
0 1 0 1 0 1

output:

5
1
0
777
0

result:

ok 5 number(s): "5 1 0 777 0"

Test #2:

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

input:

1
10
31 20 12 18 22 21 19 15 17 36

output:

7

result:

ok 1 number(s): "7"

Test #3:

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

input:

1
100
11 40 134 229 225 182 212 129 280 212 137 84 52 103 196 223 135 156 72 129 70 193 165 146 200 101 151 178 159 139 271 199 48 112 168 208 163 105 48 103 130 111 277 180 112 195 97 67 60 88 135 27 61 117 84 165 202 24 138 227 67 127 207 95 222 200 104 224 150 153 187 92 231 246 204 190 114 236 1...

output:

2

result:

ok 1 number(s): "2"

Test #4:

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

input:

1
1000
1968 1613 1692 1976 692 1381 167 966 2234 2018 1508 1073 1569 1835 1971 448 799 1108 2661 2399 1909 1189 1883 2058 1670 1294 1605 2464 1875 582 1435 2132 2341 2730 2523 1947 2115 1576 350 1183 1929 1777 156 883 1417 130 587 1380 2143 2508 1538 1047 1767 2324 1204 1495 1680 2596 1937 1361 1901...

output:

10

result:

ok 1 number(s): "10"

Test #5:

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

input:

1
10000
7993 10066 8727 18967 15732 22377 21300 9528 17552 17877 16086 15723 19670 12134 8398 10205 24820 22385 17140 18845 17137 21821 19319 12583 24854 18753 16778 20834 27731 20210 8935 20819 18494 16397 14096 9738 7727 15837 21224 7780 9528 11920 13178 8257 7303 14635 12712 430 4076 16721 27230 ...

output:

1

result:

ok 1 number(s): "1"

Test #6:

score: 0
Accepted
time: 56ms
memory: 14624kb

input:

1
200000
440701 270555 291160 381739 425048 202411 328758 222132 173786 164610 348271 410583 259338 131682 352506 465823 459254 227880 256432 262308 400899 192465 301923 208792 303736 253107 320850 285981 201436 56729 204984 326972 311522 356199 434553 425780 475072 358214 403668 340595 127281 20166...

output:

11

result:

ok 1 number(s): "11"

Test #7:

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

input:

10000
52
11 10 11 11 11 11 11 10 11 11 11 11 11 11 10 11 10 11 11 10 11 10 11 11 11 10 10 10 11 11 10 10 10 11 11 11 10 10 10 10 10 10 11 10 10 10 11 10 10 11 10 11
13
10 11 11 11 10 10 10 10 11 10 11 10 11
46
10 11 10 11 10 11 11 11 11 10 10 11 10 11 10 10 11 11 11 10 11 11 11 10 10 11 11 10 10 10 ...

output:

0
0
0
0
0
0
0
11
0
0
9
0
0
0
0
0
0
0
0
0
0
0
0
11
11
0
0
0
0
0
0
0
0
0
0
11
0
0
0
0
0
0
0
0
0
0
0
0
0
0
10
0
0
0
0
0
0
0
0
0
0
11
0
0
0
0
0
0
0
0
0
0
0
9
9
0
0
9
0
0
11
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
9
0
0
0
0
0
0
0
10
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

result:

ok 10000 numbers

Test #8:

score: 0
Accepted
time: 54ms
memory: 7936kb

input:

10000
45
101 102 106 105 107 102 110 110 103 102 101 107 108 110 102 105 100 105 102 108 100 104 103 107 104 109 106 110 100 108 106 100 110 101 109 101 106 100 105 104 110 100 105 100 102
5
100 109 101 101 109
20
109 105 103 110 106 102 103 109 108 102 104 102 105 108 109 104 105 106 102 103
5
100 ...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
104
0
0
0
0
0
0
0
0
0
0
0
0
0
94
0
92
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
103
0
0
0
0
0
0
0
0
96
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
102
0
0
0
0
0
99
0
102
0
0
0
0
103
0
0
0
0
95
105
0
95
0
0
0
0
0
107
0
0
0
101
0
0
0
0
97
0...

result:

ok 10000 numbers

Test #9:

score: 0
Accepted
time: 54ms
memory: 7840kb

input:

10000
10
1023 1014 1035 1053 1069 1047 1016 1060 1083 1027
23
1043 1060 1099 1027 1014 1001 1063 1007 1079 1056 1053 1019 1085 1026 1026 1097 1048 1031 1025 1033 1017 1006 1070
9
1085 1047 1060 1098 1004 1043 1051 1001 1030
12
1059 1025 1012 1005 1069 1079 1084 1079 1043 1092 1034 1000
6
1026 1060 1...

output:

0
0
0
0
0
0
0
982
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
946
0
0
0
0
0
0
0
0
0
0
985
0
0
0
0
0
0
0
1003
983
0
0
0
933
0
1010
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1071
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
974...

result:

ok 10000 numbers

Test #10:

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

input:

10000
2
999999999 999999990
8
999999994 1000000000 999999992 999999993 999999995 999999990 999999997 999999993
58
999999991 999999994 999999991 999999996 999999999 999999993 999999998 999999991 999999999 999999994 999999999 999999991 1000000000 999999994 999999993 999999999 999999991 999999998 99999...

output:

999999981
0
0
0
999999986
0
0
0
0
0
0
0
0
0
999999989
0
0
0
0
0
0
0
0
0
999999981
0
0
0
0
0
999999989
0
0
0
0
0
0
0
0
0
0
999999989
0
0
999999989
0
0
0
999999991
0
0
0
0
0
0
0
0
0
0
999999990
0
0
0
0
0
0
0
0
999999990
999999987
0
0
0
0
0
0
0
0
0
0
0
0
999999994
0
0
999999994
0
0
0
0
999999987
0
0
0
...

result:

ok 10000 numbers

Test #11:

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

input:

1
10
4 7 1 8 5 4 4 3 0 7

output:

0

result:

ok 1 number(s): "0"

Test #12:

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

input:

1
100
78 51 40 88 96 14 44 61 54 14 20 80 7 45 10 40 89 32 61 39 85 23 14 26 37 43 66 2 97 41 9 68 88 43 51 100 38 75 35 96 78 71 90 53 86 18 44 67 77 29 84 99 62 59 52 73 90 16 79 62 80 10 62 61 92 38 69 37 75 72 29 59 27 15 86 52 24 80 9 86 18 9 73 91 85 11 94 93 78 63 19 66 12 2 2 10 68 64 23 99

output:

0

result:

ok 1 number(s): "0"

Test #13:

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

input:

1
1000
493365815 551245852 230674298 150848089 632681352 152113321 783988699 756348428 65925053 419610634 512607722 687090713 177114685 458158148 98850647 31705258 809964999 986289629 133406153 734324039 341899469 79809531 811200175 813657320 818461402 481756354 885617065 755017292 458575964 4342517...

output:

0

result:

ok 1 number(s): "0"

Test #14:

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

input:

1
100000
520574224 560857498 610972714 281671882 915819174 43742144 377037063 658303262 47590687 245119230 786213191 925134704 796679537 3011353 424895997 641007597 372592940 947990832 140703825 719153180 921399973 77093350 459627131 341322916 636427586 751554004 804218303 359274803 914271591 642076...

output:

0

result:

ok 1 number(s): "0"

Test #15:

score: 0
Accepted
time: 61ms
memory: 11900kb

input:

1
200000
633957403 809651271 604571369 169259769 44811299 911512053 873572239 445922218 937160539 147085782 734587106 271259165 462892247 301320223 101647338 752155305 20175117 734238559 506043781 290384043 747730942 860129275 126536385 669926975 810708806 991355746 127611706 657675188 633051769 712...

output:

0

result:

ok 1 number(s): "0"

Test #16:

score: 0
Accepted
time: 56ms
memory: 12032kb

input:

1
200000
315464210 857888734 568198530 115529496 223648688 724541617 530639799 771979041 516244497 841815161 137302579 800355929 639363987 476379740 106263462 455113232 713197873 330552123 991144974 143428329 191097992 859407915 158851484 847438159 590082304 556242006 891475002 505641918 321072578 4...

output:

0

result:

ok 1 number(s): "0"

Test #17:

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

input:

1
100000
568048790 723521949 797640482 706207095 444628039 857368505 461058726 500986734 139375953 289593553 387700275 230016245 398310198 844093128 398502186 970825699 768601622 339490219 911459890 773443316 322366645 767503936 988107574 272116977 431209917 501936818 223462376 369786419 672114931 3...

output:

0

result:

ok 1 number(s): "0"

Test #18:

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

input:

1
100000
9728 7761 9804 1463 5267 5958 2830 9797 9092 1930 6819 2656 5240 5464 8512 1293 9137 7612 8565 4931 9617 8799 3338 2090 7496 6623 5858 6396 4386 5307 1922 6028 3139 3593 9154 6667 9483 5614 6667 4614 7265 8593 3081 1635 1188 1465 5835 5925 1257 7766 9605 3479 9707 8338 4539 1085 8558 2952 2...

output:

0

result:

ok 1 number(s): "0"

Test #19:

score: 0
Accepted
time: 49ms
memory: 11960kb

input:

1
200000
7238 4834 3119 3095 3744 6564 6616 9384 8088 6602 1547 2576 9539 5663 2205 4828 1021 3522 6067 9486 1137 5384 5677 4840 9257 1721 5652 1736 2277 8416 6146 1856 9600 8027 1995 4398 4440 6672 3940 5333 3162 7142 3759 5872 6996 2800 6823 5699 9831 7554 7362 2204 6581 2157 7217 5202 6916 9400 6...

output:

0

result:

ok 1 number(s): "0"

Test #20:

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

input:

1
10
7 6 8 8 6 4 9 13 16 12

output:

2

result:

ok 1 number(s): "2"

Test #21:

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

input:

1
200000
221414340 118162642 139106997 210086698 36637145 6702072 95951815 191729437 63711917 87953456 143416827 159861044 180024877 236269110 234925841 227633362 159759211 261252792 186176462 162982173 237525308 171647056 240214873 232167610 197133774 127147517 69928097 136459447 16883486 9097500 2...

output:

472

result:

ok 1 number(s): "472"

Test #22:

score: 0
Accepted
time: 63ms
memory: 15316kb

input:

1
200000
193021071 202390881 57149689 107893160 102885235 277012835 238397048 207671962 284474751 251823798 137997378 39655110 77289530 143955806 195815029 130158758 137514043 174006848 45149471 110516408 111418830 89813150 158405798 143716423 226942785 249931319 150754939 83627532 92579813 58603523...

output:

1523

result:

ok 1 number(s): "1523"

Test #23:

score: 0
Accepted
time: 57ms
memory: 15184kb

input:

1
200000
122764141 233764587 165126887 105699624 190189689 68379955 112640446 40314412 159017484 252774113 237610677 130440047 111634162 236544262 167695087 148707770 242034296 165704540 146235205 79107008 132457827 244133852 149831305 76321597 109606322 41593261 15558163 61917474 95041557 45865832 ...

output:

4068

result:

ok 1 number(s): "4068"

Test #24:

score: 0
Accepted
time: 58ms
memory: 14308kb

input:

1
200000
210713960 177582493 261759907 263116596 258459050 195493563 108419885 60185941 59408507 56008121 49011025 67734729 83825717 166229690 45153516 86863275 68716130 172813613 211932059 64472772 70537876 72321143 225553196 242872440 109993859 78846108 208670760 196486834 56569707 149627221 22002...

output:

1606

result:

ok 1 number(s): "1606"

Test #25:

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

input:

1
200000
132559595 186633702 88387713 200234277 204118607 108908983 232367122 178654176 100657666 156409688 111163156 49336993 144431423 294990933 279691949 267125935 228357155 106192518 132471271 204178956 211901219 190865022 206422465 199002224 126171675 215634243 114615722 76839669 157780616 1816...

output:

2984

result:

ok 1 number(s): "2984"

Test #26:

score: 0
Accepted
time: 57ms
memory: 9336kb

input:

1
200000
113541525 115106191 32515823 73828174 100521044 112947247 164437129 51281611 108113278 184019550 235754890 205113452 183793787 104111756 91704942 215155751 184468569 204021794 191749644 158043232 137927019 221217330 109408897 166235371 123084776 36391369 131366013 203860757 183281615 105887...

output:

3660

result:

ok 1 number(s): "3660"

Test #27:

score: 0
Accepted
time: 61ms
memory: 15164kb

input:

1
200000
637829205 552368354 719438710 646705151 524733842 578780937 564538809 641937705 612208360 641481017 684678428 732130251 715891728 639989069 506682103 586175067 600777823 530250211 612268497 609676017 552540639 546961841 674827040 679602195 715627161 659956344 543977668 615311872 709572602 6...

output:

470911856

result:

ok 1 number(s): "470911856"

Test #28:

score: 0
Accepted
time: 58ms
memory: 14672kb

input:

1
200000
920918143 904564473 905135539 916319736 917755593 908931644 910205968 905936917 906687212 910597858 925653475 928567645 927686747 925311514 915629870 912515997 916197131 915969926 920810010 925206771 921840211 916467520 918581922 910739350 914158045 916756700 904645242 908158215 915494027 9...

output:

900000036

result:

ok 1 number(s): "900000036"

Test #29:

score: 0
Accepted
time: 65ms
memory: 14900kb

input:

1
200000
130605204 134772268 132095253 138744298 124218067 162307194 149976317 137599831 196333977 207311103 183951974 133189540 148314183 171124975 138461265 137137886 128354782 120518281 123286310 120977720 159234504 190400609 163456537 119648263 134601479 161192210 168245711 122570216 121157439 1...

output:

104548767

result:

ok 1 number(s): "104548767"

Test #30:

score: 0
Accepted
time: 46ms
memory: 7940kb

input:

10000
20
2 0 7 5 10 6 10 2 10 1 5 2 4 7 8 8 8 9 4 9
31
5 7 7 9 1 5 1 9 9 4 8 9 10 2 8 4 1 6 0 4 0 10 5 7 1 10 3 6 0 2 2
8
5 5 9 10 10 1 9 0
5
2 4 0 4 10
21
3 4 7 10 4 1 4 5 1 10 5 2 2 2 10 5 5 3 4 0 8
3
1 0 8
33
1 4 10 5 1 9 10 9 10 8 8 1 3 4 0 1 5 5 8 1 6 7 1 9 4 3 1 10 0 8 3 9 1
31
6 6 3 3 4 0 7 9...

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
4
6
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
2
0
5
0
0
3
0
0
0
0
0
0
0
0
0
0
3
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
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
...

result:

ok 10000 numbers

Test #31:

score: 0
Accepted
time: 57ms
memory: 7848kb

input:

10000
2
278468 176183
9
920386 392159 359036 91484 314659 47913 831353 726986 791523
8
452227 668229 85066 44787 661610 436735 183336 264869
13
602080 683975 99326 509166 542718 742399 550359 265211 791682 443351 829081 415913 83309
4
232922 649931 683158 5383
25
187821 28300 854986 891273 448646 61...

output:

73898
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
29748
0
0
0
0
0
0
0
0
0
0
108091
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
65393
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
67506
0
0
0
0
0
0
0
0
0
0
0
0
0
46698
0
0
0
0
0
0
0
0...

result:

ok 10000 numbers

Test #32:

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

input:

10000
24
785401641 120950080 283108552 272359854 198027351 638940812 143363245 551385833 487397804 648396852 474757752 695606230 46381091 525728491 409001098 413128032 354263335 93448234 918431818 37975561 952419979 228112879 729344392 861190533
4
452782027 473749991 765786528 692320893
10
868403392...

output:

0
331742715
0
0
0
0
0
0
0
208559530
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
633204643
0
0
0
0
86240935
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
114646720
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0...

result:

ok 10000 numbers

Test #33:

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

input:

10000
21
12 20 18 18 14 17 12 21 18 18 21 16 12 17 20 17 10 14 10 11 11
21
14 16 18 19 15 16 9 9 15 20 17 10 15 13 14 16 14 9 7 8 11
11
16 10 6 9 14 13 15 15 15 13 12
3
7 10 10
40
14 16 19 19 19 14 21 18 9 13 17 19 23 20 13 15 23 20 16 20 16 12 19 19 23 18 10 13 10 9 10 13 20 15 15 14 16 13 19 12
6
...

output:

7
7
6
6
8
3
8
5
7
0
7
6
1
1
9
10
8
3
5
0
3
5
2
3
10
7
10
4
0
5
3
6
17
4
8
8
3
7
5
10
10
9
3
4
12
6
6
5
6
8
6
12
8
3
8
9
3
1
5
7
5
1
10
3
1
11
9
2
6
2
6
5
12
8
4
1
3
6
4
1
0
9
2
0
10
11
4
8
6
2
12
6
9
2
6
6
8
2
2
0
4
10
0
8
8
9
9
3
6
5
0
7
6
4
5
9
1
8
7
8
5
2
6
6
16
10
2
4
10
1
3
4
11
1
1
4
10
11
3
3...

result:

ok 10000 numbers

Test #34:

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

input:

10000
11
50698735 72502542 197370381 131558366 93071432 127386117 144120286 128876498 66211858 161092599 111721571
28
99385945 153268217 129360090 163993951 99221177 108228212 194531843 74837379 14399349 88948234 239024227 238262113 138490953 79449607 188935826 128344656 104152947 105260462 24192592...

output:

731455
8924761
25392526
1402666
11442529
22944439
186802012
13036570
1699762
63466303
14169061
3453490
123393022
21155461
111992686
5139559
5711248
7849591
13619545
16886104
33733540
81409603
17714971
4940953
31774927
138511501
3713467
11079943
153105796
4113295
1331341
3709702
135651889
32305198
15...

result:

ok 10000 numbers

Test #35:

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

input:

10000
7
60843667 50851467 130529069 146500823 149726220 266774054 212457256
48
107606738 210422065 204681243 220332090 199828391 98508554 170068538 172606135 130379499 138436077 244660203 164149328 119422993 185623412 214397836 246802231 170390777 139080318 225858810 213394759 175887308 238746371 20...

output:

21553313
49251596
26264207
24277730
33808787
13884998
11347250
298172
39532001
109033238
7059737
30376409
7312445
4101041
11310365
12880136
33230978
40897607
14332952
28649534
117009542
5529170
9080207
51785972
15589667
8379920
26719214
29659109
3415472
13689446
4659443
1077005
8619362
5240828
24438...

result:

ok 10000 numbers

Test #36:

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

input:

10000
35
223934279 215227187 285419818 280082972 213848388 135892920 269154985 172622722 29935722 33058741 123785878 266610162 240218247 169703389 210229841 186483468 216901564 236794008 193354784 206432083 230744528 191097142 45094484 123006074 221101917 138378425 110447670 206467970 83379783 18063...

output:

20590878
34550823
1207875
22808529
42914565
7918161
45946062
30110649
111163884
1149345
19316187
19182279
20914194
74166030
6626865
1923768
22698615
12939705
7636887
84456996
2833755
6840687
43514124
103066509
52203153
4691748
45422841
2186403
4319043
597003
18333894
72907020
68715216
4191981
646590...

result:

ok 10000 numbers

Test #37:

score: 0
Accepted
time: 73ms
memory: 7812kb

input:

10000
12
129780364 206794453 218620159 80575274 100726883 167241395 178867772 150946163 179480313 120930908 203201950 119665586
20
83704399 33239038 106749217 225544327 148075538 150331664 179792464 62009557 69471549 209803513 224120981 235601052 236495218 164794874 51223955 60990101 194744418 19537...

output:

59943121
2234527
3858793
24275665
404983
11920417
11292100
131088043
6496390
12758290
532933
3239170
49172470
20056939
10268077
1982590
6737341
68486719
23740489
25122397
7854490
12185791
44300767
153593053
8185798
7655308
52857817
104261677
23606335
185734
26820397
575497
13110979
14327509
5200168
...

result:

ok 10000 numbers

Test #38:

score: 0
Accepted
time: 73ms
memory: 7848kb

input:

10000
36
243711213 262451556 248812022 164451158 43362732 101367029 118963316 41634846 71779824 124103474 185444542 3504513 61463395 135686923 54917695 21163846 83542921 197329189 134877272 44646684 144256783 191191130 158440559 121607375 87615071 233305498 250727075 187078857 147218737 180409886 11...

output:

901982
3973550
10357562
7133810
3903026
22230044
39363437
65129183
6755495
13883882
20593346
335678
17172062
11719268
17038385
24797900
1033127
117204335
5842661
1160432
108198020
2154284
5869031
15903323
92941205
21350789
14054483
17565140
19374776
11874377
51716594
50875631
26961779
9207677
795062...

result:

ok 10000 numbers

Test #39:

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

input:

10000
35
97129676 225375944 218394751 110669051 105277337 15793055 25103730 112170832 245744301 137630664 104145967 268771915 275829129 257681724 188316417 160743572 139031329 247234096 144317451 109709973 138029879 191247145 66832348 143732947 144348810 203608641 154407910 171237942 88627047 138579...

output:

13100669
11278623
23133577
11314713
25129440
40554769
32249593
3774876
32103817
754201
15061015
15053849
42257903
73752388
22522900
21425524
111642243
23770911
28810200
85301587
16307776
131550811
127900799
9521322
8359124
33444271
185546098
6283179
4467229
4444196
25712725
32428135
16983678
4035667...

result:

ok 10000 numbers

Test #40:

score: 0
Accepted
time: 78ms
memory: 7776kb

input:

10000
15
549477658 482271468 552481768 499696486 516404748 561726486 500006543 513525757 567143291 585769303 544551245 551963613 573345685 493694083 525887102
12
358167645 378863955 416576756 439457998 407804402 405844987 348129329 426012554 522460406 375585061 391236716 409917432
67
470931398 41573...

output:

436566742
342102809
219076269
134677002
440414140
353362398
163745929
221056857
490195068
18998944
368352996
545638808
63615159
323369686
217678616
464176191
89022337
165143946
229783078
68745732
372928984
194108338
226508830
502407644
379394111
390640387
417634056
29982115
280632485
307708332
11569...

result:

ok 10000 numbers

Test #41:

score: 0
Accepted
time: 65ms
memory: 7936kb

input:

2000
100
381162340 458949894 406347151 414660756 441830624 464462402 492670328 459296976 378915926 293637809 316610051 337768600 384988916 364603701 285043383 252025445 332352909 364201662 382713208 396125055 410380696 503579431 419117293 259940210 316852404 374717946 368491275 319097613 464737145 4...

output:

218061514
24115552
386932031
217654657
149141626
155408830
344599069
19163810
407925832
103690508
15034398
454067619
374013623
234315761
162663336
91906184
89253990
302686517
381007719
325131375
165752631
446921455
443078161
253951076
471119045
1278426
368855315
18069322
265519142
289503512
23084808...

result:

ok 2000 numbers

Test #42:

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

input:

100
2000
578902246 492844976 461897185 508513436 554001458 593266739 614489315 593513061 640824190 572567701 498433498 533783935 635630056 571408294 525436458 607050435 615398266 508787744 538421909 477420948 553599879 602246253 647727141 549378664 544166747 603734264 471443350 455256116 530714155 5...

output:

439958378
247118520
311191903
141240360
491771688
472195601
256686883
494859593
420594399
74514891
124638842
171878219
396806331
146137865
16561736
37502281
282847033
408545199
89036922
218846552
113403998
217349233
177892026
459849387
162877973
167653319
151875631
419499402
136161915
182171292
2216...

result:

ok 100 numbers

Test #43:

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

input:

10000
12
911987411 914913492 912107678 908038030 915309586 902650463 911034700 927663068 919623236 915107239 914866881 905503228
9
909162601 905476492 905454001 918201273 918472696 915228224 916426932 910961030 922495291
2
926473781 924459109
20
911139712 916741779 902094022 910663397 920219995 9181...

output:

901363638
900080034
922444437
900343185
900863748
906215664
900516174
903628332
902324283
900364728
905782788
900788163
907908987
901334898
900746394
905855679
902339511
903681336
904037220
900147357
904993461
904318911
900268620
900802305
903513642
900986112
901197135
900084945
900717930
911135241
...

result:

ok 10000 numbers

Test #44:

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

input:

10000
13
202948777 179823099 202152881 186180446 167408579 163197658 121555535 144144640 198291994 172642878 184430795 200533582 218253783
5
157464767 136324615 161972760 196608795 201909418
9
183577293 177108453 189076992 177928525 133099684 149800336 141315544 137916119 176027100
12
137837184 1349...

output:

109672821
129590261
121827200
109460360
101712628
104707160
111405782
106908705
104466415
117305567
107584665
105480757
133358968
126589910
111667608
104200969
113251613
109108852
144380808
109121740
104775357
153383700
106114620
105363253
110956955
108164875
104466410
106357934
111101517
111383013
...

result:

ok 10000 numbers

Test #45:

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

input:

10000
4
2 4 4 3
2
4 4
2
4 4
34
3 1 1 1 2 3 1 2 4 3 1 1 2 3 2 3 1 2 3 2 3 1 2 4 4 4 4 3 2 3 2 4 4 4
29
1 2 4 4 4 3 2 4 3 1 1 1 2 4 3 1 2 4 4 4 4 4 3 2 3 2 3 2 3
3
1 1 1
20
1 1 2 4 4 4 3 1 1 1 2 3 2 4 4 3 1 2 4 3
22
2 3 2 4 4 3 2 4 4 3 2 4 4 4 3 1 1 1 2 3 1 1
3
3 2 4
33
2 3 2 3 1 1 1 2 3 2 3 1 1 1 1 1...

output:

1
4
4
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
4
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
4
1
1
1
1
1
1
1
1
1
4
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
4
...

result:

ok 10000 numbers

Test #46:

score: 0
Accepted
time: 64ms
memory: 9396kb

input:

1
200000
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 10000...

output:

1000000000

result:

ok 1 number(s): "1000000000"

Test #47:

score: 0
Accepted
time: 57ms
memory: 11936kb

input:

1
200000
999999999 999999999 1000000000 999999999 1000000000 999999999 999999999 999999999 999999999 999999999 999999999 1000000000 999999999 999999999 999999999 999999999 999999999 999999999 1000000000 999999999 999999999 999999999 999999999 999999999 1000000000 1000000000 1000000000 999999999 1000...

output:

0

result:

ok 1 number(s): "0"

Test #48:

score: 0
Accepted
time: 56ms
memory: 11916kb

input:

1
200000
999999991 999999991 999999995 999999995 999999992 999999993 999999999 999999999 999999996 999999996 999999992 999999993 999999998 999999997 999999999 999999990 999999993 999999998 999999998 999999991 999999998 999999990 999999991 999999995 999999994 999999990 999999995 999999994 999999996 9...

output:

0

result:

ok 1 number(s): "0"

Test #49:

score: 0
Accepted
time: 56ms
memory: 11972kb

input:

1
200000
999999947 999999928 999999976 999999906 999999965 999999907 999999943 999999910 999999992 999999928 999999977 999999953 999999924 999999919 999999901 999999980 999999961 999999930 999999975 999999983 999999960 999999949 999999921 999999993 999999945 999999950 999999945 999999970 999999916 9...

output:

0

result:

ok 1 number(s): "0"

Test #50:

score: 0
Accepted
time: 64ms
memory: 14756kb

input:

1
200000
999999917 999999955 999999968 999999953 999999905 999999925 999999968 999999992 999999969 999999930 999999957 999999938 999999941 999999978 999999933 999999930 999999930 999999945 999999966 999999915 999999949 999999954 999999963 999999975 999999934 999999939 999999966 999999950 999999934 9...

output:

999999900

result:

ok 1 number(s): "999999900"

Test #51:

score: 0
Accepted
time: 64ms
memory: 14416kb

input:

1
200000
999999706 999999722 999999309 999999237 999999318 999999240 999999347 999999128 999999258 999999227 999999251 999999682 999999666 999999675 999999529 999999652 999999606 999999298 999999703 999999524 999999355 999999230 999999631 999999621 999999512 999999714 999999183 999999185 999999266 9...

output:

999999000

result:

ok 1 number(s): "999999000"

Test #52:

score: 0
Accepted
time: 64ms
memory: 9368kb

input:

1
200000
999994978 999994166 999994858 999998962 999999474 999998660 999998482 999996282 999990608 999992474 999995821 999996198 999999435 999998668 999995929 999992620 999995735 999993271 999991551 999990215 999990829 999991222 999993017 999995312 999991177 999991601 999994868 999997114 999998467 9...

output:

999990000

result:

ok 1 number(s): "999990000"

Test #53:

score: 0
Accepted
time: 56ms
memory: 14760kb

input:

1
200000
999940558 999951422 999953534 999980801 999987015 999942612 999903325 999929402 999982946 999972951 999951108 999982620 999986957 999972593 999969011 999939761 999938116 999983364 999963930 999970991 999966340 999960840 999961700 999934246 999959050 999939975 999946549 999956058 999986555 9...

output:

999900000

result:

ok 1 number(s): "999900000"

Test #54:

score: 0
Accepted
time: 66ms
memory: 15248kb

input:

1
200000
999786711 999882334 999780171 999312014 999278638 999519152 999742352 999765589 999389253 999509907 999555614 999394146 999288894 999492758 999321363 999257189 999453752 999539009 999567140 999359016 999432267 999335910 999592815 999544158 999587543 999496301 999732872 999427089 999612544 9...

output:

999000000

result:

ok 1 number(s): "999000000"

Test #55:

score: 0
Accepted
time: 57ms
memory: 11856kb

input:

1
200000
0 1000000000 0 1000000000 0 1000000000 0 1000000000 0 1000000000 0 1000000000 0 1000000000 0 1000000000 0 1000000000 0 1000000000 0 1000000000 0 1000000000 0 1000000000 0 1000000000 0 1000000000 0 1000000000 0 1000000000 0 1000000000 0 1000000000 0 1000000000 0 1000000000 0 1000000000 0 100...

output:

0

result:

ok 1 number(s): "0"

Test #56:

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

input:

1
200000
499999999 1000000000 499999999 1000000000 499999999 1000000000 499999999 1000000000 499999999 1000000000 499999999 1000000000 499999999 1000000000 499999999 1000000000 499999999 1000000000 499999999 1000000000 499999999 1000000000 499999999 1000000000 499999999 1000000000 499999999 10000000...

output:

0

result:

ok 1 number(s): "0"

Test #57:

score: 0
Accepted
time: 57ms
memory: 12096kb

input:

1
200000
499999998 1000000000 499999998 1000000000 499999998 1000000000 499999998 1000000000 499999998 1000000000 499999998 1000000000 499999998 1000000000 499999998 1000000000 499999998 1000000000 499999998 1000000000 499999998 1000000000 499999998 1000000000 499999998 1000000000 499999998 10000000...

output:

0

result:

ok 1 number(s): "0"

Test #58:

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

input:

1
200000
1000000000 499999995 1000000000 499999995 1000000000 499999995 1000000000 499999995 1000000000 499999995 1000000000 499999995 1000000000 499999995 1000000000 499999995 1000000000 499999995 1000000000 499999995 1000000000 499999995 1000000000 499999995 1000000000 499999995 1000000000 4999999...

output:

0

result:

ok 1 number(s): "0"

Test #59:

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

input:

1
200000
499999977 1000000000 499999977 1000000000 499999977 1000000000 499999977 1000000000 499999977 1000000000 499999977 1000000000 499999977 1000000000 499999977 1000000000 499999977 1000000000 499999977 1000000000 499999977 1000000000 499999977 1000000000 499999977 1000000000 499999977 10000000...

output:

0

result:

ok 1 number(s): "0"

Test #60:

score: 0
Accepted
time: 56ms
memory: 12096kb

input:

1
200000
499999900 1000000000 499999900 1000000000 499999900 1000000000 499999900 1000000000 499999900 1000000000 499999900 1000000000 499999900 1000000000 499999900 1000000000 499999900 1000000000 499999900 1000000000 499999900 1000000000 499999900 1000000000 499999900 1000000000 499999900 10000000...

output:

0

result:

ok 1 number(s): "0"

Test #61:

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

input:

1
200000
1000000000 499999000 1000000000 499999000 1000000000 499999000 1000000000 499999000 1000000000 499999000 1000000000 499999000 1000000000 499999000 1000000000 499999000 1000000000 499999000 1000000000 499999000 1000000000 499999000 1000000000 499999000 1000000000 499999000 1000000000 4999990...

output:

0

result:

ok 1 number(s): "0"

Test #62:

score: 0
Accepted
time: 56ms
memory: 11940kb

input:

1
200000
499990000 1000000000 499990000 1000000000 499990000 1000000000 499990000 1000000000 499990000 1000000000 499990000 1000000000 499990000 1000000000 499990000 1000000000 499990000 1000000000 499990000 1000000000 499990000 1000000000 499990000 1000000000 499990000 1000000000 499990000 10000000...

output:

0

result:

ok 1 number(s): "0"

Test #63:

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

input:

1
200000
499900000 1000000000 499900000 1000000000 499900000 1000000000 499900000 1000000000 499900000 1000000000 499900000 1000000000 499900000 1000000000 499900000 1000000000 499900000 1000000000 499900000 1000000000 499900000 1000000000 499900000 1000000000 499900000 1000000000 499900000 10000000...

output:

0

result:

ok 1 number(s): "0"

Test #64:

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

input:

1
200000
1000000000 499000000 1000000000 499000000 1000000000 499000000 1000000000 499000000 1000000000 499000000 1000000000 499000000 1000000000 499000000 1000000000 499000000 1000000000 499000000 1000000000 499000000 1000000000 499000000 1000000000 499000000 1000000000 499000000 1000000000 4990000...

output:

0

result:

ok 1 number(s): "0"

Test #65:

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

input:

1
200000
490000000 1000000000 490000000 1000000000 490000000 1000000000 490000000 1000000000 490000000 1000000000 490000000 1000000000 490000000 1000000000 490000000 1000000000 490000000 1000000000 490000000 1000000000 490000000 1000000000 490000000 1000000000 490000000 1000000000 490000000 10000000...

output:

0

result:

ok 1 number(s): "0"

Test #66:

score: 0
Accepted
time: 58ms
memory: 15340kb

input:

1
200000
500000000 1000000000 500000000 1000000000 500000000 1000000000 500000000 1000000000 500000000 1000000000 500000000 1000000000 500000000 1000000000 500000000 1000000000 500000000 1000000000 500000000 1000000000 500000000 1000000000 500000000 1000000000 500000000 1000000000 500000000 10000000...

output:

0

result:

ok 1 number(s): "0"

Test #67:

score: 0
Accepted
time: 58ms
memory: 15524kb

input:

1
200000
500000001 1000000000 500000001 1000000000 500000001 1000000000 500000001 1000000000 500000001 1000000000 500000001 1000000000 500000001 1000000000 500000001 1000000000 500000001 1000000000 500000001 1000000000 500000001 1000000000 500000001 1000000000 500000001 1000000000 500000001 10000000...

output:

2

result:

ok 1 number(s): "2"

Test #68:

score: 0
Accepted
time: 61ms
memory: 9436kb

input:

1
200000
1000000000 500000005 1000000000 500000005 1000000000 500000005 1000000000 500000005 1000000000 500000005 1000000000 500000005 1000000000 500000005 1000000000 500000005 1000000000 500000005 1000000000 500000005 1000000000 500000005 1000000000 500000005 1000000000 500000005 1000000000 5000000...

output:

10

result:

ok 1 number(s): "10"

Test #69:

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

input:

1
200000
500000014 1000000000 500000014 1000000000 500000014 1000000000 500000014 1000000000 500000014 1000000000 500000014 1000000000 500000014 1000000000 500000014 1000000000 500000014 1000000000 500000014 1000000000 500000014 1000000000 500000014 1000000000 500000014 1000000000 500000014 10000000...

output:

28

result:

ok 1 number(s): "28"

Test #70:

score: 0
Accepted
time: 56ms
memory: 14288kb

input:

1
200000
500000042 1000000000 500000042 1000000000 500000042 1000000000 500000042 1000000000 500000042 1000000000 500000042 1000000000 500000042 1000000000 500000042 1000000000 500000042 1000000000 500000042 1000000000 500000042 1000000000 500000042 1000000000 500000042 1000000000 500000042 10000000...

output:

84

result:

ok 1 number(s): "84"

Test #71:

score: 0
Accepted
time: 54ms
memory: 15500kb

input:

1
200000
500000124 1000000000 500000124 1000000000 500000124 1000000000 500000124 1000000000 500000124 1000000000 500000124 1000000000 500000124 1000000000 500000124 1000000000 500000124 1000000000 500000124 1000000000 500000124 1000000000 500000124 1000000000 500000124 1000000000 500000124 10000000...

output:

248

result:

ok 1 number(s): "248"

Test #72:

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

input:

1
200000
1000000000 500000429 1000000000 500000429 1000000000 500000429 1000000000 500000429 1000000000 500000429 1000000000 500000429 1000000000 500000429 1000000000 500000429 1000000000 500000429 1000000000 500000429 1000000000 500000429 1000000000 500000429 1000000000 500000429 1000000000 5000004...

output:

858

result:

ok 1 number(s): "858"

Test #73:

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

input:

1
200000
500004429 1000000000 500004429 1000000000 500004429 1000000000 500004429 1000000000 500004429 1000000000 500004429 1000000000 500004429 1000000000 500004429 1000000000 500004429 1000000000 500004429 1000000000 500004429 1000000000 500004429 1000000000 500004429 1000000000 500004429 10000000...

output:

8858

result:

ok 1 number(s): "8858"

Test #74:

score: 0
Accepted
time: 61ms
memory: 14244kb

input:

1
200000
500044429 1000000000 500044429 1000000000 500044429 1000000000 500044429 1000000000 500044429 1000000000 500044429 1000000000 500044429 1000000000 500044429 1000000000 500044429 1000000000 500044429 1000000000 500044429 1000000000 500044429 1000000000 500044429 1000000000 500044429 10000000...

output:

88858

result:

ok 1 number(s): "88858"

Test #75:

score: 0
Accepted
time: 57ms
memory: 14404kb

input:

1
200000
500444429 1000000000 500444429 1000000000 500444429 1000000000 500444429 1000000000 500444429 1000000000 500444429 1000000000 500444429 1000000000 500444429 1000000000 500444429 1000000000 500444429 1000000000 500444429 1000000000 500444429 1000000000 500444429 1000000000 500444429 10000000...

output:

888858

result:

ok 1 number(s): "888858"

Test #76:

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

input:

1
200000
1000000000 504444429 1000000000 504444429 1000000000 504444429 1000000000 504444429 1000000000 504444429 1000000000 504444429 1000000000 504444429 1000000000 504444429 1000000000 504444429 1000000000 504444429 1000000000 504444429 1000000000 504444429 1000000000 504444429 1000000000 5044444...

output:

8888858

result:

ok 1 number(s): "8888858"

Test #77:

score: 0
Accepted
time: 61ms
memory: 15076kb

input:

1
200000
544444429 1000000000 544444429 1000000000 544444429 1000000000 544444429 1000000000 544444429 1000000000 544444429 1000000000 544444429 1000000000 544444429 1000000000 544444429 1000000000 544444429 1000000000 544444429 1000000000 544444429 1000000000 544444429 1000000000 544444429 10000000...

output:

88888858

result:

ok 1 number(s): "88888858"

Extra Test:

score: 0
Extra Test Passed