Submission #543367

# Submission time Handle Problem Language Result Execution time Memory
543367 2022-03-30T11:30:55 Z alextodoran Fountain Parks (IOI21_parks) C++17
100 / 100
1468 ms 146380 KB
/**
 ____ ____ ____ ____ ____
||a |||t |||o |||d |||o ||
||__|||__|||__|||__|||__||
|/__\|/__\|/__\|/__\|/__\|

**/

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

void build (vector <int> U, vector <int> V, vector <int> A, vector <int> B);

struct Point {
    int x, y;
    int id;
};
bool operator < (const Point &u, const Point &v) {
    return make_pair(u.x, u.y) < make_pair(v.x, v.y);
}
bool operator != (const Point &u, const Point &v) {
    return make_pair(u.x, u.y) != make_pair(v.x, v.y);
}
const int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};

int N;
set <Point> fountains;
set <pair <Point, Point>> roads;
set <Point> benches;
set <Point> squares;

map <Point, vector <Point>> adj;

set <Point> seen;
void DFS (Point s) {
    seen.insert(s);
    for (Point t : adj[s]) {
        if (seen.find(t) == seen.end()) {
            if (s.x == t.x) {
                roads.erase(make_pair(Point{s.x - 1, (s.y + t.y) / 2}, Point{s.x + 1, (s.y + t.y) / 2}));
            } else {
                roads.erase(make_pair(Point{(s.x + t.x) / 2, s.y - 1}, Point{(s.x + t.x) / 2, s.y + 1}));
            }
            DFS(t);
        }
    }
}

set <pair <Point, Point>> used;

map <Point, Point> root;
Point findRoot (Point u) {
    if (root.find(u) == root.end()) {
        return u;
    } else {
        return root[u] = findRoot(root[u]);
    }
}
bool join (Point u, Point v) {
    u = findRoot(u);
    v = findRoot(v);
    if (u != v) {
        root[u] = v;
        return true;
    } else {
        return false;
    }
}

int construct_roads (vector <int> X, vector <int> Y) {
    N = (int) X.size();
    for (int i = 0; i < N; i++) {
        fountains.insert(Point{X[i], Y[i], i});
    }
    // Find all usable benches
    for (Point f : fountains) {
        for (int d = 0; d < 2; d++) {
            Point g = Point{f.x + dx[d] * 2, f.y + dy[d] * 2};
            if (fountains.find(g) != fountains.end()) {
                roads.insert(make_pair(f, g));
                if (f.x == g.x) {
                    benches.insert(Point{f.x - 1, (f.y + g.y) / 2});
                    benches.insert(Point{f.x + 1, (f.y + g.y) / 2});
                } else {
                    benches.insert(Point{(f.x + g.x) / 2, g.y - 1});
                    benches.insert(Point{(f.x + g.x) / 2, g.y + 1});
                }
            }
        }
    }
    // Find all squares
    for (Point f : fountains) {
        bool isSquare = true;
        for (int dx : {0, +2}) {
            for (int dy : {0, +2}) {
                isSquare &= (fountains.find(Point{f.x + dx, f.y + dy}) != fountains.end());
            }
        }
        if (isSquare == true) {
            squares.insert(Point{f.x + 1, f.y + 1});
        }
    }
    // Build the dual graph
    for (Point s : squares) {
        for (int d = abs(s.x + s.y) / 2 % 2; d < 4; d += 2) {
            Point t = Point{s.x + dx[d] * 2, s.y + dy[d] * 2};
            if (squares.find(t) == squares.end()) {
                adj[Point{-7, -7}].push_back(t);
            }
            adj[t].push_back(s);
        }
    }
    // Run DFS and cut edges
    DFS(Point{-7, -7});
    for (pair <Point, Point> r : roads) {
        if (join(r.first, r.second) == true) {
            used.insert(r);
        }
    }
    if ((int) used.size() < N - 1) {
        return 0;
    }
    // Build answer
    vector <int> U, V, A, B;
    for (Point b : benches) {
        if (abs(b.x + b.y) / 2 % 2 == 1) {
            for (int dx : {-1, +1}) {
                Point f = Point{b.x + dx, b.y - 1};
                Point g = Point{b.x + dx, b.y + 1};
                if (used.find(make_pair(f, g)) != used.end()) {
                    U.push_back(fountains.find(f)->id);
                    V.push_back(fountains.find(g)->id);
                    A.push_back(b.x);
                    B.push_back(b.y);
                }
            }
        } else {
            for (int dy : {-1, +1}) {
                Point f = Point{b.x - 1, b.y + dy};
                Point g = Point{b.x + 1, b.y + dy};
                if (used.find(make_pair(f, g)) != used.end()) {
                    U.push_back(fountains.find(f)->id);
                    V.push_back(fountains.find(g)->id);
                    A.push_back(b.x);
                    B.push_back(b.y);
                }
            }
        }
    }
    build(U, V, A, B);
    return 1;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 304 KB Output is correct
3 Correct 0 ms 300 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 379 ms 45072 KB Output is correct
10 Correct 28 ms 4968 KB Output is correct
11 Correct 199 ms 24564 KB Output is correct
12 Correct 44 ms 7244 KB Output is correct
13 Correct 114 ms 17924 KB Output is correct
14 Correct 2 ms 596 KB Output is correct
15 Correct 4 ms 980 KB Output is correct
16 Correct 383 ms 45324 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 304 KB Output is correct
3 Correct 0 ms 300 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 379 ms 45072 KB Output is correct
10 Correct 28 ms 4968 KB Output is correct
11 Correct 199 ms 24564 KB Output is correct
12 Correct 44 ms 7244 KB Output is correct
13 Correct 114 ms 17924 KB Output is correct
14 Correct 2 ms 596 KB Output is correct
15 Correct 4 ms 980 KB Output is correct
16 Correct 383 ms 45324 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 296 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 1454 ms 138592 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 4 ms 1108 KB Output is correct
26 Correct 8 ms 2036 KB Output is correct
27 Correct 11 ms 2608 KB Output is correct
28 Correct 469 ms 55644 KB Output is correct
29 Correct 770 ms 82880 KB Output is correct
30 Correct 1049 ms 111432 KB Output is correct
31 Correct 1354 ms 138616 KB Output is correct
32 Correct 1 ms 300 KB Output is correct
33 Correct 0 ms 212 KB Output is correct
34 Correct 1 ms 212 KB Output is correct
35 Correct 1 ms 212 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 0 ms 212 KB Output is correct
38 Correct 0 ms 212 KB Output is correct
39 Correct 0 ms 212 KB Output is correct
40 Correct 1 ms 300 KB Output is correct
41 Correct 0 ms 212 KB Output is correct
42 Correct 1 ms 296 KB Output is correct
43 Correct 4 ms 980 KB Output is correct
44 Correct 5 ms 1364 KB Output is correct
45 Correct 348 ms 41240 KB Output is correct
46 Correct 532 ms 59636 KB Output is correct
47 Correct 538 ms 59500 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 304 KB Output is correct
3 Correct 0 ms 300 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 379 ms 45072 KB Output is correct
10 Correct 28 ms 4968 KB Output is correct
11 Correct 199 ms 24564 KB Output is correct
12 Correct 44 ms 7244 KB Output is correct
13 Correct 114 ms 17924 KB Output is correct
14 Correct 2 ms 596 KB Output is correct
15 Correct 4 ms 980 KB Output is correct
16 Correct 383 ms 45324 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 296 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 1454 ms 138592 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 4 ms 1108 KB Output is correct
26 Correct 8 ms 2036 KB Output is correct
27 Correct 11 ms 2608 KB Output is correct
28 Correct 469 ms 55644 KB Output is correct
29 Correct 770 ms 82880 KB Output is correct
30 Correct 1049 ms 111432 KB Output is correct
31 Correct 1354 ms 138616 KB Output is correct
32 Correct 1 ms 300 KB Output is correct
33 Correct 0 ms 212 KB Output is correct
34 Correct 1 ms 212 KB Output is correct
35 Correct 1 ms 212 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 0 ms 212 KB Output is correct
38 Correct 0 ms 212 KB Output is correct
39 Correct 0 ms 212 KB Output is correct
40 Correct 1 ms 300 KB Output is correct
41 Correct 0 ms 212 KB Output is correct
42 Correct 1 ms 296 KB Output is correct
43 Correct 4 ms 980 KB Output is correct
44 Correct 5 ms 1364 KB Output is correct
45 Correct 348 ms 41240 KB Output is correct
46 Correct 532 ms 59636 KB Output is correct
47 Correct 538 ms 59500 KB Output is correct
48 Correct 0 ms 212 KB Output is correct
49 Correct 0 ms 300 KB Output is correct
50 Correct 0 ms 212 KB Output is correct
51 Correct 1 ms 212 KB Output is correct
52 Correct 0 ms 212 KB Output is correct
53 Correct 1 ms 212 KB Output is correct
54 Correct 1 ms 212 KB Output is correct
55 Correct 1323 ms 140120 KB Output is correct
56 Correct 1 ms 304 KB Output is correct
57 Correct 6 ms 1492 KB Output is correct
58 Correct 21 ms 4476 KB Output is correct
59 Correct 29 ms 6112 KB Output is correct
60 Correct 570 ms 70140 KB Output is correct
61 Correct 864 ms 94248 KB Output is correct
62 Correct 1099 ms 115408 KB Output is correct
63 Correct 1313 ms 140236 KB Output is correct
64 Correct 1 ms 212 KB Output is correct
65 Correct 1 ms 212 KB Output is correct
66 Correct 0 ms 212 KB Output is correct
67 Correct 831 ms 89700 KB Output is correct
68 Correct 922 ms 99252 KB Output is correct
69 Correct 887 ms 94052 KB Output is correct
70 Correct 7 ms 1664 KB Output is correct
71 Correct 19 ms 3124 KB Output is correct
72 Correct 362 ms 40872 KB Output is correct
73 Correct 580 ms 61132 KB Output is correct
74 Correct 815 ms 81324 KB Output is correct
75 Correct 1091 ms 98504 KB Output is correct
76 Correct 935 ms 99312 KB Output is correct
77 Correct 10 ms 2132 KB Output is correct
78 Correct 22 ms 3620 KB Output is correct
79 Correct 389 ms 42120 KB Output is correct
80 Correct 628 ms 63132 KB Output is correct
81 Correct 854 ms 84048 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 304 KB Output is correct
3 Correct 0 ms 300 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 379 ms 45072 KB Output is correct
10 Correct 28 ms 4968 KB Output is correct
11 Correct 199 ms 24564 KB Output is correct
12 Correct 44 ms 7244 KB Output is correct
13 Correct 114 ms 17924 KB Output is correct
14 Correct 2 ms 596 KB Output is correct
15 Correct 4 ms 980 KB Output is correct
16 Correct 383 ms 45324 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 796 ms 78068 KB Output is correct
21 Correct 852 ms 77980 KB Output is correct
22 Correct 808 ms 77980 KB Output is correct
23 Correct 689 ms 78712 KB Output is correct
24 Correct 225 ms 17612 KB Output is correct
25 Correct 616 ms 80056 KB Output is correct
26 Correct 604 ms 80008 KB Output is correct
27 Correct 921 ms 89676 KB Output is correct
28 Correct 775 ms 89640 KB Output is correct
29 Correct 1283 ms 89920 KB Output is correct
30 Correct 832 ms 89764 KB Output is correct
31 Correct 0 ms 212 KB Output is correct
32 Correct 43 ms 6356 KB Output is correct
33 Correct 89 ms 9268 KB Output is correct
34 Correct 728 ms 78032 KB Output is correct
35 Correct 26 ms 3892 KB Output is correct
36 Correct 117 ms 17896 KB Output is correct
37 Correct 260 ms 35728 KB Output is correct
38 Correct 281 ms 32728 KB Output is correct
39 Correct 397 ms 44432 KB Output is correct
40 Correct 525 ms 56384 KB Output is correct
41 Correct 680 ms 68508 KB Output is correct
42 Correct 799 ms 80424 KB Output is correct
43 Correct 0 ms 212 KB Output is correct
44 Correct 0 ms 212 KB Output is correct
45 Correct 0 ms 212 KB Output is correct
46 Correct 0 ms 212 KB Output is correct
47 Correct 1 ms 212 KB Output is correct
48 Correct 0 ms 212 KB Output is correct
49 Correct 0 ms 212 KB Output is correct
50 Correct 0 ms 212 KB Output is correct
51 Correct 0 ms 296 KB Output is correct
52 Correct 1 ms 212 KB Output is correct
53 Correct 1 ms 300 KB Output is correct
54 Correct 3 ms 980 KB Output is correct
55 Correct 5 ms 1364 KB Output is correct
56 Correct 361 ms 41116 KB Output is correct
57 Correct 549 ms 59568 KB Output is correct
58 Correct 574 ms 59560 KB Output is correct
59 Correct 1 ms 212 KB Output is correct
60 Correct 1 ms 212 KB Output is correct
61 Correct 1 ms 212 KB Output is correct
62 Correct 902 ms 89752 KB Output is correct
63 Correct 900 ms 99152 KB Output is correct
64 Correct 912 ms 93976 KB Output is correct
65 Correct 7 ms 1620 KB Output is correct
66 Correct 16 ms 3048 KB Output is correct
67 Correct 359 ms 40756 KB Output is correct
68 Correct 584 ms 61080 KB Output is correct
69 Correct 844 ms 81316 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 304 KB Output is correct
3 Correct 0 ms 300 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 379 ms 45072 KB Output is correct
10 Correct 28 ms 4968 KB Output is correct
11 Correct 199 ms 24564 KB Output is correct
12 Correct 44 ms 7244 KB Output is correct
13 Correct 114 ms 17924 KB Output is correct
14 Correct 2 ms 596 KB Output is correct
15 Correct 4 ms 980 KB Output is correct
16 Correct 383 ms 45324 KB Output is correct
17 Correct 979 ms 94808 KB Output is correct
18 Correct 938 ms 92680 KB Output is correct
19 Correct 937 ms 77928 KB Output is correct
20 Correct 932 ms 83812 KB Output is correct
21 Correct 813 ms 77760 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 124 ms 13584 KB Output is correct
24 Correct 54 ms 7700 KB Output is correct
25 Correct 207 ms 26332 KB Output is correct
26 Correct 383 ms 44928 KB Output is correct
27 Correct 415 ms 42464 KB Output is correct
28 Correct 537 ms 53124 KB Output is correct
29 Correct 677 ms 63696 KB Output is correct
30 Correct 759 ms 73764 KB Output is correct
31 Correct 902 ms 84556 KB Output is correct
32 Correct 1131 ms 98524 KB Output is correct
33 Correct 959 ms 99168 KB Output is correct
34 Correct 10 ms 2132 KB Output is correct
35 Correct 19 ms 3532 KB Output is correct
36 Correct 381 ms 42032 KB Output is correct
37 Correct 626 ms 63076 KB Output is correct
38 Correct 852 ms 83976 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 304 KB Output is correct
3 Correct 0 ms 300 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 379 ms 45072 KB Output is correct
10 Correct 28 ms 4968 KB Output is correct
11 Correct 199 ms 24564 KB Output is correct
12 Correct 44 ms 7244 KB Output is correct
13 Correct 114 ms 17924 KB Output is correct
14 Correct 2 ms 596 KB Output is correct
15 Correct 4 ms 980 KB Output is correct
16 Correct 383 ms 45324 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 296 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 1454 ms 138592 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 4 ms 1108 KB Output is correct
26 Correct 8 ms 2036 KB Output is correct
27 Correct 11 ms 2608 KB Output is correct
28 Correct 469 ms 55644 KB Output is correct
29 Correct 770 ms 82880 KB Output is correct
30 Correct 1049 ms 111432 KB Output is correct
31 Correct 1354 ms 138616 KB Output is correct
32 Correct 1 ms 300 KB Output is correct
33 Correct 0 ms 212 KB Output is correct
34 Correct 1 ms 212 KB Output is correct
35 Correct 1 ms 212 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 0 ms 212 KB Output is correct
38 Correct 0 ms 212 KB Output is correct
39 Correct 0 ms 212 KB Output is correct
40 Correct 1 ms 300 KB Output is correct
41 Correct 0 ms 212 KB Output is correct
42 Correct 1 ms 296 KB Output is correct
43 Correct 4 ms 980 KB Output is correct
44 Correct 5 ms 1364 KB Output is correct
45 Correct 348 ms 41240 KB Output is correct
46 Correct 532 ms 59636 KB Output is correct
47 Correct 538 ms 59500 KB Output is correct
48 Correct 0 ms 212 KB Output is correct
49 Correct 0 ms 300 KB Output is correct
50 Correct 0 ms 212 KB Output is correct
51 Correct 1 ms 212 KB Output is correct
52 Correct 0 ms 212 KB Output is correct
53 Correct 1 ms 212 KB Output is correct
54 Correct 1 ms 212 KB Output is correct
55 Correct 1323 ms 140120 KB Output is correct
56 Correct 1 ms 304 KB Output is correct
57 Correct 6 ms 1492 KB Output is correct
58 Correct 21 ms 4476 KB Output is correct
59 Correct 29 ms 6112 KB Output is correct
60 Correct 570 ms 70140 KB Output is correct
61 Correct 864 ms 94248 KB Output is correct
62 Correct 1099 ms 115408 KB Output is correct
63 Correct 1313 ms 140236 KB Output is correct
64 Correct 1 ms 212 KB Output is correct
65 Correct 1 ms 212 KB Output is correct
66 Correct 0 ms 212 KB Output is correct
67 Correct 831 ms 89700 KB Output is correct
68 Correct 922 ms 99252 KB Output is correct
69 Correct 887 ms 94052 KB Output is correct
70 Correct 7 ms 1664 KB Output is correct
71 Correct 19 ms 3124 KB Output is correct
72 Correct 362 ms 40872 KB Output is correct
73 Correct 580 ms 61132 KB Output is correct
74 Correct 815 ms 81324 KB Output is correct
75 Correct 1091 ms 98504 KB Output is correct
76 Correct 935 ms 99312 KB Output is correct
77 Correct 10 ms 2132 KB Output is correct
78 Correct 22 ms 3620 KB Output is correct
79 Correct 389 ms 42120 KB Output is correct
80 Correct 628 ms 63132 KB Output is correct
81 Correct 854 ms 84048 KB Output is correct
82 Correct 0 ms 212 KB Output is correct
83 Correct 1 ms 212 KB Output is correct
84 Correct 1 ms 212 KB Output is correct
85 Correct 796 ms 78068 KB Output is correct
86 Correct 852 ms 77980 KB Output is correct
87 Correct 808 ms 77980 KB Output is correct
88 Correct 689 ms 78712 KB Output is correct
89 Correct 225 ms 17612 KB Output is correct
90 Correct 616 ms 80056 KB Output is correct
91 Correct 604 ms 80008 KB Output is correct
92 Correct 921 ms 89676 KB Output is correct
93 Correct 775 ms 89640 KB Output is correct
94 Correct 1283 ms 89920 KB Output is correct
95 Correct 832 ms 89764 KB Output is correct
96 Correct 0 ms 212 KB Output is correct
97 Correct 43 ms 6356 KB Output is correct
98 Correct 89 ms 9268 KB Output is correct
99 Correct 728 ms 78032 KB Output is correct
100 Correct 26 ms 3892 KB Output is correct
101 Correct 117 ms 17896 KB Output is correct
102 Correct 260 ms 35728 KB Output is correct
103 Correct 281 ms 32728 KB Output is correct
104 Correct 397 ms 44432 KB Output is correct
105 Correct 525 ms 56384 KB Output is correct
106 Correct 680 ms 68508 KB Output is correct
107 Correct 799 ms 80424 KB Output is correct
108 Correct 0 ms 212 KB Output is correct
109 Correct 0 ms 212 KB Output is correct
110 Correct 0 ms 212 KB Output is correct
111 Correct 0 ms 212 KB Output is correct
112 Correct 1 ms 212 KB Output is correct
113 Correct 0 ms 212 KB Output is correct
114 Correct 0 ms 212 KB Output is correct
115 Correct 0 ms 212 KB Output is correct
116 Correct 0 ms 296 KB Output is correct
117 Correct 1 ms 212 KB Output is correct
118 Correct 1 ms 300 KB Output is correct
119 Correct 3 ms 980 KB Output is correct
120 Correct 5 ms 1364 KB Output is correct
121 Correct 361 ms 41116 KB Output is correct
122 Correct 549 ms 59568 KB Output is correct
123 Correct 574 ms 59560 KB Output is correct
124 Correct 1 ms 212 KB Output is correct
125 Correct 1 ms 212 KB Output is correct
126 Correct 1 ms 212 KB Output is correct
127 Correct 902 ms 89752 KB Output is correct
128 Correct 900 ms 99152 KB Output is correct
129 Correct 912 ms 93976 KB Output is correct
130 Correct 7 ms 1620 KB Output is correct
131 Correct 16 ms 3048 KB Output is correct
132 Correct 359 ms 40756 KB Output is correct
133 Correct 584 ms 61080 KB Output is correct
134 Correct 844 ms 81316 KB Output is correct
135 Correct 979 ms 94808 KB Output is correct
136 Correct 938 ms 92680 KB Output is correct
137 Correct 937 ms 77928 KB Output is correct
138 Correct 932 ms 83812 KB Output is correct
139 Correct 813 ms 77760 KB Output is correct
140 Correct 1 ms 212 KB Output is correct
141 Correct 124 ms 13584 KB Output is correct
142 Correct 54 ms 7700 KB Output is correct
143 Correct 207 ms 26332 KB Output is correct
144 Correct 383 ms 44928 KB Output is correct
145 Correct 415 ms 42464 KB Output is correct
146 Correct 537 ms 53124 KB Output is correct
147 Correct 677 ms 63696 KB Output is correct
148 Correct 759 ms 73764 KB Output is correct
149 Correct 902 ms 84556 KB Output is correct
150 Correct 1131 ms 98524 KB Output is correct
151 Correct 959 ms 99168 KB Output is correct
152 Correct 10 ms 2132 KB Output is correct
153 Correct 19 ms 3532 KB Output is correct
154 Correct 381 ms 42032 KB Output is correct
155 Correct 626 ms 63076 KB Output is correct
156 Correct 852 ms 83976 KB Output is correct
157 Correct 0 ms 212 KB Output is correct
158 Correct 0 ms 340 KB Output is correct
159 Correct 0 ms 212 KB Output is correct
160 Correct 1 ms 212 KB Output is correct
161 Correct 1212 ms 146380 KB Output is correct
162 Correct 806 ms 78092 KB Output is correct
163 Correct 1048 ms 120120 KB Output is correct
164 Correct 1068 ms 120144 KB Output is correct
165 Correct 1286 ms 133836 KB Output is correct
166 Correct 1370 ms 137608 KB Output is correct
167 Correct 294 ms 29148 KB Output is correct
168 Correct 145 ms 18508 KB Output is correct
169 Correct 446 ms 46748 KB Output is correct
170 Correct 908 ms 86904 KB Output is correct
171 Correct 1141 ms 114576 KB Output is correct
172 Correct 638 ms 70156 KB Output is correct
173 Correct 826 ms 84292 KB Output is correct
174 Correct 936 ms 98260 KB Output is correct
175 Correct 1120 ms 111952 KB Output is correct
176 Correct 1225 ms 126292 KB Output is correct
177 Correct 1468 ms 140240 KB Output is correct