Submission #685079

# Submission time Handle Problem Language Result Execution time Memory
685079 2023-01-23T09:38:06 Z sharaelong Fountain Parks (IOI21_parks) C++17
100 / 100
678 ms 63504 KB
#include "parks.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;

struct DisjointSet {
    int n;
    vector<int> parent, rank;
    DisjointSet(int _n) : n(_n) {
        parent.resize(n);
        iota(parent.begin(), parent.end(), 0);
        rank.resize(n, 0);
    }

    int find(int u) {
        return parent[u] = (u == parent[u] ? u : find(parent[u]));
    }

    void merge(int u, int v) {
        u = find(u); v = find(v);
        if (u == v) return;
        if (rank[u] > rank[v]) swap(u, v);
        parent[u] = v;
        if (rank[u] == rank[v]) ++rank[v];
    }
};

int construct_roads(vector<int> x, vector<int> y) {
    int n = x.size();
    map<pii, int> fountains;
    for (int i=0; i<n; ++i) fountains[{ x[i], y[i] }] = i;
    set<pii> bench_cands;
    set<pii> road_cands; // store midpoint of adjacent fountains
    
    DisjointSet dsu(n);
    vector<vector<int>> points(200001);
    for (int i=0; i<n; ++i) points[x[i]].push_back(y[i]);
    for (auto& v: points) sort(v.begin(), v.end());
    for (int x=2; x<points.size(); x+=2) {
        for (int j=0; j<points[x].size(); ++j) {
            int y = points[x][j];
            if (fountains.count({ x-2, y })) {
                bench_cands.insert({ x-1, y-1 });
                bench_cands.insert({ x-1, y+1 });
                road_cands.insert({ x-1, y });
                dsu.merge(fountains[{ x-2, y }], fountains[{ x, y }]);
            }
            if (j+1 < points[x].size() && points[x][j+1] == y+2) {
                bench_cands.insert({ x-1, y+1 });
                bench_cands.insert({ x+1, y+1 });
                road_cands.insert({ x, y+1 });
                dsu.merge(fountains[{ x, y }], fountains[{ x, y+2 }]);
            }
        }
    }
    for (int i=1; i<n; ++i) {
        if (dsu.find(i) != dsu.find(0)) {
            return 0;
        }
    }

    vector<int> U, V, A, B;
    for (auto[a, b]: bench_cands) {
        bool is_black = ((a+b) % 4 == 2);
        if (is_black) {
            if (road_cands.count({ a, b+1 })) {
                U.push_back(fountains[{ a-1, b+1 }]);
                V.push_back(fountains[{ a+1, b+1 }]);
                A.push_back(a);
                B.push_back(b);
                road_cands.erase({ a, b+1 });
            } else if (road_cands.count({ a, b-1 })) {
                U.push_back(fountains[{ a-1, b-1 }]);
                V.push_back(fountains[{ a+1, b-1 }]);
                A.push_back(a);
                B.push_back(b);
                road_cands.erase({ a, b-1 });
            }
        } else {
            if (road_cands.count({ a-1, b })) {
                U.push_back(fountains[{ a-1, b-1 }]);
                V.push_back(fountains[{ a-1, b+1 }]);
                A.push_back(a);
                B.push_back(b);
                road_cands.erase({ a-1, b });
            } else if (road_cands.count({ a+1, b })) {
                U.push_back(fountains[{ a+1, b-1 }]);
                V.push_back(fountains[{ a+1, b+1 }]);
                A.push_back(a);
                B.push_back(b);
                road_cands.erase({ a+1, b });
            }   
        }
    }
    build(U, V, A, B);
    return 1;
}

Compilation message

parks.cpp: In function 'int construct_roads(std::vector<int>, std::vector<int>)':
parks.cpp:40:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   40 |     for (int x=2; x<points.size(); x+=2) {
      |                   ~^~~~~~~~~~~~~~
parks.cpp:41:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   41 |         for (int j=0; j<points[x].size(); ++j) {
      |                       ~^~~~~~~~~~~~~~~~~
parks.cpp:49:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   49 |             if (j+1 < points[x].size() && points[x][j+1] == y+2) {
      |                 ~~~~^~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 3 ms 4948 KB Output is correct
2 Correct 3 ms 4948 KB Output is correct
3 Correct 3 ms 4908 KB Output is correct
4 Correct 3 ms 4900 KB Output is correct
5 Correct 4 ms 4948 KB Output is correct
6 Correct 4 ms 4948 KB Output is correct
7 Correct 3 ms 4948 KB Output is correct
8 Correct 4 ms 4948 KB Output is correct
9 Correct 247 ms 33392 KB Output is correct
10 Correct 19 ms 7876 KB Output is correct
11 Correct 118 ms 20268 KB Output is correct
12 Correct 29 ms 9244 KB Output is correct
13 Correct 61 ms 15376 KB Output is correct
14 Correct 4 ms 5204 KB Output is correct
15 Correct 5 ms 5432 KB Output is correct
16 Correct 251 ms 33228 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 4948 KB Output is correct
2 Correct 3 ms 4948 KB Output is correct
3 Correct 3 ms 4908 KB Output is correct
4 Correct 3 ms 4900 KB Output is correct
5 Correct 4 ms 4948 KB Output is correct
6 Correct 4 ms 4948 KB Output is correct
7 Correct 3 ms 4948 KB Output is correct
8 Correct 4 ms 4948 KB Output is correct
9 Correct 247 ms 33392 KB Output is correct
10 Correct 19 ms 7876 KB Output is correct
11 Correct 118 ms 20268 KB Output is correct
12 Correct 29 ms 9244 KB Output is correct
13 Correct 61 ms 15376 KB Output is correct
14 Correct 4 ms 5204 KB Output is correct
15 Correct 5 ms 5432 KB Output is correct
16 Correct 251 ms 33228 KB Output is correct
17 Correct 3 ms 4948 KB Output is correct
18 Correct 3 ms 4948 KB Output is correct
19 Correct 3 ms 4948 KB Output is correct
20 Correct 3 ms 4948 KB Output is correct
21 Correct 3 ms 4948 KB Output is correct
22 Correct 3 ms 4948 KB Output is correct
23 Correct 660 ms 61492 KB Output is correct
24 Correct 3 ms 4948 KB Output is correct
25 Correct 5 ms 5332 KB Output is correct
26 Correct 7 ms 5716 KB Output is correct
27 Correct 8 ms 5868 KB Output is correct
28 Correct 221 ms 27508 KB Output is correct
29 Correct 365 ms 38680 KB Output is correct
30 Correct 505 ms 49732 KB Output is correct
31 Correct 652 ms 61396 KB Output is correct
32 Correct 3 ms 4948 KB Output is correct
33 Correct 3 ms 4948 KB Output is correct
34 Correct 3 ms 4948 KB Output is correct
35 Correct 4 ms 4948 KB Output is correct
36 Correct 3 ms 4948 KB Output is correct
37 Correct 3 ms 4948 KB Output is correct
38 Correct 3 ms 4900 KB Output is correct
39 Correct 3 ms 4948 KB Output is correct
40 Correct 3 ms 4948 KB Output is correct
41 Correct 3 ms 4948 KB Output is correct
42 Correct 3 ms 4948 KB Output is correct
43 Correct 5 ms 5332 KB Output is correct
44 Correct 7 ms 5588 KB Output is correct
45 Correct 242 ms 30256 KB Output is correct
46 Correct 374 ms 41400 KB Output is correct
47 Correct 385 ms 41424 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 4948 KB Output is correct
2 Correct 3 ms 4948 KB Output is correct
3 Correct 3 ms 4908 KB Output is correct
4 Correct 3 ms 4900 KB Output is correct
5 Correct 4 ms 4948 KB Output is correct
6 Correct 4 ms 4948 KB Output is correct
7 Correct 3 ms 4948 KB Output is correct
8 Correct 4 ms 4948 KB Output is correct
9 Correct 247 ms 33392 KB Output is correct
10 Correct 19 ms 7876 KB Output is correct
11 Correct 118 ms 20268 KB Output is correct
12 Correct 29 ms 9244 KB Output is correct
13 Correct 61 ms 15376 KB Output is correct
14 Correct 4 ms 5204 KB Output is correct
15 Correct 5 ms 5432 KB Output is correct
16 Correct 251 ms 33228 KB Output is correct
17 Correct 3 ms 4948 KB Output is correct
18 Correct 3 ms 4948 KB Output is correct
19 Correct 3 ms 4948 KB Output is correct
20 Correct 3 ms 4948 KB Output is correct
21 Correct 3 ms 4948 KB Output is correct
22 Correct 3 ms 4948 KB Output is correct
23 Correct 660 ms 61492 KB Output is correct
24 Correct 3 ms 4948 KB Output is correct
25 Correct 5 ms 5332 KB Output is correct
26 Correct 7 ms 5716 KB Output is correct
27 Correct 8 ms 5868 KB Output is correct
28 Correct 221 ms 27508 KB Output is correct
29 Correct 365 ms 38680 KB Output is correct
30 Correct 505 ms 49732 KB Output is correct
31 Correct 652 ms 61396 KB Output is correct
32 Correct 3 ms 4948 KB Output is correct
33 Correct 3 ms 4948 KB Output is correct
34 Correct 3 ms 4948 KB Output is correct
35 Correct 4 ms 4948 KB Output is correct
36 Correct 3 ms 4948 KB Output is correct
37 Correct 3 ms 4948 KB Output is correct
38 Correct 3 ms 4900 KB Output is correct
39 Correct 3 ms 4948 KB Output is correct
40 Correct 3 ms 4948 KB Output is correct
41 Correct 3 ms 4948 KB Output is correct
42 Correct 3 ms 4948 KB Output is correct
43 Correct 5 ms 5332 KB Output is correct
44 Correct 7 ms 5588 KB Output is correct
45 Correct 242 ms 30256 KB Output is correct
46 Correct 374 ms 41400 KB Output is correct
47 Correct 385 ms 41424 KB Output is correct
48 Correct 3 ms 4948 KB Output is correct
49 Correct 3 ms 4948 KB Output is correct
50 Correct 3 ms 4948 KB Output is correct
51 Correct 3 ms 4968 KB Output is correct
52 Correct 4 ms 4948 KB Output is correct
53 Correct 3 ms 4948 KB Output is correct
54 Correct 3 ms 4948 KB Output is correct
55 Correct 678 ms 61500 KB Output is correct
56 Correct 3 ms 4948 KB Output is correct
57 Correct 6 ms 5436 KB Output is correct
58 Correct 14 ms 6740 KB Output is correct
59 Correct 17 ms 7348 KB Output is correct
60 Correct 340 ms 33592 KB Output is correct
61 Correct 410 ms 43688 KB Output is correct
62 Correct 520 ms 52448 KB Output is correct
63 Correct 676 ms 62904 KB Output is correct
64 Correct 3 ms 4948 KB Output is correct
65 Correct 3 ms 4948 KB Output is correct
66 Correct 3 ms 4912 KB Output is correct
67 Correct 559 ms 63020 KB Output is correct
68 Correct 559 ms 62904 KB Output is correct
69 Correct 582 ms 62584 KB Output is correct
70 Correct 7 ms 5820 KB Output is correct
71 Correct 11 ms 6580 KB Output is correct
72 Correct 265 ms 30596 KB Output is correct
73 Correct 382 ms 43304 KB Output is correct
74 Correct 540 ms 56088 KB Output is correct
75 Correct 599 ms 61556 KB Output is correct
76 Correct 566 ms 62900 KB Output is correct
77 Correct 8 ms 5972 KB Output is correct
78 Correct 16 ms 6868 KB Output is correct
79 Correct 264 ms 31872 KB Output is correct
80 Correct 430 ms 45548 KB Output is correct
81 Correct 591 ms 59036 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 4948 KB Output is correct
2 Correct 3 ms 4948 KB Output is correct
3 Correct 3 ms 4908 KB Output is correct
4 Correct 3 ms 4900 KB Output is correct
5 Correct 4 ms 4948 KB Output is correct
6 Correct 4 ms 4948 KB Output is correct
7 Correct 3 ms 4948 KB Output is correct
8 Correct 4 ms 4948 KB Output is correct
9 Correct 247 ms 33392 KB Output is correct
10 Correct 19 ms 7876 KB Output is correct
11 Correct 118 ms 20268 KB Output is correct
12 Correct 29 ms 9244 KB Output is correct
13 Correct 61 ms 15376 KB Output is correct
14 Correct 4 ms 5204 KB Output is correct
15 Correct 5 ms 5432 KB Output is correct
16 Correct 251 ms 33228 KB Output is correct
17 Correct 3 ms 4948 KB Output is correct
18 Correct 3 ms 4948 KB Output is correct
19 Correct 3 ms 4948 KB Output is correct
20 Correct 533 ms 53828 KB Output is correct
21 Correct 528 ms 52308 KB Output is correct
22 Correct 548 ms 52380 KB Output is correct
23 Correct 447 ms 53748 KB Output is correct
24 Correct 183 ms 23304 KB Output is correct
25 Correct 356 ms 51348 KB Output is correct
26 Correct 365 ms 51424 KB Output is correct
27 Correct 482 ms 60960 KB Output is correct
28 Correct 483 ms 62368 KB Output is correct
29 Correct 538 ms 62444 KB Output is correct
30 Correct 535 ms 62520 KB Output is correct
31 Correct 3 ms 4948 KB Output is correct
32 Correct 32 ms 8616 KB Output is correct
33 Correct 89 ms 17960 KB Output is correct
34 Correct 517 ms 56312 KB Output is correct
35 Correct 16 ms 6996 KB Output is correct
36 Correct 74 ms 15300 KB Output is correct
37 Correct 159 ms 25764 KB Output is correct
38 Correct 182 ms 25524 KB Output is correct
39 Correct 257 ms 33160 KB Output is correct
40 Correct 346 ms 40748 KB Output is correct
41 Correct 422 ms 48460 KB Output is correct
42 Correct 505 ms 55972 KB Output is correct
43 Correct 3 ms 4948 KB Output is correct
44 Correct 3 ms 4948 KB Output is correct
45 Correct 4 ms 4948 KB Output is correct
46 Correct 3 ms 4948 KB Output is correct
47 Correct 3 ms 4948 KB Output is correct
48 Correct 3 ms 4948 KB Output is correct
49 Correct 3 ms 4948 KB Output is correct
50 Correct 3 ms 4948 KB Output is correct
51 Correct 3 ms 4948 KB Output is correct
52 Correct 3 ms 4948 KB Output is correct
53 Correct 3 ms 4912 KB Output is correct
54 Correct 5 ms 5332 KB Output is correct
55 Correct 6 ms 5584 KB Output is correct
56 Correct 254 ms 30832 KB Output is correct
57 Correct 389 ms 42564 KB Output is correct
58 Correct 369 ms 42524 KB Output is correct
59 Correct 3 ms 4908 KB Output is correct
60 Correct 3 ms 4948 KB Output is correct
61 Correct 3 ms 4948 KB Output is correct
62 Correct 558 ms 63056 KB Output is correct
63 Correct 570 ms 62884 KB Output is correct
64 Correct 582 ms 62532 KB Output is correct
65 Correct 7 ms 5844 KB Output is correct
66 Correct 11 ms 6612 KB Output is correct
67 Correct 235 ms 30476 KB Output is correct
68 Correct 385 ms 43288 KB Output is correct
69 Correct 558 ms 56096 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 4948 KB Output is correct
2 Correct 3 ms 4948 KB Output is correct
3 Correct 3 ms 4908 KB Output is correct
4 Correct 3 ms 4900 KB Output is correct
5 Correct 4 ms 4948 KB Output is correct
6 Correct 4 ms 4948 KB Output is correct
7 Correct 3 ms 4948 KB Output is correct
8 Correct 4 ms 4948 KB Output is correct
9 Correct 247 ms 33392 KB Output is correct
10 Correct 19 ms 7876 KB Output is correct
11 Correct 118 ms 20268 KB Output is correct
12 Correct 29 ms 9244 KB Output is correct
13 Correct 61 ms 15376 KB Output is correct
14 Correct 4 ms 5204 KB Output is correct
15 Correct 5 ms 5432 KB Output is correct
16 Correct 251 ms 33228 KB Output is correct
17 Correct 562 ms 62056 KB Output is correct
18 Correct 568 ms 62248 KB Output is correct
19 Correct 509 ms 52528 KB Output is correct
20 Correct 535 ms 61296 KB Output is correct
21 Correct 485 ms 55848 KB Output is correct
22 Correct 3 ms 4948 KB Output is correct
23 Correct 74 ms 13468 KB Output is correct
24 Correct 30 ms 9308 KB Output is correct
25 Correct 112 ms 20440 KB Output is correct
26 Correct 204 ms 31564 KB Output is correct
27 Correct 255 ms 32928 KB Output is correct
28 Correct 331 ms 40100 KB Output is correct
29 Correct 407 ms 47096 KB Output is correct
30 Correct 499 ms 53668 KB Output is correct
31 Correct 558 ms 60688 KB Output is correct
32 Correct 638 ms 61452 KB Output is correct
33 Correct 619 ms 62900 KB Output is correct
34 Correct 9 ms 5972 KB Output is correct
35 Correct 14 ms 6860 KB Output is correct
36 Correct 262 ms 31872 KB Output is correct
37 Correct 425 ms 45744 KB Output is correct
38 Correct 577 ms 58940 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 4948 KB Output is correct
2 Correct 3 ms 4948 KB Output is correct
3 Correct 3 ms 4908 KB Output is correct
4 Correct 3 ms 4900 KB Output is correct
5 Correct 4 ms 4948 KB Output is correct
6 Correct 4 ms 4948 KB Output is correct
7 Correct 3 ms 4948 KB Output is correct
8 Correct 4 ms 4948 KB Output is correct
9 Correct 247 ms 33392 KB Output is correct
10 Correct 19 ms 7876 KB Output is correct
11 Correct 118 ms 20268 KB Output is correct
12 Correct 29 ms 9244 KB Output is correct
13 Correct 61 ms 15376 KB Output is correct
14 Correct 4 ms 5204 KB Output is correct
15 Correct 5 ms 5432 KB Output is correct
16 Correct 251 ms 33228 KB Output is correct
17 Correct 3 ms 4948 KB Output is correct
18 Correct 3 ms 4948 KB Output is correct
19 Correct 3 ms 4948 KB Output is correct
20 Correct 3 ms 4948 KB Output is correct
21 Correct 3 ms 4948 KB Output is correct
22 Correct 3 ms 4948 KB Output is correct
23 Correct 660 ms 61492 KB Output is correct
24 Correct 3 ms 4948 KB Output is correct
25 Correct 5 ms 5332 KB Output is correct
26 Correct 7 ms 5716 KB Output is correct
27 Correct 8 ms 5868 KB Output is correct
28 Correct 221 ms 27508 KB Output is correct
29 Correct 365 ms 38680 KB Output is correct
30 Correct 505 ms 49732 KB Output is correct
31 Correct 652 ms 61396 KB Output is correct
32 Correct 3 ms 4948 KB Output is correct
33 Correct 3 ms 4948 KB Output is correct
34 Correct 3 ms 4948 KB Output is correct
35 Correct 4 ms 4948 KB Output is correct
36 Correct 3 ms 4948 KB Output is correct
37 Correct 3 ms 4948 KB Output is correct
38 Correct 3 ms 4900 KB Output is correct
39 Correct 3 ms 4948 KB Output is correct
40 Correct 3 ms 4948 KB Output is correct
41 Correct 3 ms 4948 KB Output is correct
42 Correct 3 ms 4948 KB Output is correct
43 Correct 5 ms 5332 KB Output is correct
44 Correct 7 ms 5588 KB Output is correct
45 Correct 242 ms 30256 KB Output is correct
46 Correct 374 ms 41400 KB Output is correct
47 Correct 385 ms 41424 KB Output is correct
48 Correct 3 ms 4948 KB Output is correct
49 Correct 3 ms 4948 KB Output is correct
50 Correct 3 ms 4948 KB Output is correct
51 Correct 3 ms 4968 KB Output is correct
52 Correct 4 ms 4948 KB Output is correct
53 Correct 3 ms 4948 KB Output is correct
54 Correct 3 ms 4948 KB Output is correct
55 Correct 678 ms 61500 KB Output is correct
56 Correct 3 ms 4948 KB Output is correct
57 Correct 6 ms 5436 KB Output is correct
58 Correct 14 ms 6740 KB Output is correct
59 Correct 17 ms 7348 KB Output is correct
60 Correct 340 ms 33592 KB Output is correct
61 Correct 410 ms 43688 KB Output is correct
62 Correct 520 ms 52448 KB Output is correct
63 Correct 676 ms 62904 KB Output is correct
64 Correct 3 ms 4948 KB Output is correct
65 Correct 3 ms 4948 KB Output is correct
66 Correct 3 ms 4912 KB Output is correct
67 Correct 559 ms 63020 KB Output is correct
68 Correct 559 ms 62904 KB Output is correct
69 Correct 582 ms 62584 KB Output is correct
70 Correct 7 ms 5820 KB Output is correct
71 Correct 11 ms 6580 KB Output is correct
72 Correct 265 ms 30596 KB Output is correct
73 Correct 382 ms 43304 KB Output is correct
74 Correct 540 ms 56088 KB Output is correct
75 Correct 599 ms 61556 KB Output is correct
76 Correct 566 ms 62900 KB Output is correct
77 Correct 8 ms 5972 KB Output is correct
78 Correct 16 ms 6868 KB Output is correct
79 Correct 264 ms 31872 KB Output is correct
80 Correct 430 ms 45548 KB Output is correct
81 Correct 591 ms 59036 KB Output is correct
82 Correct 3 ms 4948 KB Output is correct
83 Correct 3 ms 4948 KB Output is correct
84 Correct 3 ms 4948 KB Output is correct
85 Correct 533 ms 53828 KB Output is correct
86 Correct 528 ms 52308 KB Output is correct
87 Correct 548 ms 52380 KB Output is correct
88 Correct 447 ms 53748 KB Output is correct
89 Correct 183 ms 23304 KB Output is correct
90 Correct 356 ms 51348 KB Output is correct
91 Correct 365 ms 51424 KB Output is correct
92 Correct 482 ms 60960 KB Output is correct
93 Correct 483 ms 62368 KB Output is correct
94 Correct 538 ms 62444 KB Output is correct
95 Correct 535 ms 62520 KB Output is correct
96 Correct 3 ms 4948 KB Output is correct
97 Correct 32 ms 8616 KB Output is correct
98 Correct 89 ms 17960 KB Output is correct
99 Correct 517 ms 56312 KB Output is correct
100 Correct 16 ms 6996 KB Output is correct
101 Correct 74 ms 15300 KB Output is correct
102 Correct 159 ms 25764 KB Output is correct
103 Correct 182 ms 25524 KB Output is correct
104 Correct 257 ms 33160 KB Output is correct
105 Correct 346 ms 40748 KB Output is correct
106 Correct 422 ms 48460 KB Output is correct
107 Correct 505 ms 55972 KB Output is correct
108 Correct 3 ms 4948 KB Output is correct
109 Correct 3 ms 4948 KB Output is correct
110 Correct 4 ms 4948 KB Output is correct
111 Correct 3 ms 4948 KB Output is correct
112 Correct 3 ms 4948 KB Output is correct
113 Correct 3 ms 4948 KB Output is correct
114 Correct 3 ms 4948 KB Output is correct
115 Correct 3 ms 4948 KB Output is correct
116 Correct 3 ms 4948 KB Output is correct
117 Correct 3 ms 4948 KB Output is correct
118 Correct 3 ms 4912 KB Output is correct
119 Correct 5 ms 5332 KB Output is correct
120 Correct 6 ms 5584 KB Output is correct
121 Correct 254 ms 30832 KB Output is correct
122 Correct 389 ms 42564 KB Output is correct
123 Correct 369 ms 42524 KB Output is correct
124 Correct 3 ms 4908 KB Output is correct
125 Correct 3 ms 4948 KB Output is correct
126 Correct 3 ms 4948 KB Output is correct
127 Correct 558 ms 63056 KB Output is correct
128 Correct 570 ms 62884 KB Output is correct
129 Correct 582 ms 62532 KB Output is correct
130 Correct 7 ms 5844 KB Output is correct
131 Correct 11 ms 6612 KB Output is correct
132 Correct 235 ms 30476 KB Output is correct
133 Correct 385 ms 43288 KB Output is correct
134 Correct 558 ms 56096 KB Output is correct
135 Correct 562 ms 62056 KB Output is correct
136 Correct 568 ms 62248 KB Output is correct
137 Correct 509 ms 52528 KB Output is correct
138 Correct 535 ms 61296 KB Output is correct
139 Correct 485 ms 55848 KB Output is correct
140 Correct 3 ms 4948 KB Output is correct
141 Correct 74 ms 13468 KB Output is correct
142 Correct 30 ms 9308 KB Output is correct
143 Correct 112 ms 20440 KB Output is correct
144 Correct 204 ms 31564 KB Output is correct
145 Correct 255 ms 32928 KB Output is correct
146 Correct 331 ms 40100 KB Output is correct
147 Correct 407 ms 47096 KB Output is correct
148 Correct 499 ms 53668 KB Output is correct
149 Correct 558 ms 60688 KB Output is correct
150 Correct 638 ms 61452 KB Output is correct
151 Correct 619 ms 62900 KB Output is correct
152 Correct 9 ms 5972 KB Output is correct
153 Correct 14 ms 6860 KB Output is correct
154 Correct 262 ms 31872 KB Output is correct
155 Correct 425 ms 45744 KB Output is correct
156 Correct 577 ms 58940 KB Output is correct
157 Correct 4 ms 4948 KB Output is correct
158 Correct 3 ms 4948 KB Output is correct
159 Correct 3 ms 4948 KB Output is correct
160 Correct 3 ms 4908 KB Output is correct
161 Correct 605 ms 62824 KB Output is correct
162 Correct 549 ms 56220 KB Output is correct
163 Correct 553 ms 58144 KB Output is correct
164 Correct 546 ms 58172 KB Output is correct
165 Correct 586 ms 61900 KB Output is correct
166 Correct 610 ms 62996 KB Output is correct
167 Correct 118 ms 18432 KB Output is correct
168 Correct 53 ms 12260 KB Output is correct
169 Correct 186 ms 24364 KB Output is correct
170 Correct 303 ms 41388 KB Output is correct
171 Correct 494 ms 53564 KB Output is correct
172 Correct 274 ms 34244 KB Output is correct
173 Correct 332 ms 40116 KB Output is correct
174 Correct 388 ms 45880 KB Output is correct
175 Correct 468 ms 51568 KB Output is correct
176 Correct 545 ms 57576 KB Output is correct
177 Correct 638 ms 63504 KB Output is correct