Submission #598768

# Submission time Handle Problem Language Result Execution time Memory
598768 2022-07-19T02:35:07 Z balbit Fountain Parks (IOI21_parks) C++17
70 / 100
488 ms 78256 KB
#include "parks.h"
#include <bits/stdc++.h>
// #define int ll
using namespace std;
#define ll long long
#define y1 zck_is_king
#define pii pair<ll, ll>
#define ull unsigned ll
#define f first
#define s second
#define ALL(x) x.begin(),x.end()
#define SZ(x) (int)x.size()
#define SQ(x) (x)*(x)
#define MN(a,b) a = min(a,(__typeof__(a))(b))
#define MX(a,b) a = max(a,(__typeof__(a))(b))
#define pb push_back
#define REP(i,n) for (int i = 0; i<n; ++i)
#define RREP(i,n) for (int i = n-1; i>=0; --i)
#define REP1(i,n) for (int i = 1; i<=n; ++i)
#define SORT_UNIQUE(c) (sort(c.begin(),c.end()), c.resize(distance(c.begin(),unique(c.begin(),c.end()))))
#ifdef BALBIT
#define IOS()
#define bug(...) fprintf(stderr,"#%d (%s) = ",__LINE__,#__VA_ARGS__),_do(__VA_ARGS__);
template<typename T> void _do(T &&x){cerr<<x<<endl;}
template<typename T, typename ...S> void _do(T &&x, S &&...y){cerr<<x<<", ";_do(y...);}
#else
#define IOS() ios_base::sync_with_stdio(0);cin.tie(0);
#define endl '\n'
#define bug(...)
#endif

const int maxn = 4e5+5;
vector<int> rU,rV,rA,rB;
set<pii> used; // benches in use
map<pii, int> id; 

void ADD(int u, int v, int a, int b) {
    rU.pb(u);
    rV.pb(v);
    rA.pb(a);
    rB.pb(b);
    used.insert({a,b});
}


int GET(int x, int y){
    return id.count({x,y})?id[{x,y}]:-1;
}

int dx[] = {1,0,-1,0};
int dy[] = {0,1,0,-1};
bool seen[maxn];

vector<int> X, Y; 

void dfs(int v, int sd) { //sd: starting direction
    seen[v]= 1;
    int x = X[v], y = Y[v];
    for (int df = 0; df < 4; ++df) {
        int d = (df + sd) % 4;
        int tx = x + dx[d]*2, ty = y + dy[d]*2;
        int u = GET(tx,ty);
        if (u == -1 || seen[u]) continue;

        int pd = (d-1+4)%4;
        int nxtd = (d+1)%4;

        int b1x = x + dx[d] + dx[pd], b1y = y + dy[d] + dy[pd];
        int b2x = x + dx[d] + dx[nxtd], b2y = y + dy[d] + dy[nxtd];

        bug(v,u,d);
        bug(b1x,b1y);
        bug(b2x,b2y);

        if (!used.count({b1x, b1y})) {
            ADD(u,v,b1x,b1y);
        }else{
            assert(!used.count({b2x,b2y}));
            ADD(u,v,b2x,b2y);
        }
        dfs(u, pd);
    }
}


int construct_roads(std::vector<int> _x, std::vector<int> _y) {
    X = _x, Y = _y;
    int n = SZ(X);
    REP(i,n) {
        id[{X[i], Y[i]}] = i;
    }

    dfs(0, 0);

    if (SZ(rU) < n-1) return 0;
    build(rU,rV,rA,rB);
    return 1;
}

/*
4, 4, 6, 4, 2], [4, 6, 4, 2, 4

5
4 4
4 6
6 4
4 2
2 4
*/
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 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 308 KB Output is correct
9 Correct 158 ms 33768 KB Output is correct
10 Correct 14 ms 3884 KB Output is correct
11 Correct 85 ms 18828 KB Output is correct
12 Correct 21 ms 5712 KB Output is correct
13 Correct 44 ms 11084 KB Output is correct
14 Correct 1 ms 468 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 160 ms 28068 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 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 308 KB Output is correct
9 Correct 158 ms 33768 KB Output is correct
10 Correct 14 ms 3884 KB Output is correct
11 Correct 85 ms 18828 KB Output is correct
12 Correct 21 ms 5712 KB Output is correct
13 Correct 44 ms 11084 KB Output is correct
14 Correct 1 ms 468 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 160 ms 28068 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 0 ms 304 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 417 ms 67756 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 2 ms 596 KB Output is correct
26 Correct 2 ms 724 KB Output is correct
27 Correct 3 ms 724 KB Output is correct
28 Correct 136 ms 27648 KB Output is correct
29 Correct 217 ms 37876 KB Output is correct
30 Correct 311 ms 53972 KB Output is correct
31 Correct 426 ms 69516 KB Output is correct
32 Correct 1 ms 212 KB Output is correct
33 Correct 0 ms 308 KB Output is correct
34 Correct 0 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 1 ms 212 KB Output is correct
38 Correct 1 ms 212 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 1 ms 340 KB Output is correct
41 Correct 1 ms 212 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 2 ms 596 KB Output is correct
44 Correct 2 ms 704 KB Output is correct
45 Correct 165 ms 29544 KB Output is correct
46 Correct 259 ms 43496 KB Output is correct
47 Correct 263 ms 42620 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 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 308 KB Output is correct
9 Correct 158 ms 33768 KB Output is correct
10 Correct 14 ms 3884 KB Output is correct
11 Correct 85 ms 18828 KB Output is correct
12 Correct 21 ms 5712 KB Output is correct
13 Correct 44 ms 11084 KB Output is correct
14 Correct 1 ms 468 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 160 ms 28068 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 0 ms 304 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 417 ms 67756 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 2 ms 596 KB Output is correct
26 Correct 2 ms 724 KB Output is correct
27 Correct 3 ms 724 KB Output is correct
28 Correct 136 ms 27648 KB Output is correct
29 Correct 217 ms 37876 KB Output is correct
30 Correct 311 ms 53972 KB Output is correct
31 Correct 426 ms 69516 KB Output is correct
32 Correct 1 ms 212 KB Output is correct
33 Correct 0 ms 308 KB Output is correct
34 Correct 0 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 1 ms 212 KB Output is correct
38 Correct 1 ms 212 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 1 ms 340 KB Output is correct
41 Correct 1 ms 212 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 2 ms 596 KB Output is correct
44 Correct 2 ms 704 KB Output is correct
45 Correct 165 ms 29544 KB Output is correct
46 Correct 259 ms 43496 KB Output is correct
47 Correct 263 ms 42620 KB Output is correct
48 Correct 0 ms 212 KB Output is correct
49 Correct 1 ms 212 KB Output is correct
50 Correct 1 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 414 ms 66712 KB Output is correct
56 Correct 0 ms 212 KB Output is correct
57 Correct 3 ms 852 KB Output is correct
58 Correct 8 ms 2340 KB Output is correct
59 Correct 6 ms 1724 KB Output is correct
60 Correct 187 ms 34456 KB Output is correct
61 Correct 264 ms 44824 KB Output is correct
62 Correct 320 ms 55524 KB Output is correct
63 Correct 406 ms 66464 KB Output is correct
64 Correct 0 ms 308 KB Output is correct
65 Correct 1 ms 212 KB Output is correct
66 Correct 0 ms 212 KB Output is correct
67 Correct 359 ms 61340 KB Output is correct
68 Correct 369 ms 61728 KB Output is correct
69 Correct 377 ms 64516 KB Output is correct
70 Correct 4 ms 852 KB Output is correct
71 Correct 5 ms 1344 KB Output is correct
72 Correct 174 ms 25564 KB Output is correct
73 Correct 273 ms 41632 KB Output is correct
74 Correct 396 ms 51092 KB Output is correct
75 Correct 395 ms 63240 KB Output is correct
76 Correct 374 ms 69528 KB Output is correct
77 Correct 4 ms 1108 KB Output is correct
78 Correct 6 ms 1620 KB Output is correct
79 Correct 185 ms 26464 KB Output is correct
80 Correct 266 ms 40316 KB Output is correct
81 Correct 381 ms 53904 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 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 308 KB Output is correct
9 Correct 158 ms 33768 KB Output is correct
10 Correct 14 ms 3884 KB Output is correct
11 Correct 85 ms 18828 KB Output is correct
12 Correct 21 ms 5712 KB Output is correct
13 Correct 44 ms 11084 KB Output is correct
14 Correct 1 ms 468 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 160 ms 28068 KB Output is correct
17 Correct 1 ms 308 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 433 ms 70184 KB Output is correct
21 Correct 429 ms 64424 KB Output is correct
22 Correct 419 ms 61144 KB Output is correct
23 Correct 340 ms 50832 KB Output is correct
24 Correct 136 ms 19156 KB Output is correct
25 Correct 141 ms 19316 KB Output is correct
26 Correct 133 ms 19412 KB Output is correct
27 Correct 334 ms 41504 KB Output is correct
28 Correct 317 ms 41376 KB Output is correct
29 Correct 488 ms 41492 KB Output is correct
30 Correct 481 ms 41412 KB Output is correct
31 Correct 0 ms 212 KB Output is correct
32 Correct 25 ms 4400 KB Output is correct
33 Correct 53 ms 10124 KB Output is correct
34 Correct 415 ms 65600 KB Output is correct
35 Correct 9 ms 1656 KB Output is correct
36 Correct 34 ms 6092 KB Output is correct
37 Correct 73 ms 11064 KB Output is correct
38 Correct 139 ms 17380 KB Output is correct
39 Correct 206 ms 23632 KB Output is correct
40 Correct 260 ms 29960 KB Output is correct
41 Correct 335 ms 36344 KB Output is correct
42 Correct 406 ms 42812 KB Output is correct
43 Correct 0 ms 212 KB Output is correct
44 Correct 0 ms 212 KB Output is correct
45 Correct 1 ms 212 KB Output is correct
46 Correct 0 ms 212 KB Output is correct
47 Correct 0 ms 312 KB Output is correct
48 Correct 0 ms 340 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 212 KB Output is correct
52 Correct 0 ms 212 KB Output is correct
53 Correct 0 ms 308 KB Output is correct
54 Correct 2 ms 596 KB Output is correct
55 Correct 2 ms 796 KB Output is correct
56 Correct 166 ms 29532 KB Output is correct
57 Correct 263 ms 43484 KB Output is correct
58 Correct 256 ms 42648 KB Output is correct
59 Correct 1 ms 212 KB Output is correct
60 Correct 0 ms 212 KB Output is correct
61 Correct 0 ms 212 KB Output is correct
62 Correct 358 ms 61388 KB Output is correct
63 Correct 367 ms 61808 KB Output is correct
64 Correct 357 ms 64540 KB Output is correct
65 Correct 3 ms 852 KB Output is correct
66 Correct 4 ms 1340 KB Output is correct
67 Correct 169 ms 25560 KB Output is correct
68 Correct 272 ms 41536 KB Output is correct
69 Correct 417 ms 50980 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 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 308 KB Output is correct
9 Correct 158 ms 33768 KB Output is correct
10 Correct 14 ms 3884 KB Output is correct
11 Correct 85 ms 18828 KB Output is correct
12 Correct 21 ms 5712 KB Output is correct
13 Correct 44 ms 11084 KB Output is correct
14 Correct 1 ms 468 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 160 ms 28068 KB Output is correct
17 Correct 401 ms 69888 KB Output is correct
18 Correct 397 ms 56612 KB Output is correct
19 Correct 428 ms 68132 KB Output is correct
20 Correct 451 ms 58876 KB Output is correct
21 Correct 378 ms 50100 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 51 ms 8288 KB Output is correct
24 Correct 18 ms 4020 KB Output is correct
25 Correct 49 ms 9172 KB Output is correct
26 Correct 92 ms 14292 KB Output is correct
27 Correct 206 ms 30280 KB Output is correct
28 Correct 263 ms 38376 KB Output is correct
29 Correct 335 ms 46264 KB Output is correct
30 Correct 446 ms 53104 KB Output is correct
31 Correct 484 ms 61172 KB Output is correct
32 Correct 398 ms 63264 KB Output is correct
33 Correct 366 ms 69504 KB Output is correct
34 Correct 4 ms 1108 KB Output is correct
35 Correct 6 ms 1620 KB Output is correct
36 Correct 161 ms 26404 KB Output is correct
37 Correct 263 ms 40320 KB Output is correct
38 Correct 383 ms 54124 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 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 308 KB Output is correct
9 Correct 158 ms 33768 KB Output is correct
10 Correct 14 ms 3884 KB Output is correct
11 Correct 85 ms 18828 KB Output is correct
12 Correct 21 ms 5712 KB Output is correct
13 Correct 44 ms 11084 KB Output is correct
14 Correct 1 ms 468 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 160 ms 28068 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 0 ms 304 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 417 ms 67756 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 2 ms 596 KB Output is correct
26 Correct 2 ms 724 KB Output is correct
27 Correct 3 ms 724 KB Output is correct
28 Correct 136 ms 27648 KB Output is correct
29 Correct 217 ms 37876 KB Output is correct
30 Correct 311 ms 53972 KB Output is correct
31 Correct 426 ms 69516 KB Output is correct
32 Correct 1 ms 212 KB Output is correct
33 Correct 0 ms 308 KB Output is correct
34 Correct 0 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 1 ms 212 KB Output is correct
38 Correct 1 ms 212 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 1 ms 340 KB Output is correct
41 Correct 1 ms 212 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 2 ms 596 KB Output is correct
44 Correct 2 ms 704 KB Output is correct
45 Correct 165 ms 29544 KB Output is correct
46 Correct 259 ms 43496 KB Output is correct
47 Correct 263 ms 42620 KB Output is correct
48 Correct 0 ms 212 KB Output is correct
49 Correct 1 ms 212 KB Output is correct
50 Correct 1 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 414 ms 66712 KB Output is correct
56 Correct 0 ms 212 KB Output is correct
57 Correct 3 ms 852 KB Output is correct
58 Correct 8 ms 2340 KB Output is correct
59 Correct 6 ms 1724 KB Output is correct
60 Correct 187 ms 34456 KB Output is correct
61 Correct 264 ms 44824 KB Output is correct
62 Correct 320 ms 55524 KB Output is correct
63 Correct 406 ms 66464 KB Output is correct
64 Correct 0 ms 308 KB Output is correct
65 Correct 1 ms 212 KB Output is correct
66 Correct 0 ms 212 KB Output is correct
67 Correct 359 ms 61340 KB Output is correct
68 Correct 369 ms 61728 KB Output is correct
69 Correct 377 ms 64516 KB Output is correct
70 Correct 4 ms 852 KB Output is correct
71 Correct 5 ms 1344 KB Output is correct
72 Correct 174 ms 25564 KB Output is correct
73 Correct 273 ms 41632 KB Output is correct
74 Correct 396 ms 51092 KB Output is correct
75 Correct 395 ms 63240 KB Output is correct
76 Correct 374 ms 69528 KB Output is correct
77 Correct 4 ms 1108 KB Output is correct
78 Correct 6 ms 1620 KB Output is correct
79 Correct 185 ms 26464 KB Output is correct
80 Correct 266 ms 40316 KB Output is correct
81 Correct 381 ms 53904 KB Output is correct
82 Correct 1 ms 308 KB Output is correct
83 Correct 1 ms 212 KB Output is correct
84 Correct 0 ms 212 KB Output is correct
85 Correct 433 ms 70184 KB Output is correct
86 Correct 429 ms 64424 KB Output is correct
87 Correct 419 ms 61144 KB Output is correct
88 Correct 340 ms 50832 KB Output is correct
89 Correct 136 ms 19156 KB Output is correct
90 Correct 141 ms 19316 KB Output is correct
91 Correct 133 ms 19412 KB Output is correct
92 Correct 334 ms 41504 KB Output is correct
93 Correct 317 ms 41376 KB Output is correct
94 Correct 488 ms 41492 KB Output is correct
95 Correct 481 ms 41412 KB Output is correct
96 Correct 0 ms 212 KB Output is correct
97 Correct 25 ms 4400 KB Output is correct
98 Correct 53 ms 10124 KB Output is correct
99 Correct 415 ms 65600 KB Output is correct
100 Correct 9 ms 1656 KB Output is correct
101 Correct 34 ms 6092 KB Output is correct
102 Correct 73 ms 11064 KB Output is correct
103 Correct 139 ms 17380 KB Output is correct
104 Correct 206 ms 23632 KB Output is correct
105 Correct 260 ms 29960 KB Output is correct
106 Correct 335 ms 36344 KB Output is correct
107 Correct 406 ms 42812 KB Output is correct
108 Correct 0 ms 212 KB Output is correct
109 Correct 0 ms 212 KB Output is correct
110 Correct 1 ms 212 KB Output is correct
111 Correct 0 ms 212 KB Output is correct
112 Correct 0 ms 312 KB Output is correct
113 Correct 0 ms 340 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 212 KB Output is correct
117 Correct 0 ms 212 KB Output is correct
118 Correct 0 ms 308 KB Output is correct
119 Correct 2 ms 596 KB Output is correct
120 Correct 2 ms 796 KB Output is correct
121 Correct 166 ms 29532 KB Output is correct
122 Correct 263 ms 43484 KB Output is correct
123 Correct 256 ms 42648 KB Output is correct
124 Correct 1 ms 212 KB Output is correct
125 Correct 0 ms 212 KB Output is correct
126 Correct 0 ms 212 KB Output is correct
127 Correct 358 ms 61388 KB Output is correct
128 Correct 367 ms 61808 KB Output is correct
129 Correct 357 ms 64540 KB Output is correct
130 Correct 3 ms 852 KB Output is correct
131 Correct 4 ms 1340 KB Output is correct
132 Correct 169 ms 25560 KB Output is correct
133 Correct 272 ms 41536 KB Output is correct
134 Correct 417 ms 50980 KB Output is correct
135 Correct 401 ms 69888 KB Output is correct
136 Correct 397 ms 56612 KB Output is correct
137 Correct 428 ms 68132 KB Output is correct
138 Correct 451 ms 58876 KB Output is correct
139 Correct 378 ms 50100 KB Output is correct
140 Correct 0 ms 212 KB Output is correct
141 Correct 51 ms 8288 KB Output is correct
142 Correct 18 ms 4020 KB Output is correct
143 Correct 49 ms 9172 KB Output is correct
144 Correct 92 ms 14292 KB Output is correct
145 Correct 206 ms 30280 KB Output is correct
146 Correct 263 ms 38376 KB Output is correct
147 Correct 335 ms 46264 KB Output is correct
148 Correct 446 ms 53104 KB Output is correct
149 Correct 484 ms 61172 KB Output is correct
150 Correct 398 ms 63264 KB Output is correct
151 Correct 366 ms 69504 KB Output is correct
152 Correct 4 ms 1108 KB Output is correct
153 Correct 6 ms 1620 KB Output is correct
154 Correct 161 ms 26404 KB Output is correct
155 Correct 263 ms 40320 KB Output is correct
156 Correct 383 ms 54124 KB Output is correct
157 Correct 0 ms 212 KB Output is correct
158 Correct 0 ms 212 KB Output is correct
159 Correct 1 ms 212 KB Output is correct
160 Correct 0 ms 212 KB Output is correct
161 Correct 474 ms 69816 KB Output is correct
162 Correct 396 ms 61400 KB Output is correct
163 Correct 399 ms 54332 KB Output is correct
164 Correct 400 ms 53232 KB Output is correct
165 Runtime error 215 ms 78256 KB Execution killed with signal 6
166 Halted 0 ms 0 KB -