QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#776698#2529. NeedlenanikaAC ✓22ms16632kbC++201.9kb2024-11-23 20:18:472024-11-23 20:18:47

詳細信息

Test #1:

score: 100
Accepted
time: 14ms
memory: 16032kb

input:

100
-71 -146 -137 -184 -174 -88 -43 -169 -126 -48 -68 -20 -78 -57 -191 -138 -70 -147 -103 -150 -152 -79 -156 -49 -22 -151 -31 -19 -10 -91 -194 -109 -148 -157 -7 -154 -26 -144 -53 -140 -122 -145 -38 -56 -8 -188 -123 -117 -11 -142 -61 -84 -120 -33 -89 -171 -105 -59 -60 -130 -114 -36 -82 -12 -177 -13 -...

output:

1223

result:

ok single line: '1223'

Test #2:

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

input:

100
-40 -78 -88 -81 -14 -47 -9 28 -62 86 61 71 -95 62 97 80 -8 -44 -52 76 13 14 -93 43 23 -21 -37 -33 -85 -29 16 -39 45 48 77 -49 -67 32 -83 83 36 -28 -87 -86 -76 -5 -46 -80 -4 58 -66 9 10 26 -45 -16 56 -50 40 -65 57 -89 30 92 -79 93 73 8 85 24 46 -75 96 29 -1 -100 79 12 -12 -10 -69 -20 -48 -71 20 -...

output:

437

result:

ok single line: '437'

Test #3:

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

input:

1000
-5991 -3571 5600 -1127 -3420 -4551 752 669 -9030 -5885 -639 6593 -9144 5008 -92 -4900 4506 5240 1748 149 2294 -1975 -6329 7565 9076 8683 3153 4918 15 -4742 -3638 -2162 -3860 -3844 -8760 2094 8695 8260 4665 -5955 423 6676 7960 6441 -5415 -9091 -5921 9389 -527 -9979 -5294 7531 410 -6793 -9058 -25...

output:

499098

result:

ok single line: '499098'

Test #4:

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

input:

10000
-24873 -11800 -15593 -18587 -29660 -26233 -16281 -23195 -20826 -27156 -15462 -14208 -12640 -18171 -19519 -13893 -23308 -12651 -14770 -11127 -20175 -22273 -28433 -15971 -14060 -26144 -12100 -16728 -28356 -24547 -16091 -13456 -14096 -10086 -27453 -28189 -21443 -16262 -16073 -25642 -22251 -13011 ...

output:

25004378

result:

ok single line: '25004378'

Test #5:

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

input:

10000
-2108 -849 -1893 -726 -1521 -1062 -562 -4555 -4694 -1014 -1756 -3426 4821 -4561 -2102 -976 -75 -1537 -4712 -1711 4622 -4796 1511 3821 -4536 -4227 -803 -65 1024 1159 -4729 -360 -2295 -2191 -2562 4542 -2526 1431 4537 -639 -3908 2581 2909 1767 438 3713 4381 -1805 1236 4436 3279 4049 4822 -3866 59...

output:

49015780

result:

ok single line: '49015780'

Test #6:

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

input:

10000
-4843 -5091 3097 5002 -7161 -4527 4529 9685 -8026 2125 -4815 4688 6876 2544 -337 -2423 -4370 -4491 9049 -4551 2173 -7994 8591 -595 -989 8365 7223 807 -6001 7380 3309 7051 -6395 1319 5845 274 4309 9453 -7754 -1720 8349 -7488 -3259 1710 -1917 9231 -8746 9939 -8277 -363 -3243 -1661 8477 -3822 -10...

output:

49954931

result:

ok single line: '49954931'

Test #7:

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

input:

20000
-210 156 -4489 -4077 -2133 6696 -435 -3778 -4599 -4196 6330 7029 -9902 4458 5945 7088 -7721 -6854 -7075 -6773 8361 -9582 -5689 -3231 -7207 -7112 8089 5503 -10032 -8409 -5897 8729 195 -9421 -7893 8627 -9292 1766 7619 2718 -1264 -128 -9086 8886 4991 7153 -7814 3818 -6857 75 -7913 4578 2746 2492 ...

output:

148558302

result:

ok single line: '148558302'

Test #8:

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

input:

20000
504 75 -8251 2409 -3087 -2145 -7736 8130 6135 -5318 -9678 1946 -9804 -2493 -4140 3499 2097 8829 -1009 3206 3733 -9867 -5631 -3354 3014 -4374 519 -2600 8012 4881 -6831 3864 -578 -2590 -590 -3925 -6737 -854 -9441 -8101 2088 -2577 1837 7758 -5244 3578 -6871 4516 -4035 8027 -572 -6191 -5576 -5103 ...

output:

197882484

result:

ok single line: '197882484'

Test #9:

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

input:

20000
14948 -9728 6099 3475 -2938 9845 -2511 8898 4696 10146 1959 -4748 -6251 8102 -12812 9729 244 -6057 -1464 7873 -6183 10451 -13245 10418 -4440 4006 10001 -12037 -14992 53 13372 -13246 -381 -7237 11212 -712 -2120 -1334 14951 9640 10416 1810 267 12743 -10598 1547 3733 2878 -356 14766 4674 -9997 -6...

output:

133123116

result:

ok single line: '133123116'

Test #10:

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

input:

1
1
1
2
1
1

output:

0

result:

ok single line: '0'

Test #11:

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

input:

20000
-8567 -2482 -17951 -13866 -9895 -13965 -5175 -15842 -12459 -13940 -5045 -19615 -6981 -7114 -5073 -19851 -8112 -7104 -9979 -14951 -5417 -3067 -11873 -18050 -12123 -12038 -11414 -6414 -2374 -15446 -9498 -18765 -6889 -7051 -18256 -10680 -13764 -14954 -9816 -17117 -6824 -3327 -18038 -4162 -2794 -7...

output:

39330

result:

ok single line: '39330'

Test #12:

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

input:

20000
-15795 17483 -10810 3116 -11184 5614 -11387 -4810 -18074 2682 -6521 13444 15019 9195 10950 5863 17328 11285 4503 -437 -5128 -5507 -2136 -13994 -3698 -14104 16952 -1085 9398 -3612 -9397 -3355 7385 -12295 12725 15993 -1297 6960 -11940 7136 -2733 10146 -16515 12590 2959 -4590 -11069 -8871 12310 -...

output:

125466298

result:

ok single line: '125466298'

Test #13:

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

input:

25000
5277 5819 11716 -1532 2964 -475 -3974 9221 6160 7075 -10008 7936 -9677 4966 -6164 -385 -7138 -10788 -747 -3171 9762 9962 -3659 -10123 -1960 -3338 -6971 -5870 11917 10705 -8148 -10970 10914 -973 12368 -8550 8998 3810 -4964 6483 7513 9083 995 10545 -5887 -2160 -10743 1026 6482 -6876 -5607 12126 ...

output:

311161671

result:

ok single line: '311161671'

Test #14:

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

input:

25000
-397 3625 -7305 50 8997 -10678 2325 4238 9577 2994 -1109 4468 -1024 9187 2747 8923 -12538 11430 -12684 8407 -5816 4545 -113 6091 -4796 -9848 -7112 3384 -8289 496 2020 11139 12395 -826 -12663 -9000 -6899 -6152 -2879 -7297 718 9375 -8189 -150 1032 5767 1699 -8052 -420 -12040 10478 8795 -12802 -8...

output:

300746635

result:

ok single line: '300746635'

Test #15:

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

input:

30000
-10193 -1985 -85 -3605 -2290 3131 -13841 12625 13111 -13694 8822 3353 2213 15364 -7203 8375 13879 -14277 9383 3829 5617 10855 -8024 -6171 15926 13792 12639 -6765 -8198 -13270 -13315 -6719 -4978 -11316 8243 2404 -8559 -4057 9297 -5038 1100 14904 -12450 10167 13566 -10138 -11978 -8900 15405 1516...

output:

2803005

result:

ok single line: '2803005'

Test #16:

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

input:

30000
-1333 -1461 117 -6061 -11231 7469 -10211 12633 12580 15905 -16786 -14676 -9254 15153 -10450 -8598 11376 -2007 -4239 -14461 -4236 -13500 -10799 -16394 6088 -7178 16643 6822 -8281 -14117 -9430 -16547 -7585 -8962 12501 725 13704 -3908 -56 6129 -1093 -3153 -13497 13499 9924 -11548 -1257 11776 2942...

output:

111696189

result:

ok single line: '111696189'

Test #17:

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

input:

30000
12853 -11479 -14397 11741 10047 14211 -7682 -9047 8582 12921 -12595 -5596 4449 -9396 -3376 -8081 -158 13931 -6053 -3895 -1054 5039 -6528 -8682 8612 9342 -9311 -13939 -7921 -5850 10583 -2619 -3213 4754 -10227 3489 -12734 -5011 -378 8652 11344 -2440 6551 9185 8410 10228 12874 -333 -603 3531 1437...

output:

448589614

result:

ok single line: '448589614'

Test #18:

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

input:

30000
16752 -17336 19174 -15195 -7879 13104 -4988 2806 -19920 -7248 11449 -4843 13036 13684 -17586 -15148 -17256 10928 14818 -15509 7621 -13161 2925 -4977 14544 -19870 9236 -12364 2803 -15031 -11443 -2266 17285 -1925 -11354 -16946 14955 13461 -3435 -18481 -6079 -6776 -10382 16077 14327 1329 -6585 -1...

output:

338480682

result:

ok single line: '338480682'

Test #19:

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

input:

30000
-1877 -5448 -13771 7563 -611 -8700 -11453 -11229 9571 -10902 7207 -8243 -18141 -18585 4184 -1431 5121 -7303 -381 9176 4908 -14381 -7869 6852 8681 -15080 -10637 -8853 -13791 -16817 4336 -410 -19344 1332 6749 -6560 -11504 -5540 9664 -1502 -6990 -14058 -12082 2335 -16448 -15266 7200 7050 -15139 5...

output:

349843699

result:

ok single line: '349843699'

Test #20:

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

input:

40000
-1236 20724 16312 -15120 -16038 11620 -20081 -3320 11730 -18658 -19181 20664 -7123 19343 -7740 -7258 -9760 -12602 -14176 -19477 2889 -20951 -5462 -19023 -10961 10686 17926 4972 -6499 -3749 5353 -10750 7571 -3672 14434 9630 16621 14786 -16818 4970 -7772 11635 -17351 9596 11422 11254 -8062 17130...

output:

762170841

result:

ok single line: '762170841'

Test #21:

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

input:

3
4 -3 2
2
4 1
3
-3 4 0

output:

2

result:

ok single line: '2'

Test #22:

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

input:

40000
6501 -415 24549 -15803 2092 11100 -11977 -17777 -25051 6112 18381 -14332 -11752 9531 -8128 16030 -29277 -22604 -5805 2143 15825 15592 -4703 -28514 7623 -9702 13324 14770 -7460 -4440 8051 2844 -19383 -21381 -25528 16675 -23278 -373 -1981 8485 -21493 9631 12666 -11809 25412 7911 1648 25176 -1647...

output:

533782879

result:

ok single line: '533782879'

Test #23:

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

input:

50000
210 -7524 -21821 6936 23053 17287 -10122 15638 -28989 14876 -4608 -3074 -6167 -7347 -26690 -16278 -11232 -20504 7125 -28423 -19612 -18980 -9807 7973 -3755 13222 -12757 24973 -2979 16008 7434 21778 26539 -13670 -8034 -19520 5847 8209 -27557 27971 24553 17159 28097 6234 23275 -10369 18830 29444 ...

output:

1041059786

result:

ok single line: '1041059786'

Test #24:

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

input:

6000
980 1498 -803 -1812 57 470 2656 2494 427 -2017 1257 -664 -1 1152 -1411 1093 2660 2947 -1150 -1216 2536 312 -2763 591 -1397 1410 -2820 -2247 1784 1572 -1628 2923 2402 -2836 -2503 -2653 -362 -1997 -1234 375 -2371 139 -2109 1823 1246 -685 19 1496 -1659 -1546 -1752 927 -705 1599 -1140 -159 -1503 -7...

output:

17924045

result:

ok single line: '17924045'

Test #25:

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

input:

6000
-2798 1885 446 -1113 -481 -2803 1866 832 1145 -1663 885 310 1303 -656 -1209 -2788 -349 -289 423 -2584 -2060 -464 -1509 -2035 -577 1014 1446 -227 1871 -1652 2964 2035 -692 -1956 145 878 -1622 641 -1003 1418 -1840 872 -290 -835 47 -1511 -1686 -1774 2512 611 974 2639 -2953 430 123 -1864 -79 -233 -...

output:

9699780

result:

ok single line: '9699780'

Test #26:

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

input:

7000
-2740 1997 2889 -970 2732 -2695 1630 -311 3665 -1711 -2691 3240 546 2471 -591 -409 2143 949 -2635 -2510 -903 1837 -1454 217 -742 -2798 2239 -3599 -3783 1115 -2566 -2521 2414 -2364 2397 -307 -1689 2119 2644 -3571 -3353 -3690 1743 1350 2710 -1230 -874 603 2061 2412 1385 2015 -3040 1424 -2293 1475...

output:

21226324

result:

ok single line: '21226324'

Test #27:

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

input:

8000
-2121 423 -1718 -1601 2532 2155 -5493 478 109 -2045 -4600 -5197 -1481 1388 -3751 -5316 1960 -2937 -5150 -4812 -1892 144 1897 -4987 1000 -1556 -2867 -4853 749 1912 -5377 -3923 -5272 274 -4527 1207 -2865 -911 1104 -1885 -4794 -4923 1581 -2861 -1087 -507 -4074 -1052 1597 1976 -3694 -4592 -3980 532...

output:

31035809

result:

ok single line: '31035809'

Test #28:

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

input:

10
-6 -8 -1 -7 -15 -11 -5 -17 -18 -9
10
17 11 7 2 4 5 9 12 19 8
10
-2 -13 -1 -10 -17 -11 -7 -8 -16 -19

output:

0

result:

ok single line: '0'

Test #29:

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

input:

20
-40 -33 -45 -41 -53 -2 -60 -1 -73 -66 -76 -39 -44 -42 -48 -5 -4 -50 -87 -6
20
4 60 19 12 36 11 55 26 43 29 54 46 45 64 80 34 68 27 17 76
20
-18 -79 -84 -2 -43 -20 -51 -35 -53 -6 -45 -10 -62 -48 -7 -36 -59 -46 -44 -77

output:

0

result:

ok single line: '0'

Test #30:

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

input:

20000
-17129 -8229 -9158 -4755 -13707 -16013 -483 -11619 -9128 -15378 -1945 -1277 -6587 -9065 -8491 -520 -13790 -6625 -15021 -17047 -1010 -6591 -4099 -2849 -9010 -2366 -14920 -17947 -4926 -2869 -17666 -10348 -8905 -19270 -1885 -8633 -4381 -4220 -10537 -11430 -3526 -3525 -7390 -15501 -3078 -14149 -16...

output:

0

result:

ok single line: '0'

Test #31:

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

input:

20000
-27659 -18394 -25611 -15996 -4663 -29928 -23552 -26930 -14015 -23810 -29644 -23122 -27129 -720 -19749 -6399 -22678 -4501 -15771 -9863 -10092 -9965 -13332 -23734 -22649 -16938 -10721 -8049 -13416 -3752 -4240 -25913 -13731 -21002 -15180 -16766 -17584 -11502 -7322 -25572 -23803 -12727 -27906 -175...

output:

0

result:

ok single line: '0'

Test #32:

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

input:

3
-1 1 0
3
0 1 -1
3
0 -1 1

output:

5

result:

ok single line: '5'

Test #33:

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

input:

5
-6 -10 -2 -5 -7
5
2 1 5 3 6
5
-1 -10 -7 -9 -2

output:

0

result:

ok single line: '0'