QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#665607#6433. Klee in Solitary Confinementcomp_towels_catTL 542ms19836kbC++173.3kb2024-10-22 14:23:492024-10-22 14:23:50

Judging History

你现在查看的是最新测评结果

  • [2024-10-22 14:23:50]
  • 评测
  • 测评结果:TL
  • 用时:542ms
  • 内存:19836kb
  • [2024-10-22 14:23:49]
  • 提交

answer

//#pragma GCC optimize(2)
//#pragma GCC optimize(3,"Ofast","inline")
#include <bits/stdc++.h>

#define FOR(i, j, k) for(int i = (j);i <= (k);i ++)
#define ROF(i, j, k) for(int i = (j);i >= (k);i --)
#define For(i, j, k) for(int i = (j);i < (k);i ++)
#define Rof(i, j, k) for(int i = (j);i > (k);i --)
#define ull unsigned long long
#define PII pair<int,int>
#define ULL unsigned long long
#define db double
#define x first
#define y second
#define sp(x) fixed << setprecision(x)
#define all(x) x.begin(), x.end()
#define unq_all(x) x.erase(unique(all(x)), x.end())
#define M(x) x %= mod, x += mod, x %= mod
#define YES cout << "YES\n"
#define NO cout << "NO\n"
#define Yes cout << "Yes\n"
#define No cout << "No\n"
#define ANS cout << ans << '\n'
#define de(p) cout << #p << ' ' << p << '\n'
#define END(i, n) (i == n ? '\n' : ' ')
#define double long double

#define RED cout << "\033[91m"
#define GREEN cout << "\033[92m"
#define YELLOW cout << "\033[93m"
#define BLUE cout << "\033[94m"
#define MAGENTA cout << "\033[95m"
#define CYAN cout << "\033[96m"
#define RESET cout << "\033[0m"

// 红色
#define DEBUG1(x)                     \
    RED;                              \
    cout << #x << " : " << x << endl; \
    RESET;

// 绿色
#define DEBUG2(x)                     \
    GREEN;                            \
    cout << #x << " : " << x << endl; \
    RESET;

// 蓝色
#define DEBUG3(x)                     \
    BLUE;                             \
    cout << #x << " : " << x << endl; \
    RESET;

// 品红
#define DEBUG4(x)                     \
    MAGENTA;                          \
    cout << #x << " : " << x << endl; \
    RESET;

// 青色
#define DEBUG5(x)                     \
    CYAN;                             \
    cout << #x << " : " << x << endl; \
    RESET;

// 黄色
#define DEBUG6(x)                     \
    YELLOW;                           \
    cout << #x << " : " << x << endl; \
    RESET;


using namespace std;


const int N = 1e6 + 10, M = 1e5 + 10, INF = 1e9, mod = 998244353;

int n, m, k;
int a[N];
map<int,vector<int>> pos;

int get(int aim)
{
    //m = aim - k

    vector<PII> v;
    for(auto i : pos[aim])
    {
        v.push_back({i,-1});
    }
    for(auto i : pos[aim - k])
    {
        v.push_back({i,1});
    }
    sort(all(v));
    int ma = 0,mi = 0,pre = 0;
    for(auto [i,j] : v)
    {
        pre += j;
        mi = min(mi,pre);
        ma = max(ma,pre - mi);
    }
    return pos[aim].size() + ma;
}

void solve()
{
    cin >> n >> k;
    vector<int> all;
    FOR(i,1,n)
    {
        cin >> a[i];
        pos[a[i]].push_back(i);
    }
    for(auto [i,j] : pos) all.push_back(i);
    int ans = 0;
    if (k == 0)
    {
        for(auto i : all)
        {
            ans = max(ans,(int)pos[i].size());
        }
    }
    else
    {
        for(auto i : all)
        {
            ans = max(ans,get(i));
        }
    }

    ANS;
}

int main()
{
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    auto t = clock();
    int T = 1;
//    cin >> T;
    while (T--)
    {
        solve();
    }
    auto tt = clock();

//    cout << "Time: " << 1000.0 * (tt - t) / CLOCKS_PER_SEC << "ms" << endl;

    return 0;
}

詳細信息

Test #1:

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

input:

5 2
2 2 4 4 4

output:

5

result:

ok 1 number(s): "5"

Test #2:

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

input:

7 1
3 2 3 2 2 2 3

output:

6

result:

ok 1 number(s): "6"

Test #3:

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

input:

7 1
2 3 2 3 2 3 3

output:

5

result:

ok 1 number(s): "5"

Test #4:

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

input:

9 -100
-1 -2 1 2 -1 -2 1 -2 1

output:

3

result:

ok 1 number(s): "3"

Test #5:

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

input:

200 121649
0 527189 -1000000 -306471 -998939 527189 -1000000 -1000000 0 527189 0 527189 0 527189 -306471 -998939 -306471 -306471 -306471 0 0 527189 527189 1000000 527189 -1000000 1000000 648838 -1000000 -998939 -998939 -998939 0 1000000 -1000000 -998939 527189 1000000 648838 -1000000 1000000 648838 ...

output:

37

result:

ok 1 number(s): "37"

Test #6:

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

input:

200 -454379
-385892 454379 -1000000 373644 -665078 -1000000 -1000000 454379 0 1000000 373644 -1000000 1000000 -385892 -1000000 373644 0 -665078 0 -665078 -1000000 -665078 -385892 -665078 -385892 454379 -665078 -385892 -1000000 454379 1000000 -385892 373644 454379 -1000000 -385892 -1000000 -385892 -1...

output:

40

result:

ok 1 number(s): "40"

Test #7:

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

input:

200 0
451272 -1000000 677452 677452 0 18908 451272 677452 -233144 677452 451272 18908 -1000000 18908 -1000000 0 451272 0 -233144 677452 1000000 451272 1000000 18908 -1000000 0 -233144 451272 1000000 18908 677452 0 677452 0 677452 1000000 -233144 18908 451272 -1000000 -233144 18908 1000000 0 0 -23314...

output:

35

result:

ok 1 number(s): "35"

Test #8:

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

input:

200 -705945
-586687 198791 0 198791 0 705945 198791 -1000000 705945 705945 1000000 705945 0 -1000000 699023 0 705945 -586687 -1000000 198791 -1000000 1000000 198791 -1000000 198791 705945 -1000000 1000000 1000000 198791 198791 -1000000 699023 0 0 699023 -586687 705945 -586687 705945 699023 0 705945 ...

output:

34

result:

ok 1 number(s): "34"

Test #9:

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

input:

200 0
344286 0 -230711 532652 -589794 344286 532652 -1000000 -589794 344286 0 532652 -1000000 344286 344286 1000000 0 -1000000 532652 532652 532652 -230711 -1000000 344286 532652 532652 0 532652 1000000 0 0 1000000 -589794 -1000000 1000000 -1000000 -1000000 344286 0 344286 344286 1000000 -1000000 -1...

output:

34

result:

ok 1 number(s): "34"

Test #10:

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

input:

200 -230027
-1000000 -662604 0 1000000 59253 1000000 1000000 -662604 -662604 0 -70266 1000000 -300293 -300293 59253 1000000 -1000000 1000000 0 1000000 -662604 59253 -1000000 -70266 -1000000 -662604 -662604 59253 59253 -1000000 -70266 -70266 1000000 -300293 59253 59253 1000000 -70266 -1000000 -70266 ...

output:

33

result:

ok 1 number(s): "33"

Test #11:

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

input:

200 197410
1000000 -665711 0 -271800 -701554 -271800 -1000000 -665711 -665711 -1000000 -271800 1000000 -701554 1000000 -701554 -1000000 1000000 1000000 -1000000 -701554 1000000 -271800 -1000000 -197410 -665711 -701554 1000000 -1000000 -665711 -701554 -701554 -271800 -1000000 -1000000 -271800 -701554...

output:

37

result:

ok 1 number(s): "37"

Test #12:

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

input:

200 -96015
791544 -1000000 791544 -1000000 -668818 695529 1000000 -552146 -1000000 -668818 1000000 1000000 1000000 695529 695529 0 791544 -552146 0 1000000 791544 -668818 0 -1000000 0 -1000000 791544 -1000000 791544 1000000 791544 0 -1000000 0 -668818 695529 791544 1000000 695529 695529 -668818 -100...

output:

38

result:

ok 1 number(s): "38"

Test #13:

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

input:

200 -1000000
1000000 127969 0 0 0 -970611 0 0 293224 293224 293224 293224 -1000000 -970611 1000000 -1000000 820037 820037 820037 127969 127969 0 0 -970611 1000000 -970611 820037 -1000000 -970611 -1000000 820037 -970611 -1000000 127969 -970611 293224 1000000 293224 1000000 293224 293224 -1000000 8200...

output:

39

result:

ok 1 number(s): "39"

Test #14:

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

input:

200 0
0 527518 841746 0 331297 -1000000 595261 841746 527518 1000000 1000000 527518 1000000 527518 0 1000000 0 841746 527518 -1000000 595261 0 595261 -1000000 841746 841746 841746 0 -1000000 595261 331297 841746 0 841746 595261 0 595261 0 0 0 527518 331297 527518 0 841746 331297 0 1000000 -1000000 5...

output:

44

result:

ok 1 number(s): "44"

Test #15:

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

input:

200 -258363
704217 520353 810464 704217 -264059 270856 1000000 838639 810464 -264059 0 704217 945100 945100 813177 328488 1000000 270856 -1000000 1000000 520353 233383 328488 -522422 -187632 -187632 373822 810464 653545 838639 -264059 945100 -187632 -22847 810464 373822 373822 0 -187632 -22847 27085...

output:

17

result:

ok 1 number(s): "17"

Test #16:

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

input:

200 181089
-300523 -104331 360450 -108859 1000000 388283 -108859 -118869 -104331 -277725 360450 -104331 727661 1000000 -108859 727661 383704 727661 -628369 727661 -108859 -118869 388283 -83881 -655062 -655062 -199320 1000000 -1000000 -964033 -83881 -964033 -448024 1000000 -104331 569372 800854 38828...

output:

13

result:

ok 1 number(s): "13"

Test #17:

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

input:

200 117900
-838409 411806 34821 -766900 67987 34821 46504 46504 -49913 411806 161685 313760 -49913 596234 156661 67987 -646448 161685 -838409 46504 -236598 -766900 -538744 46504 -49913 599791 -1000000 -538744 34821 -646441 -236598 67987 0 -766900 161685 161685 -305084 34821 0 -49913 46504 -49913 156...

output:

14

result:

ok 1 number(s): "14"

Test #18:

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

input:

200 88724
-233297 630561 -275237 -275237 505621 416897 0 505621 0 -1000000 416897 -888093 -275237 630561 788662 788662 505621 -1000000 416897 -314063 584906 0 -1000000 -888093 1000000 276966 416897 311201 257302 493457 -852985 -233297 493457 563328 788662 -233297 1000000 584906 -1000000 416897 58490...

output:

14

result:

ok 1 number(s): "14"

Test #19:

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

input:

200 739055
-276846 -1000000 -970267 274436 -278344 -276846 690590 -780355 -619119 338671 681144 -970267 537803 338671 -780355 0 885372 -619119 -780355 -711246 235223 274436 445389 460711 460711 -276846 -1000000 690590 400277 681144 351497 -278344 885372 0 -1000000 -711246 -438285 537803 1000000 6905...

output:

15

result:

ok 1 number(s): "15"

Test #20:

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

input:

200 -942994
884626 1000000 -491267 884626 -26900 -362264 916094 -705196 -503120 -730425 -705196 -362264 -503120 763328 -26900 12314 -362264 -26900 -281451 1000000 -26900 -503120 916094 -501391 -501391 -705196 -491267 763328 -841371 636579 -730425 636579 -501391 -730425 -26900 -503120 -841371 -705196...

output:

16

result:

ok 1 number(s): "16"

Test #21:

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

input:

200 863782
-909322 180110 0 -354261 -98424 -539584 509521 -43919 -654935 -43919 -98424 -909322 -795454 -1000000 -5749 474004 932634 -783914 667659 474004 -43919 289728 -1000000 -795454 -43919 -654935 -354261 -179344 -539584 -886774 -43919 289728 1000000 1000000 509521 -179344 932634 180110 -5749 490...

output:

12

result:

ok 1 number(s): "12"

Test #22:

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

input:

200 -86945
4973 274752 -348485 0 -661269 192390 -604418 -604418 0 366658 -618002 366658 200590 113645 1000000 4973 -491231 200590 -933401 -491231 -1000000 0 113645 -357368 192390 -348485 -348485 192390 642587 -462653 -110388 366658 -618002 642587 -491231 -618002 -462653 113645 366658 642587 779540 6...

output:

15

result:

ok 1 number(s): "15"

Test #23:

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

input:

200 -96625
67966 96625 -464136 961712 1000000 1000000 -269712 -1000000 79999 784610 604674 -199318 784610 1000000 96625 -199318 961712 -259853 20672 -1000000 -640882 -640882 -259853 -1000000 604674 604674 604674 -479599 -1000000 -259853 79999 784610 961712 -199318 -199318 -977257 -328717 79999 78461...

output:

13

result:

ok 1 number(s): "13"

Test #24:

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

input:

200 -672541
875140 -239147 0 875140 -126371 546170 -420922 -239147 -126371 -126371 -530108 -1000000 39354 -534942 -926598 -239147 -999662 542231 542231 -126371 546170 70909 -926598 -983208 -409757 -251037 -267623 -534942 -506813 -126371 875140 -267623 -251037 546170 112393 1000000 503549 590746 -239...

output:

16

result:

ok 1 number(s): "16"

Test #25:

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

input:

200 290556
-562226 -470944 -476890 -855535 896680 625399 -375294 546758 -1000000 86661 -500265 928824 906314 -212125 789141 -384224 150468 -728038 180898 86661 182356 371493 906314 999068 557976 727667 371493 208850 -988123 825950 -103281 -287540 719469 -853452 86661 -342794 -500265 -728038 -721633 ...

output:

5

result:

ok 1 number(s): "5"

Test #26:

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

input:

200 179682
929614 -21247 -265968 -21247 -287974 928826 -868203 -563505 514758 877402 173245 -619036 454699 -766433 -592913 948190 629961 68382 948190 636639 -942217 636639 -267329 566108 -623113 -54339 -942217 208640 555793 -804559 795354 -545404 572841 173245 -54339 986929 409171 173245 636639 -685...

output:

7

result:

ok 1 number(s): "7"

Test #27:

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

input:

200 -991752
954660 -596546 -525947 1000000 -679108 -542218 365468 -480731 544554 986182 144161 634196 -590564 -506613 986182 -162018 -368859 21502 189307 789950 835550 -299875 176110 -746851 -549131 635606 -565037 -679108 736710 -182064 -395657 9764 185337 -368859 203349 789950 923902 -485907 -48073...

output:

7

result:

ok 1 number(s): "7"

Test #28:

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

input:

200 569638
-548355 -691936 -578229 621700 -1000000 -628566 -401673 678066 -255352 968872 -77499 905238 -703331 -104566 -300189 -520809 -722912 -879064 -81938 -284893 609667 678066 -578229 -691936 957065 -643485 755266 155923 -81938 740312 -306969 286750 -77499 968872 -639853 -27086 -892181 -809911 1...

output:

6

result:

ok 1 number(s): "6"

Test #29:

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

input:

200 0
910111 -582315 351686 -304954 -981006 -913772 -531700 -665941 -856809 -82453 -16749 -981006 -176952 431945 974583 -896968 -601100 -631689 629948 -459202 974583 381043 -653184 789031 -152004 494958 269840 -214049 -759445 616294 677636 -531700 -222405 -833624 147927 -92940 -135836 865538 -575424...

output:

9

result:

ok 1 number(s): "9"

Test #30:

score: 0
Accepted
time: 99ms
memory: 14232kb

input:

1000000 890430
-890430 -1000000 -890430 1000000 0 0 148415 148415 0 1000000 1000000 -890430 658440 658440 658440 0 148415 -1000000 0 0 -890430 842292 842292 148415 -501797 148415 -501797 -501797 842292 658440 1000000 -501797 -1000000 -501797 842292 -501797 658440 842292 658440 1000000 148415 -100000...

output:

125227

result:

ok 1 number(s): "125227"

Test #31:

score: 0
Accepted
time: 107ms
memory: 14172kb

input:

1000000 -828531
-278216 -850680 -850680 -195667 -850680 -850680 -850680 -195667 -850680 -850680 -195667 1000000 -195667 -1000000 0 -195667 1000000 -278216 -556570 -850680 -850680 828531 -195667 -850680 828531 -556570 -850680 828531 -556570 828531 -556570 -1000000 1000000 -556570 -1000000 0 -278216 1...

output:

125296

result:

ok 1 number(s): "125296"

Test #32:

score: 0
Accepted
time: 101ms
memory: 14088kb

input:

1000000 -292581
840514 -249723 1000000 -1000000 0 828808 828808 0 -491355 -249723 840514 1000000 -1000000 828808 1000000 -491355 0 0 -198774 840514 828808 -491355 -1000000 -1000000 -198774 0 828808 -1000000 -198774 1000000 828808 -198774 840514 1000000 828808 1000000 -198774 840514 840514 -1000000 -...

output:

125204

result:

ok 1 number(s): "125204"

Test #33:

score: 0
Accepted
time: 103ms
memory: 14144kb

input:

1000000 -554042
1000000 0 479925 -1000000 1000000 1000000 -1000000 209226 1000000 -1000000 763268 763268 -1000000 217131 763268 0 1000000 763268 763268 0 763268 217131 813621 0 0 209226 -1000000 209226 217131 763268 0 -1000000 217131 813621 0 813621 0 1000000 1000000 217131 -1000000 813621 763268 20...

output:

125336

result:

ok 1 number(s): "125336"

Test #34:

score: 0
Accepted
time: 97ms
memory: 14164kb

input:

1000000 633075
586042 586042 -999261 728785 1000000 -1000000 0 95710 -999261 728785 95710 -999261 95710 728785 586042 728785 -1000000 0 95710 -1000000 -999261 911869 586042 -999261 728785 -1000000 -999261 911869 -999261 95710 95710 1000000 911869 1000000 586042 586042 728785 0 95710 95710 -999261 91...

output:

125513

result:

ok 1 number(s): "125513"

Test #35:

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

input:

1000000 470382
-1000000 -1000000 231305 -207871 -1000000 0 92603 -207871 0 1000000 1000000 -1000000 231305 92603 397823 92603 562985 92603 92603 397823 1000000 562985 0 562985 231305 92603 -207871 231305 397823 231305 -207871 -207871 -207871 -207871 562985 1000000 231305 562985 562985 -207871 100000...

output:

125290

result:

ok 1 number(s): "125290"

Test #36:

score: 0
Accepted
time: 122ms
memory: 15292kb

input:

1000000 -1000000
911420 19793 0 -179379 -1000000 911420 911420 1000000 214102 19793 214102 0 -233466 214102 214102 -1000000 214102 911420 19793 0 -179379 -1000000 -1000000 1000000 19793 -179379 -179379 1000000 -233466 -179379 1000000 911420 911420 19793 1000000 -179379 0 911420 0 0 -233466 19793 -23...

output:

125338

result:

ok 1 number(s): "125338"

Test #37:

score: 0
Accepted
time: 110ms
memory: 13680kb

input:

1000000 -820743
-1000000 -836383 -1000000 -179257 -179257 -408465 -836383 -179257 -179257 -408465 -179257 -408465 1000000 -179257 -179257 -836383 16686 -1000000 16686 -1000000 -179257 16686 1000000 1000000 -179257 -179257 -836383 -1000000 -408465 1000000 16686 -1000000 -408465 16686 1000000 -1000000...

output:

125243

result:

ok 1 number(s): "125243"

Test #38:

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

input:

1000000 0
300021 0 814385 -502522 -455294 1000000 -455294 -455294 0 -1000000 300021 814385 -455294 1000000 0 978728 -502522 814385 300021 -502522 -1000000 1000000 -502522 -502522 -455294 300021 -455294 0 814385 0 -455294 -455294 0 -502522 814385 -1000000 -455294 -502522 0 1000000 -502522 -455294 978...

output:

125088

result:

ok 1 number(s): "125088"

Test #39:

score: 0
Accepted
time: 122ms
memory: 15084kb

input:

1000000 1000000
-1000000 894561 894561 14988 -804178 -59231 -1000000 0 -804178 -59231 0 -1000000 -804178 894561 14988 -1000000 14988 -804178 14988 0 894561 1000000 -59231 -804178 -122272 -1000000 -804178 -804178 -122272 -59231 0 14988 -1000000 1000000 1000000 894561 -122272 0 894561 14988 1000000 10...

output:

125290

result:

ok 1 number(s): "125290"

Test #40:

score: 0
Accepted
time: 105ms
memory: 14236kb

input:

1000000 992649
-339749 1000000 902811 -339749 -89838 263273 1000000 263273 -339749 263273 -1000000 0 -1000000 0 -93779 -93779 902811 -1000000 -339749 -89838 0 1000000 1000000 1000000 -339749 902811 -89838 -339749 -93779 263273 263273 0 -89838 -93779 902811 0 -339749 -93779 1000000 -1000000 263273 90...

output:

125327

result:

ok 1 number(s): "125327"

Test #41:

score: 0
Accepted
time: 100ms
memory: 14248kb

input:

1000000 779087
-1000000 340366 1000000 340366 969565 -438721 899705 -1000000 1000000 -438721 -438721 340366 1000000 969565 -1000000 899705 899705 1000000 340366 340366 -438721 0 -1000000 340366 899705 969565 -1000000 1000000 969565 -438721 -1000000 -438721 969565 899705 969565 -438721 899705 899705 ...

output:

125291

result:

ok 1 number(s): "125291"

Test #42:

score: 0
Accepted
time: 112ms
memory: 14040kb

input:

1000000 -914354
-979519 -1000000 275618 896598 -65165 0 -979519 896598 -65165 0 92290 -65165 0 896598 1000000 -1000000 0 0 92290 1000000 -979519 0 -65165 -65165 1000000 1000000 -1000000 -65165 -65165 1000000 0 92290 -979519 -1000000 -1000000 -979519 1000000 -1000000 -1000000 275618 92290 275618 9229...

output:

125281

result:

ok 1 number(s): "125281"

Test #43:

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

input:

1000000 0
-1000000 823788 -36672 823788 -36672 665745 -538998 -36672 823788 665745 823788 -1000000 0 891884 823788 -538998 1000000 823788 -538998 -36672 1000000 0 665745 -1000000 891884 665745 -1000000 0 -36672 0 -538998 823788 823788 665745 823788 1000000 -1000000 -538998 665745 0 1000000 1000000 -...

output:

125093

result:

ok 1 number(s): "125093"

Test #44:

score: 0
Accepted
time: 117ms
memory: 14260kb

input:

1000000 382113
97877 -782336 97877 1000000 -782336 -808919 358678 -782336 358678 -808919 -808919 -808919 -782336 0 97877 0 -1000000 1000000 97877 -782336 0 -23435 0 0 -808919 358678 -23435 -782336 -1000000 0 -23435 -808919 -23435 -1000000 -782336 -1000000 -808919 -782336 -23435 1000000 -23435 0 -782...

output:

125354

result:

ok 1 number(s): "125354"

Test #45:

score: 0
Accepted
time: 94ms
memory: 14368kb

input:

1000000 33108
-1000000 1000000 0 1000000 586377 586377 -1000000 -1000000 -256859 586377 1000000 586377 941836 974944 941836 974944 974944 0 586377 0 974944 941836 -1000000 -256859 0 0 941836 1000000 -1000000 -256859 1000000 -1000000 586377 586377 974944 586377 0 0 0 586377 0 -256859 -1000000 -256859...

output:

125274

result:

ok 1 number(s): "125274"

Test #46:

score: 0
Accepted
time: 91ms
memory: 13580kb

input:

1000000 -983460
423256 423256 -1000000 1000000 423256 626061 0 -884836 1000000 626061 626061 626061 626061 -884836 626061 423256 5180 -884836 -16540 626061 423256 5180 626061 5180 -1000000 -16540 626061 5180 -1000000 5180 423256 5180 423256 0 0 0 -1000000 626061 -16540 -1000000 5180 5180 0 5180 0 51...

output:

125340

result:

ok 1 number(s): "125340"

Test #47:

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

input:

1000000 0
33672 -1000000 -896629 1000000 -887943 33672 33672 0 317320 1000000 -1000000 -1000000 1000000 0 33672 -896629 317320 -896629 1000000 -659601 317320 1000000 -659601 -1000000 -659601 -887943 -1000000 -1000000 -659601 -896629 0 -659601 -896629 33672 -659601 -887943 1000000 -896629 0 -1000000 ...

output:

125100

result:

ok 1 number(s): "125100"

Test #48:

score: 0
Accepted
time: 109ms
memory: 14172kb

input:

1000000 -74099
-216514 74099 -285597 -1000000 -216514 -216514 -216514 1000000 74099 -216514 -216514 74099 -1000000 -216514 74099 991517 -285597 -285597 -902984 1000000 -902984 991517 74099 74099 -285597 74099 -1000000 -1000000 -1000000 1000000 0 1000000 1000000 74099 991517 74099 -285597 -1000000 -2...

output:

125356

result:

ok 1 number(s): "125356"

Test #49:

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

input:

1000000 0
-1000000 642633 -963860 642633 -963860 -874491 146338 -473177 -1000000 642633 0 146338 1000000 1000000 146338 -473177 -473177 -874491 -874491 -874491 -963860 642633 1000000 146338 -963860 642633 -1000000 146338 -1000000 -963860 146338 642633 -1000000 -1000000 1000000 -1000000 -473177 14633...

output:

125089

result:

ok 1 number(s): "125089"

Test #50:

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

input:

1000000 -1818
-827913 0 1000000 322121 -1818 -1000000 322121 322121 -484951 1000000 -1000000 322121 0 -484951 90779 1000000 -1818 322121 90779 -827913 -1000000 -1000000 -1000000 322121 0 0 -1000000 1000000 1000000 -484951 -1000000 -827913 90779 -484951 -827913 -484951 0 0 -827913 90779 90779 90779 -...

output:

125252

result:

ok 1 number(s): "125252"

Test #51:

score: 0
Accepted
time: 103ms
memory: 13488kb

input:

1000000 -973237
-4925 0 -1000000 0 -4925 -147798 119272 1000000 -4925 0 -1000000 -26763 0 -1000000 119272 1000000 912133 -1000000 119272 1000000 -1000000 912133 1000000 119272 1000000 -26763 -4925 0 912133 0 119272 0 1000000 119272 -26763 0 0 -1000000 -1000000 -26763 912133 -1000000 912133 0 -100000...

output:

125166

result:

ok 1 number(s): "125166"

Test #52:

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

input:

1000000 -467683
-817385 -817385 0 -754007 1000000 -754007 -1000000 -817385 532317 -8032 532317 -817385 0 532317 0 1000000 687577 -817385 1000000 -1000000 532317 -8032 687577 -1000000 1000000 -8032 1000000 -1000000 -817385 687577 532317 -817385 1000000 687577 687577 -8032 -8032 -754007 -817385 0 -803...

output:

125295

result:

ok 1 number(s): "125295"

Test #53:

score: 0
Accepted
time: 107ms
memory: 14064kb

input:

1000000 211108
-1000000 -322073 -787568 -788892 0 338693 0 -1000000 -322073 1000000 -80842 -322073 -787568 -80842 -787568 1000000 1000000 0 338693 -80842 -788892 1000000 -80842 -322073 -322073 -80842 1000000 -1000000 1000000 0 1000000 -322073 0 -80842 -80842 -787568 -322073 -1000000 338693 1000000 0...

output:

125305

result:

ok 1 number(s): "125305"

Test #54:

score: 0
Accepted
time: 101ms
memory: 14116kb

input:

1000000 -455813
0 -390287 1000000 161124 -390287 161124 1000000 -292586 0 -1000000 -292586 161124 -390287 161124 -1000000 1000000 161124 1000000 -292586 -390287 -1000000 -1000000 1000000 161124 -292586 0 0 0 0 -593781 161124 -292586 -593781 -748399 1000000 -1000000 1000000 -1000000 -292586 -593781 0...

output:

125431

result:

ok 1 number(s): "125431"

Test #55:

score: 0
Accepted
time: 105ms
memory: 12464kb

input:

1000000 -185077
822848 421754 421754 464598 689264 689264 890032 464598 383108 -1000000 -380590 -286366 289829 0 289829 1000000 689264 -927460 595028 -61837 -286366 -628684 0 189617 -628684 724949 595028 -799487 890032 -642234 -927460 4540 -380590 -927460 890032 -628684 890032 -61837 822848 4540 764...

output:

30564

result:

ok 1 number(s): "30564"

Test #56:

score: 0
Accepted
time: 101ms
memory: 12544kb

input:

1000000 289211
653466 0 640671 890971 198740 -652602 -747040 -747040 -961982 -747040 -206663 912779 912779 -617702 969944 -717020 -757022 200385 1000000 -617702 -100665 912779 -289258 -663134 234619 401688 -980019 234619 890971 -961982 -893881 653466 -663134 1000000 -980019 0 210536 -747040 0 -98001...

output:

30788

result:

ok 1 number(s): "30788"

Test #57:

score: 0
Accepted
time: 103ms
memory: 12384kb

input:

1000000 94907
290267 207429 -829351 -1000000 413225 -754515 -152897 -849422 -165598 -849422 -113883 569542 0 207429 421229 0 -829351 -718547 413225 983938 -113883 -855015 -1000000 -855015 -849422 -244670 -244670 207429 1000000 999053 -244670 -173126 -510908 -247642 413225 -755309 620983 534246 -7543...

output:

30642

result:

ok 1 number(s): "30642"

Test #58:

score: 0
Accepted
time: 95ms
memory: 12260kb

input:

1000000 -865381
1000000 622336 -644425 935472 825561 -1000000 149242 204755 -961583 -596526 -279472 622336 149242 524626 -1000000 -861057 884505 -861057 524626 884505 246723 -441151 134619 -704678 -231615 390635 -557382 884505 524626 622336 622336 894520 0 -596526 -596526 401520 894520 -231615 20475...

output:

30798

result:

ok 1 number(s): "30798"

Test #59:

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

input:

1000000 0
-24563 -947286 -215182 334892 -189399 -562410 -535026 -24563 -364049 -77680 -859215 -685932 -189399 -363716 -331878 131512 -691159 -189399 133204 -689933 334892 -562410 -689933 -77680 0 -200700 -364049 -691159 133204 -364049 -512296 -77680 -859215 599651 -691159 -562410 951293 -145538 -512...

output:

30819

result:

ok 1 number(s): "30819"

Test #60:

score: 0
Accepted
time: 94ms
memory: 12536kb

input:

1000000 692596
871615 941296 -661440 979735 1000000 -477710 0 -753597 57194 -268026 -1000000 -477710 -459891 -290978 -1000000 -134744 77298 803783 -4652 -692596 979735 157512 941296 892200 -692596 -661440 -268026 -268026 308667 1000000 -4652 645428 -281226 -281226 -661440 -661440 -661440 -692596 -93...

output:

30651

result:

ok 1 number(s): "30651"

Test #61:

score: 0
Accepted
time: 95ms
memory: 12524kb

input:

1000000 234556
-288109 76070 -874389 -184394 127584 54919 -369696 -659510 1000000 -452649 -184394 799401 -10605 -381369 -381369 650702 -452649 -171415 -632948 -315736 -49757 -579953 -369696 799401 -579953 376511 21248 885940 65835 65835 76070 -171415 54919 398890 -156468 -156468 -632948 -10605 76070...

output:

30808

result:

ok 1 number(s): "30808"

Test #62:

score: 0
Accepted
time: 96ms
memory: 12684kb

input:

1000000 170261
427401 1000000 -260337 1000000 673394 -179112 -1000000 707330 276484 52488 -410238 220214 -352944 -260337 -1000000 586437 -998045 44153 -821563 137411 -626767 -890105 -626767 -352944 -221096 137411 220214 930347 -626767 305137 305137 -221096 -716571 951174 586437 -821563 586437 -10000...

output:

30583

result:

ok 1 number(s): "30583"

Test #63:

score: 0
Accepted
time: 93ms
memory: 12580kb

input:

1000000 358271
-330798 868703 658973 -389408 -160555 -1000000 155080 -724314 -105148 -527133 -527133 1000000 155080 155080 -71580 -912681 -403471 -451752 -214497 155080 -604334 -105148 155080 724269 -945430 -348532 -64061 -214497 -389408 -527133 -389408 -985471 697270 1000000 -387344 -105148 -527133...

output:

30713

result:

ok 1 number(s): "30713"

Test #64:

score: 0
Accepted
time: 91ms
memory: 12472kb

input:

1000000 -645608
-1000000 1000000 848201 -667657 -667657 -511178 -98956 -50670 -65566 374053 -247219 -376856 651159 -511178 917768 -50670 374053 -213223 208720 917768 -376856 374053 -845776 1000000 208720 703935 -98956 917768 -494155 -845776 1000000 -109896 830694 -273415 208720 835045 -98956 651159 ...

output:

30780

result:

ok 1 number(s): "30780"

Test #65:

score: 0
Accepted
time: 127ms
memory: 12972kb

input:

1000000 -205285
-67229 -78870 -304921 -126100 -291564 83367 169305 -593837 402329 -481219 28675 910676 -679524 878163 402728 842144 169731 -469228 -170268 -565627 639902 -359096 951598 0 -386554 837154 -342834 -404731 -704418 67606 -324098 -45061 -596038 399338 577151 800389 -704418 -291564 -350439 ...

output:

3440

result:

ok 1 number(s): "3440"

Test #66:

score: 0
Accepted
time: 112ms
memory: 12712kb

input:

1000000 -240764
330248 -15518 188495 22565 971056 -445418 -382564 22565 -176064 95053 740607 -505197 402668 -232040 69798 -1000000 -171522 969380 179107 -145891 -204953 -645913 304916 -477118 261678 -736704 721290 -204953 47720 489137 -771110 769093 489137 -755096 764298 -627272 -149660 -471415 1245...

output:

3438

result:

ok 1 number(s): "3438"

Test #67:

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

input:

1000000 -761186
883155 714302 833256 -847661 -270297 553291 -849786 -989261 581538 258095 203117 563584 979872 910883 396291 508731 -837229 -585119 994376 435362 -299333 -539973 -538905 579999 -312366 961355 237294 579999 -306881 228584 671761 676033 -579775 -837229 -842854 435362 77028 -213182 7619...

output:

3461

result:

ok 1 number(s): "3461"

Test #68:

score: 0
Accepted
time: 116ms
memory: 12844kb

input:

1000000 714790
-423644 -718238 -246419 -761563 828298 -246419 707042 39762 -423644 -845267 -779643 808980 -794233 -830437 -512731 -842178 55980 -867434 -341319 -659422 -61540 -794233 456999 679668 894606 -696881 24372 -635396 -434557 -431979 -883246 335397 871571 -1828 -224524 -842178 954892 159534 ...

output:

3461

result:

ok 1 number(s): "3461"

Test #69:

score: 0
Accepted
time: 107ms
memory: 12868kb

input:

1000000 841908
-35399 -245483 799308 -742674 -630465 605052 -105676 -421349 595217 69906 781750 151082 -492527 -118346 -804640 -231923 377556 36704 903574 -136732 269501 204891 632397 -376038 -410648 265254 -537904 -587018 -442931 407227 464270 1000000 -930380 -131702 -492527 734700 102402 506825 30...

output:

3477

result:

ok 1 number(s): "3477"

Test #70:

score: 0
Accepted
time: 109ms
memory: 12872kb

input:

1000000 -180047
-937710 -68641 -649854 -876502 627055 -874960 648828 752094 -681156 854356 573813 -784126 -158277 -418220 -561185 471856 -221861 378042 636133 -1000000 -431922 202506 -185993 39488 -747853 454046 658255 -571243 -861914 658255 915403 -886887 -435889 -833847 -689444 -861914 -491163 -84...

output:

3484

result:

ok 1 number(s): "3484"

Test #71:

score: 0
Accepted
time: 111ms
memory: 12908kb

input:

1000000 -751719
748023 -917917 75652 974066 219786 898050 -67793 866858 -317637 991177 594707 -831910 -958007 -371332 737275 -1000000 -660759 558638 -316446 -599052 656446 219786 -910026 164044 -393867 -599052 187120 -948795 529898 -248458 937774 -476232 -756466 -525172 -522783 -566764 915507 296509...

output:

3463

result:

ok 1 number(s): "3463"

Test #72:

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

input:

1000000 -744416
-986673 -959316 587461 -56500 554263 0 700422 25247 235387 -736188 -589883 -612287 547683 -962956 760009 -329990 806588 81020 588808 156739 327124 885302 899098 -337621 281598 1000000 614955 -397586 -511127 626059 597827 -369186 -391744 410487 806588 211082 851388 1000000 -680729 961...

output:

3422

result:

ok 1 number(s): "3422"

Test #73:

score: 0
Accepted
time: 120ms
memory: 12908kb

input:

1000000 -825206
-605336 -816591 146497 -70052 -596991 -285443 48101 210935 -215062 -607187 -623730 83790 673691 389025 827925 -968065 592100 -923498 -395642 -288928 626574 -687136 -669220 794071 -576237 -992181 -592478 637341 1000000 -411815 -28382 827925 -31551 972772 254113 -404582 -834513 127494 ...

output:

3468

result:

ok 1 number(s): "3468"

Test #74:

score: 0
Accepted
time: 114ms
memory: 12968kb

input:

1000000 -123605
-288960 -945694 -547917 -966137 993486 -138624 -847259 118061 -341545 847320 -465380 97457 447769 918183 -639580 466230 -240924 115100 475877 918183 -40381 -516411 -601440 -743262 -515623 135622 -298546 153085 382247 -311691 -771469 -368412 392287 -309109 128336 856170 25151 868670 3...

output:

3482

result:

ok 1 number(s): "3482"

Test #75:

score: 0
Accepted
time: 160ms
memory: 14268kb

input:

1000000 -648055
620078 -105299 -814944 769333 -850734 773229 584794 -47452 668416 -578686 -519359 968114 -425815 978051 715231 775906 -65918 975864 -849963 735277 659009 -479161 223941 528044 -893002 45103 -46783 -620609 510745 -464565 508150 665057 -979864 -937800 909934 -165392 79178 312849 786365...

output:

683

result:

ok 1 number(s): "683"

Test #76:

score: 0
Accepted
time: 152ms
memory: 14500kb

input:

1000000 259990
286334 -855714 -725836 512217 683220 -807183 963252 -480269 -530243 -815647 722487 824401 -662204 554033 -54730 934444 -411417 290452 -687265 -10052 825197 -179265 -474129 728073 -431786 10224 -171742 -247274 966913 -929872 365952 -867723 -499719 345432 820328 47189 791692 -993790 152...

output:

714

result:

ok 1 number(s): "714"

Test #77:

score: 0
Accepted
time: 152ms
memory: 14456kb

input:

1000000 799167
-343327 583749 321337 -343543 252340 368906 384743 -319560 -821692 446737 -186119 -637373 734082 886773 -320116 241641 540747 709959 -580348 54384 907169 227536 909437 -636032 890580 -528085 -293358 466974 849320 -151622 252340 -18035 -703847 237877 625571 -248398 663826 -821110 81323...

output:

646

result:

ok 1 number(s): "646"

Test #78:

score: 0
Accepted
time: 155ms
memory: 14332kb

input:

1000000 -57348
451722 -6649 -427115 -292505 -457724 -660676 -744232 415721 970019 -698380 -590217 964944 -912904 63257 635743 340948 41203 265103 -410341 263676 -216982 113241 -594955 855724 -900414 -567566 10398 530618 -472663 -69912 476009 638397 -493340 -794469 -418170 -60728 -648839 174099 15049...

output:

682

result:

ok 1 number(s): "682"

Test #79:

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

input:

1000000 -696298
51209 290075 -779241 51714 14769 557246 203845 -840010 -94716 357425 375041 -267250 769248 232426 186764 -600635 -420859 -93419 310674 -89944 -738635 26061 106159 -776502 781160 -109861 -515797 -283369 909669 -455114 693059 -865585 -34846 -453987 432178 331103 -281318 347662 698995 2...

output:

657

result:

ok 1 number(s): "657"

Test #80:

score: 0
Accepted
time: 152ms
memory: 14596kb

input:

1000000 38588
498787 60346 787859 356996 536322 -884563 19937 -531745 89231 977999 88056 105648 917277 887031 184679 305358 -167134 -468531 974811 -569299 -588980 966869 -55278 384677 -1993 94860 33901 259336 731924 -187314 -952647 -436711 276659 -781106 -884563 758894 -929514 -349699 -833281 61282 ...

output:

676

result:

ok 1 number(s): "676"

Test #81:

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

input:

1000000 -135704
165790 551137 -766390 -318893 -459599 662011 -343739 3430 720640 408787 811153 746128 -393445 -270413 158489 763268 -166594 -10504 -569219 -521058 462944 -362100 -20660 215766 -949566 841322 -429245 508428 -956352 964525 737111 -770935 -977925 -187981 58372 542522 500114 -471588 -853...

output:

671

result:

ok 1 number(s): "671"

Test #82:

score: 0
Accepted
time: 147ms
memory: 14372kb

input:

1000000 -300126
583301 -44548 -954174 -307756 -915922 -237041 -729531 40129 -169082 -140758 -540861 -539777 384881 502406 -502197 -169082 -206394 22251 705077 696909 219421 -351281 559231 -352578 -335678 -977437 -452500 449 630399 -252760 -775995 159326 -348588 120547 -105086 90803 -472384 288812 71...

output:

677

result:

ok 1 number(s): "677"

Test #83:

score: 0
Accepted
time: 153ms
memory: 14424kb

input:

1000000 -840558
-681326 271728 129839 107174 -731527 945190 570212 -31870 -505130 -641947 -9029 -950988 270851 -699607 254472 88131 -590002 882102 -944388 -284362 -9477 -415452 -115910 205639 803535 28421 376508 315109 -58568 505982 -97626 395167 335149 -799407 419888 143147 112601 -660600 -915222 1...

output:

654

result:

ok 1 number(s): "654"

Test #84:

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

input:

1000000 425784
-334814 524593 74075 -292208 -959402 89249 406696 738288 248801 -497050 347903 -948361 858075 652163 -896596 -213127 197253 925609 519165 104285 107830 -683125 -241342 524050 -666743 -620213 760264 823622 -244896 329093 -133483 -834029 -103839 180568 -507702 420512 606543 -593740 1589...

output:

672

result:

ok 1 number(s): "672"

Test #85:

score: 0
Accepted
time: 470ms
memory: 19688kb

input:

1000000 -182775
-979974 -718358 -654582 462845 -760836 -201770 -23415 827674 517520 210078 -729190 -735169 -780509 -705855 -220355 -104441 -431214 -808645 -159097 -785025 -634535 -574752 702912 -713693 48837 85028 573852 441201 -838103 502101 -15621 30509 652487 28248 -467129 240252 743779 -846664 -...

output:

104

result:

ok 1 number(s): "104"

Test #86:

score: 0
Accepted
time: 504ms
memory: 19672kb

input:

1000000 -664261
-306495 100104 -270370 467514 521214 -188120 -279790 -195043 -985877 864494 564345 898763 -38353 -137788 712154 448957 -699041 613469 509056 882088 801530 991796 -624683 546139 -667609 775569 702193 99103 291467 -448859 954410 524577 -186294 944234 -718350 781332 -45383 563704 -23805...

output:

118

result:

ok 1 number(s): "118"

Test #87:

score: 0
Accepted
time: 542ms
memory: 19408kb

input:

1000000 340399
70738 -263162 884477 -249339 198682 -150146 -477627 556000 -607013 580192 -791768 -865154 -757035 -885829 -112593 874935 933156 363933 509200 481409 -727552 -458263 -932530 549595 -593419 -44240 -305028 -849441 -215248 -465580 105285 -239761 -50145 -467667 -338738 -265108 717792 -7274...

output:

98

result:

ok 1 number(s): "98"

Test #88:

score: 0
Accepted
time: 470ms
memory: 19396kb

input:

1000000 19657
-827339 -100097 -681484 -820588 -993209 545983 -547742 807828 -346962 -537294 60168 347859 -181712 -770121 59086 -462647 920817 232661 208565 -640317 335269 571130 173279 601073 -850268 -824832 -730767 302136 229246 -302522 -477969 -399300 -301656 353718 626549 -708237 -176213 -745491 ...

output:

98

result:

ok 1 number(s): "98"

Test #89:

score: 0
Accepted
time: 493ms
memory: 19528kb

input:

1000000 531541
-475474 -794123 928767 667689 375726 -925230 232929 -109883 425155 -567397 -866562 -680014 -945615 785137 -788534 66300 -315744 -210168 408085 672089 -988722 -358581 362164 326481 834284 -593543 -510782 151115 -93890 -375792 230021 -815809 -25578 870688 201815 58227 972030 399252 -772...

output:

109

result:

ok 1 number(s): "109"

Test #90:

score: 0
Accepted
time: 489ms
memory: 19400kb

input:

1000000 585552
322775 871884 508975 -566136 -66431 -256342 -33419 -623737 843848 107603 347557 -568303 860415 -81098 -196858 -471488 -756398 599551 -416213 -804133 808387 693648 904909 -264146 408820 103193 -531501 860796 460070 448192 911511 -25971 -236913 -624781 144766 -50411 966529 642328 309544...

output:

94

result:

ok 1 number(s): "94"

Test #91:

score: 0
Accepted
time: 499ms
memory: 19836kb

input:

1000000 -115420
-320988 -939338 -777631 -438181 563465 -291957 412028 553876 -578926 -429934 -205691 -268281 -68605 -966330 198921 -8456 955104 908280 -108891 -704911 884109 -858341 -932842 -208845 507114 -891726 418544 -566812 -952365 -898828 -557143 -334052 -650919 450620 -407165 27552 789966 -153...

output:

114

result:

ok 1 number(s): "114"

Test #92:

score: 0
Accepted
time: 470ms
memory: 19652kb

input:

1000000 -611005
-694857 -991242 -995145 -994351 -831489 -812702 -703683 232730 -901820 -377541 778609 398760 270347 -45963 -721204 -425851 616523 954055 103417 314757 -777678 -528003 299288 -684431 -425767 -657005 -775814 -931676 854824 -350450 346586 -218063 -87144 -362645 266374 984913 -617516 606...

output:

124

result:

ok 1 number(s): "124"

Test #93:

score: 0
Accepted
time: 449ms
memory: 19432kb

input:

1000000 152675
362043 866246 -244505 -122457 -352348 324147 -43321 -59469 92778 133656 302404 -749642 -861608 876707 -619613 833019 80967 227800 805287 778030 -655837 -378490 -3070 325116 -640716 -192574 565436 -610257 711212 47439 849152 -631443 273410 -613309 -431494 -202393 324730 -841229 -807560...

output:

94

result:

ok 1 number(s): "94"

Test #94:

score: 0
Accepted
time: 426ms
memory: 19532kb

input:

1000000 20361
-567004 -655068 -53887 990674 -682506 447822 -409940 451583 437824 -170334 631737 344858 646460 82110 -893890 853903 662528 80892 -45515 -998218 -450515 225702 -251583 -128367 653249 -722926 -985144 -79730 -399402 -339138 -326671 100357 -561419 662193 -293309 -444152 210891 629772 3833...

output:

85

result:

ok 1 number(s): "85"

Test #95:

score: -100
Time Limit Exceeded

input:

1000000 -210335
-686757 -293932 495696 -404900 -768004 -289055 -257036 -93087 192547 804337 -208964 -249063 -869094 -170452 188036 -996769 397881 -395873 466299 -837621 -906681 955065 -164332 468560 -413150 239045 -348920 -620809 760008 -326820 -959432 -977457 537321 520171 -521493 897043 -406107 50...

output:


result: