Submission #896344

# Submission time Handle Problem Language Result Execution time Memory
896344 2024-01-01T09:45:37 Z abcvuitunggio Fountain Parks (IOI21_parks) C++17
70 / 100
3500 ms 243672 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],mp2[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(order,order+n,0);
    px=x,py=y;
    sort(order,order+n,[](int i, int j){return make_pair(px[i],py[i])<make_pair(px[j],py[j]);});
    a.assign(n-1,0);
    b.assign(n-1,0);
    while (true){
        g.Reset();
        g.Assign(n*10);
        u.clear();
        v.clear();
        id=0;
        iota(p,p+n,0);
        for (int i=1;i<=200000;i+=2)
            mp2[i].clear();
        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 (!mp2[X+dx[l]].count(Y+dy[l])){
                                    id++;
                                    mp2[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(),mp2[X+dx[l]][Y+dy[l]]+n-1,1);
                            }
                    }
                }
        }
        if (u.size()<n-1)
            return 0;
        int mx=g.MaxFlow(n*3-1,n*3);
        if (mx<n-1){
            reverse(order,order+n);
            continue;
        }
        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:151:21: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'long long int' [-Wsign-compare]
  151 |         if (u.size()<n-1)
      |             ~~~~~~~~^~~~
parks.cpp:158:23: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<Edge>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  158 |         for (int i=0;i<g.s.size();i+=2)
      |                      ~^~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 6 ms 29272 KB Output is correct
2 Correct 7 ms 33372 KB Output is correct
3 Correct 7 ms 33216 KB Output is correct
4 Correct 7 ms 33372 KB Output is correct
5 Correct 9 ms 33372 KB Output is correct
6 Correct 8 ms 33372 KB Output is correct
7 Correct 7 ms 33372 KB Output is correct
8 Correct 7 ms 33372 KB Output is correct
9 Correct 293 ms 139872 KB Output is correct
10 Correct 29 ms 43608 KB Output is correct
11 Correct 172 ms 90356 KB Output is correct
12 Correct 39 ms 48852 KB Output is correct
13 Correct 89 ms 78928 KB Output is correct
14 Correct 10 ms 34396 KB Output is correct
15 Correct 11 ms 35420 KB Output is correct
16 Correct 314 ms 139800 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 6 ms 29272 KB Output is correct
2 Correct 7 ms 33372 KB Output is correct
3 Correct 7 ms 33216 KB Output is correct
4 Correct 7 ms 33372 KB Output is correct
5 Correct 9 ms 33372 KB Output is correct
6 Correct 8 ms 33372 KB Output is correct
7 Correct 7 ms 33372 KB Output is correct
8 Correct 7 ms 33372 KB Output is correct
9 Correct 293 ms 139872 KB Output is correct
10 Correct 29 ms 43608 KB Output is correct
11 Correct 172 ms 90356 KB Output is correct
12 Correct 39 ms 48852 KB Output is correct
13 Correct 89 ms 78928 KB Output is correct
14 Correct 10 ms 34396 KB Output is correct
15 Correct 11 ms 35420 KB Output is correct
16 Correct 314 ms 139800 KB Output is correct
17 Correct 7 ms 33372 KB Output is correct
18 Correct 8 ms 33372 KB Output is correct
19 Correct 8 ms 33372 KB Output is correct
20 Correct 8 ms 33372 KB Output is correct
21 Correct 8 ms 33372 KB Output is correct
22 Correct 7 ms 33372 KB Output is correct
23 Correct 558 ms 216404 KB Output is correct
24 Correct 7 ms 33368 KB Output is correct
25 Correct 9 ms 34396 KB Output is correct
26 Correct 14 ms 35992 KB Output is correct
27 Correct 18 ms 36700 KB Output is correct
28 Correct 195 ms 106236 KB Output is correct
29 Correct 317 ms 142528 KB Output is correct
30 Correct 449 ms 178708 KB Output is correct
31 Correct 600 ms 216460 KB Output is correct
32 Correct 7 ms 33388 KB Output is correct
33 Correct 7 ms 33372 KB Output is correct
34 Correct 7 ms 33368 KB Output is correct
35 Correct 9 ms 33372 KB Output is correct
36 Correct 7 ms 33372 KB Output is correct
37 Correct 7 ms 33372 KB Output is correct
38 Correct 7 ms 33372 KB Output is correct
39 Correct 8 ms 33372 KB Output is correct
40 Correct 7 ms 33372 KB Output is correct
41 Correct 7 ms 33372 KB Output is correct
42 Correct 7 ms 33372 KB Output is correct
43 Correct 12 ms 35164 KB Output is correct
44 Correct 14 ms 36188 KB Output is correct
45 Correct 323 ms 131860 KB Output is correct
46 Correct 456 ms 176336 KB Output is correct
47 Correct 449 ms 175324 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 6 ms 29272 KB Output is correct
2 Correct 7 ms 33372 KB Output is correct
3 Correct 7 ms 33216 KB Output is correct
4 Correct 7 ms 33372 KB Output is correct
5 Correct 9 ms 33372 KB Output is correct
6 Correct 8 ms 33372 KB Output is correct
7 Correct 7 ms 33372 KB Output is correct
8 Correct 7 ms 33372 KB Output is correct
9 Correct 293 ms 139872 KB Output is correct
10 Correct 29 ms 43608 KB Output is correct
11 Correct 172 ms 90356 KB Output is correct
12 Correct 39 ms 48852 KB Output is correct
13 Correct 89 ms 78928 KB Output is correct
14 Correct 10 ms 34396 KB Output is correct
15 Correct 11 ms 35420 KB Output is correct
16 Correct 314 ms 139800 KB Output is correct
17 Correct 7 ms 33372 KB Output is correct
18 Correct 8 ms 33372 KB Output is correct
19 Correct 8 ms 33372 KB Output is correct
20 Correct 8 ms 33372 KB Output is correct
21 Correct 8 ms 33372 KB Output is correct
22 Correct 7 ms 33372 KB Output is correct
23 Correct 558 ms 216404 KB Output is correct
24 Correct 7 ms 33368 KB Output is correct
25 Correct 9 ms 34396 KB Output is correct
26 Correct 14 ms 35992 KB Output is correct
27 Correct 18 ms 36700 KB Output is correct
28 Correct 195 ms 106236 KB Output is correct
29 Correct 317 ms 142528 KB Output is correct
30 Correct 449 ms 178708 KB Output is correct
31 Correct 600 ms 216460 KB Output is correct
32 Correct 7 ms 33388 KB Output is correct
33 Correct 7 ms 33372 KB Output is correct
34 Correct 7 ms 33368 KB Output is correct
35 Correct 9 ms 33372 KB Output is correct
36 Correct 7 ms 33372 KB Output is correct
37 Correct 7 ms 33372 KB Output is correct
38 Correct 7 ms 33372 KB Output is correct
39 Correct 8 ms 33372 KB Output is correct
40 Correct 7 ms 33372 KB Output is correct
41 Correct 7 ms 33372 KB Output is correct
42 Correct 7 ms 33372 KB Output is correct
43 Correct 12 ms 35164 KB Output is correct
44 Correct 14 ms 36188 KB Output is correct
45 Correct 323 ms 131860 KB Output is correct
46 Correct 456 ms 176336 KB Output is correct
47 Correct 449 ms 175324 KB Output is correct
48 Correct 7 ms 33372 KB Output is correct
49 Correct 7 ms 33372 KB Output is correct
50 Correct 8 ms 33372 KB Output is correct
51 Correct 8 ms 33372 KB Output is correct
52 Correct 8 ms 33372 KB Output is correct
53 Correct 7 ms 33420 KB Output is correct
54 Correct 7 ms 33368 KB Output is correct
55 Correct 598 ms 215956 KB Output is correct
56 Correct 7 ms 33372 KB Output is correct
57 Correct 11 ms 34908 KB Output is correct
58 Correct 19 ms 38836 KB Output is correct
59 Correct 24 ms 41964 KB Output is correct
60 Correct 278 ms 129060 KB Output is correct
61 Correct 385 ms 155768 KB Output is correct
62 Correct 428 ms 183824 KB Output is correct
63 Correct 587 ms 216720 KB Output is correct
64 Correct 9 ms 33368 KB Output is correct
65 Correct 9 ms 33368 KB Output is correct
66 Correct 7 ms 33624 KB Output is correct
67 Correct 585 ms 243608 KB Output is correct
68 Correct 600 ms 242916 KB Output is correct
69 Correct 595 ms 242468 KB Output is correct
70 Correct 14 ms 36952 KB Output is correct
71 Correct 26 ms 40600 KB Output is correct
72 Correct 331 ms 130508 KB Output is correct
73 Correct 527 ms 179072 KB Output is correct
74 Correct 728 ms 226176 KB Output is correct
75 Correct 651 ms 228816 KB Output is correct
76 Correct 617 ms 243440 KB Output is correct
77 Correct 18 ms 37724 KB Output is correct
78 Correct 28 ms 41308 KB Output is correct
79 Correct 341 ms 129884 KB Output is correct
80 Correct 540 ms 179564 KB Output is correct
81 Correct 754 ms 227316 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 6 ms 29272 KB Output is correct
2 Correct 7 ms 33372 KB Output is correct
3 Correct 7 ms 33216 KB Output is correct
4 Correct 7 ms 33372 KB Output is correct
5 Correct 9 ms 33372 KB Output is correct
6 Correct 8 ms 33372 KB Output is correct
7 Correct 7 ms 33372 KB Output is correct
8 Correct 7 ms 33372 KB Output is correct
9 Correct 293 ms 139872 KB Output is correct
10 Correct 29 ms 43608 KB Output is correct
11 Correct 172 ms 90356 KB Output is correct
12 Correct 39 ms 48852 KB Output is correct
13 Correct 89 ms 78928 KB Output is correct
14 Correct 10 ms 34396 KB Output is correct
15 Correct 11 ms 35420 KB Output is correct
16 Correct 314 ms 139800 KB Output is correct
17 Correct 7 ms 33372 KB Output is correct
18 Correct 9 ms 33368 KB Output is correct
19 Correct 8 ms 33204 KB Output is correct
20 Correct 430 ms 219048 KB Output is correct
21 Correct 413 ms 217904 KB Output is correct
22 Correct 449 ms 217332 KB Output is correct
23 Correct 421 ms 212272 KB Output is correct
24 Correct 199 ms 130836 KB Output is correct
25 Correct 490 ms 235052 KB Output is correct
26 Correct 411 ms 235260 KB Output is correct
27 Correct 588 ms 243524 KB Output is correct
28 Correct 531 ms 243384 KB Output is correct
29 Correct 555 ms 242716 KB Output is correct
30 Correct 565 ms 243504 KB Output is correct
31 Correct 8 ms 33372 KB Output is correct
32 Correct 44 ms 47152 KB Output is correct
33 Correct 72 ms 81856 KB Output is correct
34 Correct 421 ms 218040 KB Output is correct
35 Correct 28 ms 42140 KB Output is correct
36 Correct 112 ms 80584 KB Output is correct
37 Correct 185 ms 124476 KB Output is correct
38 Correct 437 ms 109896 KB Output is correct
39 Correct 787 ms 137488 KB Output is correct
40 Correct 875 ms 164572 KB Output is correct
41 Correct 1010 ms 195096 KB Output is correct
42 Correct 1183 ms 224736 KB Output is correct
43 Correct 6 ms 33372 KB Output is correct
44 Correct 7 ms 33372 KB Output is correct
45 Correct 7 ms 33372 KB Output is correct
46 Correct 8 ms 33372 KB Output is correct
47 Correct 7 ms 33372 KB Output is correct
48 Correct 7 ms 33372 KB Output is correct
49 Correct 7 ms 33396 KB Output is correct
50 Correct 7 ms 33372 KB Output is correct
51 Correct 7 ms 33372 KB Output is correct
52 Correct 7 ms 33368 KB Output is correct
53 Correct 7 ms 33384 KB Output is correct
54 Correct 10 ms 35164 KB Output is correct
55 Correct 12 ms 36188 KB Output is correct
56 Correct 278 ms 130204 KB Output is correct
57 Correct 420 ms 175592 KB Output is correct
58 Correct 422 ms 174436 KB Output is correct
59 Correct 7 ms 33372 KB Output is correct
60 Correct 7 ms 33296 KB Output is correct
61 Correct 7 ms 33372 KB Output is correct
62 Correct 584 ms 243232 KB Output is correct
63 Correct 605 ms 242736 KB Output is correct
64 Correct 563 ms 241956 KB Output is correct
65 Correct 14 ms 36952 KB Output is correct
66 Correct 21 ms 40540 KB Output is correct
67 Correct 329 ms 130560 KB Output is correct
68 Correct 487 ms 180356 KB Output is correct
69 Correct 647 ms 227456 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 6 ms 29272 KB Output is correct
2 Correct 7 ms 33372 KB Output is correct
3 Correct 7 ms 33216 KB Output is correct
4 Correct 7 ms 33372 KB Output is correct
5 Correct 9 ms 33372 KB Output is correct
6 Correct 8 ms 33372 KB Output is correct
7 Correct 7 ms 33372 KB Output is correct
8 Correct 7 ms 33372 KB Output is correct
9 Correct 293 ms 139872 KB Output is correct
10 Correct 29 ms 43608 KB Output is correct
11 Correct 172 ms 90356 KB Output is correct
12 Correct 39 ms 48852 KB Output is correct
13 Correct 89 ms 78928 KB Output is correct
14 Correct 10 ms 34396 KB Output is correct
15 Correct 11 ms 35420 KB Output is correct
16 Correct 314 ms 139800 KB Output is correct
17 Correct 505 ms 243224 KB Output is correct
18 Correct 497 ms 243672 KB Output is correct
19 Correct 458 ms 222104 KB Output is correct
20 Correct 527 ms 223684 KB Output is correct
21 Correct 497 ms 214124 KB Output is correct
22 Correct 9 ms 33372 KB Output is correct
23 Correct 112 ms 62924 KB Output is correct
24 Correct 38 ms 51152 KB Output is correct
25 Correct 124 ms 99660 KB Output is correct
26 Correct 217 ms 142712 KB Output is correct
27 Correct 400 ms 129444 KB Output is correct
28 Correct 553 ms 153768 KB Output is correct
29 Correct 756 ms 178972 KB Output is correct
30 Correct 866 ms 202248 KB Output is correct
31 Correct 979 ms 226168 KB Output is correct
32 Correct 600 ms 229360 KB Output is correct
33 Correct 577 ms 242844 KB Output is correct
34 Correct 15 ms 37724 KB Output is correct
35 Correct 23 ms 41300 KB Output is correct
36 Correct 301 ms 129940 KB Output is correct
37 Correct 470 ms 179328 KB Output is correct
38 Correct 719 ms 227012 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 6 ms 29272 KB Output is correct
2 Correct 7 ms 33372 KB Output is correct
3 Correct 7 ms 33216 KB Output is correct
4 Correct 7 ms 33372 KB Output is correct
5 Correct 9 ms 33372 KB Output is correct
6 Correct 8 ms 33372 KB Output is correct
7 Correct 7 ms 33372 KB Output is correct
8 Correct 7 ms 33372 KB Output is correct
9 Correct 293 ms 139872 KB Output is correct
10 Correct 29 ms 43608 KB Output is correct
11 Correct 172 ms 90356 KB Output is correct
12 Correct 39 ms 48852 KB Output is correct
13 Correct 89 ms 78928 KB Output is correct
14 Correct 10 ms 34396 KB Output is correct
15 Correct 11 ms 35420 KB Output is correct
16 Correct 314 ms 139800 KB Output is correct
17 Correct 7 ms 33372 KB Output is correct
18 Correct 8 ms 33372 KB Output is correct
19 Correct 8 ms 33372 KB Output is correct
20 Correct 8 ms 33372 KB Output is correct
21 Correct 8 ms 33372 KB Output is correct
22 Correct 7 ms 33372 KB Output is correct
23 Correct 558 ms 216404 KB Output is correct
24 Correct 7 ms 33368 KB Output is correct
25 Correct 9 ms 34396 KB Output is correct
26 Correct 14 ms 35992 KB Output is correct
27 Correct 18 ms 36700 KB Output is correct
28 Correct 195 ms 106236 KB Output is correct
29 Correct 317 ms 142528 KB Output is correct
30 Correct 449 ms 178708 KB Output is correct
31 Correct 600 ms 216460 KB Output is correct
32 Correct 7 ms 33388 KB Output is correct
33 Correct 7 ms 33372 KB Output is correct
34 Correct 7 ms 33368 KB Output is correct
35 Correct 9 ms 33372 KB Output is correct
36 Correct 7 ms 33372 KB Output is correct
37 Correct 7 ms 33372 KB Output is correct
38 Correct 7 ms 33372 KB Output is correct
39 Correct 8 ms 33372 KB Output is correct
40 Correct 7 ms 33372 KB Output is correct
41 Correct 7 ms 33372 KB Output is correct
42 Correct 7 ms 33372 KB Output is correct
43 Correct 12 ms 35164 KB Output is correct
44 Correct 14 ms 36188 KB Output is correct
45 Correct 323 ms 131860 KB Output is correct
46 Correct 456 ms 176336 KB Output is correct
47 Correct 449 ms 175324 KB Output is correct
48 Correct 7 ms 33372 KB Output is correct
49 Correct 7 ms 33372 KB Output is correct
50 Correct 8 ms 33372 KB Output is correct
51 Correct 8 ms 33372 KB Output is correct
52 Correct 8 ms 33372 KB Output is correct
53 Correct 7 ms 33420 KB Output is correct
54 Correct 7 ms 33368 KB Output is correct
55 Correct 598 ms 215956 KB Output is correct
56 Correct 7 ms 33372 KB Output is correct
57 Correct 11 ms 34908 KB Output is correct
58 Correct 19 ms 38836 KB Output is correct
59 Correct 24 ms 41964 KB Output is correct
60 Correct 278 ms 129060 KB Output is correct
61 Correct 385 ms 155768 KB Output is correct
62 Correct 428 ms 183824 KB Output is correct
63 Correct 587 ms 216720 KB Output is correct
64 Correct 9 ms 33368 KB Output is correct
65 Correct 9 ms 33368 KB Output is correct
66 Correct 7 ms 33624 KB Output is correct
67 Correct 585 ms 243608 KB Output is correct
68 Correct 600 ms 242916 KB Output is correct
69 Correct 595 ms 242468 KB Output is correct
70 Correct 14 ms 36952 KB Output is correct
71 Correct 26 ms 40600 KB Output is correct
72 Correct 331 ms 130508 KB Output is correct
73 Correct 527 ms 179072 KB Output is correct
74 Correct 728 ms 226176 KB Output is correct
75 Correct 651 ms 228816 KB Output is correct
76 Correct 617 ms 243440 KB Output is correct
77 Correct 18 ms 37724 KB Output is correct
78 Correct 28 ms 41308 KB Output is correct
79 Correct 341 ms 129884 KB Output is correct
80 Correct 540 ms 179564 KB Output is correct
81 Correct 754 ms 227316 KB Output is correct
82 Correct 7 ms 33372 KB Output is correct
83 Correct 9 ms 33368 KB Output is correct
84 Correct 8 ms 33204 KB Output is correct
85 Correct 430 ms 219048 KB Output is correct
86 Correct 413 ms 217904 KB Output is correct
87 Correct 449 ms 217332 KB Output is correct
88 Correct 421 ms 212272 KB Output is correct
89 Correct 199 ms 130836 KB Output is correct
90 Correct 490 ms 235052 KB Output is correct
91 Correct 411 ms 235260 KB Output is correct
92 Correct 588 ms 243524 KB Output is correct
93 Correct 531 ms 243384 KB Output is correct
94 Correct 555 ms 242716 KB Output is correct
95 Correct 565 ms 243504 KB Output is correct
96 Correct 8 ms 33372 KB Output is correct
97 Correct 44 ms 47152 KB Output is correct
98 Correct 72 ms 81856 KB Output is correct
99 Correct 421 ms 218040 KB Output is correct
100 Correct 28 ms 42140 KB Output is correct
101 Correct 112 ms 80584 KB Output is correct
102 Correct 185 ms 124476 KB Output is correct
103 Correct 437 ms 109896 KB Output is correct
104 Correct 787 ms 137488 KB Output is correct
105 Correct 875 ms 164572 KB Output is correct
106 Correct 1010 ms 195096 KB Output is correct
107 Correct 1183 ms 224736 KB Output is correct
108 Correct 6 ms 33372 KB Output is correct
109 Correct 7 ms 33372 KB Output is correct
110 Correct 7 ms 33372 KB Output is correct
111 Correct 8 ms 33372 KB Output is correct
112 Correct 7 ms 33372 KB Output is correct
113 Correct 7 ms 33372 KB Output is correct
114 Correct 7 ms 33396 KB Output is correct
115 Correct 7 ms 33372 KB Output is correct
116 Correct 7 ms 33372 KB Output is correct
117 Correct 7 ms 33368 KB Output is correct
118 Correct 7 ms 33384 KB Output is correct
119 Correct 10 ms 35164 KB Output is correct
120 Correct 12 ms 36188 KB Output is correct
121 Correct 278 ms 130204 KB Output is correct
122 Correct 420 ms 175592 KB Output is correct
123 Correct 422 ms 174436 KB Output is correct
124 Correct 7 ms 33372 KB Output is correct
125 Correct 7 ms 33296 KB Output is correct
126 Correct 7 ms 33372 KB Output is correct
127 Correct 584 ms 243232 KB Output is correct
128 Correct 605 ms 242736 KB Output is correct
129 Correct 563 ms 241956 KB Output is correct
130 Correct 14 ms 36952 KB Output is correct
131 Correct 21 ms 40540 KB Output is correct
132 Correct 329 ms 130560 KB Output is correct
133 Correct 487 ms 180356 KB Output is correct
134 Correct 647 ms 227456 KB Output is correct
135 Correct 505 ms 243224 KB Output is correct
136 Correct 497 ms 243672 KB Output is correct
137 Correct 458 ms 222104 KB Output is correct
138 Correct 527 ms 223684 KB Output is correct
139 Correct 497 ms 214124 KB Output is correct
140 Correct 9 ms 33372 KB Output is correct
141 Correct 112 ms 62924 KB Output is correct
142 Correct 38 ms 51152 KB Output is correct
143 Correct 124 ms 99660 KB Output is correct
144 Correct 217 ms 142712 KB Output is correct
145 Correct 400 ms 129444 KB Output is correct
146 Correct 553 ms 153768 KB Output is correct
147 Correct 756 ms 178972 KB Output is correct
148 Correct 866 ms 202248 KB Output is correct
149 Correct 979 ms 226168 KB Output is correct
150 Correct 600 ms 229360 KB Output is correct
151 Correct 577 ms 242844 KB Output is correct
152 Correct 15 ms 37724 KB Output is correct
153 Correct 23 ms 41300 KB Output is correct
154 Correct 301 ms 129940 KB Output is correct
155 Correct 470 ms 179328 KB Output is correct
156 Correct 719 ms 227012 KB Output is correct
157 Correct 7 ms 33368 KB Output is correct
158 Correct 7 ms 33372 KB Output is correct
159 Correct 7 ms 33372 KB Output is correct
160 Correct 7 ms 33228 KB Output is correct
161 Correct 494 ms 217800 KB Output is correct
162 Correct 322 ms 217448 KB Output is correct
163 Correct 391 ms 216716 KB Output is correct
164 Correct 399 ms 217044 KB Output is correct
165 Correct 471 ms 218196 KB Output is correct
166 Correct 501 ms 217372 KB Output is correct
167 Execution timed out 3522 ms 77560 KB Time limit exceeded
168 Halted 0 ms 0 KB -