Submission #1092359

# Submission time Handle Problem Language Result Execution time Memory
1092359 2024-09-23T21:17:23 Z TlenekWodoru Fountain Parks (IOI21_parks) C++17
100 / 100
1713 ms 125832 KB
#include<bits/stdc++.h>
#include "parks.h"
using namespace std;
struct Edge
{
    int som,ind;
};
map<pair<int,int>,int>M,M2;
vector<Edge>Graf[200009];
vector<int>D[1000009];
pair<int,int>KimJest[1000009];
bool zaj[1000009];
vector<int>Sprz;
int g[1000009];
int match[1000009];
int n,m=0,k=0,N,IleVert=0;
int f[200009],ilosc[200009];
bool Zaj[1000009];
int F(int v)
{
    if(f[v]==v){return v;}
    return f[v]=F(f[v]);
}
void Polacz(int a, int b)
{
    a=F(a);
    b=F(b);
    if(a==b){return;}
    if(ilosc[a]<ilosc[b]){swap(a,b);}
    ilosc[a]+=ilosc[b];
    f[b]=a;
}
bool DFS(int v)
{
    if(zaj[v]){return 0;}
    zaj[v]=1;
    Sprz.push_back(v);
    for(int som : D[v])
    {
        if(match[som]==-1||DFS(match[som]))
        {
            match[v]=som;
            match[som]=v;
            return 1;
        }
    }
    return 0;
}
void BFS()
{
    int start=0;
    Zaj[start]=1;
    deque<int>Y;
    Y.push_back(start);
    while((int)Y.size()>0)
    {
        const int v=Y[0];
        Y.pop_front();
        for(int som : D[v])
        {
            if(Zaj[som]==0)
            {
                Zaj[som]=1;
                Y.push_back(som);
                if(match[v]==-1&&match[som]==-1)
                {
                    match[v]=som;
                    match[som]=v;
                }
            }
        }
    }
}
void SKOJ()
{
    random_shuffle(g,g+N);
    for(int i=0;i<N;i++)
    {
        match[i]=-1;
        zaj[i]=0;
        random_shuffle(D[i].begin(),D[i].end());
    }
    BFS();
    random_shuffle(g,g+N);
    return;
    for(int i=0;i<N;i++)
    {
        int u=g[i];
        if(match[u]==-1)
        {
            DFS(u);
        }
        for(int temp : Sprz)
        {
            zaj[temp]=0;
        }
        Sprz.clear();
    }
}
void Upgrade(int v)
{
    zaj[v]=1;
    Sprz.push_back(v);
    for(int som : D[v])
    {
        if(zaj[match[som]]==0)
        {
            Upgrade(match[som]);
            match[v]=som;
            match[som]=v;
            return;
        }
        else if(match[som]!=v)
        {
            break;
        }
    }
    for(int u : Sprz){zaj[u]=0;}
    Sprz.clear();
    match[v]=-1;
}
void CzySpojna(int v)
{
    zaj[v]=1;
    IleVert++;
    for(auto[som,ind] : Graf[v])
    {
        if(zaj[som]){continue;}
        CzySpojna(som);
    }
}
int construct_roads(vector<int>X, vector<int>Y)
{
    srand(2137);
    n=(int)X.size();
    for(int i=0;i<n;i++)
    {
        M[{X[i],Y[i]}]=i;
    }
    for(int i=0;i<n;i++)
    {
        if(M.find({X[i]-2,Y[i]})!=M.end())
        {
            Graf[i].push_back({M[{X[i]-2,Y[i]}],m});
            Graf[M[{X[i]-2,Y[i]}]].push_back({i,m});
            m++;
        }
        if(M.find({X[i],Y[i]-2})!=M.end())
        {
            Graf[i].push_back({M[{X[i],Y[i]-2}],m});
            Graf[M[{X[i],Y[i]-2}]].push_back({i,m});
            m++;
        }
    }
    CzySpojna(0);
    if(IleVert!=n){return 0;}
    vector<pair<int,int>>E(m);
    for(int i=0;i<n;i++)
    {
        for(auto[som,ind] : Graf[i])
        {
            int a=i,b=som;
            if(pair<int,int>{X[a],Y[a]}>pair<int,int>{X[b],Y[b]}){continue;}
            E[ind]={a,b};
        }
    }
    for(int i=0;i<(int)E.size();i++)
    {
        const int a=E[i].first,b=E[i].second;
        vector<pair<int,int>>Som;
        if(Y[a]+2==Y[b])
        {
            Som.push_back({X[a]-1,Y[a]+1});
            Som.push_back({X[a]+1,Y[a]+1});
        }
        else if(X[a]+2==X[b])
        {
            Som.push_back({X[a]+1,Y[a]+1});
            Som.push_back({X[a]+1,Y[a]-1});
        }
        for(pair<int,int>som : Som)
        {
            if(M2.find(som)==M2.end())
            {
                KimJest[k]=som;
                M2[som]=k++;
            }
            int u=m+M2[som];
            D[i].push_back(u);
            D[u].push_back(i);
        }
    }
    N=m+k;
    for(int i=0;i<N;i++){g[i]=i;}
    SKOJ();
for(int I=1;I<=100;I++)
{
    for(int i=0;i<n;i++)
    {
        f[i]=i;
        ilosc[i]=1;
    }
    for(int i=0;i<n;i++)
    {
        for(auto[som,ind] : Graf[i])
        {
            if(match[ind]==-1){continue;}
            Polacz(i,som);
        }
    }
    if(ilosc[F(0)]==n)
    {
        vector<int>O1,O2,O3,O4;
        for(int j=0;j<m;j++)
        {
            const int a=E[j].first,b=E[j].second;
            if(match[j]!=-1)
            {
                pair<int,int>xd=KimJest[match[j]-m];
                O1.push_back(a);
                O2.push_back(b);
                O3.push_back(xd.first);
                O4.push_back(xd.second);
            }
        }
        build(O1,O2,O3,O4);
        return 1;
    }
    vector<int>U;
    for(int i=0;i<n;i++){g[i]=i;}
    random_shuffle(g,g+n);
    for(int i=0;i<n;i++)
    {
        const int u=g[i];
        for(auto[som,ind] : Graf[u])
        {
            if(match[ind]==-1&&F(u)!=F(som))
            {
                U.push_back(ind);
                Polacz(u,som);
            }
        }
    }
    for(int u : U)
    {
        if(match[u]!=-1){continue;}
        Upgrade(u);
    }
}
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 11 ms 28508 KB Output is correct
2 Correct 14 ms 28508 KB Output is correct
3 Correct 12 ms 28440 KB Output is correct
4 Correct 12 ms 28508 KB Output is correct
5 Correct 11 ms 28508 KB Output is correct
6 Correct 12 ms 28564 KB Output is correct
7 Correct 11 ms 28508 KB Output is correct
8 Correct 10 ms 28504 KB Output is correct
9 Correct 302 ms 76464 KB Output is correct
10 Correct 26 ms 33616 KB Output is correct
11 Correct 111 ms 54392 KB Output is correct
12 Correct 35 ms 35932 KB Output is correct
13 Correct 37 ms 34644 KB Output is correct
14 Correct 11 ms 28764 KB Output is correct
15 Correct 12 ms 28820 KB Output is correct
16 Correct 290 ms 75044 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 11 ms 28508 KB Output is correct
2 Correct 14 ms 28508 KB Output is correct
3 Correct 12 ms 28440 KB Output is correct
4 Correct 12 ms 28508 KB Output is correct
5 Correct 11 ms 28508 KB Output is correct
6 Correct 12 ms 28564 KB Output is correct
7 Correct 11 ms 28508 KB Output is correct
8 Correct 10 ms 28504 KB Output is correct
9 Correct 302 ms 76464 KB Output is correct
10 Correct 26 ms 33616 KB Output is correct
11 Correct 111 ms 54392 KB Output is correct
12 Correct 35 ms 35932 KB Output is correct
13 Correct 37 ms 34644 KB Output is correct
14 Correct 11 ms 28764 KB Output is correct
15 Correct 12 ms 28820 KB Output is correct
16 Correct 290 ms 75044 KB Output is correct
17 Correct 14 ms 28508 KB Output is correct
18 Correct 11 ms 28508 KB Output is correct
19 Correct 10 ms 28536 KB Output is correct
20 Correct 11 ms 28504 KB Output is correct
21 Correct 12 ms 28636 KB Output is correct
22 Correct 15 ms 28512 KB Output is correct
23 Correct 908 ms 124652 KB Output is correct
24 Correct 11 ms 28508 KB Output is correct
25 Correct 15 ms 29160 KB Output is correct
26 Correct 14 ms 29016 KB Output is correct
27 Correct 20 ms 29036 KB Output is correct
28 Correct 296 ms 67004 KB Output is correct
29 Correct 482 ms 85512 KB Output is correct
30 Correct 682 ms 105180 KB Output is correct
31 Correct 869 ms 123544 KB Output is correct
32 Correct 11 ms 28508 KB Output is correct
33 Correct 11 ms 28496 KB Output is correct
34 Correct 11 ms 28508 KB Output is correct
35 Correct 11 ms 28528 KB Output is correct
36 Correct 11 ms 28504 KB Output is correct
37 Correct 11 ms 28508 KB Output is correct
38 Correct 11 ms 28448 KB Output is correct
39 Correct 13 ms 28508 KB Output is correct
40 Correct 11 ms 28508 KB Output is correct
41 Correct 14 ms 28508 KB Output is correct
42 Correct 11 ms 28556 KB Output is correct
43 Correct 13 ms 28764 KB Output is correct
44 Correct 15 ms 28920 KB Output is correct
45 Correct 315 ms 69044 KB Output is correct
46 Correct 500 ms 88492 KB Output is correct
47 Correct 478 ms 88212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 11 ms 28508 KB Output is correct
2 Correct 14 ms 28508 KB Output is correct
3 Correct 12 ms 28440 KB Output is correct
4 Correct 12 ms 28508 KB Output is correct
5 Correct 11 ms 28508 KB Output is correct
6 Correct 12 ms 28564 KB Output is correct
7 Correct 11 ms 28508 KB Output is correct
8 Correct 10 ms 28504 KB Output is correct
9 Correct 302 ms 76464 KB Output is correct
10 Correct 26 ms 33616 KB Output is correct
11 Correct 111 ms 54392 KB Output is correct
12 Correct 35 ms 35932 KB Output is correct
13 Correct 37 ms 34644 KB Output is correct
14 Correct 11 ms 28764 KB Output is correct
15 Correct 12 ms 28820 KB Output is correct
16 Correct 290 ms 75044 KB Output is correct
17 Correct 14 ms 28508 KB Output is correct
18 Correct 11 ms 28508 KB Output is correct
19 Correct 10 ms 28536 KB Output is correct
20 Correct 11 ms 28504 KB Output is correct
21 Correct 12 ms 28636 KB Output is correct
22 Correct 15 ms 28512 KB Output is correct
23 Correct 908 ms 124652 KB Output is correct
24 Correct 11 ms 28508 KB Output is correct
25 Correct 15 ms 29160 KB Output is correct
26 Correct 14 ms 29016 KB Output is correct
27 Correct 20 ms 29036 KB Output is correct
28 Correct 296 ms 67004 KB Output is correct
29 Correct 482 ms 85512 KB Output is correct
30 Correct 682 ms 105180 KB Output is correct
31 Correct 869 ms 123544 KB Output is correct
32 Correct 11 ms 28508 KB Output is correct
33 Correct 11 ms 28496 KB Output is correct
34 Correct 11 ms 28508 KB Output is correct
35 Correct 11 ms 28528 KB Output is correct
36 Correct 11 ms 28504 KB Output is correct
37 Correct 11 ms 28508 KB Output is correct
38 Correct 11 ms 28448 KB Output is correct
39 Correct 13 ms 28508 KB Output is correct
40 Correct 11 ms 28508 KB Output is correct
41 Correct 14 ms 28508 KB Output is correct
42 Correct 11 ms 28556 KB Output is correct
43 Correct 13 ms 28764 KB Output is correct
44 Correct 15 ms 28920 KB Output is correct
45 Correct 315 ms 69044 KB Output is correct
46 Correct 500 ms 88492 KB Output is correct
47 Correct 478 ms 88212 KB Output is correct
48 Correct 11 ms 28508 KB Output is correct
49 Correct 12 ms 28504 KB Output is correct
50 Correct 10 ms 28708 KB Output is correct
51 Correct 12 ms 28508 KB Output is correct
52 Correct 15 ms 28508 KB Output is correct
53 Correct 12 ms 28504 KB Output is correct
54 Correct 11 ms 28540 KB Output is correct
55 Correct 947 ms 119196 KB Output is correct
56 Correct 12 ms 28504 KB Output is correct
57 Correct 15 ms 29276 KB Output is correct
58 Correct 29 ms 31368 KB Output is correct
59 Correct 21 ms 30036 KB Output is correct
60 Correct 429 ms 74160 KB Output is correct
61 Correct 590 ms 90116 KB Output is correct
62 Correct 805 ms 103476 KB Output is correct
63 Correct 947 ms 118884 KB Output is correct
64 Correct 12 ms 28504 KB Output is correct
65 Correct 12 ms 28508 KB Output is correct
66 Correct 11 ms 28508 KB Output is correct
67 Correct 684 ms 123236 KB Output is correct
68 Correct 704 ms 123248 KB Output is correct
69 Correct 705 ms 123524 KB Output is correct
70 Correct 15 ms 29020 KB Output is correct
71 Correct 17 ms 29532 KB Output is correct
72 Correct 330 ms 67396 KB Output is correct
73 Correct 494 ms 88652 KB Output is correct
74 Correct 753 ms 106872 KB Output is correct
75 Correct 841 ms 116408 KB Output is correct
76 Correct 719 ms 125044 KB Output is correct
77 Correct 15 ms 29272 KB Output is correct
78 Correct 19 ms 29788 KB Output is correct
79 Correct 327 ms 69736 KB Output is correct
80 Correct 529 ms 91452 KB Output is correct
81 Correct 759 ms 111316 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 11 ms 28508 KB Output is correct
2 Correct 14 ms 28508 KB Output is correct
3 Correct 12 ms 28440 KB Output is correct
4 Correct 12 ms 28508 KB Output is correct
5 Correct 11 ms 28508 KB Output is correct
6 Correct 12 ms 28564 KB Output is correct
7 Correct 11 ms 28508 KB Output is correct
8 Correct 10 ms 28504 KB Output is correct
9 Correct 302 ms 76464 KB Output is correct
10 Correct 26 ms 33616 KB Output is correct
11 Correct 111 ms 54392 KB Output is correct
12 Correct 35 ms 35932 KB Output is correct
13 Correct 37 ms 34644 KB Output is correct
14 Correct 11 ms 28764 KB Output is correct
15 Correct 12 ms 28820 KB Output is correct
16 Correct 290 ms 75044 KB Output is correct
17 Correct 11 ms 28504 KB Output is correct
18 Correct 11 ms 28508 KB Output is correct
19 Correct 13 ms 28508 KB Output is correct
20 Correct 602 ms 102264 KB Output is correct
21 Correct 784 ms 101952 KB Output is correct
22 Correct 676 ms 100964 KB Output is correct
23 Correct 559 ms 109728 KB Output is correct
24 Correct 172 ms 45836 KB Output is correct
25 Correct 355 ms 52304 KB Output is correct
26 Correct 298 ms 52280 KB Output is correct
27 Correct 704 ms 118744 KB Output is correct
28 Correct 719 ms 118648 KB Output is correct
29 Correct 703 ms 118652 KB Output is correct
30 Correct 720 ms 118644 KB Output is correct
31 Correct 11 ms 28508 KB Output is correct
32 Correct 42 ms 34304 KB Output is correct
33 Correct 82 ms 37712 KB Output is correct
34 Correct 656 ms 101316 KB Output is correct
35 Correct 20 ms 29784 KB Output is correct
36 Correct 65 ms 34752 KB Output is correct
37 Correct 133 ms 41300 KB Output is correct
38 Correct 240 ms 59048 KB Output is correct
39 Correct 361 ms 69604 KB Output is correct
40 Correct 469 ms 81864 KB Output is correct
41 Correct 599 ms 92660 KB Output is correct
42 Correct 749 ms 103168 KB Output is correct
43 Correct 12 ms 28508 KB Output is correct
44 Correct 11 ms 28668 KB Output is correct
45 Correct 12 ms 28616 KB Output is correct
46 Correct 12 ms 28440 KB Output is correct
47 Correct 13 ms 28640 KB Output is correct
48 Correct 12 ms 28508 KB Output is correct
49 Correct 13 ms 28508 KB Output is correct
50 Correct 11 ms 28508 KB Output is correct
51 Correct 12 ms 28636 KB Output is correct
52 Correct 11 ms 28620 KB Output is correct
53 Correct 11 ms 28508 KB Output is correct
54 Correct 14 ms 28760 KB Output is correct
55 Correct 13 ms 28828 KB Output is correct
56 Correct 311 ms 69124 KB Output is correct
57 Correct 478 ms 88232 KB Output is correct
58 Correct 474 ms 87980 KB Output is correct
59 Correct 12 ms 28508 KB Output is correct
60 Correct 14 ms 28764 KB Output is correct
61 Correct 11 ms 28508 KB Output is correct
62 Correct 741 ms 123132 KB Output is correct
63 Correct 706 ms 123256 KB Output is correct
64 Correct 712 ms 123524 KB Output is correct
65 Correct 15 ms 29016 KB Output is correct
66 Correct 17 ms 29532 KB Output is correct
67 Correct 289 ms 67436 KB Output is correct
68 Correct 483 ms 88656 KB Output is correct
69 Correct 729 ms 106900 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 11 ms 28508 KB Output is correct
2 Correct 14 ms 28508 KB Output is correct
3 Correct 12 ms 28440 KB Output is correct
4 Correct 12 ms 28508 KB Output is correct
5 Correct 11 ms 28508 KB Output is correct
6 Correct 12 ms 28564 KB Output is correct
7 Correct 11 ms 28508 KB Output is correct
8 Correct 10 ms 28504 KB Output is correct
9 Correct 302 ms 76464 KB Output is correct
10 Correct 26 ms 33616 KB Output is correct
11 Correct 111 ms 54392 KB Output is correct
12 Correct 35 ms 35932 KB Output is correct
13 Correct 37 ms 34644 KB Output is correct
14 Correct 11 ms 28764 KB Output is correct
15 Correct 12 ms 28820 KB Output is correct
16 Correct 290 ms 75044 KB Output is correct
17 Correct 713 ms 125832 KB Output is correct
18 Correct 741 ms 125556 KB Output is correct
19 Correct 649 ms 102108 KB Output is correct
20 Correct 870 ms 107176 KB Output is correct
21 Correct 706 ms 106320 KB Output is correct
22 Correct 12 ms 28504 KB Output is correct
23 Correct 94 ms 40788 KB Output is correct
24 Correct 32 ms 31184 KB Output is correct
25 Correct 97 ms 37964 KB Output is correct
26 Correct 178 ms 44372 KB Output is correct
27 Correct 344 ms 69256 KB Output is correct
28 Correct 442 ms 79568 KB Output is correct
29 Correct 553 ms 90972 KB Output is correct
30 Correct 666 ms 100092 KB Output is correct
31 Correct 844 ms 110260 KB Output is correct
32 Correct 849 ms 116364 KB Output is correct
33 Correct 699 ms 124564 KB Output is correct
34 Correct 15 ms 29272 KB Output is correct
35 Correct 17 ms 29788 KB Output is correct
36 Correct 337 ms 69632 KB Output is correct
37 Correct 532 ms 91332 KB Output is correct
38 Correct 782 ms 111452 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 11 ms 28508 KB Output is correct
2 Correct 14 ms 28508 KB Output is correct
3 Correct 12 ms 28440 KB Output is correct
4 Correct 12 ms 28508 KB Output is correct
5 Correct 11 ms 28508 KB Output is correct
6 Correct 12 ms 28564 KB Output is correct
7 Correct 11 ms 28508 KB Output is correct
8 Correct 10 ms 28504 KB Output is correct
9 Correct 302 ms 76464 KB Output is correct
10 Correct 26 ms 33616 KB Output is correct
11 Correct 111 ms 54392 KB Output is correct
12 Correct 35 ms 35932 KB Output is correct
13 Correct 37 ms 34644 KB Output is correct
14 Correct 11 ms 28764 KB Output is correct
15 Correct 12 ms 28820 KB Output is correct
16 Correct 290 ms 75044 KB Output is correct
17 Correct 14 ms 28508 KB Output is correct
18 Correct 11 ms 28508 KB Output is correct
19 Correct 10 ms 28536 KB Output is correct
20 Correct 11 ms 28504 KB Output is correct
21 Correct 12 ms 28636 KB Output is correct
22 Correct 15 ms 28512 KB Output is correct
23 Correct 908 ms 124652 KB Output is correct
24 Correct 11 ms 28508 KB Output is correct
25 Correct 15 ms 29160 KB Output is correct
26 Correct 14 ms 29016 KB Output is correct
27 Correct 20 ms 29036 KB Output is correct
28 Correct 296 ms 67004 KB Output is correct
29 Correct 482 ms 85512 KB Output is correct
30 Correct 682 ms 105180 KB Output is correct
31 Correct 869 ms 123544 KB Output is correct
32 Correct 11 ms 28508 KB Output is correct
33 Correct 11 ms 28496 KB Output is correct
34 Correct 11 ms 28508 KB Output is correct
35 Correct 11 ms 28528 KB Output is correct
36 Correct 11 ms 28504 KB Output is correct
37 Correct 11 ms 28508 KB Output is correct
38 Correct 11 ms 28448 KB Output is correct
39 Correct 13 ms 28508 KB Output is correct
40 Correct 11 ms 28508 KB Output is correct
41 Correct 14 ms 28508 KB Output is correct
42 Correct 11 ms 28556 KB Output is correct
43 Correct 13 ms 28764 KB Output is correct
44 Correct 15 ms 28920 KB Output is correct
45 Correct 315 ms 69044 KB Output is correct
46 Correct 500 ms 88492 KB Output is correct
47 Correct 478 ms 88212 KB Output is correct
48 Correct 11 ms 28508 KB Output is correct
49 Correct 12 ms 28504 KB Output is correct
50 Correct 10 ms 28708 KB Output is correct
51 Correct 12 ms 28508 KB Output is correct
52 Correct 15 ms 28508 KB Output is correct
53 Correct 12 ms 28504 KB Output is correct
54 Correct 11 ms 28540 KB Output is correct
55 Correct 947 ms 119196 KB Output is correct
56 Correct 12 ms 28504 KB Output is correct
57 Correct 15 ms 29276 KB Output is correct
58 Correct 29 ms 31368 KB Output is correct
59 Correct 21 ms 30036 KB Output is correct
60 Correct 429 ms 74160 KB Output is correct
61 Correct 590 ms 90116 KB Output is correct
62 Correct 805 ms 103476 KB Output is correct
63 Correct 947 ms 118884 KB Output is correct
64 Correct 12 ms 28504 KB Output is correct
65 Correct 12 ms 28508 KB Output is correct
66 Correct 11 ms 28508 KB Output is correct
67 Correct 684 ms 123236 KB Output is correct
68 Correct 704 ms 123248 KB Output is correct
69 Correct 705 ms 123524 KB Output is correct
70 Correct 15 ms 29020 KB Output is correct
71 Correct 17 ms 29532 KB Output is correct
72 Correct 330 ms 67396 KB Output is correct
73 Correct 494 ms 88652 KB Output is correct
74 Correct 753 ms 106872 KB Output is correct
75 Correct 841 ms 116408 KB Output is correct
76 Correct 719 ms 125044 KB Output is correct
77 Correct 15 ms 29272 KB Output is correct
78 Correct 19 ms 29788 KB Output is correct
79 Correct 327 ms 69736 KB Output is correct
80 Correct 529 ms 91452 KB Output is correct
81 Correct 759 ms 111316 KB Output is correct
82 Correct 11 ms 28504 KB Output is correct
83 Correct 11 ms 28508 KB Output is correct
84 Correct 13 ms 28508 KB Output is correct
85 Correct 602 ms 102264 KB Output is correct
86 Correct 784 ms 101952 KB Output is correct
87 Correct 676 ms 100964 KB Output is correct
88 Correct 559 ms 109728 KB Output is correct
89 Correct 172 ms 45836 KB Output is correct
90 Correct 355 ms 52304 KB Output is correct
91 Correct 298 ms 52280 KB Output is correct
92 Correct 704 ms 118744 KB Output is correct
93 Correct 719 ms 118648 KB Output is correct
94 Correct 703 ms 118652 KB Output is correct
95 Correct 720 ms 118644 KB Output is correct
96 Correct 11 ms 28508 KB Output is correct
97 Correct 42 ms 34304 KB Output is correct
98 Correct 82 ms 37712 KB Output is correct
99 Correct 656 ms 101316 KB Output is correct
100 Correct 20 ms 29784 KB Output is correct
101 Correct 65 ms 34752 KB Output is correct
102 Correct 133 ms 41300 KB Output is correct
103 Correct 240 ms 59048 KB Output is correct
104 Correct 361 ms 69604 KB Output is correct
105 Correct 469 ms 81864 KB Output is correct
106 Correct 599 ms 92660 KB Output is correct
107 Correct 749 ms 103168 KB Output is correct
108 Correct 12 ms 28508 KB Output is correct
109 Correct 11 ms 28668 KB Output is correct
110 Correct 12 ms 28616 KB Output is correct
111 Correct 12 ms 28440 KB Output is correct
112 Correct 13 ms 28640 KB Output is correct
113 Correct 12 ms 28508 KB Output is correct
114 Correct 13 ms 28508 KB Output is correct
115 Correct 11 ms 28508 KB Output is correct
116 Correct 12 ms 28636 KB Output is correct
117 Correct 11 ms 28620 KB Output is correct
118 Correct 11 ms 28508 KB Output is correct
119 Correct 14 ms 28760 KB Output is correct
120 Correct 13 ms 28828 KB Output is correct
121 Correct 311 ms 69124 KB Output is correct
122 Correct 478 ms 88232 KB Output is correct
123 Correct 474 ms 87980 KB Output is correct
124 Correct 12 ms 28508 KB Output is correct
125 Correct 14 ms 28764 KB Output is correct
126 Correct 11 ms 28508 KB Output is correct
127 Correct 741 ms 123132 KB Output is correct
128 Correct 706 ms 123256 KB Output is correct
129 Correct 712 ms 123524 KB Output is correct
130 Correct 15 ms 29016 KB Output is correct
131 Correct 17 ms 29532 KB Output is correct
132 Correct 289 ms 67436 KB Output is correct
133 Correct 483 ms 88656 KB Output is correct
134 Correct 729 ms 106900 KB Output is correct
135 Correct 713 ms 125832 KB Output is correct
136 Correct 741 ms 125556 KB Output is correct
137 Correct 649 ms 102108 KB Output is correct
138 Correct 870 ms 107176 KB Output is correct
139 Correct 706 ms 106320 KB Output is correct
140 Correct 12 ms 28504 KB Output is correct
141 Correct 94 ms 40788 KB Output is correct
142 Correct 32 ms 31184 KB Output is correct
143 Correct 97 ms 37964 KB Output is correct
144 Correct 178 ms 44372 KB Output is correct
145 Correct 344 ms 69256 KB Output is correct
146 Correct 442 ms 79568 KB Output is correct
147 Correct 553 ms 90972 KB Output is correct
148 Correct 666 ms 100092 KB Output is correct
149 Correct 844 ms 110260 KB Output is correct
150 Correct 849 ms 116364 KB Output is correct
151 Correct 699 ms 124564 KB Output is correct
152 Correct 15 ms 29272 KB Output is correct
153 Correct 17 ms 29788 KB Output is correct
154 Correct 337 ms 69632 KB Output is correct
155 Correct 532 ms 91332 KB Output is correct
156 Correct 782 ms 111452 KB Output is correct
157 Correct 16 ms 28508 KB Output is correct
158 Correct 13 ms 28640 KB Output is correct
159 Correct 11 ms 28456 KB Output is correct
160 Correct 12 ms 28508 KB Output is correct
161 Correct 967 ms 111276 KB Output is correct
162 Correct 691 ms 100544 KB Output is correct
163 Correct 776 ms 103088 KB Output is correct
164 Correct 757 ms 102704 KB Output is correct
165 Correct 881 ms 109480 KB Output is correct
166 Correct 1006 ms 110840 KB Output is correct
167 Correct 679 ms 47736 KB Output is correct
168 Correct 51 ms 33092 KB Output is correct
169 Correct 139 ms 40272 KB Output is correct
170 Correct 266 ms 50276 KB Output is correct
171 Correct 371 ms 57212 KB Output is correct
172 Correct 612 ms 70152 KB Output is correct
173 Correct 748 ms 78948 KB Output is correct
174 Correct 885 ms 86972 KB Output is correct
175 Correct 1074 ms 95152 KB Output is correct
176 Correct 1179 ms 103472 KB Output is correct
177 Correct 1713 ms 111616 KB Output is correct