Submission #439484

# Submission time Handle Problem Language Result Execution time Memory
439484 2021-06-30T05:55:29 Z qwerasdfzxcl Fountain Parks (IOI21_parks) C++17
100 / 100
1042 ms 146924 KB
#include "parks.h"
#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
struct point{
    int x, y, n;
    point(){}
    point(int _x, int _y, int _n): x(_x), y(_y), n(_n) {}
    bool operator<(const point &P) const{
        if (x+y==P.x+P.y) return y<P.y;
        return x+y<P.x+P.y;
    }
};
struct DSU{
    int path[200200];
    void init(int n){
        for (int i=0;i<n;i++) path[i] = i;
    }
    int find(int s){
        if (s==path[s]) return s;
        return path[s] = find(path[s]);
    }
    void merge(int s, int v){
        int x = find(s), y = find(v);
        if (x==y) return;
        path[x] = y;
    }
}dsu;
struct Vertex{
    int s, e, x, y;
    Vertex(){}
    Vertex(int _s, int _e, int _x, int _y): s(_s), e(_e), x(_x), y(_y) {}
};
map<int, int> mp[200200];
multimap<pair<int, int>, int> INV;
vector<Vertex> graph;
vector<int> adj[400400], inv[400400];

bool make_edge(int x, int y, int x2, int y2){
    if (mp[x].find(y)==mp[x].end() || mp[x2].find(y2)==mp[x2].end()) return 0;
    int tmp1 = mp[x][y], tmp2 = mp[x2][y2];
    if (dsu.find(tmp1)==dsu.find(tmp2)) return 0;
    if (tmp1>tmp2) swap(tmp1, tmp2);
    dsu.merge(tmp1, tmp2);

    if (x==x2){
        graph.emplace_back(tmp1, tmp2, x-1, (y+y2)/2);
        graph.emplace_back(tmp1, tmp2, x+1, (y+y2)/2);
        INV.insert(make_pair(make_pair(x-1, (y+y2)/2), (int)graph.size()-2));
        INV.insert(make_pair(make_pair(x+1, (y+y2)/2), (int)graph.size()-1));
    }
    else{
        graph.emplace_back(tmp1, tmp2, (x+x2)/2, y-1);
        graph.emplace_back(tmp1, tmp2, (x+x2)/2, y+1);
        INV.insert(make_pair(make_pair((x+x2)/2, y-1), (int)graph.size()-2));
        INV.insert(make_pair(make_pair((x+x2)/2, y+1), (int)graph.size()-1));
    }
    return 1;
}

bool valid(int n){
    bool ret = 1;
    for (int i=0;i<n-1;i++) if (dsu.find(i)!=dsu.find(i+1)) ret = 0;
    return ret;
}

int sccnum[400400], col[400400], cnt = 0;
bool visited[400400];
stack<int> st;
vector<vector<int>> scc;

void dfs1(int s){
    visited[s] = 1;
    for (auto &v:adj[s]) if (!visited[v]) dfs1(v);
    st.push(s);
}

void dfs2(int s){
    visited[s] = 1;
    sccnum[s] = cnt;
    scc.back().push_back(s);
    for (auto &v:inv[s]) if (!visited[v]) dfs2(v);
}

void getscc(int n){
    for (int i=0;i<n;i++){
        for (auto &v:adj[i]) inv[v].push_back(i);
    }
    for (int i=0;i<n;i++) if (!visited[i]) dfs1(i);
    fill(visited, visited+n, 0);
    scc.push_back(vector<int>());
    while(!st.empty()){
        int cur = st.top(); st.pop();
        if (visited[cur]) continue;
        cnt++;
        scc.push_back(vector<int>());
        dfs2(cur);
    }
}

bool cmp(point &x, point &y){
    if (x.y==y.y) return x.x<y.x;
    return x.y<y.y;
}

int construct_roads(std::vector<int> x, std::vector<int> y) {
    if (x.size() == 1) {
	build({}, {}, {}, {});
        return 1;
    }
    std::vector<int> ansu, ansv, ansa, ansb;
    vector<point> vec;
    int n = x.size();
    for (int i=0;i<n;i++){
        vec.emplace_back(x[i], y[i], i);
        mp[x[i]][y[i]] = i;
    }

    ///graph modeling
    dsu.init(n);
    sort(vec.begin(), vec.end());
    for (int i=0;i<n;i++) if ((vec[i].x+vec[i].y)%4==2){
        make_edge(vec[i].x, vec[i].y, vec[i].x+2, vec[i].y);
        make_edge(vec[i].x, vec[i].y, vec[i].x, vec[i].y+2);
    }
    for (int i=0;i<n;i++) if ((vec[i].x+vec[i].y)%4==0){
        make_edge(vec[i].x, vec[i].y, vec[i].x+2, vec[i].y);
        make_edge(vec[i].x, vec[i].y, vec[i].x, vec[i].y+2);
    }
    if (!valid(n)) return 0;

    for (auto iter=INV.begin();iter!=INV.end();++iter){
        auto tmp = INV.equal_range(iter->first);
        auto iter1 = tmp.first, iter2 = tmp.second;
        for(;iter1!=iter2;++iter1){
            if (iter1==iter) continue;
            adj[iter->second].push_back((iter1->second)^1);
        }
    }
    ///

    getscc((int)graph.size());
    for (int i=0;i<(int)graph.size();i++) if (sccnum[i]==sccnum[i^1]) return 0;

    ///finding solution
    fill(col, col+(int)graph.size(), -1);
    for (auto &V:scc){
        int tmp = 0;
        for (auto &x:V) if (col[x]==1) tmp = 1;
        for (auto &x:V) col[x] = tmp, col[x^1] = tmp^1;
    }
    ///
    for (int i=0;i<(int)graph.size();i++) if (col[i]==1){
        ansu.push_back(graph[i].s);
        ansv.push_back(graph[i].e);
        ansa.push_back(graph[i].x);
        ansb.push_back(graph[i].y);
    }
    build(ansu, ansv, ansa, ansb);
    return 1;
}
# Verdict Execution time Memory Grader output
1 Correct 21 ms 28492 KB Output is correct
2 Correct 20 ms 28436 KB Output is correct
3 Correct 21 ms 28492 KB Output is correct
4 Correct 19 ms 28508 KB Output is correct
5 Correct 21 ms 28488 KB Output is correct
6 Correct 21 ms 28492 KB Output is correct
7 Correct 19 ms 28480 KB Output is correct
8 Correct 19 ms 28492 KB Output is correct
9 Correct 305 ms 70156 KB Output is correct
10 Correct 42 ms 32700 KB Output is correct
11 Correct 166 ms 51092 KB Output is correct
12 Correct 50 ms 34856 KB Output is correct
13 Correct 96 ms 39052 KB Output is correct
14 Correct 23 ms 28748 KB Output is correct
15 Correct 22 ms 28900 KB Output is correct
16 Correct 299 ms 70128 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 21 ms 28492 KB Output is correct
2 Correct 20 ms 28436 KB Output is correct
3 Correct 21 ms 28492 KB Output is correct
4 Correct 19 ms 28508 KB Output is correct
5 Correct 21 ms 28488 KB Output is correct
6 Correct 21 ms 28492 KB Output is correct
7 Correct 19 ms 28480 KB Output is correct
8 Correct 19 ms 28492 KB Output is correct
9 Correct 305 ms 70156 KB Output is correct
10 Correct 42 ms 32700 KB Output is correct
11 Correct 166 ms 51092 KB Output is correct
12 Correct 50 ms 34856 KB Output is correct
13 Correct 96 ms 39052 KB Output is correct
14 Correct 23 ms 28748 KB Output is correct
15 Correct 22 ms 28900 KB Output is correct
16 Correct 299 ms 70128 KB Output is correct
17 Correct 24 ms 28408 KB Output is correct
18 Correct 19 ms 28508 KB Output is correct
19 Correct 20 ms 28444 KB Output is correct
20 Correct 19 ms 28516 KB Output is correct
21 Correct 20 ms 28516 KB Output is correct
22 Correct 19 ms 28492 KB Output is correct
23 Correct 812 ms 127168 KB Output is correct
24 Correct 19 ms 28492 KB Output is correct
25 Correct 23 ms 29124 KB Output is correct
26 Correct 28 ms 29200 KB Output is correct
27 Correct 25 ms 29332 KB Output is correct
28 Correct 321 ms 68216 KB Output is correct
29 Correct 463 ms 87492 KB Output is correct
30 Correct 597 ms 108300 KB Output is correct
31 Correct 826 ms 127276 KB Output is correct
32 Correct 26 ms 28492 KB Output is correct
33 Correct 17 ms 28456 KB Output is correct
34 Correct 32 ms 28480 KB Output is correct
35 Correct 17 ms 28400 KB Output is correct
36 Correct 17 ms 28492 KB Output is correct
37 Correct 16 ms 28492 KB Output is correct
38 Correct 16 ms 28528 KB Output is correct
39 Correct 17 ms 28416 KB Output is correct
40 Correct 17 ms 28492 KB Output is correct
41 Correct 23 ms 28492 KB Output is correct
42 Correct 18 ms 28512 KB Output is correct
43 Correct 22 ms 28876 KB Output is correct
44 Correct 20 ms 29132 KB Output is correct
45 Correct 323 ms 77828 KB Output is correct
46 Correct 544 ms 101080 KB Output is correct
47 Correct 517 ms 100804 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 21 ms 28492 KB Output is correct
2 Correct 20 ms 28436 KB Output is correct
3 Correct 21 ms 28492 KB Output is correct
4 Correct 19 ms 28508 KB Output is correct
5 Correct 21 ms 28488 KB Output is correct
6 Correct 21 ms 28492 KB Output is correct
7 Correct 19 ms 28480 KB Output is correct
8 Correct 19 ms 28492 KB Output is correct
9 Correct 305 ms 70156 KB Output is correct
10 Correct 42 ms 32700 KB Output is correct
11 Correct 166 ms 51092 KB Output is correct
12 Correct 50 ms 34856 KB Output is correct
13 Correct 96 ms 39052 KB Output is correct
14 Correct 23 ms 28748 KB Output is correct
15 Correct 22 ms 28900 KB Output is correct
16 Correct 299 ms 70128 KB Output is correct
17 Correct 24 ms 28408 KB Output is correct
18 Correct 19 ms 28508 KB Output is correct
19 Correct 20 ms 28444 KB Output is correct
20 Correct 19 ms 28516 KB Output is correct
21 Correct 20 ms 28516 KB Output is correct
22 Correct 19 ms 28492 KB Output is correct
23 Correct 812 ms 127168 KB Output is correct
24 Correct 19 ms 28492 KB Output is correct
25 Correct 23 ms 29124 KB Output is correct
26 Correct 28 ms 29200 KB Output is correct
27 Correct 25 ms 29332 KB Output is correct
28 Correct 321 ms 68216 KB Output is correct
29 Correct 463 ms 87492 KB Output is correct
30 Correct 597 ms 108300 KB Output is correct
31 Correct 826 ms 127276 KB Output is correct
32 Correct 26 ms 28492 KB Output is correct
33 Correct 17 ms 28456 KB Output is correct
34 Correct 32 ms 28480 KB Output is correct
35 Correct 17 ms 28400 KB Output is correct
36 Correct 17 ms 28492 KB Output is correct
37 Correct 16 ms 28492 KB Output is correct
38 Correct 16 ms 28528 KB Output is correct
39 Correct 17 ms 28416 KB Output is correct
40 Correct 17 ms 28492 KB Output is correct
41 Correct 23 ms 28492 KB Output is correct
42 Correct 18 ms 28512 KB Output is correct
43 Correct 22 ms 28876 KB Output is correct
44 Correct 20 ms 29132 KB Output is correct
45 Correct 323 ms 77828 KB Output is correct
46 Correct 544 ms 101080 KB Output is correct
47 Correct 517 ms 100804 KB Output is correct
48 Correct 18 ms 28528 KB Output is correct
49 Correct 19 ms 28448 KB Output is correct
50 Correct 18 ms 28492 KB Output is correct
51 Correct 20 ms 28492 KB Output is correct
52 Correct 20 ms 28492 KB Output is correct
53 Correct 21 ms 28468 KB Output is correct
54 Correct 16 ms 28420 KB Output is correct
55 Correct 827 ms 130376 KB Output is correct
56 Correct 22 ms 28464 KB Output is correct
57 Correct 25 ms 29440 KB Output is correct
58 Correct 42 ms 31556 KB Output is correct
59 Correct 36 ms 30852 KB Output is correct
60 Correct 370 ms 79360 KB Output is correct
61 Correct 533 ms 98092 KB Output is correct
62 Correct 689 ms 113184 KB Output is correct
63 Correct 844 ms 130352 KB Output is correct
64 Correct 20 ms 28492 KB Output is correct
65 Correct 19 ms 28492 KB Output is correct
66 Correct 19 ms 28492 KB Output is correct
67 Correct 687 ms 111640 KB Output is correct
68 Correct 703 ms 111840 KB Output is correct
69 Correct 738 ms 111432 KB Output is correct
70 Correct 36 ms 29388 KB Output is correct
71 Correct 30 ms 30388 KB Output is correct
72 Correct 408 ms 77992 KB Output is correct
73 Correct 561 ms 103600 KB Output is correct
74 Correct 755 ms 127512 KB Output is correct
75 Correct 752 ms 121988 KB Output is correct
76 Correct 782 ms 111784 KB Output is correct
77 Correct 33 ms 29588 KB Output is correct
78 Correct 34 ms 30704 KB Output is correct
79 Correct 331 ms 76612 KB Output is correct
80 Correct 516 ms 101488 KB Output is correct
81 Correct 737 ms 125292 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 21 ms 28492 KB Output is correct
2 Correct 20 ms 28436 KB Output is correct
3 Correct 21 ms 28492 KB Output is correct
4 Correct 19 ms 28508 KB Output is correct
5 Correct 21 ms 28488 KB Output is correct
6 Correct 21 ms 28492 KB Output is correct
7 Correct 19 ms 28480 KB Output is correct
8 Correct 19 ms 28492 KB Output is correct
9 Correct 305 ms 70156 KB Output is correct
10 Correct 42 ms 32700 KB Output is correct
11 Correct 166 ms 51092 KB Output is correct
12 Correct 50 ms 34856 KB Output is correct
13 Correct 96 ms 39052 KB Output is correct
14 Correct 23 ms 28748 KB Output is correct
15 Correct 22 ms 28900 KB Output is correct
16 Correct 299 ms 70128 KB Output is correct
17 Correct 19 ms 28480 KB Output is correct
18 Correct 20 ms 28424 KB Output is correct
19 Correct 19 ms 28492 KB Output is correct
20 Correct 642 ms 146832 KB Output is correct
21 Correct 668 ms 141940 KB Output is correct
22 Correct 633 ms 142028 KB Output is correct
23 Correct 489 ms 100128 KB Output is correct
24 Correct 297 ms 44148 KB Output is correct
25 Correct 663 ms 75496 KB Output is correct
26 Correct 576 ms 75388 KB Output is correct
27 Correct 745 ms 111492 KB Output is correct
28 Correct 770 ms 111496 KB Output is correct
29 Correct 839 ms 111532 KB Output is correct
30 Correct 871 ms 111512 KB Output is correct
31 Correct 21 ms 28484 KB Output is correct
32 Correct 60 ms 35600 KB Output is correct
33 Correct 93 ms 36252 KB Output is correct
34 Correct 610 ms 146880 KB Output is correct
35 Correct 34 ms 30856 KB Output is correct
36 Correct 114 ms 40192 KB Output is correct
37 Correct 199 ms 51996 KB Output is correct
38 Correct 314 ms 69448 KB Output is correct
39 Correct 433 ms 84176 KB Output is correct
40 Correct 590 ms 100520 KB Output is correct
41 Correct 736 ms 115420 KB Output is correct
42 Correct 1042 ms 130196 KB Output is correct
43 Correct 19 ms 28544 KB Output is correct
44 Correct 21 ms 28456 KB Output is correct
45 Correct 18 ms 28476 KB Output is correct
46 Correct 19 ms 28484 KB Output is correct
47 Correct 19 ms 28492 KB Output is correct
48 Correct 19 ms 28520 KB Output is correct
49 Correct 20 ms 28484 KB Output is correct
50 Correct 21 ms 28492 KB Output is correct
51 Correct 20 ms 28512 KB Output is correct
52 Correct 20 ms 28492 KB Output is correct
53 Correct 20 ms 28492 KB Output is correct
54 Correct 26 ms 28964 KB Output is correct
55 Correct 24 ms 29208 KB Output is correct
56 Correct 327 ms 77944 KB Output is correct
57 Correct 519 ms 101060 KB Output is correct
58 Correct 497 ms 101012 KB Output is correct
59 Correct 20 ms 28492 KB Output is correct
60 Correct 20 ms 28492 KB Output is correct
61 Correct 20 ms 28492 KB Output is correct
62 Correct 643 ms 111668 KB Output is correct
63 Correct 704 ms 111828 KB Output is correct
64 Correct 720 ms 111536 KB Output is correct
65 Correct 25 ms 29388 KB Output is correct
66 Correct 32 ms 30352 KB Output is correct
67 Correct 361 ms 77872 KB Output is correct
68 Correct 583 ms 103760 KB Output is correct
69 Correct 744 ms 127608 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 21 ms 28492 KB Output is correct
2 Correct 20 ms 28436 KB Output is correct
3 Correct 21 ms 28492 KB Output is correct
4 Correct 19 ms 28508 KB Output is correct
5 Correct 21 ms 28488 KB Output is correct
6 Correct 21 ms 28492 KB Output is correct
7 Correct 19 ms 28480 KB Output is correct
8 Correct 19 ms 28492 KB Output is correct
9 Correct 305 ms 70156 KB Output is correct
10 Correct 42 ms 32700 KB Output is correct
11 Correct 166 ms 51092 KB Output is correct
12 Correct 50 ms 34856 KB Output is correct
13 Correct 96 ms 39052 KB Output is correct
14 Correct 23 ms 28748 KB Output is correct
15 Correct 22 ms 28900 KB Output is correct
16 Correct 299 ms 70128 KB Output is correct
17 Correct 670 ms 112104 KB Output is correct
18 Correct 624 ms 112388 KB Output is correct
19 Correct 658 ms 141976 KB Output is correct
20 Correct 889 ms 126196 KB Output is correct
21 Correct 717 ms 105696 KB Output is correct
22 Correct 19 ms 28492 KB Output is correct
23 Correct 109 ms 44176 KB Output is correct
24 Correct 56 ms 33200 KB Output is correct
25 Correct 148 ms 46196 KB Output is correct
26 Correct 259 ms 56684 KB Output is correct
27 Correct 430 ms 78856 KB Output is correct
28 Correct 599 ms 91288 KB Output is correct
29 Correct 706 ms 105084 KB Output is correct
30 Correct 790 ms 117068 KB Output is correct
31 Correct 951 ms 129564 KB Output is correct
32 Correct 831 ms 122044 KB Output is correct
33 Correct 704 ms 111780 KB Output is correct
34 Correct 29 ms 29676 KB Output is correct
35 Correct 36 ms 30676 KB Output is correct
36 Correct 376 ms 76544 KB Output is correct
37 Correct 613 ms 101520 KB Output is correct
38 Correct 777 ms 125256 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 21 ms 28492 KB Output is correct
2 Correct 20 ms 28436 KB Output is correct
3 Correct 21 ms 28492 KB Output is correct
4 Correct 19 ms 28508 KB Output is correct
5 Correct 21 ms 28488 KB Output is correct
6 Correct 21 ms 28492 KB Output is correct
7 Correct 19 ms 28480 KB Output is correct
8 Correct 19 ms 28492 KB Output is correct
9 Correct 305 ms 70156 KB Output is correct
10 Correct 42 ms 32700 KB Output is correct
11 Correct 166 ms 51092 KB Output is correct
12 Correct 50 ms 34856 KB Output is correct
13 Correct 96 ms 39052 KB Output is correct
14 Correct 23 ms 28748 KB Output is correct
15 Correct 22 ms 28900 KB Output is correct
16 Correct 299 ms 70128 KB Output is correct
17 Correct 24 ms 28408 KB Output is correct
18 Correct 19 ms 28508 KB Output is correct
19 Correct 20 ms 28444 KB Output is correct
20 Correct 19 ms 28516 KB Output is correct
21 Correct 20 ms 28516 KB Output is correct
22 Correct 19 ms 28492 KB Output is correct
23 Correct 812 ms 127168 KB Output is correct
24 Correct 19 ms 28492 KB Output is correct
25 Correct 23 ms 29124 KB Output is correct
26 Correct 28 ms 29200 KB Output is correct
27 Correct 25 ms 29332 KB Output is correct
28 Correct 321 ms 68216 KB Output is correct
29 Correct 463 ms 87492 KB Output is correct
30 Correct 597 ms 108300 KB Output is correct
31 Correct 826 ms 127276 KB Output is correct
32 Correct 26 ms 28492 KB Output is correct
33 Correct 17 ms 28456 KB Output is correct
34 Correct 32 ms 28480 KB Output is correct
35 Correct 17 ms 28400 KB Output is correct
36 Correct 17 ms 28492 KB Output is correct
37 Correct 16 ms 28492 KB Output is correct
38 Correct 16 ms 28528 KB Output is correct
39 Correct 17 ms 28416 KB Output is correct
40 Correct 17 ms 28492 KB Output is correct
41 Correct 23 ms 28492 KB Output is correct
42 Correct 18 ms 28512 KB Output is correct
43 Correct 22 ms 28876 KB Output is correct
44 Correct 20 ms 29132 KB Output is correct
45 Correct 323 ms 77828 KB Output is correct
46 Correct 544 ms 101080 KB Output is correct
47 Correct 517 ms 100804 KB Output is correct
48 Correct 18 ms 28528 KB Output is correct
49 Correct 19 ms 28448 KB Output is correct
50 Correct 18 ms 28492 KB Output is correct
51 Correct 20 ms 28492 KB Output is correct
52 Correct 20 ms 28492 KB Output is correct
53 Correct 21 ms 28468 KB Output is correct
54 Correct 16 ms 28420 KB Output is correct
55 Correct 827 ms 130376 KB Output is correct
56 Correct 22 ms 28464 KB Output is correct
57 Correct 25 ms 29440 KB Output is correct
58 Correct 42 ms 31556 KB Output is correct
59 Correct 36 ms 30852 KB Output is correct
60 Correct 370 ms 79360 KB Output is correct
61 Correct 533 ms 98092 KB Output is correct
62 Correct 689 ms 113184 KB Output is correct
63 Correct 844 ms 130352 KB Output is correct
64 Correct 20 ms 28492 KB Output is correct
65 Correct 19 ms 28492 KB Output is correct
66 Correct 19 ms 28492 KB Output is correct
67 Correct 687 ms 111640 KB Output is correct
68 Correct 703 ms 111840 KB Output is correct
69 Correct 738 ms 111432 KB Output is correct
70 Correct 36 ms 29388 KB Output is correct
71 Correct 30 ms 30388 KB Output is correct
72 Correct 408 ms 77992 KB Output is correct
73 Correct 561 ms 103600 KB Output is correct
74 Correct 755 ms 127512 KB Output is correct
75 Correct 752 ms 121988 KB Output is correct
76 Correct 782 ms 111784 KB Output is correct
77 Correct 33 ms 29588 KB Output is correct
78 Correct 34 ms 30704 KB Output is correct
79 Correct 331 ms 76612 KB Output is correct
80 Correct 516 ms 101488 KB Output is correct
81 Correct 737 ms 125292 KB Output is correct
82 Correct 19 ms 28480 KB Output is correct
83 Correct 20 ms 28424 KB Output is correct
84 Correct 19 ms 28492 KB Output is correct
85 Correct 642 ms 146832 KB Output is correct
86 Correct 668 ms 141940 KB Output is correct
87 Correct 633 ms 142028 KB Output is correct
88 Correct 489 ms 100128 KB Output is correct
89 Correct 297 ms 44148 KB Output is correct
90 Correct 663 ms 75496 KB Output is correct
91 Correct 576 ms 75388 KB Output is correct
92 Correct 745 ms 111492 KB Output is correct
93 Correct 770 ms 111496 KB Output is correct
94 Correct 839 ms 111532 KB Output is correct
95 Correct 871 ms 111512 KB Output is correct
96 Correct 21 ms 28484 KB Output is correct
97 Correct 60 ms 35600 KB Output is correct
98 Correct 93 ms 36252 KB Output is correct
99 Correct 610 ms 146880 KB Output is correct
100 Correct 34 ms 30856 KB Output is correct
101 Correct 114 ms 40192 KB Output is correct
102 Correct 199 ms 51996 KB Output is correct
103 Correct 314 ms 69448 KB Output is correct
104 Correct 433 ms 84176 KB Output is correct
105 Correct 590 ms 100520 KB Output is correct
106 Correct 736 ms 115420 KB Output is correct
107 Correct 1042 ms 130196 KB Output is correct
108 Correct 19 ms 28544 KB Output is correct
109 Correct 21 ms 28456 KB Output is correct
110 Correct 18 ms 28476 KB Output is correct
111 Correct 19 ms 28484 KB Output is correct
112 Correct 19 ms 28492 KB Output is correct
113 Correct 19 ms 28520 KB Output is correct
114 Correct 20 ms 28484 KB Output is correct
115 Correct 21 ms 28492 KB Output is correct
116 Correct 20 ms 28512 KB Output is correct
117 Correct 20 ms 28492 KB Output is correct
118 Correct 20 ms 28492 KB Output is correct
119 Correct 26 ms 28964 KB Output is correct
120 Correct 24 ms 29208 KB Output is correct
121 Correct 327 ms 77944 KB Output is correct
122 Correct 519 ms 101060 KB Output is correct
123 Correct 497 ms 101012 KB Output is correct
124 Correct 20 ms 28492 KB Output is correct
125 Correct 20 ms 28492 KB Output is correct
126 Correct 20 ms 28492 KB Output is correct
127 Correct 643 ms 111668 KB Output is correct
128 Correct 704 ms 111828 KB Output is correct
129 Correct 720 ms 111536 KB Output is correct
130 Correct 25 ms 29388 KB Output is correct
131 Correct 32 ms 30352 KB Output is correct
132 Correct 361 ms 77872 KB Output is correct
133 Correct 583 ms 103760 KB Output is correct
134 Correct 744 ms 127608 KB Output is correct
135 Correct 670 ms 112104 KB Output is correct
136 Correct 624 ms 112388 KB Output is correct
137 Correct 658 ms 141976 KB Output is correct
138 Correct 889 ms 126196 KB Output is correct
139 Correct 717 ms 105696 KB Output is correct
140 Correct 19 ms 28492 KB Output is correct
141 Correct 109 ms 44176 KB Output is correct
142 Correct 56 ms 33200 KB Output is correct
143 Correct 148 ms 46196 KB Output is correct
144 Correct 259 ms 56684 KB Output is correct
145 Correct 430 ms 78856 KB Output is correct
146 Correct 599 ms 91288 KB Output is correct
147 Correct 706 ms 105084 KB Output is correct
148 Correct 790 ms 117068 KB Output is correct
149 Correct 951 ms 129564 KB Output is correct
150 Correct 831 ms 122044 KB Output is correct
151 Correct 704 ms 111780 KB Output is correct
152 Correct 29 ms 29676 KB Output is correct
153 Correct 36 ms 30676 KB Output is correct
154 Correct 376 ms 76544 KB Output is correct
155 Correct 613 ms 101520 KB Output is correct
156 Correct 777 ms 125256 KB Output is correct
157 Correct 22 ms 28516 KB Output is correct
158 Correct 19 ms 28492 KB Output is correct
159 Correct 20 ms 28492 KB Output is correct
160 Correct 20 ms 28492 KB Output is correct
161 Correct 877 ms 136920 KB Output is correct
162 Correct 615 ms 146924 KB Output is correct
163 Correct 622 ms 139524 KB Output is correct
164 Correct 634 ms 139400 KB Output is correct
165 Correct 766 ms 137852 KB Output is correct
166 Correct 746 ms 137108 KB Output is correct
167 Correct 187 ms 53088 KB Output is correct
168 Correct 72 ms 35456 KB Output is correct
169 Correct 165 ms 47216 KB Output is correct
170 Correct 351 ms 64848 KB Output is correct
171 Correct 433 ms 75448 KB Output is correct
172 Correct 409 ms 82740 KB Output is correct
173 Correct 459 ms 93300 KB Output is correct
174 Correct 641 ms 105504 KB Output is correct
175 Correct 625 ms 116080 KB Output is correct
176 Correct 711 ms 126664 KB Output is correct
177 Correct 829 ms 137392 KB Output is correct