답안 #1092345

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1092345 2024-09-23T20:41:04 Z TlenekWodoru 분수 공원 (IOI21_parks) C++17
70 / 100
3500 ms 127076 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];
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=rand()%n;
    vector<bool>Zaj(N);
    Zaj[start]=1;
    deque<int>Y={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;
    }
    //BFS();
    random_shuffle(g,g+N);
    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<=10;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;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 28504 KB Output is correct
2 Correct 13 ms 28508 KB Output is correct
3 Correct 11 ms 28636 KB Output is correct
4 Correct 11 ms 28628 KB Output is correct
5 Correct 11 ms 28496 KB Output is correct
6 Correct 10 ms 28508 KB Output is correct
7 Correct 11 ms 28508 KB Output is correct
8 Correct 12 ms 28508 KB Output is correct
9 Correct 323 ms 75708 KB Output is correct
10 Correct 26 ms 33616 KB Output is correct
11 Correct 123 ms 54220 KB Output is correct
12 Correct 36 ms 35784 KB Output is correct
13 Correct 34 ms 34644 KB Output is correct
14 Correct 16 ms 28504 KB Output is correct
15 Correct 17 ms 28764 KB Output is correct
16 Correct 292 ms 74424 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 28504 KB Output is correct
2 Correct 13 ms 28508 KB Output is correct
3 Correct 11 ms 28636 KB Output is correct
4 Correct 11 ms 28628 KB Output is correct
5 Correct 11 ms 28496 KB Output is correct
6 Correct 10 ms 28508 KB Output is correct
7 Correct 11 ms 28508 KB Output is correct
8 Correct 12 ms 28508 KB Output is correct
9 Correct 323 ms 75708 KB Output is correct
10 Correct 26 ms 33616 KB Output is correct
11 Correct 123 ms 54220 KB Output is correct
12 Correct 36 ms 35784 KB Output is correct
13 Correct 34 ms 34644 KB Output is correct
14 Correct 16 ms 28504 KB Output is correct
15 Correct 17 ms 28764 KB Output is correct
16 Correct 292 ms 74424 KB Output is correct
17 Correct 11 ms 28508 KB Output is correct
18 Correct 11 ms 28556 KB Output is correct
19 Correct 13 ms 28508 KB Output is correct
20 Correct 11 ms 28504 KB Output is correct
21 Correct 12 ms 28504 KB Output is correct
22 Correct 12 ms 28508 KB Output is correct
23 Correct 943 ms 126812 KB Output is correct
24 Correct 11 ms 28504 KB Output is correct
25 Correct 13 ms 29240 KB Output is correct
26 Correct 12 ms 29016 KB Output is correct
27 Correct 13 ms 29020 KB Output is correct
28 Correct 305 ms 67844 KB Output is correct
29 Correct 512 ms 87320 KB Output is correct
30 Correct 822 ms 106064 KB Output is correct
31 Correct 1139 ms 127076 KB Output is correct
32 Correct 13 ms 28472 KB Output is correct
33 Correct 11 ms 28508 KB Output is correct
34 Correct 11 ms 28524 KB Output is correct
35 Correct 12 ms 28508 KB Output is correct
36 Correct 11 ms 28508 KB Output is correct
37 Correct 11 ms 28508 KB Output is correct
38 Correct 12 ms 28508 KB Output is correct
39 Correct 14 ms 28508 KB Output is correct
40 Correct 12 ms 28508 KB Output is correct
41 Correct 11 ms 28508 KB Output is correct
42 Correct 12 ms 28508 KB Output is correct
43 Correct 14 ms 28760 KB Output is correct
44 Correct 14 ms 28764 KB Output is correct
45 Correct 285 ms 68280 KB Output is correct
46 Correct 483 ms 86184 KB Output is correct
47 Correct 451 ms 86180 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 28504 KB Output is correct
2 Correct 13 ms 28508 KB Output is correct
3 Correct 11 ms 28636 KB Output is correct
4 Correct 11 ms 28628 KB Output is correct
5 Correct 11 ms 28496 KB Output is correct
6 Correct 10 ms 28508 KB Output is correct
7 Correct 11 ms 28508 KB Output is correct
8 Correct 12 ms 28508 KB Output is correct
9 Correct 323 ms 75708 KB Output is correct
10 Correct 26 ms 33616 KB Output is correct
11 Correct 123 ms 54220 KB Output is correct
12 Correct 36 ms 35784 KB Output is correct
13 Correct 34 ms 34644 KB Output is correct
14 Correct 16 ms 28504 KB Output is correct
15 Correct 17 ms 28764 KB Output is correct
16 Correct 292 ms 74424 KB Output is correct
17 Correct 11 ms 28508 KB Output is correct
18 Correct 11 ms 28556 KB Output is correct
19 Correct 13 ms 28508 KB Output is correct
20 Correct 11 ms 28504 KB Output is correct
21 Correct 12 ms 28504 KB Output is correct
22 Correct 12 ms 28508 KB Output is correct
23 Correct 943 ms 126812 KB Output is correct
24 Correct 11 ms 28504 KB Output is correct
25 Correct 13 ms 29240 KB Output is correct
26 Correct 12 ms 29016 KB Output is correct
27 Correct 13 ms 29020 KB Output is correct
28 Correct 305 ms 67844 KB Output is correct
29 Correct 512 ms 87320 KB Output is correct
30 Correct 822 ms 106064 KB Output is correct
31 Correct 1139 ms 127076 KB Output is correct
32 Correct 13 ms 28472 KB Output is correct
33 Correct 11 ms 28508 KB Output is correct
34 Correct 11 ms 28524 KB Output is correct
35 Correct 12 ms 28508 KB Output is correct
36 Correct 11 ms 28508 KB Output is correct
37 Correct 11 ms 28508 KB Output is correct
38 Correct 12 ms 28508 KB Output is correct
39 Correct 14 ms 28508 KB Output is correct
40 Correct 12 ms 28508 KB Output is correct
41 Correct 11 ms 28508 KB Output is correct
42 Correct 12 ms 28508 KB Output is correct
43 Correct 14 ms 28760 KB Output is correct
44 Correct 14 ms 28764 KB Output is correct
45 Correct 285 ms 68280 KB Output is correct
46 Correct 483 ms 86184 KB Output is correct
47 Correct 451 ms 86180 KB Output is correct
48 Correct 11 ms 28504 KB Output is correct
49 Correct 14 ms 28540 KB Output is correct
50 Correct 11 ms 28504 KB Output is correct
51 Correct 11 ms 28636 KB Output is correct
52 Correct 11 ms 28508 KB Output is correct
53 Correct 11 ms 28508 KB Output is correct
54 Correct 11 ms 28508 KB Output is correct
55 Correct 1072 ms 118408 KB Output is correct
56 Correct 12 ms 28664 KB Output is correct
57 Correct 15 ms 29276 KB Output is correct
58 Correct 29 ms 31488 KB Output is correct
59 Correct 21 ms 30032 KB Output is correct
60 Correct 499 ms 73876 KB Output is correct
61 Correct 684 ms 89672 KB Output is correct
62 Correct 820 ms 103084 KB Output is correct
63 Correct 1040 ms 118252 KB Output is correct
64 Correct 11 ms 28504 KB Output is correct
65 Correct 13 ms 28508 KB Output is correct
66 Correct 11 ms 28508 KB Output is correct
67 Correct 709 ms 121420 KB Output is correct
68 Correct 726 ms 121512 KB Output is correct
69 Correct 729 ms 121776 KB Output is correct
70 Correct 14 ms 29020 KB Output is correct
71 Correct 16 ms 29428 KB Output is correct
72 Correct 297 ms 66744 KB Output is correct
73 Correct 484 ms 86700 KB Output is correct
74 Correct 747 ms 105132 KB Output is correct
75 Correct 869 ms 116904 KB Output is correct
76 Correct 723 ms 123304 KB Output is correct
77 Correct 19 ms 29276 KB Output is correct
78 Correct 20 ms 29784 KB Output is correct
79 Correct 326 ms 69456 KB Output is correct
80 Correct 528 ms 90304 KB Output is correct
81 Correct 754 ms 110436 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 28504 KB Output is correct
2 Correct 13 ms 28508 KB Output is correct
3 Correct 11 ms 28636 KB Output is correct
4 Correct 11 ms 28628 KB Output is correct
5 Correct 11 ms 28496 KB Output is correct
6 Correct 10 ms 28508 KB Output is correct
7 Correct 11 ms 28508 KB Output is correct
8 Correct 12 ms 28508 KB Output is correct
9 Correct 323 ms 75708 KB Output is correct
10 Correct 26 ms 33616 KB Output is correct
11 Correct 123 ms 54220 KB Output is correct
12 Correct 36 ms 35784 KB Output is correct
13 Correct 34 ms 34644 KB Output is correct
14 Correct 16 ms 28504 KB Output is correct
15 Correct 17 ms 28764 KB Output is correct
16 Correct 292 ms 74424 KB Output is correct
17 Correct 10 ms 28504 KB Output is correct
18 Correct 10 ms 28508 KB Output is correct
19 Correct 10 ms 28508 KB Output is correct
20 Correct 719 ms 105812 KB Output is correct
21 Correct 775 ms 102128 KB Output is correct
22 Correct 730 ms 102096 KB Output is correct
23 Correct 581 ms 107432 KB Output is correct
24 Correct 169 ms 45740 KB Output is correct
25 Correct 306 ms 52304 KB Output is correct
26 Correct 304 ms 52308 KB Output is correct
27 Correct 799 ms 116908 KB Output is correct
28 Correct 803 ms 116876 KB Output is correct
29 Correct 738 ms 116904 KB Output is correct
30 Correct 755 ms 116920 KB Output is correct
31 Correct 10 ms 28760 KB Output is correct
32 Correct 42 ms 34356 KB Output is correct
33 Correct 81 ms 37712 KB Output is correct
34 Correct 754 ms 107332 KB Output is correct
35 Correct 20 ms 29784 KB Output is correct
36 Correct 80 ms 34900 KB Output is correct
37 Correct 132 ms 41296 KB Output is correct
38 Correct 243 ms 57584 KB Output is correct
39 Correct 333 ms 68296 KB Output is correct
40 Correct 467 ms 79092 KB Output is correct
41 Correct 658 ms 90072 KB Output is correct
42 Correct 722 ms 100800 KB Output is correct
43 Correct 12 ms 28508 KB Output is correct
44 Correct 14 ms 28508 KB Output is correct
45 Correct 10 ms 28504 KB Output is correct
46 Correct 11 ms 28508 KB Output is correct
47 Correct 14 ms 28508 KB Output is correct
48 Correct 13 ms 28508 KB Output is correct
49 Correct 11 ms 28508 KB Output is correct
50 Correct 11 ms 28508 KB Output is correct
51 Correct 10 ms 28504 KB Output is correct
52 Correct 10 ms 28508 KB Output is correct
53 Correct 10 ms 28524 KB Output is correct
54 Correct 11 ms 28884 KB Output is correct
55 Correct 13 ms 28760 KB Output is correct
56 Correct 280 ms 68168 KB Output is correct
57 Correct 457 ms 86164 KB Output is correct
58 Correct 496 ms 85932 KB Output is correct
59 Correct 13 ms 28508 KB Output is correct
60 Correct 11 ms 28508 KB Output is correct
61 Correct 12 ms 28436 KB Output is correct
62 Correct 741 ms 121368 KB Output is correct
63 Correct 710 ms 121668 KB Output is correct
64 Correct 702 ms 121776 KB Output is correct
65 Correct 16 ms 29020 KB Output is correct
66 Correct 17 ms 29532 KB Output is correct
67 Correct 296 ms 66752 KB Output is correct
68 Correct 483 ms 86720 KB Output is correct
69 Correct 672 ms 105128 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 28504 KB Output is correct
2 Correct 13 ms 28508 KB Output is correct
3 Correct 11 ms 28636 KB Output is correct
4 Correct 11 ms 28628 KB Output is correct
5 Correct 11 ms 28496 KB Output is correct
6 Correct 10 ms 28508 KB Output is correct
7 Correct 11 ms 28508 KB Output is correct
8 Correct 12 ms 28508 KB Output is correct
9 Correct 323 ms 75708 KB Output is correct
10 Correct 26 ms 33616 KB Output is correct
11 Correct 123 ms 54220 KB Output is correct
12 Correct 36 ms 35784 KB Output is correct
13 Correct 34 ms 34644 KB Output is correct
14 Correct 16 ms 28504 KB Output is correct
15 Correct 17 ms 28764 KB Output is correct
16 Correct 292 ms 74424 KB Output is correct
17 Correct 763 ms 123712 KB Output is correct
18 Correct 769 ms 123184 KB Output is correct
19 Correct 791 ms 105272 KB Output is correct
20 Correct 854 ms 109196 KB Output is correct
21 Correct 705 ms 105396 KB Output is correct
22 Correct 11 ms 28504 KB Output is correct
23 Correct 91 ms 40904 KB Output is correct
24 Correct 30 ms 31324 KB Output is correct
25 Correct 98 ms 38008 KB Output is correct
26 Correct 169 ms 44368 KB Output is correct
27 Correct 346 ms 69192 KB Output is correct
28 Correct 455 ms 79460 KB Output is correct
29 Correct 593 ms 89516 KB Output is correct
30 Correct 721 ms 99464 KB Output is correct
31 Correct 812 ms 109740 KB Output is correct
32 Correct 819 ms 116860 KB Output is correct
33 Correct 726 ms 122792 KB Output is correct
34 Correct 16 ms 29276 KB Output is correct
35 Correct 20 ms 29788 KB Output is correct
36 Correct 340 ms 69468 KB Output is correct
37 Correct 510 ms 90280 KB Output is correct
38 Correct 809 ms 110532 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 28504 KB Output is correct
2 Correct 13 ms 28508 KB Output is correct
3 Correct 11 ms 28636 KB Output is correct
4 Correct 11 ms 28628 KB Output is correct
5 Correct 11 ms 28496 KB Output is correct
6 Correct 10 ms 28508 KB Output is correct
7 Correct 11 ms 28508 KB Output is correct
8 Correct 12 ms 28508 KB Output is correct
9 Correct 323 ms 75708 KB Output is correct
10 Correct 26 ms 33616 KB Output is correct
11 Correct 123 ms 54220 KB Output is correct
12 Correct 36 ms 35784 KB Output is correct
13 Correct 34 ms 34644 KB Output is correct
14 Correct 16 ms 28504 KB Output is correct
15 Correct 17 ms 28764 KB Output is correct
16 Correct 292 ms 74424 KB Output is correct
17 Correct 11 ms 28508 KB Output is correct
18 Correct 11 ms 28556 KB Output is correct
19 Correct 13 ms 28508 KB Output is correct
20 Correct 11 ms 28504 KB Output is correct
21 Correct 12 ms 28504 KB Output is correct
22 Correct 12 ms 28508 KB Output is correct
23 Correct 943 ms 126812 KB Output is correct
24 Correct 11 ms 28504 KB Output is correct
25 Correct 13 ms 29240 KB Output is correct
26 Correct 12 ms 29016 KB Output is correct
27 Correct 13 ms 29020 KB Output is correct
28 Correct 305 ms 67844 KB Output is correct
29 Correct 512 ms 87320 KB Output is correct
30 Correct 822 ms 106064 KB Output is correct
31 Correct 1139 ms 127076 KB Output is correct
32 Correct 13 ms 28472 KB Output is correct
33 Correct 11 ms 28508 KB Output is correct
34 Correct 11 ms 28524 KB Output is correct
35 Correct 12 ms 28508 KB Output is correct
36 Correct 11 ms 28508 KB Output is correct
37 Correct 11 ms 28508 KB Output is correct
38 Correct 12 ms 28508 KB Output is correct
39 Correct 14 ms 28508 KB Output is correct
40 Correct 12 ms 28508 KB Output is correct
41 Correct 11 ms 28508 KB Output is correct
42 Correct 12 ms 28508 KB Output is correct
43 Correct 14 ms 28760 KB Output is correct
44 Correct 14 ms 28764 KB Output is correct
45 Correct 285 ms 68280 KB Output is correct
46 Correct 483 ms 86184 KB Output is correct
47 Correct 451 ms 86180 KB Output is correct
48 Correct 11 ms 28504 KB Output is correct
49 Correct 14 ms 28540 KB Output is correct
50 Correct 11 ms 28504 KB Output is correct
51 Correct 11 ms 28636 KB Output is correct
52 Correct 11 ms 28508 KB Output is correct
53 Correct 11 ms 28508 KB Output is correct
54 Correct 11 ms 28508 KB Output is correct
55 Correct 1072 ms 118408 KB Output is correct
56 Correct 12 ms 28664 KB Output is correct
57 Correct 15 ms 29276 KB Output is correct
58 Correct 29 ms 31488 KB Output is correct
59 Correct 21 ms 30032 KB Output is correct
60 Correct 499 ms 73876 KB Output is correct
61 Correct 684 ms 89672 KB Output is correct
62 Correct 820 ms 103084 KB Output is correct
63 Correct 1040 ms 118252 KB Output is correct
64 Correct 11 ms 28504 KB Output is correct
65 Correct 13 ms 28508 KB Output is correct
66 Correct 11 ms 28508 KB Output is correct
67 Correct 709 ms 121420 KB Output is correct
68 Correct 726 ms 121512 KB Output is correct
69 Correct 729 ms 121776 KB Output is correct
70 Correct 14 ms 29020 KB Output is correct
71 Correct 16 ms 29428 KB Output is correct
72 Correct 297 ms 66744 KB Output is correct
73 Correct 484 ms 86700 KB Output is correct
74 Correct 747 ms 105132 KB Output is correct
75 Correct 869 ms 116904 KB Output is correct
76 Correct 723 ms 123304 KB Output is correct
77 Correct 19 ms 29276 KB Output is correct
78 Correct 20 ms 29784 KB Output is correct
79 Correct 326 ms 69456 KB Output is correct
80 Correct 528 ms 90304 KB Output is correct
81 Correct 754 ms 110436 KB Output is correct
82 Correct 10 ms 28504 KB Output is correct
83 Correct 10 ms 28508 KB Output is correct
84 Correct 10 ms 28508 KB Output is correct
85 Correct 719 ms 105812 KB Output is correct
86 Correct 775 ms 102128 KB Output is correct
87 Correct 730 ms 102096 KB Output is correct
88 Correct 581 ms 107432 KB Output is correct
89 Correct 169 ms 45740 KB Output is correct
90 Correct 306 ms 52304 KB Output is correct
91 Correct 304 ms 52308 KB Output is correct
92 Correct 799 ms 116908 KB Output is correct
93 Correct 803 ms 116876 KB Output is correct
94 Correct 738 ms 116904 KB Output is correct
95 Correct 755 ms 116920 KB Output is correct
96 Correct 10 ms 28760 KB Output is correct
97 Correct 42 ms 34356 KB Output is correct
98 Correct 81 ms 37712 KB Output is correct
99 Correct 754 ms 107332 KB Output is correct
100 Correct 20 ms 29784 KB Output is correct
101 Correct 80 ms 34900 KB Output is correct
102 Correct 132 ms 41296 KB Output is correct
103 Correct 243 ms 57584 KB Output is correct
104 Correct 333 ms 68296 KB Output is correct
105 Correct 467 ms 79092 KB Output is correct
106 Correct 658 ms 90072 KB Output is correct
107 Correct 722 ms 100800 KB Output is correct
108 Correct 12 ms 28508 KB Output is correct
109 Correct 14 ms 28508 KB Output is correct
110 Correct 10 ms 28504 KB Output is correct
111 Correct 11 ms 28508 KB Output is correct
112 Correct 14 ms 28508 KB Output is correct
113 Correct 13 ms 28508 KB Output is correct
114 Correct 11 ms 28508 KB Output is correct
115 Correct 11 ms 28508 KB Output is correct
116 Correct 10 ms 28504 KB Output is correct
117 Correct 10 ms 28508 KB Output is correct
118 Correct 10 ms 28524 KB Output is correct
119 Correct 11 ms 28884 KB Output is correct
120 Correct 13 ms 28760 KB Output is correct
121 Correct 280 ms 68168 KB Output is correct
122 Correct 457 ms 86164 KB Output is correct
123 Correct 496 ms 85932 KB Output is correct
124 Correct 13 ms 28508 KB Output is correct
125 Correct 11 ms 28508 KB Output is correct
126 Correct 12 ms 28436 KB Output is correct
127 Correct 741 ms 121368 KB Output is correct
128 Correct 710 ms 121668 KB Output is correct
129 Correct 702 ms 121776 KB Output is correct
130 Correct 16 ms 29020 KB Output is correct
131 Correct 17 ms 29532 KB Output is correct
132 Correct 296 ms 66752 KB Output is correct
133 Correct 483 ms 86720 KB Output is correct
134 Correct 672 ms 105128 KB Output is correct
135 Correct 763 ms 123712 KB Output is correct
136 Correct 769 ms 123184 KB Output is correct
137 Correct 791 ms 105272 KB Output is correct
138 Correct 854 ms 109196 KB Output is correct
139 Correct 705 ms 105396 KB Output is correct
140 Correct 11 ms 28504 KB Output is correct
141 Correct 91 ms 40904 KB Output is correct
142 Correct 30 ms 31324 KB Output is correct
143 Correct 98 ms 38008 KB Output is correct
144 Correct 169 ms 44368 KB Output is correct
145 Correct 346 ms 69192 KB Output is correct
146 Correct 455 ms 79460 KB Output is correct
147 Correct 593 ms 89516 KB Output is correct
148 Correct 721 ms 99464 KB Output is correct
149 Correct 812 ms 109740 KB Output is correct
150 Correct 819 ms 116860 KB Output is correct
151 Correct 726 ms 122792 KB Output is correct
152 Correct 16 ms 29276 KB Output is correct
153 Correct 20 ms 29788 KB Output is correct
154 Correct 340 ms 69468 KB Output is correct
155 Correct 510 ms 90280 KB Output is correct
156 Correct 809 ms 110532 KB Output is correct
157 Correct 11 ms 28508 KB Output is correct
158 Correct 10 ms 28396 KB Output is correct
159 Correct 10 ms 28508 KB Output is correct
160 Correct 11 ms 28468 KB Output is correct
161 Execution timed out 3556 ms 101204 KB Time limit exceeded
162 Halted 0 ms 0 KB -