Submission #896363

# Submission time Handle Problem Language Result Execution time Memory
896363 2024-01-01T10:14:02 Z abcvuitunggio Fountain Parks (IOI21_parks) C++17
70 / 100
3500 ms 231656 KB
#include "parks.h"
#include <bits/stdc++.h>
#define int long long
using namespace std;
const int INF=1e17;
struct Edge{
    int u,v,c;
    Edge(){};
    Edge (int u, int v, int c){
        this->u=u;
        this->v=v;
        this->c=c;
    }
};
struct Dinic{
    vector <Edge> s;
    vector <vector <int>> adj;
    vector <vector <int> :: iterator> cur;
    vector <int> h;
    int n, sink, source;
    void Reset(){
        s.clear();
        adj.clear();
        cur.clear();
        h.clear();
    }
    void Assign(int n){
        this->n=n;
        s.reserve(n+2);
        adj.resize(n+2);
        cur.resize(n+2);
        h.resize(n+2);
    }
    void AddEdge(int u, int v, int c){
        s.emplace_back(u,v,c);
        adj[u].emplace_back(s.size()-1);
        s.emplace_back(v,u,0);
        adj[v].emplace_back(s.size()-1);
    }
    bool bfs(){
        fill(h.begin(),h.end(),n+2);
        queue <int> q({sink});
        h[sink]=0;
        while (!q.empty()){
            int c=q.front();
            q.pop();
            for (int i:adj[c])
                if (h[s[i].v]==n+2&&s[i^1].c){
                    h[s[i].v]=h[c]+1;
                    if (s[i].v==source)
                        return true;
                    q.emplace(s[i].v);
                }
        }
        return false;
    }
    int dfs(int v, int flowin){
        if (v==sink)
            return flowin;
        int flowout=0;
        for (;cur[v]!=adj[v].end();++cur[v]){
            int i=*cur[v];
            if (!s[i].c||h[s[i].v]+1!=h[v])
                continue;
            int q=dfs(s[i].v,min(flowin,s[i].c));
            flowout+=q;
            if (flowin!=INF)
                flowin-=q;
            s[i].c-=q;
            s[i^1].c+=q;
            if (!flowin)
                break;
        }
        return flowout;
    }
    int BlockFlow(){
        for (int i=1;i<=n;i++)
            cur[i]=adj[i].begin();
        return dfs(source,INF);
    }
    int MaxFlow(int s, int t){
        source=s;
        sink=t;
        int res=0;
        while (bfs())
            res+=BlockFlow();
        return res;
    }
}g;
int n,dx[4]={-1,0,1,0},dy[4]={0,1,0,-1},p[200001],id,order[200001];
pair <int, int> bench[400001];
map <int, int> mp[300001];
vector <int32_t> px,py;
int f(int i){
    return (p[i]==i?i:p[i]=f(p[i]));
}
bool unite(int i, int j){
    i=f(i);
    j=f(j);
    if (i==j)
        return false;
    p[j]=i;
    return true;
}
int32_t construct_roads(vector <int32_t> x, vector <int32_t> y) {
    if (x.size()==1){
        build({},{},{},{});
        return 1;
    }
    vector <int32_t> u,v,a,b;
    n=x.size();
    for (int i=0;i<n;i++)
        mp[x[i]][y[i]]=i;
    iota(p,p+n,0);
    iota(order,order+n,0);
    px=x,py=y;
    sort(order,order+n,[](int i, int j){return px[i]+py[i]<px[j]+py[j];});
    g.Assign(n*10);
    for (int it=0;it<n;it++){
        int i=order[it];
        for (int j=0;j<4;j++)
            if (mp[x[i]+dx[j]*2].count(y[i]+dy[j]*2)){
                int k=mp[x[i]+dx[j]*2][y[i]+dy[j]*2];
                if (unite(i,k)){
                    u.push_back(i);
                    v.push_back(k);
                    g.AddEdge(n*3-1,u.size(),1);
                    int X=x[i]+dx[j],Y=y[i]+dy[j];
                    for (int l=0;l<4;l++)
                        if (X+dx[l]!=x[i]&&Y+dy[l]!=y[i]){
                            if (!mp[X+dx[l]].count(Y+dy[l])){
                                id++;
                                mp[X+dx[l]][Y+dy[l]]=id;
                                bench[id]={X+dx[l],Y+dy[l]};
                                g.AddEdge(id+n-1,n*3,1);
                            }
                            g.AddEdge(u.size(),mp[X+dx[l]][Y+dy[l]]+n-1,1);
                        }
                }
            }
    }
    if (u.size()<n-1)
        return 0;
    a.assign(n-1,0);
    b.assign(n-1,0);
    int mx=g.MaxFlow(n*3-1,n*3);
    for (int i=0;i<g.s.size();i+=2)
        if (!g.s[i].c&&g.s[i].u!=n*3-1&&g.s[i].v!=n*3){
            a[g.s[i].u-1]=bench[g.s[i].v-n+1].first;
            b[g.s[i].u-1]=bench[g.s[i].v-n+1].second;
        }
    build(u,v,a,b);
    return 1;
}

Compilation message

parks.cpp: In function 'int32_t construct_roads(std::vector<int>, std::vector<int>)':
parks.cpp:142:17: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'long long int' [-Wsign-compare]
  142 |     if (u.size()<n-1)
      |         ~~~~~~~~^~~~
parks.cpp:147:19: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<Edge>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  147 |     for (int i=0;i<g.s.size();i+=2)
      |                  ~^~~~~~~~~~~
parks.cpp:146:9: warning: unused variable 'mx' [-Wunused-variable]
  146 |     int mx=g.MaxFlow(n*3-1,n*3);
      |         ^~
# Verdict Execution time Memory Grader output
1 Correct 3 ms 15192 KB Output is correct
2 Correct 3 ms 19036 KB Output is correct
3 Correct 3 ms 19044 KB Output is correct
4 Correct 3 ms 19032 KB Output is correct
5 Correct 4 ms 19036 KB Output is correct
6 Correct 4 ms 19036 KB Output is correct
7 Correct 3 ms 19032 KB Output is correct
8 Correct 4 ms 19288 KB Output is correct
9 Correct 274 ms 126136 KB Output is correct
10 Correct 24 ms 29264 KB Output is correct
11 Correct 125 ms 76484 KB Output is correct
12 Correct 35 ms 36692 KB Output is correct
13 Correct 83 ms 64316 KB Output is correct
14 Correct 5 ms 20072 KB Output is correct
15 Correct 7 ms 20828 KB Output is correct
16 Correct 279 ms 126076 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 15192 KB Output is correct
2 Correct 3 ms 19036 KB Output is correct
3 Correct 3 ms 19044 KB Output is correct
4 Correct 3 ms 19032 KB Output is correct
5 Correct 4 ms 19036 KB Output is correct
6 Correct 4 ms 19036 KB Output is correct
7 Correct 3 ms 19032 KB Output is correct
8 Correct 4 ms 19288 KB Output is correct
9 Correct 274 ms 126136 KB Output is correct
10 Correct 24 ms 29264 KB Output is correct
11 Correct 125 ms 76484 KB Output is correct
12 Correct 35 ms 36692 KB Output is correct
13 Correct 83 ms 64316 KB Output is correct
14 Correct 5 ms 20072 KB Output is correct
15 Correct 7 ms 20828 KB Output is correct
16 Correct 279 ms 126076 KB Output is correct
17 Correct 3 ms 19036 KB Output is correct
18 Correct 3 ms 19036 KB Output is correct
19 Correct 3 ms 19036 KB Output is correct
20 Correct 3 ms 19036 KB Output is correct
21 Correct 4 ms 19036 KB Output is correct
22 Correct 3 ms 19036 KB Output is correct
23 Correct 565 ms 209920 KB Output is correct
24 Correct 3 ms 19036 KB Output is correct
25 Correct 6 ms 20060 KB Output is correct
26 Correct 8 ms 21600 KB Output is correct
27 Correct 9 ms 22364 KB Output is correct
28 Correct 196 ms 95936 KB Output is correct
29 Correct 316 ms 133536 KB Output is correct
30 Correct 424 ms 173640 KB Output is correct
31 Correct 579 ms 210908 KB Output is correct
32 Correct 3 ms 19036 KB Output is correct
33 Correct 4 ms 19024 KB Output is correct
34 Correct 4 ms 19036 KB Output is correct
35 Correct 3 ms 19036 KB Output is correct
36 Correct 3 ms 19032 KB Output is correct
37 Correct 3 ms 19032 KB Output is correct
38 Correct 3 ms 19036 KB Output is correct
39 Correct 3 ms 19036 KB Output is correct
40 Correct 3 ms 19032 KB Output is correct
41 Correct 3 ms 19036 KB Output is correct
42 Correct 4 ms 19032 KB Output is correct
43 Correct 7 ms 20824 KB Output is correct
44 Correct 8 ms 21596 KB Output is correct
45 Correct 261 ms 116520 KB Output is correct
46 Correct 397 ms 163264 KB Output is correct
47 Correct 391 ms 163520 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 15192 KB Output is correct
2 Correct 3 ms 19036 KB Output is correct
3 Correct 3 ms 19044 KB Output is correct
4 Correct 3 ms 19032 KB Output is correct
5 Correct 4 ms 19036 KB Output is correct
6 Correct 4 ms 19036 KB Output is correct
7 Correct 3 ms 19032 KB Output is correct
8 Correct 4 ms 19288 KB Output is correct
9 Correct 274 ms 126136 KB Output is correct
10 Correct 24 ms 29264 KB Output is correct
11 Correct 125 ms 76484 KB Output is correct
12 Correct 35 ms 36692 KB Output is correct
13 Correct 83 ms 64316 KB Output is correct
14 Correct 5 ms 20072 KB Output is correct
15 Correct 7 ms 20828 KB Output is correct
16 Correct 279 ms 126076 KB Output is correct
17 Correct 3 ms 19036 KB Output is correct
18 Correct 3 ms 19036 KB Output is correct
19 Correct 3 ms 19036 KB Output is correct
20 Correct 3 ms 19036 KB Output is correct
21 Correct 4 ms 19036 KB Output is correct
22 Correct 3 ms 19036 KB Output is correct
23 Correct 565 ms 209920 KB Output is correct
24 Correct 3 ms 19036 KB Output is correct
25 Correct 6 ms 20060 KB Output is correct
26 Correct 8 ms 21600 KB Output is correct
27 Correct 9 ms 22364 KB Output is correct
28 Correct 196 ms 95936 KB Output is correct
29 Correct 316 ms 133536 KB Output is correct
30 Correct 424 ms 173640 KB Output is correct
31 Correct 579 ms 210908 KB Output is correct
32 Correct 3 ms 19036 KB Output is correct
33 Correct 4 ms 19024 KB Output is correct
34 Correct 4 ms 19036 KB Output is correct
35 Correct 3 ms 19036 KB Output is correct
36 Correct 3 ms 19032 KB Output is correct
37 Correct 3 ms 19032 KB Output is correct
38 Correct 3 ms 19036 KB Output is correct
39 Correct 3 ms 19036 KB Output is correct
40 Correct 3 ms 19032 KB Output is correct
41 Correct 3 ms 19036 KB Output is correct
42 Correct 4 ms 19032 KB Output is correct
43 Correct 7 ms 20824 KB Output is correct
44 Correct 8 ms 21596 KB Output is correct
45 Correct 261 ms 116520 KB Output is correct
46 Correct 397 ms 163264 KB Output is correct
47 Correct 391 ms 163520 KB Output is correct
48 Correct 4 ms 19032 KB Output is correct
49 Correct 3 ms 19032 KB Output is correct
50 Correct 3 ms 19036 KB Output is correct
51 Correct 4 ms 19036 KB Output is correct
52 Correct 3 ms 19036 KB Output is correct
53 Correct 4 ms 19036 KB Output is correct
54 Correct 3 ms 19036 KB Output is correct
55 Correct 913 ms 208232 KB Output is correct
56 Correct 3 ms 19036 KB Output is correct
57 Correct 7 ms 20620 KB Output is correct
58 Correct 19 ms 24412 KB Output is correct
59 Correct 21 ms 27736 KB Output is correct
60 Correct 371 ms 112800 KB Output is correct
61 Correct 538 ms 146116 KB Output is correct
62 Correct 715 ms 175784 KB Output is correct
63 Correct 895 ms 207568 KB Output is correct
64 Correct 4 ms 19036 KB Output is correct
65 Correct 4 ms 19064 KB Output is correct
66 Correct 3 ms 19036 KB Output is correct
67 Correct 593 ms 231092 KB Output is correct
68 Correct 591 ms 230244 KB Output is correct
69 Correct 575 ms 230104 KB Output is correct
70 Correct 10 ms 22616 KB Output is correct
71 Correct 16 ms 25988 KB Output is correct
72 Correct 280 ms 115896 KB Output is correct
73 Correct 440 ms 167324 KB Output is correct
74 Correct 597 ms 214672 KB Output is correct
75 Correct 577 ms 217996 KB Output is correct
76 Correct 570 ms 230468 KB Output is correct
77 Correct 12 ms 23388 KB Output is correct
78 Correct 18 ms 26972 KB Output is correct
79 Correct 284 ms 116448 KB Output is correct
80 Correct 452 ms 167068 KB Output is correct
81 Correct 636 ms 217036 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 15192 KB Output is correct
2 Correct 3 ms 19036 KB Output is correct
3 Correct 3 ms 19044 KB Output is correct
4 Correct 3 ms 19032 KB Output is correct
5 Correct 4 ms 19036 KB Output is correct
6 Correct 4 ms 19036 KB Output is correct
7 Correct 3 ms 19032 KB Output is correct
8 Correct 4 ms 19288 KB Output is correct
9 Correct 274 ms 126136 KB Output is correct
10 Correct 24 ms 29264 KB Output is correct
11 Correct 125 ms 76484 KB Output is correct
12 Correct 35 ms 36692 KB Output is correct
13 Correct 83 ms 64316 KB Output is correct
14 Correct 5 ms 20072 KB Output is correct
15 Correct 7 ms 20828 KB Output is correct
16 Correct 279 ms 126076 KB Output is correct
17 Correct 4 ms 19040 KB Output is correct
18 Correct 4 ms 19032 KB Output is correct
19 Correct 3 ms 19036 KB Output is correct
20 Correct 553 ms 207440 KB Output is correct
21 Correct 338 ms 205016 KB Output is correct
22 Correct 523 ms 207232 KB Output is correct
23 Correct 422 ms 199412 KB Output is correct
24 Correct 175 ms 115108 KB Output is correct
25 Correct 629 ms 219356 KB Output is correct
26 Correct 539 ms 219288 KB Output is correct
27 Correct 652 ms 230260 KB Output is correct
28 Correct 619 ms 230844 KB Output is correct
29 Correct 659 ms 231656 KB Output is correct
30 Correct 669 ms 231372 KB Output is correct
31 Correct 3 ms 19036 KB Output is correct
32 Correct 40 ms 32388 KB Output is correct
33 Correct 60 ms 66640 KB Output is correct
34 Correct 354 ms 205076 KB Output is correct
35 Correct 23 ms 27736 KB Output is correct
36 Correct 81 ms 64708 KB Output is correct
37 Correct 173 ms 108672 KB Output is correct
38 Correct 438 ms 96416 KB Output is correct
39 Correct 709 ms 123924 KB Output is correct
40 Correct 927 ms 154588 KB Output is correct
41 Correct 1250 ms 182084 KB Output is correct
42 Correct 1262 ms 211300 KB Output is correct
43 Correct 3 ms 19036 KB Output is correct
44 Correct 3 ms 19036 KB Output is correct
45 Correct 3 ms 19028 KB Output is correct
46 Correct 3 ms 19036 KB Output is correct
47 Correct 3 ms 19036 KB Output is correct
48 Correct 3 ms 19036 KB Output is correct
49 Correct 3 ms 19036 KB Output is correct
50 Correct 3 ms 19036 KB Output is correct
51 Correct 3 ms 19048 KB Output is correct
52 Correct 4 ms 19036 KB Output is correct
53 Correct 3 ms 19036 KB Output is correct
54 Correct 6 ms 20828 KB Output is correct
55 Correct 8 ms 21596 KB Output is correct
56 Correct 267 ms 116716 KB Output is correct
57 Correct 399 ms 162548 KB Output is correct
58 Correct 403 ms 162956 KB Output is correct
59 Correct 3 ms 19032 KB Output is correct
60 Correct 4 ms 19036 KB Output is correct
61 Correct 3 ms 19036 KB Output is correct
62 Correct 569 ms 231100 KB Output is correct
63 Correct 572 ms 230528 KB Output is correct
64 Correct 561 ms 229556 KB Output is correct
65 Correct 10 ms 22620 KB Output is correct
66 Correct 20 ms 25948 KB Output is correct
67 Correct 282 ms 116104 KB Output is correct
68 Correct 448 ms 166116 KB Output is correct
69 Correct 614 ms 214180 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 15192 KB Output is correct
2 Correct 3 ms 19036 KB Output is correct
3 Correct 3 ms 19044 KB Output is correct
4 Correct 3 ms 19032 KB Output is correct
5 Correct 4 ms 19036 KB Output is correct
6 Correct 4 ms 19036 KB Output is correct
7 Correct 3 ms 19032 KB Output is correct
8 Correct 4 ms 19288 KB Output is correct
9 Correct 274 ms 126136 KB Output is correct
10 Correct 24 ms 29264 KB Output is correct
11 Correct 125 ms 76484 KB Output is correct
12 Correct 35 ms 36692 KB Output is correct
13 Correct 83 ms 64316 KB Output is correct
14 Correct 5 ms 20072 KB Output is correct
15 Correct 7 ms 20828 KB Output is correct
16 Correct 279 ms 126076 KB Output is correct
17 Correct 510 ms 231304 KB Output is correct
18 Correct 512 ms 231180 KB Output is correct
19 Correct 501 ms 211456 KB Output is correct
20 Correct 681 ms 210448 KB Output is correct
21 Correct 580 ms 202868 KB Output is correct
22 Correct 3 ms 19036 KB Output is correct
23 Correct 96 ms 51128 KB Output is correct
24 Correct 35 ms 36696 KB Output is correct
25 Correct 124 ms 83128 KB Output is correct
26 Correct 224 ms 128236 KB Output is correct
27 Correct 425 ms 115660 KB Output is correct
28 Correct 565 ms 141792 KB Output is correct
29 Correct 781 ms 165248 KB Output is correct
30 Correct 883 ms 189788 KB Output is correct
31 Correct 1113 ms 214252 KB Output is correct
32 Correct 565 ms 217040 KB Output is correct
33 Correct 564 ms 230156 KB Output is correct
34 Correct 11 ms 23388 KB Output is correct
35 Correct 18 ms 26968 KB Output is correct
36 Correct 280 ms 116776 KB Output is correct
37 Correct 445 ms 167356 KB Output is correct
38 Correct 605 ms 215784 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 15192 KB Output is correct
2 Correct 3 ms 19036 KB Output is correct
3 Correct 3 ms 19044 KB Output is correct
4 Correct 3 ms 19032 KB Output is correct
5 Correct 4 ms 19036 KB Output is correct
6 Correct 4 ms 19036 KB Output is correct
7 Correct 3 ms 19032 KB Output is correct
8 Correct 4 ms 19288 KB Output is correct
9 Correct 274 ms 126136 KB Output is correct
10 Correct 24 ms 29264 KB Output is correct
11 Correct 125 ms 76484 KB Output is correct
12 Correct 35 ms 36692 KB Output is correct
13 Correct 83 ms 64316 KB Output is correct
14 Correct 5 ms 20072 KB Output is correct
15 Correct 7 ms 20828 KB Output is correct
16 Correct 279 ms 126076 KB Output is correct
17 Correct 3 ms 19036 KB Output is correct
18 Correct 3 ms 19036 KB Output is correct
19 Correct 3 ms 19036 KB Output is correct
20 Correct 3 ms 19036 KB Output is correct
21 Correct 4 ms 19036 KB Output is correct
22 Correct 3 ms 19036 KB Output is correct
23 Correct 565 ms 209920 KB Output is correct
24 Correct 3 ms 19036 KB Output is correct
25 Correct 6 ms 20060 KB Output is correct
26 Correct 8 ms 21600 KB Output is correct
27 Correct 9 ms 22364 KB Output is correct
28 Correct 196 ms 95936 KB Output is correct
29 Correct 316 ms 133536 KB Output is correct
30 Correct 424 ms 173640 KB Output is correct
31 Correct 579 ms 210908 KB Output is correct
32 Correct 3 ms 19036 KB Output is correct
33 Correct 4 ms 19024 KB Output is correct
34 Correct 4 ms 19036 KB Output is correct
35 Correct 3 ms 19036 KB Output is correct
36 Correct 3 ms 19032 KB Output is correct
37 Correct 3 ms 19032 KB Output is correct
38 Correct 3 ms 19036 KB Output is correct
39 Correct 3 ms 19036 KB Output is correct
40 Correct 3 ms 19032 KB Output is correct
41 Correct 3 ms 19036 KB Output is correct
42 Correct 4 ms 19032 KB Output is correct
43 Correct 7 ms 20824 KB Output is correct
44 Correct 8 ms 21596 KB Output is correct
45 Correct 261 ms 116520 KB Output is correct
46 Correct 397 ms 163264 KB Output is correct
47 Correct 391 ms 163520 KB Output is correct
48 Correct 4 ms 19032 KB Output is correct
49 Correct 3 ms 19032 KB Output is correct
50 Correct 3 ms 19036 KB Output is correct
51 Correct 4 ms 19036 KB Output is correct
52 Correct 3 ms 19036 KB Output is correct
53 Correct 4 ms 19036 KB Output is correct
54 Correct 3 ms 19036 KB Output is correct
55 Correct 913 ms 208232 KB Output is correct
56 Correct 3 ms 19036 KB Output is correct
57 Correct 7 ms 20620 KB Output is correct
58 Correct 19 ms 24412 KB Output is correct
59 Correct 21 ms 27736 KB Output is correct
60 Correct 371 ms 112800 KB Output is correct
61 Correct 538 ms 146116 KB Output is correct
62 Correct 715 ms 175784 KB Output is correct
63 Correct 895 ms 207568 KB Output is correct
64 Correct 4 ms 19036 KB Output is correct
65 Correct 4 ms 19064 KB Output is correct
66 Correct 3 ms 19036 KB Output is correct
67 Correct 593 ms 231092 KB Output is correct
68 Correct 591 ms 230244 KB Output is correct
69 Correct 575 ms 230104 KB Output is correct
70 Correct 10 ms 22616 KB Output is correct
71 Correct 16 ms 25988 KB Output is correct
72 Correct 280 ms 115896 KB Output is correct
73 Correct 440 ms 167324 KB Output is correct
74 Correct 597 ms 214672 KB Output is correct
75 Correct 577 ms 217996 KB Output is correct
76 Correct 570 ms 230468 KB Output is correct
77 Correct 12 ms 23388 KB Output is correct
78 Correct 18 ms 26972 KB Output is correct
79 Correct 284 ms 116448 KB Output is correct
80 Correct 452 ms 167068 KB Output is correct
81 Correct 636 ms 217036 KB Output is correct
82 Correct 4 ms 19040 KB Output is correct
83 Correct 4 ms 19032 KB Output is correct
84 Correct 3 ms 19036 KB Output is correct
85 Correct 553 ms 207440 KB Output is correct
86 Correct 338 ms 205016 KB Output is correct
87 Correct 523 ms 207232 KB Output is correct
88 Correct 422 ms 199412 KB Output is correct
89 Correct 175 ms 115108 KB Output is correct
90 Correct 629 ms 219356 KB Output is correct
91 Correct 539 ms 219288 KB Output is correct
92 Correct 652 ms 230260 KB Output is correct
93 Correct 619 ms 230844 KB Output is correct
94 Correct 659 ms 231656 KB Output is correct
95 Correct 669 ms 231372 KB Output is correct
96 Correct 3 ms 19036 KB Output is correct
97 Correct 40 ms 32388 KB Output is correct
98 Correct 60 ms 66640 KB Output is correct
99 Correct 354 ms 205076 KB Output is correct
100 Correct 23 ms 27736 KB Output is correct
101 Correct 81 ms 64708 KB Output is correct
102 Correct 173 ms 108672 KB Output is correct
103 Correct 438 ms 96416 KB Output is correct
104 Correct 709 ms 123924 KB Output is correct
105 Correct 927 ms 154588 KB Output is correct
106 Correct 1250 ms 182084 KB Output is correct
107 Correct 1262 ms 211300 KB Output is correct
108 Correct 3 ms 19036 KB Output is correct
109 Correct 3 ms 19036 KB Output is correct
110 Correct 3 ms 19028 KB Output is correct
111 Correct 3 ms 19036 KB Output is correct
112 Correct 3 ms 19036 KB Output is correct
113 Correct 3 ms 19036 KB Output is correct
114 Correct 3 ms 19036 KB Output is correct
115 Correct 3 ms 19036 KB Output is correct
116 Correct 3 ms 19048 KB Output is correct
117 Correct 4 ms 19036 KB Output is correct
118 Correct 3 ms 19036 KB Output is correct
119 Correct 6 ms 20828 KB Output is correct
120 Correct 8 ms 21596 KB Output is correct
121 Correct 267 ms 116716 KB Output is correct
122 Correct 399 ms 162548 KB Output is correct
123 Correct 403 ms 162956 KB Output is correct
124 Correct 3 ms 19032 KB Output is correct
125 Correct 4 ms 19036 KB Output is correct
126 Correct 3 ms 19036 KB Output is correct
127 Correct 569 ms 231100 KB Output is correct
128 Correct 572 ms 230528 KB Output is correct
129 Correct 561 ms 229556 KB Output is correct
130 Correct 10 ms 22620 KB Output is correct
131 Correct 20 ms 25948 KB Output is correct
132 Correct 282 ms 116104 KB Output is correct
133 Correct 448 ms 166116 KB Output is correct
134 Correct 614 ms 214180 KB Output is correct
135 Correct 510 ms 231304 KB Output is correct
136 Correct 512 ms 231180 KB Output is correct
137 Correct 501 ms 211456 KB Output is correct
138 Correct 681 ms 210448 KB Output is correct
139 Correct 580 ms 202868 KB Output is correct
140 Correct 3 ms 19036 KB Output is correct
141 Correct 96 ms 51128 KB Output is correct
142 Correct 35 ms 36696 KB Output is correct
143 Correct 124 ms 83128 KB Output is correct
144 Correct 224 ms 128236 KB Output is correct
145 Correct 425 ms 115660 KB Output is correct
146 Correct 565 ms 141792 KB Output is correct
147 Correct 781 ms 165248 KB Output is correct
148 Correct 883 ms 189788 KB Output is correct
149 Correct 1113 ms 214252 KB Output is correct
150 Correct 565 ms 217040 KB Output is correct
151 Correct 564 ms 230156 KB Output is correct
152 Correct 11 ms 23388 KB Output is correct
153 Correct 18 ms 26968 KB Output is correct
154 Correct 280 ms 116776 KB Output is correct
155 Correct 445 ms 167356 KB Output is correct
156 Correct 605 ms 215784 KB Output is correct
157 Correct 3 ms 19032 KB Output is correct
158 Correct 3 ms 19036 KB Output is correct
159 Correct 3 ms 19036 KB Output is correct
160 Correct 3 ms 19036 KB Output is correct
161 Execution timed out 3557 ms 197388 KB Time limit exceeded
162 Halted 0 ms 0 KB -