QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#83341#2713. Exercise Deadlinesxiaowuc125 ✓80ms16748kbC++171.5kb2023-03-01 14:18:592023-03-01 14:19:02

詳細信息

Subtask #1:

score: 17
Accepted

Test #1:

score: 17
Accepted
time: 7ms
memory: 8320kb

input:

5000
4599 4641 4098 4934 4641 1817 2479 4394 902 3640 3101 2692 4745 4040 4992 2803 3461 1837 3052 4857 3620 3567 3382 3156 4117 4290 4966 3682 4800 4836 4705 1771 4604 1307 3436 4244 4693 4634 3735 1658 1067 2526 4732 2201 4139 4631 4164 4460 4917 4874 4653 3993 4021 1357 4521 1554 4238 4106 4209 4...

output:

1728805

result:

ok single line: '1728805'

Test #2:

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

input:

5000
3231 4907 3422 2981 4859 4330 1148 2806 4990 181 4657 2697 4977 4826 4992 4588 4940 4265 2582 4251 4645 1938 4355 1925 4025 4321 3750 4720 2252 4206 990 3697 4471 2452 4719 4407 4948 4327 3991 3963 3504 4250 2265 4290 4731 3263 2404 3998 1913 4589 4001 4905 4093 2648 3900 4991 4378 643 1582 394...

output:

1728008

result:

ok single line: '1728008'

Test #3:

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

input:

5000
4312 4113 214 218 3997 3278 325 3655 2092 412 417 4906 1581 479 1429 4725 518 522 2993 532 4824 2345 3654 569 4677 4498 4317 593 1826 618 4052 1487 3794 1556 2470 2983 669 672 4745 685 692 694 1594 4869 3875 4726 847 4143 2257 780 2427 796 4657 4472 805 3705 809 4858 4278 4150 4636 2068 844 313...

output:

1008491

result:

ok single line: '1008491'

Test #4:

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

input:

5000
4747 142 177 244 2369 4786 4105 3267 344 2821 394 2850 4958 782 409 4458 454 3839 480 484 486 4591 499 504 511 3285 518 530 551 3510 557 1211 4609 593 608 611 616 3510 4948 655 4909 682 686 2170 4519 695 4636 3468 725 3448 727 4907 731 736 2629 772 408 2456 792 3127 800 801 803 4163 4581 827 41...

output:

780129

result:

ok single line: '780129'

Test #5:

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

input:

5000
5000 3855 4061 5000 5000 5000 5000 5000 2276 4713 4999 4999 3733 4999 4999 4999 3298 4999 4999 4998 4998 4998 4998 4193 4563 4572 4997 4248 4997 4997 4997 4997 4997 4067 4997 4996 4996 4996 4626 4996 4996 4996 4996 4996 4996 3534 4995 4995 4995 4995 4995 4229 4994 4994 1572 2896 4994 4994 4994 ...

output:

4259771

result:

ok single line: '4259771'

Test #6:

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

input:

5000
1777 5000 5000 5000 3560 3529 2737 4999 4731 4999 4998 4623 4998 4998 4208 4998 4998 4998 3956 4130 4997 4997 4997 4767 4997 4685 4997 4996 3934 4111 4996 4943 4996 4167 4995 2755 4995 4995 4995 4995 4995 4210 4350 4994 4994 4994 4994 4994 4994 4994 4562 4994 4530 4994 4994 4690 4993 4993 4993 ...

output:

3972921

result:

ok single line: '3972921'

Test #7:

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

input:

4937
642 4056 3751 2485 1186 4123 4592 3905 908 2227 640 325 515 3813 1837 4431 679 225 2675 2946 1754 4327 2218 1764 754 2975 4320 4425 4377 1948 1652 482 3707 556 2223 856 2489 3792 1698 4553 1905 2545 1791 985 4129 1403 3404 2840 4278 4816 3879 4383 1748 3825 1918 318 3085 1220 3999 1721 586 4726...

output:

6023852

result:

ok single line: '6023852'

Test #8:

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

input:

5000
3250 292 3039 505 923 1736 4016 4309 1776 340 1394 1127 2634 904 1962 2200 2189 271 40 3955 368 2355 3509 2616 3906 393 2929 4024 3542 4196 3690 2159 4982 1462 3446 791 296 2914 2359 3988 1807 1390 3599 1886 4975 1159 4919 4182 3257 2687 1259 3658 4264 4127 4682 3324 1071 1442 2620 3050 1492 45...

output:

6052818

result:

ok single line: '6052818'

Test #9:

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

input:

4956
1 2298 3 4 5 4379 7 8 2939 10 11 12 13 14 55 2965 17 2000 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 1281 42 43 44 45 46 47 48 49 50 51 1802 3140 54 15 56 9 58 4386 60 61 62 3971 64 65 66 67 68 69 854 71 1047 73 74 75 3450 77 3229 79 80 81 4640 83 2469 85 86 87 88 3109 19...

output:

2140898

result:

ok single line: '2140898'

Test #10:

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

input:

5000
1 2 3 4 5 6 3508 8 9 10 11 12 13 942 55 16 17 18 19 3889 21 22 23 24 25 26 27 28 29 30 31 4381 33 34 35 36 3904 38 39 40 41 42 2916 44 45 4867 47 48 484 182 51 52 53 54 15 56 57 58 59 60 61 62 63 64 65 66 693 2072 69 70 71 72 73 74 75 76 2513 78 79 80 81 82 83 1513 85 86 87 88 89 90 91 92 93 94...

output:

998354

result:

ok single line: '998354'

Test #11:

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

input:

4975
3968 2628 4973 4972 4219 4970 4969 4968 4967 4966 2689 4964 1699 3223 4961 1544 4959 907 4957 4956 1564 2372 1936 4952 2169 948 2894 4406 56 1422 917 4944 4943 3369 3808 1730 256 1607 3286 3514 2005 4934 2063 4932 3952 4930 399 2378 4927 3851 4925 4924 4923 4700 1634 202 1842 1691 2591 4916 491...

output:

8063550

result:

ok single line: '8063550'

Test #12:

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

input:

5000
3265 832 4998 4062 413 4995 2245 4993 853 42 4990 4989 4988 2748 4986 4985 4984 4983 3793 4981 4980 1137 4228 4977 4976 4975 4974 4973 4972 4971 4970 1743 2417 4967 4966 4965 1688 4963 1871 2300 569 4358 4006 4547 4956 4625 3337 4953 658 4466 3306 3723 1780 4210 4946 3919 4944 2408 3555 4941 49...

output:

8838440

result:

ok single line: '8838440'

Test #13:

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

input:

4949
4753 4061 288 2519 2986 1362 3821 3636 4837 1198 1466 4499 838 1156 1063 3766 4235 1016 3675 1896 398 3733 2469 560 326 1362 2924 4808 2132 346 4750 87 2314 1313 4840 835 599 2824 1007 3687 2933 3789 3153 4490 3729 960 864 635 1457 4251 2719 4495 4641 2707 2344 1919 464 854 2501 4618 4493 4186 ...

output:

6081091

result:

ok single line: '6081091'

Test #14:

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

input:

4987
247 2947 4787 1291 2055 997 1306 998 1178 4271 4762 4677 3481 3915 2540 823 2670 756 2415 2228 297 4563 136 101 708 1969 1314 1495 3999 1557 2679 1381 433 1641 1923 853 2431 4495 4386 4037 427 3739 2700 2203 1325 626 1827 3298 584 1748 4662 1674 3851 4011 3475 1594 2294 3970 1166 325 1464 1264 ...

output:

6162030

result:

ok single line: '6162030'

Test #15:

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

input:

4968
2 6 6 7 9 9 10 11 13 14 15 15 18 19 20 20 21 22 22 23 25 25 25 29 29 4868 34 34 35 37 2763 39 40 245 41 41 43 44 45 47 47 47 49 4214 1703 51 52 53 54 54 54 423 58 59 60 3225 62 63 65 1678 66 67 69 69 72 73 73 73 74 74 74 76 77 79 2998 81 81 83 85 4656 88 89 91 91 92 92 93 94 4939 96 97 98 98 99...

output:

778722

result:

ok single line: '778722'

Test #16:

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

input:

4936
3 5 7 2328 741 10 10 1098 11 15 17 17 17 797 18 19 4371 20 22 2660 543 4238 25 3467 30 31 31 33 35 615 36 36 37 38 41 41 2861 42 42 547 44 45 45 2109 50 1850 51 51 3490 55 56 57 380 1432 59 60 60 60 61 63 64 65 65 4591 1319 67 67 72 2455 76 76 1160 1727 79 4791 81 3577 1515 84 86 3241 2132 87 8...

output:

2080944

result:

ok single line: '2080944'

Test #17:

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

input:

4987
4987 4987 3950 4987 2215 4987 4986 4985 4984 4983 4982 4981 4981 4977 3395 4976 4974 4974 4056 4971 4970 3254 4968 4967 3800 4964 4964 4963 4963 4963 4963 4960 4959 4958 4957 805 4957 4955 4953 1169 4951 4951 4951 4949 4949 4948 4947 3091 4946 4942 4941 4940 4939 4939 4939 4938 4935 4934 4934 4...

output:

11122512

result:

ok single line: '11122512'

Test #18:

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

input:

4955
4955 4955 546 4955 4954 4953 4953 4952 1296 4951 4951 1042 4948 4946 1233 4943 4942 4942 2930 4941 4940 4940 4939 4935 4934 4335 872 4931 4820 4928 4927 4927 3151 3141 4926 1335 4596 4744 4921 4920 4920 4919 4919 4918 4916 4897 4915 290 4914 4911 4910 4909 893 4907 4906 1035 4903 4903 2966 4900...

output:

9253949

result:

ok single line: '9253949'

Test #19:

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

input:

5000
3083 3211 3002 4940 1816 3834 4779 1233 3446 3205 145 3247 2615 3539 2814 1423 2572 2634 4416 4286 2742 964 2125 2169 2510 1516 3407 2719 4331 2452 4143 2377 2265 4329 4258 2012 3425 1714 4606 3246 3198 3719 3607 2145 1721 4951 4339 671 2852 3874 346 983 3000 2488 2232 4273 3561 3168 1914 1130 ...

output:

6110232

result:

ok single line: '6110232'

Test #20:

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

input:

4999
3173 721 2615 4341 1859 3388 604 1739 1382 99 1974 1079 4696 2081 4071 1568 2544 842 2129 4468 1370 1895 4668 661 2602 3287 1940 2288 264 4768 4443 3033 3365 4547 1159 2385 2458 4364 4181 614 1325 3500 1615 776 1132 2062 4269 3050 4558 2558 734 2820 1476 460 684 2410 605 2958 1996 4585 43 4636 ...

output:

5990136

result:

ok single line: '5990136'

Test #21:

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

input:

5000
9 13 15 16 3807 4022 21 382 4241 25 4601 1725 29 33 4101 40 43 43 45 3500 50 51 3025 52 55 57 57 59 61 62 3865 4879 1188 69 70 315 72 1483 75 76 77 77 77 78 78 79 79 79 80 81 81 83 85 86 86 86 87 87 2285 89 90 92 95 96 97 98 99 103 103 3278 105 106 2853 3270 2919 111 112 113 116 3941 116 118 12...

output:

1434214

result:

ok single line: '1434214'

Test #22:

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

input:

4948
3 2512 14 582 1385 29 2417 33 4836 1393 4069 4473 42 2534 1355 47 2166 48 3464 475 53 3757 743 3476 4197 58 2644 701 4149 61 62 63 63 63 2411 3239 66 4318 1999 70 1604 4855 1433 79 79 79 3150 3253 831 81 82 359 1854 82 436 84 89 90 4344 3112 94 94 666 4098 3911 3373 3251 106 1188 467 4681 108 1...

output:

4401948

result:

ok single line: '4401948'

Test #23:

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

input:

5000
5000 1427 2453 1121 4934 4487 2013 3620 2153 895 4433 220 4575 4519 4138 3183 3461 5000 2410 5000 3331 4482 4568 1066 5000 925 2770 4653 4365 1762 1983 1360 175 4842 4651 5000 380 70 749 5000 1307 4999 4996 2131 3788 4994 666 3757 800 2544 4990 229 4986 1603 1135 4182 116 1092 1811 4979 269 497...

output:

7219666

result:

ok single line: '7219666'

Test #24:

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

input:

4967
4967 464 4237 4598 4967 2265 4795 841 1925 2063 3331 3657 2857 829 3166 4421 81 1406 2548 4967 3492 282 2904 4585 4967 2190 4967 4754 3111 3449 1683 1659 2879 1089 2657 4426 426 903 4962 4200 3662 2257 4727 1456 3533 2913 3276 4955 4358 3556 4951 4034 4948 4820 2312 1020 2689 1971 397 1053 3543...

output:

6670996

result:

ok single line: '6670996'

Test #25:

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

input:

5000
3933 815 976 1449 2956 3634 3606 5000 4803 514 3069 3551 1729 3690 3344 326 3267 5000 2574 5000 5000 2744 4904 4503 4161 1841 2400 2634 3628 3831 2669 4421 4575 5000 2859 1470 3609 4031 1431 3710 678 4068 1147 5000 1874 2477 2924 3428 5000 2978 3534 2011 3286 3838 3651 4042 2862 3982 2450 4614 ...

output:

3930344

result:

ok single line: '3930344'

Test #26:

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

input:

5000
4364 4739 3687 5000 4141 932 2227 5000 1601 3491 1582 1664 2979 5000 3642 2163 2048 5000 763 1553 3847 1791 2715 4174 5000 3923 402 4830 3686 3016 3360 4138 3583 4765 2991 3347 4081 1870 5000 4495 5000 1047 996 672 4328 2393 3290 2030 4394 4791 4062 4714 2868 2454 4853 1017 5000 1403 875 4493 3...

output:

3858699

result:

ok single line: '3858699'

Test #27:

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

input:

5000
1859 61 4631 89 3970 4233 120 124 1318 2867 1207 3595 1508 5000 172 178 1490 208 215 1361 2975 2119 233 234 2390 2077 237 5000 255 4459 3502 1438 5000 266 268 274 275 4656 300 300 2655 305 321 323 1512 1414 329 331 333 4200 3771 334 1719 4702 2656 1327 335 349 5000 354 3956 4663 372 5000 4290 3...

output:

1861237

result:

ok single line: '1861237'

Test #28:

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

input:

5000
29 30 4749 2322 73 901 97 3765 2018 3434 136 1681 152 4236 4016 178 5000 184 199 215 3483 3795 219 224 225 230 233 239 256 3996 3798 1843 262 265 5000 3826 281 1175 4923 289 2964 300 306 307 311 4556 322 323 4869 3645 334 337 2108 4024 2206 2948 360 480 362 363 1324 1712 2153 373 2205 1902 384 ...

output:

1817464

result:

ok single line: '1817464'

Test #29:

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

input:

5000
801 4573 4750 936 5000 4410 3584 4753 2779 5000 3083 4704 5000 5000 1344 5000 5000 5000 5000 4952 3265 2804 2169 2429 3252 3019 3195 4561 1397 5000 3077 4792 5000 2663 4202 5000 1529 2828 1103 2472 5000 2245 932 4997 2791 1545 4081 1589 3119 5000 5000 4818 4937 4110 4008 5000 5000 5000 5000 500...

output:

4721087

result:

ok single line: '4721087'

Test #30:

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

input:

5000
5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 4098 5000 5000 5000 5000 5000 5000 2550 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 5000 ...

output:

9442591

result:

ok single line: '9442591'

Test #31:

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

input:

4985
1732 4454 1964 4165 4325 4027 4952 3489 1847 3136 3066 4921 2748 1965 715 1176 4970 4868 1087 4753 3818 4358 1651 4736 4812 1879 4794 3336 4934 2667 4793 1685 4750 3821 4099 252 4924 3194 4690 972 616 4397 3542 4686 4328 4948 4798 3174 1875 3366 1727 4377 4790 1067 1385 4335 3944 1659 4364 1146...

output:

-1

result:

ok single line: '-1'

Test #32:

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

input:

4997
4997 4990 4994 4994 4989 4990 4965 4995 4995 4982 4994 4995 4997 4995 4996 4995 4993 4995 4995 4993 4997 4988 4994 4997 4994 4996 4993 4993 4993 4996 4993 4993 4992 4995 4994 4994 4993 4987 4811 4996 4995 4993 4995 4982 4922 4978 4994 4997 4996 4989 4993 4993 4995 4994 4996 4994 4994 4995 4994 ...

output:

5974

result:

ok single line: '5974'

Test #33:

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

input:

4994
4994 4993 4992 4991 4990 4989 4988 4987 4986 4985 4984 4983 4982 4981 4980 4979 4978 4977 4976 4975 4974 4973 4972 4971 4970 4969 4968 4967 4966 4965 4964 4963 4962 4961 4960 4959 4958 4957 4956 4955 4954 4953 4952 4951 4950 4949 4948 4947 4946 4945 4944 4943 4942 4941 790 4939 4938 4937 4936 4...

output:

12371389

result:

ok single line: '12371389'

Test #34:

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

input:

4935
4935 4935 4935 4934 4934 4934 4932 4932 4932 4932 4929 4928 4926 4925 4924 4922 4922 4922 4921 4920 4920 4916 4916 4916 4916 4915 4913 4912 4910 4910 4909 4909 4908 4907 4906 4903 4902 4902 4902 4901 4900 4899 4897 4896 4895 4895 4893 4892 4890 4890 4889 4887 4886 4886 4886 4885 4884 4883 4880 ...

output:

12005809

result:

ok single line: '12005809'

Test #35:

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

input:

5000
4985 4723 473 2490 4684 1912 1193 4988 4911 3652 2998 4351 4890 4150 4177 955 4827 4385 1160 3654 3361 4816 3368 2140 3996 4554 383 787 4267 3837 3628 855 4648 4578 2958 1244 834 942 2914 3693 4891 2393 1041 3838 4607 648 4705 4985 937 4320 4439 527 1199 4058 4555 4145 2689 1850 4594 1369 4959 ...

output:

-1

result:

ok single line: '-1'

Test #36:

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

input:

4965
4959 4955 4961 4965 4961 4961 4957 4963 4963 4890 4965 4958 4962 4964 4961 4961 4952 4962 4852 4960 4961 4956 4964 4955 4961 4964 4963 4963 4962 4964 4961 4963 4960 4965 4953 4959 4961 4958 4964 4961 4956 4958 4960 4965 4963 4964 4964 4965 4961 4964 4960 4953 4955 4959 4964 4960 4958 4958 4965 ...

output:

4221

result:

ok single line: '4221'

Test #37:

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

input:

5000
5000 4999 4998 4997 4996 4995 4994 4993 4992 4991 4990 4989 4988 4987 4986 4985 4984 4983 4982 4981 4980 4979 4978 2794 4976 4975 4974 4973 4972 4971 4970 4969 4968 4967 4966 4965 4964 4963 4962 4961 4960 4959 4958 4957 4956 4955 4954 4953 4952 4951 4950 4949 4948 4947 4946 4945 4944 4943 4942 ...

output:

12376477

result:

ok single line: '12376477'

Test #38:

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

input:

4974
4974 4974 4974 4974 4974 4972 4972 4970 4969 4969 4968 4968 4966 4965 4964 4964 4962 4961 4960 4959 4958 4958 4957 4957 4956 4952 4952 4035 4950 4950 4949 4949 4948 4947 4946 4944 4943 4943 4942 4940 4940 4940 4936 4936 4934 4932 4932 4932 4931 4931 4927 4926 4925 4924 4924 4924 4923 4922 4921 ...

output:

12263055

result:

ok single line: '12263055'

Test #39:

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

input:

5000
3557 2372 2696 2829 2297 4872 4668 688 3571 3661 2341 3281 1699 4212 2163 3378 2776 2968 457 4348 1791 1154 4765 4041 4116 4449 1477 2921 3293 2463 1391 3351 4725 2624 4519 2489 2132 2923 2244 4066 3405 4409 4753 3849 2738 3315 2190 3011 4420 2382 362 3129 3934 4931 3944 2136 4951 4478 3406 405...

output:

2827621

result:

ok single line: '2827621'

Test #40:

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

input:

4977
3820 3674 4917 2197 1897 1297 4600 3693 3828 3531 4750 3938 3468 4428 2005 2539 4352 3650 1928 3111 3455 2893 3433 4625 435 323 4612 1097 3714 4397 4889 4023 3975 3307 4772 1073 3645 2154 1845 1834 2828 4177 3735 3931 4753 4496 4662 4426 4312 2474 4402 3985 2010 4628 4712 4097 4205 2627 4857 28...

output:

2836474

result:

ok single line: '2836474'

Test #41:

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

input:

4944
3015 4396 4571 4791 2738 3846 4018 2560 2176 4741 3652 1722 3366 2965 2153 3406 4058 4629 1985 3554 4764 949 1811 543 1591 2765 2553 2943 4432 4279 4455 4588 1306 2176 3100 879 4346 4592 4687 3765 4852 2556 3570 4821 3450 299 3901 4712 4006 4581 1956 3349 2181 2481 4429 3193 1095 3575 4308 3619...

output:

-1

result:

ok single line: '-1'

Test #42:

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

input:

5000
4663 4917 3889 1496 3656 3599 4030 4328 2703 255 3169 3830 3826 3928 4685 4223 1653 3909 4651 3250 4602 2536 4566 4889 3990 4285 2578 3884 4666 3759 4485 4451 4871 3337 4617 4858 4704 3475 4231 4858 3955 4075 3743 4489 4982 4938 4757 2794 2789 3863 4060 3774 2126 2524 2795 4317 4426 3002 3469 1...

output:

2857606

result:

ok single line: '2857606'

Test #43:

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

input:

5000
2754 825 2208 3463 3976 3571 4903 2716 2583 2874 3159 917 3557 4596 3681 3151 651 1852 2157 4698 4509 1019 2605 4884 3094 2686 3233 3685 4934 2019 3514 2698 3938 1862 4107 4591 4040 2570 3411 4831 3738 4578 4746 2914 3096 1909 1246 4799 2742 4755 3884 4814 4642 2520 3153 4354 4015 3524 2641 164...

output:

-1

result:

ok single line: '-1'

Subtask #2:

score: 8
Accepted

Test #44:

score: 8
Accepted
time: 64ms
memory: 13764kb

input:

200000
187854 166873 153188 194198 161855 139184 135537 79143 179076 153531 163145 109919 145007 182658 148316 58038 169563 190096 175746 91085 105904 78116 148480 151122 167290 127986 185705 85945 140456 177839 88493 159377 150625 175214 117144 91901 134732 159929 156208 186894 190469 171280 185391...

output:

2750141541

result:

ok single line: '2750141541'

Test #45:

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

input:

199679
187452 163552 174211 164715 172100 177434 173091 56246 76855 192400 157493 53716 199391 123498 117375 169302 175503 182005 62229 197413 182745 173096 154043 183094 162377 79013 145132 69400 195293 198834 135744 195557 164758 189870 166141 182831 128661 147112 161864 178366 189630 198489 19598...

output:

2745169193

result:

ok single line: '2745169193'

Test #46:

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

input:

200000
196882 433 1118 1135 171226 179754 1423 1650 1944 2120 2161 2198 87574 2496 35552 159491 2626 2806 107582 184050 71103 141725 3361 3385 3414 3508 3615 114468 3693 3705 3732 3762 159198 3826 3874 3950 199499 3965 187744 3996 4034 4094 4177 4350 193839 4391 195162 4496 4547 4561 4652 4723 4732 ...

output:

882604376

result:

ok single line: '882604376'

Test #47:

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

input:

199799
309 500 595 72527 198697 196428 1541 1596 161791 75908 1833 1902 106480 1941 196520 2201 147433 2253 2383 148948 2634 161220 2889 3098 3114 110503 3257 3395 3513 113456 190686 149769 199629 3747 3882 3894 3946 4066 4355 159910 4431 93665 101846 160679 150269 195523 4796 4896 4912 4960 5012 16...

output:

970824740

result:

ok single line: '970824740'

Test #48:

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

input:

200000
111805 110408 200000 114806 200000 197951 177495 159022 142484 200000 10317 135899 182392 200000 125754 200000 144602 173149 147547 199999 199999 199999 146419 122966 199999 199999 199999 140417 80834 199998 178091 49558 187008 199998 174373 120621 197830 199997 199899 199997 199997 67841 190...

output:

4499414954

result:

ok single line: '4499414954'

Test #49:

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

input:

199920
104102 199920 199920 153144 199220 199755 199920 199920 199920 199920 125995 199920 199920 199919 199919 130829 132896 182920 199919 195607 199919 199919 199919 144949 197733 189948 194749 199918 199918 199918 199918 199918 199918 166368 169302 199918 193924 199917 199917 199917 178351 178982...

output:

5578535372

result:

ok single line: '5578535372'

Test #50:

score: 0
Accepted
time: 48ms
memory: 16736kb

input:

199786
71552 10418 166231 146825 32846 35852 94824 112539 113907 102067 166456 86733 97617 156787 9616 53169 195315 6867 66180 10530 21813 50073 37495 91542 173753 135341 164614 199596 153250 141888 160965 109669 25358 125211 65407 95213 116659 173424 11027 82397 17572 193767 104258 199377 103506 12...

output:

9960852688

result:

ok single line: '9960852688'

Test #51:

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

input:

200000
176346 34632 50529 15411 38930 158560 177716 50164 131029 16670 35110 60004 126547 12663 86323 101259 103279 189713 119216 147463 115562 146335 79981 34941 80904 194492 189491 126278 75069 127055 102089 129330 144459 110546 138815 132937 62227 197176 116393 23529 33396 117242 98129 39188 1768...

output:

10008646979

result:

ok single line: '10008646979'

Test #52:

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

input:

199907
1 2 48130 59007 5 186750 115928 8 131550 10 136756 12 13 150246 183500 16 197968 18 115963 187977 48700 22 86508 151989 120227 26 27 28 29 143453 31 32 33 51075 35 138878 37 126443 39 93644 41 42 43 44 45 115324 47 184767 49 167965 51 52 107288 54 55 56 57 95252 59 60 61 64453 63 111251 16166...

output:

5500783655

result:

ok single line: '5500783655'

Test #53:

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

input:

200000
1 68558 3 4 5 6 7 8 9 10 11 12 13 14 126073 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 185970 32 33 34 35 36 37 58911 39 40 41 42 43 44 45 46 47 2027 49 50 51 52 53 45510 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 35570 2036 73 74 75 76 69105 78 79 80 81 161475 83 84 85 86 87 88 89 90 ...

output:

1369747995

result:

ok single line: '1369747995'

Test #54:

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

input:

199580
199580 199579 199578 199577 199576 199575 43150 199573 199572 199571 199570 10221 199568 123372 199566 199565 199564 161017 199562 64134 199560 160773 199558 199557 15272 112177 73034 199553 199552 97373 119927 3662 93230 57820 199546 199545 153469 182364 199542 199541 199540 199539 199538 19...

output:

14790571015

result:

ok single line: '14790571015'

Test #55:

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

input:

200000
131995 123186 199998 199997 61934 199995 199994 199993 199992 184450 199990 199989 104353 199987 143232 168226 199984 199983 199982 199981 171502 22666 17567 199977 165601 93971 188497 85974 199972 187335 199970 103775 65687 199967 199966 194852 90624 199963 199962 40987 135645 130286 144287 ...

output:

14149550202

result:

ok single line: '14149550202'

Test #56:

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

input:

199862
152527 25626 139400 22972 90689 47365 62664 18305 128290 193170 154886 12686 168507 35560 5446 160035 122633 174748 97241 69793 190493 183677 67286 105049 158961 11675 164571 57257 123222 39884 24682 174003 40548 105187 13739 53764 194846 134758 799 97861 125293 127590 3551 190595 196687 1396...

output:

9979435554

result:

ok single line: '9979435554'

Test #57:

score: 0
Accepted
time: 70ms
memory: 14476kb

input:

200000
158582 72932 139305 133429 154937 13650 57784 125474 100299 54504 90216 172977 140940 1092 36019 48233 199581 44003 77619 12896 69344 177645 58152 2432 171677 6137 32162 179730 120721 158016 23959 76832 94267 43098 49539 82450 166006 149345 50930 173713 159406 53362 144549 166540 54523 185501...

output:

9992860673

result:

ok single line: '9992860673'

Test #58:

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

input:

199983
93349 45659 175144 62150 110014 65479 105386 165720 40391 14 130226 17 153893 192745 82753 57806 117670 174154 121394 196784 24 17783 38069 31 137271 65228 48405 171902 62642 170582 192495 62009 177061 143619 160079 6162 35968 42 151401 164176 157260 59422 91818 161399 49 126814 50 42119 1721...

output:

8746824280

result:

ok single line: '8746824280'

Test #59:

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

input:

200000
3 158212 7528 9 11 174557 106179 1756 113576 15 16 87170 17 105175 20 22 23 23 23 24 25 26 26 75439 30 31 35387 172296 35 36 39 39 40 41 41 15415 43 189833 45746 181408 144135 44 45 77306 156419 167079 50 128420 185376 7519 102756 58 145411 138889 61 62 62 181174 63 63 162852 65 69 69 69 71 1...

output:

4979465210

result:

ok single line: '4979465210'

Test #60:

score: 0
Accepted
time: 41ms
memory: 14516kb

input:

199656
199656 199656 199656 199656 199656 199655 199655 199655 199654 199649 199648 199648 199647 199647 120420 199645 199644 199644 199644 60513 55301 199641 199641 199641 199639 199638 199635 199633 199632 199632 199631 199629 199627 199626 199626 199625 199623 199623 199623 199618 42199 199617 19...

output:

19043816879

result:

ok single line: '19043816879'

Test #61:

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

input:

200000
200000 200000 167708 200000 200000 200000 199999 199998 199997 48760 32974 199995 199995 160871 199992 158004 113536 199988 161514 193202 199983 199983 113255 199983 165828 41604 199978 199978 199976 199975 199975 76247 97329 77207 90007 149606 199969 101411 199968 130207 140323 199965 9710 1...

output:

14942199470

result:

ok single line: '14942199470'

Test #62:

score: 0
Accepted
time: 80ms
memory: 14384kb

input:

200000
191511 26795 123707 92798 120140 165034 171708 21811 60677 170779 82292 164935 111845 154729 51221 188930 196714 119103 175194 49876 73202 67766 91913 137632 102986 54387 172315 125687 11659 122905 183080 130839 55478 102317 87419 89826 199861 187015 168749 197430 184658 89181 745 19938 7050 ...

output:

9955528896

result:

ok single line: '9955528896'

Test #63:

score: 0
Accepted
time: 68ms
memory: 14360kb

input:

199906
87889 15949 193140 93629 51565 65251 148818 76360 179788 58085 133143 159865 102540 70574 175827 116769 85288 195560 104562 121068 113727 196639 54990 134650 174483 19752 180033 56298 81149 192496 162735 16776 115592 101404 166281 7948 131695 147206 106138 137990 196571 163935 140344 127391 7...

output:

9945261494

result:

ok single line: '9945261494'

Test #64:

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

input:

200000
21 42 51 55 68 93691 188996 164041 81 81 54310 62498 94 103265 114453 66890 155577 101824 167199 117 151261 73757 133 172795 242 188833 139 36360 148 151227 66744 154 20224 180627 131401 37442 159 62191 189295 167635 140350 176 177 178 134510 182 61772 86971 187 187 103708 100887 206 194158 1...

output:

6662141819

result:

ok single line: '6662141819'

Test #65:

score: 0
Accepted
time: 70ms
memory: 14352kb

input:

199580
27 46762 101176 49 51 54 163662 46177 65 73 75 135849 89 94 100 6363 107 107 193430 122 30971 132 198522 44568 135 135 112420 144 148346 139099 139768 159 160 161 163 164 26427 165 78065 171 173 30860 107616 177 28330 180 188 190 195 201 64721 22092 203 53707 211 213 86700 160058 143613 221 1...

output:

4284609631

result:

ok single line: '4284609631'

Test #66:

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

input:

200000
149771 130952 42717 19761 200000 200000 200000 200000 135673 68432 200000 142950 200000 59856 200000 17325 167432 200000 200000 21865 21474 200000 200000 194975 57563 200000 17674 200000 200000 50793 111399 129777 200000 101516 200000 200000 200000 42554 200000 200000 89169 200000 200000 2000...

output:

13221322451

result:

ok single line: '13221322451'

Test #67:

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

input:

199700
165282 167825 12692 194632 44298 199700 60329 199700 119100 140017 89825 33608 199700 199700 111460 89725 144143 67825 138243 69875 86203 29834 199700 199700 199700 199240 64033 52645 128830 132899 16980 148400 199700 9730 195101 135853 111220 24638 196507 142615 199532 27977 199700 121910 16...

output:

11117314112

result:

ok single line: '11117314112'

Test #68:

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

input:

199567
179382 69622 199567 198106 199567 67202 199567 151720 92426 44145 174664 53373 38423 56281 199567 128434 194555 108036 176828 199567 199567 60809 107127 199567 95747 199567 149460 117839 51446 198403 199567 104193 6843 134837 158208 47544 174030 31164 96000 81136 111464 177517 65064 107365 11...

output:

6179565187

result:

ok single line: '6179565187'

Test #69:

score: 0
Accepted
time: 70ms
memory: 14120kb

input:

199982
199982 159344 133482 103731 176494 190806 66963 171345 133424 199982 55103 54022 100335 149609 199982 136760 181317 84523 167616 130072 69945 30146 147457 53362 167910 199982 188691 156939 26455 122731 190665 192369 95386 190167 148012 197385 186633 85952 128264 56597 124772 140202 105291 199...

output:

6201277610

result:

ok single line: '6201277610'

Test #70:

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

input:

199687
195 88067 158910 162412 199687 66353 199687 114353 187565 149214 199687 169695 1131 62473 12492 1258 39414 46520 139204 146109 112038 1831 41706 139412 1897 35108 186650 2000 199687 199687 2022 2023 101816 157113 2091 123792 112400 153853 178975 25976 172926 63653 4907 68275 116299 2301 2332 ...

output:

4527586602

result:

ok single line: '4527586602'

Test #71:

score: 0
Accepted
time: 70ms
memory: 14168kb

input:

199655
220 233 62798 199655 397 441 79263 553 133206 607 52566 678 848 193344 26201 83048 191414 36452 1097 110556 1155 1163 198907 199655 105558 1324 1342 156887 53884 145588 39844 102153 1645 175252 1718 1731 71369 22538 1832 1864 1891 100297 2034 85006 2056 66165 171979 2123 162900 2280 2300 6733...

output:

3317205082

result:

ok single line: '3317205082'

Test #72:

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

input:

199807
199807 199807 199807 199807 199807 199807 199807 199807 199807 199807 199807 199807 199807 40585 199807 199807 199807 199807 199807 199807 199807 199807 199807 199807 199807 151001 199807 199807 199807 199807 199807 199807 199807 199807 199807 199807 199807 199807 199807 199807 199807 199807 ...

output:

14127408404

result:

ok single line: '14127408404'

Test #73:

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

input:

199776
199776 199776 199776 199776 199776 72427 199776 77382 199776 199776 40747 44954 197779 166489 130426 68410 199776 73516 96419 169302 199776 199776 91829 199776 54845 166526 69268 51265 123047 133213 199776 199776 105436 199776 127954 165438 146612 199776 101858 73362 198480 77467 159588 19977...

output:

8169075638

result:

ok single line: '8169075638'

Test #74:

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

input:

199643
59364 169997 197648 84508 134179 176249 86993 179905 196892 115145 163620 199637 107868 79000 114953 197070 116376 122764 74007 171738 120807 123510 92914 197513 82720 69980 117939 128871 199295 180907 133799 92268 196895 133301 113805 115564 128581 97904 187506 90803 105943 112634 132995 116...

output:

-1

result:

ok single line: '-1'

Test #75:

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

input:

200000
199997 199991 199990 199995 199997 199997 199999 199996 199997 199996 199964 200000 199996 199987 199995 199993 199966 199958 199995 199997 199991 199997 199998 199999 199997 199997 199999 199997 199998 200000 199990 199998 199996 199995 199999 199997 199999 199999 200000 199992 199997 199994...

output:

102441

result:

ok single line: '102441'

Test #76:

score: 0
Accepted
time: 29ms
memory: 16676kb

input:

199700
199700 199699 199698 199697 199696 199695 199694 199693 199692 199691 199690 199689 199688 199687 199686 199685 199684 199683 199682 199681 199680 199679 199678 199677 199676 199675 199674 199673 199672 199671 199670 199669 199668 199667 199666 199665 199664 199663 199662 199661 199660 199659...

output:

19903935198

result:

ok single line: '19903935198'

Test #77:

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

input:

199776
199776 199776 199776 199776 199776 199776 199775 199774 199774 199772 199770 199769 199767 199766 199766 199765 199763 199762 199762 199761 199760 199760 199758 199757 199755 199755 199754 199753 199753 199752 199750 199749 199746 199745 199745 199745 199744 199742 199741 199741 199741 199740...

output:

19916750667

result:

ok single line: '19916750667'

Test #78:

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

input:

200000
69631 199772 89366 128193 182960 77791 179011 152376 177533 78125 198303 161413 176186 181123 76990 199925 138230 199522 190125 79020 191948 61047 196786 181966 168135 64970 171230 176614 182658 59799 60467 197943 191442 65997 77386 156780 199959 175716 189900 154669 76141 141449 89341 89537 ...

output:

-1

result:

ok single line: '-1'

Test #79:

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

input:

200000
199997 199974 199995 199998 199993 199994 199999 199993 199993 199999 199998 199992 199997 199996 199991 200000 199995 199996 199998 199999 199993 199998 199998 199997 199997 199998 199997 199994 199997 199974 199998 199999 199990 199996 199996 200000 199995 199998 200000 199995 200000 199998...

output:

263170

result:

ok single line: '263170'

Test #80:

score: 0
Accepted
time: 40ms
memory: 16748kb

input:

200000
200000 199999 199998 199997 199996 199995 199994 199993 199992 199991 199990 199989 199988 199987 199986 199985 199984 199983 199982 199981 199980 199979 199978 199977 199976 199975 199974 199973 199972 199971 199970 199969 199968 199967 199966 199965 199964 199963 199962 199961 199960 199959...

output:

19957177270

result:

ok single line: '19957177270'

Test #81:

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

input:

200000
200000 200000 200000 200000 200000 199999 199999 199999 199998 199997 199995 199993 199992 199991 199991 199990 199990 199989 199988 199986 199986 199986 199983 199981 199980 199977 199975 199975 199975 199975 199975 199974 199973 199973 199971 199971 199969 199969 199968 199965 199962 199961...

output:

19989179949

result:

ok single line: '19989179949'

Test #82:

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

input:

200000
146023 72419 196966 135706 93736 175560 50970 169029 133015 93185 28757 174954 191695 105063 139641 103789 30596 163067 197952 132904 182551 85471 192352 168922 113314 138518 27714 88416 122251 149041 195494 166746 171736 192662 196029 86049 179073 175663 157978 93752 156346 156980 107723 125...

output:

4532308121

result:

ok single line: '4532308121'

Test #83:

score: 0
Accepted
time: 69ms
memory: 14100kb

input:

199762
153037 169980 107497 156845 136827 168766 155508 160086 194676 115816 163353 121459 111044 61692 135017 85152 165204 111539 96993 105391 134001 81436 185222 63234 94305 178878 99628 106814 182467 97468 151843 170583 172472 110081 148153 85285 38443 81737 31921 176935 192397 151985 196164 1375...

output:

4524782259

result:

ok single line: '4524782259'

Test #84:

score: 0
Accepted
time: 74ms
memory: 14100kb

input:

200000
8938 118991 132619 143983 85049 82306 173513 85842 70883 74955 113028 179452 134931 85204 145770 186776 151611 90875 157243 12877 188741 170351 196326 85444 176658 140877 121972 173914 105691 153353 124825 113757 97304 109313 185473 193476 164651 192334 147785 152808 185412 153386 196865 1823...

output:

4509547613

result:

ok single line: '4509547613'

Test #85:

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

input:

200000
89181 171258 113320 132882 157451 169540 100673 137689 191598 143264 132895 179849 66047 195063 140920 124232 121698 188641 168277 181440 129346 165935 160924 181497 91172 99491 41642 122212 168105 108250 148249 91005 80248 161102 74200 74855 195697 108046 60160 172626 53618 189759 136418 164...

output:

-1

result:

ok single line: '-1'

Test #86:

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

input:

199668
38644 147211 120062 30273 182052 92812 177811 151174 138669 187964 59048 135575 186161 136964 122816 186586 105372 133344 124329 117748 168800 8123 20431 135012 105379 197248 174482 46231 185209 193430 144274 110172 174254 162916 116634 113428 116239 131941 171160 186320 77986 76832 135269 18...

output:

4523343406

result:

ok single line: '4523343406'

Extra Test:

score: 0
Extra Test Passed