답안 #441816

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
441816 2021-07-06T09:17:54 Z baluteshih 분수 공원 (IOI21_parks) C++17
70 / 100
591 ms 51088 KB
#include "parks.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define X first
#define Y second
#define pb push_back
#define ALL(v) v.begin(), v.end()
#define SZ(a) ((int)a.size())

pii operator+(const pii &a, const pii &b) { return pii(a.X + b.X, a.Y + b.Y); }
pii operator-(const pii &a, const pii &b) { return pii(a.X - b.X, a.Y - b.Y); }

vector<int> dt[200005];
int boss[200005], conn;
int vis[200005];
map<pii, int> id, chair;

int finds(int x) {
    if (x == boss[x]) return x;
    return boss[x] = finds(boss[x]);
}

bool Union(int x, int y) {
    x = finds(x), y = finds(y);
    if (x == y) return 0;
    boss[x] = y, --conn;
    return 1;
}

vector<int> u, v, a, b, gx, gy;

int goaway(pii p) {
    auto q = chair.find(p);
    if (q == chair.end())
        return 1;
    if (vis[q->Y])
        return 0;
    vis[q->Y] = 1;
    if (gx[u[q->Y]] == gx[v[q->Y]]) {
        pii d = q->X - pii(gx[u[q->Y]], gy[u[q->Y]]);
        d.X *= -1;
        if (!goaway(pii(gx[u[q->Y]], gy[u[q->Y]]) + d))
            return 0;
        a[q->Y] = gx[u[q->Y]] + d.X;
        b[q->Y] = gy[u[q->Y]] + d.Y;
        chair[pii(a[q->Y], b[q->Y])] = q->Y;
    }
    else {
        pii d = q->X - pii(gx[u[q->Y]], gy[u[q->Y]]);
        d.Y *= -1;
        if (!goaway(pii(gx[u[q->Y]], gy[u[q->Y]]) + d))
            return 0;
        a[q->Y] = gx[u[q->Y]] + d.X;
        b[q->Y] = gy[u[q->Y]] + d.Y;
        chair[pii(a[q->Y], b[q->Y])] = q->Y;
    }
    return 1;
}

int construct_roads(vector<int> x, vector<int> y) {
    gx = x, gy = y;
    if (x.size() == 1) {
	    build({}, {}, {}, {});
        return 1;
    }
    int n = SZ(x);
    conn = n;
    iota(boss, boss + n, 0);
    int L = *min_element(ALL(y));
    int R = *max_element(ALL(y));
    for (int i = 0; i < n; ++i) {
        dt[y[i]].pb(i);
        id[pii(x[i], y[i])] = i;
    }
    for (int i = L; i <= R; i += 2) {
        if (dt[i].empty())
            return 0;
        sort(ALL(dt[i]), [&](int p, int q){ return x[p] < x[q]; });
    }
    for (int i = L; i <= R; i += 2) {
        for (int p : dt[i]) {

            auto q = id.find(pii(x[p], y[p]) + pii(2, 0));
            if (q != id.end() && finds(p) != finds(q->Y)) {
                Union(p, q->Y);
                if (chair.find(pii(x[p], y[p]) + pii(1, -1)) == chair.end()) {
                    chair[pii(x[p], y[p]) + pii(1, -1)] = SZ(u);
                    u.pb(p), v.pb(q->Y);
                    a.pb(x[p] + 1);
                    b.pb(y[p] - 1);
                }
                else {
                    assert(goaway(pii(x[p], y[p]) + pii(1, 1)));
                    chair[pii(x[p], y[p]) + pii(1, 1)] = SZ(u);
                    u.pb(p), v.pb(q->Y);
                    a.pb(x[p] + 1);
                    b.pb(y[p] + 1);
                }
            }

            q = id.find(pii(x[p], y[p]) + pii(0, 2));
            if (q != id.end() && finds(p) != finds(q->Y)) {
                Union(p, q->Y);
                if (chair.find(pii(x[p], y[p]) + pii(-1, 1)) == chair.end()) {
                    chair[pii(x[p], y[p]) + pii(-1, 1)] = SZ(u);
                    u.pb(p), v.pb(q->Y);
                    a.pb(x[p] - 1);
                    b.pb(y[p] + 1);
                }
                else {
                    assert(goaway(pii(x[p], y[p]) + pii(1, 1)));
                    chair[pii(x[p], y[p]) + pii(1, 1)] = SZ(u);
                    u.pb(p), v.pb(q->Y);
                    a.pb(x[p] + 1);
                    b.pb(y[p] + 1);
                }
            }
        }
    }
    
    if (conn != 1)
        return 0;
    build(u, v, a, b);
    return 1;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 4940 KB Output is correct
2 Correct 3 ms 4940 KB Output is correct
3 Correct 3 ms 4940 KB Output is correct
4 Correct 3 ms 4940 KB Output is correct
5 Correct 3 ms 4940 KB Output is correct
6 Correct 3 ms 4940 KB Output is correct
7 Correct 3 ms 4940 KB Output is correct
8 Correct 3 ms 4940 KB Output is correct
9 Correct 209 ms 27992 KB Output is correct
10 Correct 16 ms 7500 KB Output is correct
11 Correct 91 ms 17384 KB Output is correct
12 Correct 24 ms 8760 KB Output is correct
13 Correct 23 ms 10308 KB Output is correct
14 Correct 4 ms 5068 KB Output is correct
15 Correct 5 ms 5196 KB Output is correct
16 Correct 224 ms 28012 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 4940 KB Output is correct
2 Correct 3 ms 4940 KB Output is correct
3 Correct 3 ms 4940 KB Output is correct
4 Correct 3 ms 4940 KB Output is correct
5 Correct 3 ms 4940 KB Output is correct
6 Correct 3 ms 4940 KB Output is correct
7 Correct 3 ms 4940 KB Output is correct
8 Correct 3 ms 4940 KB Output is correct
9 Correct 209 ms 27992 KB Output is correct
10 Correct 16 ms 7500 KB Output is correct
11 Correct 91 ms 17384 KB Output is correct
12 Correct 24 ms 8760 KB Output is correct
13 Correct 23 ms 10308 KB Output is correct
14 Correct 4 ms 5068 KB Output is correct
15 Correct 5 ms 5196 KB Output is correct
16 Correct 224 ms 28012 KB Output is correct
17 Correct 3 ms 4940 KB Output is correct
18 Correct 3 ms 4940 KB Output is correct
19 Correct 3 ms 4940 KB Output is correct
20 Correct 3 ms 4940 KB Output is correct
21 Correct 3 ms 4940 KB Output is correct
22 Correct 3 ms 4940 KB Output is correct
23 Correct 535 ms 48072 KB Output is correct
24 Correct 3 ms 4992 KB Output is correct
25 Correct 5 ms 5196 KB Output is correct
26 Correct 5 ms 5196 KB Output is correct
27 Correct 5 ms 5324 KB Output is correct
28 Correct 220 ms 22304 KB Output is correct
29 Correct 276 ms 30868 KB Output is correct
30 Correct 410 ms 39492 KB Output is correct
31 Correct 591 ms 48140 KB Output is correct
32 Correct 3 ms 4940 KB Output is correct
33 Correct 4 ms 4940 KB Output is correct
34 Correct 3 ms 4988 KB Output is correct
35 Correct 3 ms 4940 KB Output is correct
36 Correct 3 ms 4940 KB Output is correct
37 Correct 3 ms 4940 KB Output is correct
38 Correct 3 ms 4940 KB Output is correct
39 Correct 3 ms 4940 KB Output is correct
40 Correct 3 ms 4940 KB Output is correct
41 Correct 4 ms 4940 KB Output is correct
42 Correct 3 ms 4940 KB Output is correct
43 Correct 4 ms 5196 KB Output is correct
44 Correct 5 ms 5272 KB Output is correct
45 Correct 211 ms 27136 KB Output is correct
46 Correct 340 ms 37120 KB Output is correct
47 Correct 335 ms 37092 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 4940 KB Output is correct
2 Correct 3 ms 4940 KB Output is correct
3 Correct 3 ms 4940 KB Output is correct
4 Correct 3 ms 4940 KB Output is correct
5 Correct 3 ms 4940 KB Output is correct
6 Correct 3 ms 4940 KB Output is correct
7 Correct 3 ms 4940 KB Output is correct
8 Correct 3 ms 4940 KB Output is correct
9 Correct 209 ms 27992 KB Output is correct
10 Correct 16 ms 7500 KB Output is correct
11 Correct 91 ms 17384 KB Output is correct
12 Correct 24 ms 8760 KB Output is correct
13 Correct 23 ms 10308 KB Output is correct
14 Correct 4 ms 5068 KB Output is correct
15 Correct 5 ms 5196 KB Output is correct
16 Correct 224 ms 28012 KB Output is correct
17 Correct 3 ms 4940 KB Output is correct
18 Correct 3 ms 4940 KB Output is correct
19 Correct 3 ms 4940 KB Output is correct
20 Correct 3 ms 4940 KB Output is correct
21 Correct 3 ms 4940 KB Output is correct
22 Correct 3 ms 4940 KB Output is correct
23 Correct 535 ms 48072 KB Output is correct
24 Correct 3 ms 4992 KB Output is correct
25 Correct 5 ms 5196 KB Output is correct
26 Correct 5 ms 5196 KB Output is correct
27 Correct 5 ms 5324 KB Output is correct
28 Correct 220 ms 22304 KB Output is correct
29 Correct 276 ms 30868 KB Output is correct
30 Correct 410 ms 39492 KB Output is correct
31 Correct 591 ms 48140 KB Output is correct
32 Correct 3 ms 4940 KB Output is correct
33 Correct 4 ms 4940 KB Output is correct
34 Correct 3 ms 4988 KB Output is correct
35 Correct 3 ms 4940 KB Output is correct
36 Correct 3 ms 4940 KB Output is correct
37 Correct 3 ms 4940 KB Output is correct
38 Correct 3 ms 4940 KB Output is correct
39 Correct 3 ms 4940 KB Output is correct
40 Correct 3 ms 4940 KB Output is correct
41 Correct 4 ms 4940 KB Output is correct
42 Correct 3 ms 4940 KB Output is correct
43 Correct 4 ms 5196 KB Output is correct
44 Correct 5 ms 5272 KB Output is correct
45 Correct 211 ms 27136 KB Output is correct
46 Correct 340 ms 37120 KB Output is correct
47 Correct 335 ms 37092 KB Output is correct
48 Correct 3 ms 4940 KB Output is correct
49 Correct 3 ms 4940 KB Output is correct
50 Correct 3 ms 4940 KB Output is correct
51 Correct 3 ms 4940 KB Output is correct
52 Correct 3 ms 4940 KB Output is correct
53 Correct 3 ms 4940 KB Output is correct
54 Correct 3 ms 4940 KB Output is correct
55 Correct 536 ms 47028 KB Output is correct
56 Correct 3 ms 4940 KB Output is correct
57 Correct 5 ms 5324 KB Output is correct
58 Correct 12 ms 6348 KB Output is correct
59 Correct 9 ms 5992 KB Output is correct
60 Correct 220 ms 25896 KB Output is correct
61 Correct 326 ms 33352 KB Output is correct
62 Correct 397 ms 39656 KB Output is correct
63 Correct 520 ms 47056 KB Output is correct
64 Correct 3 ms 4940 KB Output is correct
65 Correct 4 ms 4940 KB Output is correct
66 Correct 3 ms 4940 KB Output is correct
67 Correct 537 ms 48136 KB Output is correct
68 Correct 504 ms 48084 KB Output is correct
69 Correct 499 ms 47784 KB Output is correct
70 Correct 5 ms 5408 KB Output is correct
71 Correct 7 ms 5708 KB Output is correct
72 Correct 217 ms 26408 KB Output is correct
73 Correct 368 ms 37156 KB Output is correct
74 Correct 541 ms 47912 KB Output is correct
75 Correct 515 ms 47384 KB Output is correct
76 Correct 512 ms 48008 KB Output is correct
77 Correct 6 ms 5408 KB Output is correct
78 Correct 8 ms 5836 KB Output is correct
79 Correct 227 ms 26264 KB Output is correct
80 Correct 350 ms 37016 KB Output is correct
81 Correct 498 ms 47768 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 4940 KB Output is correct
2 Correct 3 ms 4940 KB Output is correct
3 Correct 3 ms 4940 KB Output is correct
4 Correct 3 ms 4940 KB Output is correct
5 Correct 3 ms 4940 KB Output is correct
6 Correct 3 ms 4940 KB Output is correct
7 Correct 3 ms 4940 KB Output is correct
8 Correct 3 ms 4940 KB Output is correct
9 Correct 209 ms 27992 KB Output is correct
10 Correct 16 ms 7500 KB Output is correct
11 Correct 91 ms 17384 KB Output is correct
12 Correct 24 ms 8760 KB Output is correct
13 Correct 23 ms 10308 KB Output is correct
14 Correct 4 ms 5068 KB Output is correct
15 Correct 5 ms 5196 KB Output is correct
16 Correct 224 ms 28012 KB Output is correct
17 Correct 3 ms 4940 KB Output is correct
18 Correct 3 ms 4940 KB Output is correct
19 Correct 3 ms 4940 KB Output is correct
20 Correct 526 ms 48552 KB Output is correct
21 Correct 475 ms 46816 KB Output is correct
22 Correct 482 ms 46676 KB Output is correct
23 Correct 391 ms 40364 KB Output is correct
24 Correct 173 ms 24004 KB Output is correct
25 Correct 173 ms 23976 KB Output is correct
26 Correct 459 ms 39704 KB Output is correct
27 Correct 565 ms 45944 KB Output is correct
28 Correct 549 ms 45948 KB Output is correct
29 Correct 496 ms 45824 KB Output is correct
30 Correct 486 ms 45992 KB Output is correct
31 Correct 3 ms 4940 KB Output is correct
32 Correct 29 ms 8260 KB Output is correct
33 Correct 164 ms 18304 KB Output is correct
34 Correct 508 ms 50980 KB Output is correct
35 Correct 9 ms 6092 KB Output is correct
36 Correct 36 ms 10388 KB Output is correct
37 Correct 75 ms 15896 KB Output is correct
38 Correct 194 ms 23048 KB Output is correct
39 Correct 302 ms 29720 KB Output is correct
40 Correct 379 ms 36608 KB Output is correct
41 Correct 504 ms 43248 KB Output is correct
42 Correct 582 ms 49952 KB Output is correct
43 Correct 3 ms 4908 KB Output is correct
44 Correct 3 ms 4940 KB Output is correct
45 Correct 3 ms 4940 KB Output is correct
46 Correct 3 ms 4996 KB Output is correct
47 Correct 3 ms 4940 KB Output is correct
48 Correct 3 ms 4992 KB Output is correct
49 Correct 3 ms 4940 KB Output is correct
50 Correct 4 ms 4940 KB Output is correct
51 Correct 3 ms 4940 KB Output is correct
52 Correct 3 ms 4940 KB Output is correct
53 Correct 3 ms 4940 KB Output is correct
54 Correct 4 ms 5196 KB Output is correct
55 Correct 5 ms 5324 KB Output is correct
56 Correct 209 ms 27888 KB Output is correct
57 Correct 341 ms 38364 KB Output is correct
58 Correct 338 ms 38296 KB Output is correct
59 Correct 3 ms 4940 KB Output is correct
60 Correct 3 ms 4940 KB Output is correct
61 Correct 3 ms 4940 KB Output is correct
62 Correct 498 ms 49828 KB Output is correct
63 Correct 519 ms 49816 KB Output is correct
64 Correct 507 ms 49460 KB Output is correct
65 Correct 5 ms 5324 KB Output is correct
66 Correct 8 ms 5836 KB Output is correct
67 Correct 206 ms 27276 KB Output is correct
68 Correct 376 ms 38568 KB Output is correct
69 Correct 496 ms 49560 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 4940 KB Output is correct
2 Correct 3 ms 4940 KB Output is correct
3 Correct 3 ms 4940 KB Output is correct
4 Correct 3 ms 4940 KB Output is correct
5 Correct 3 ms 4940 KB Output is correct
6 Correct 3 ms 4940 KB Output is correct
7 Correct 3 ms 4940 KB Output is correct
8 Correct 3 ms 4940 KB Output is correct
9 Correct 209 ms 27992 KB Output is correct
10 Correct 16 ms 7500 KB Output is correct
11 Correct 91 ms 17384 KB Output is correct
12 Correct 24 ms 8760 KB Output is correct
13 Correct 23 ms 10308 KB Output is correct
14 Correct 4 ms 5068 KB Output is correct
15 Correct 5 ms 5196 KB Output is correct
16 Correct 224 ms 28012 KB Output is correct
17 Correct 457 ms 47524 KB Output is correct
18 Correct 487 ms 47352 KB Output is correct
19 Correct 497 ms 46756 KB Output is correct
20 Correct 531 ms 45004 KB Output is correct
21 Correct 531 ms 41176 KB Output is correct
22 Correct 3 ms 4940 KB Output is correct
23 Correct 62 ms 12204 KB Output is correct
24 Correct 15 ms 7148 KB Output is correct
25 Correct 62 ms 12592 KB Output is correct
26 Correct 98 ms 18016 KB Output is correct
27 Correct 257 ms 27128 KB Output is correct
28 Correct 312 ms 32916 KB Output is correct
29 Correct 404 ms 38480 KB Output is correct
30 Correct 489 ms 43276 KB Output is correct
31 Correct 580 ms 49328 KB Output is correct
32 Correct 494 ms 49048 KB Output is correct
33 Correct 527 ms 49720 KB Output is correct
34 Correct 6 ms 5452 KB Output is correct
35 Correct 8 ms 5964 KB Output is correct
36 Correct 206 ms 27084 KB Output is correct
37 Correct 380 ms 38296 KB Output is correct
38 Correct 503 ms 49400 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 4940 KB Output is correct
2 Correct 3 ms 4940 KB Output is correct
3 Correct 3 ms 4940 KB Output is correct
4 Correct 3 ms 4940 KB Output is correct
5 Correct 3 ms 4940 KB Output is correct
6 Correct 3 ms 4940 KB Output is correct
7 Correct 3 ms 4940 KB Output is correct
8 Correct 3 ms 4940 KB Output is correct
9 Correct 209 ms 27992 KB Output is correct
10 Correct 16 ms 7500 KB Output is correct
11 Correct 91 ms 17384 KB Output is correct
12 Correct 24 ms 8760 KB Output is correct
13 Correct 23 ms 10308 KB Output is correct
14 Correct 4 ms 5068 KB Output is correct
15 Correct 5 ms 5196 KB Output is correct
16 Correct 224 ms 28012 KB Output is correct
17 Correct 3 ms 4940 KB Output is correct
18 Correct 3 ms 4940 KB Output is correct
19 Correct 3 ms 4940 KB Output is correct
20 Correct 3 ms 4940 KB Output is correct
21 Correct 3 ms 4940 KB Output is correct
22 Correct 3 ms 4940 KB Output is correct
23 Correct 535 ms 48072 KB Output is correct
24 Correct 3 ms 4992 KB Output is correct
25 Correct 5 ms 5196 KB Output is correct
26 Correct 5 ms 5196 KB Output is correct
27 Correct 5 ms 5324 KB Output is correct
28 Correct 220 ms 22304 KB Output is correct
29 Correct 276 ms 30868 KB Output is correct
30 Correct 410 ms 39492 KB Output is correct
31 Correct 591 ms 48140 KB Output is correct
32 Correct 3 ms 4940 KB Output is correct
33 Correct 4 ms 4940 KB Output is correct
34 Correct 3 ms 4988 KB Output is correct
35 Correct 3 ms 4940 KB Output is correct
36 Correct 3 ms 4940 KB Output is correct
37 Correct 3 ms 4940 KB Output is correct
38 Correct 3 ms 4940 KB Output is correct
39 Correct 3 ms 4940 KB Output is correct
40 Correct 3 ms 4940 KB Output is correct
41 Correct 4 ms 4940 KB Output is correct
42 Correct 3 ms 4940 KB Output is correct
43 Correct 4 ms 5196 KB Output is correct
44 Correct 5 ms 5272 KB Output is correct
45 Correct 211 ms 27136 KB Output is correct
46 Correct 340 ms 37120 KB Output is correct
47 Correct 335 ms 37092 KB Output is correct
48 Correct 3 ms 4940 KB Output is correct
49 Correct 3 ms 4940 KB Output is correct
50 Correct 3 ms 4940 KB Output is correct
51 Correct 3 ms 4940 KB Output is correct
52 Correct 3 ms 4940 KB Output is correct
53 Correct 3 ms 4940 KB Output is correct
54 Correct 3 ms 4940 KB Output is correct
55 Correct 536 ms 47028 KB Output is correct
56 Correct 3 ms 4940 KB Output is correct
57 Correct 5 ms 5324 KB Output is correct
58 Correct 12 ms 6348 KB Output is correct
59 Correct 9 ms 5992 KB Output is correct
60 Correct 220 ms 25896 KB Output is correct
61 Correct 326 ms 33352 KB Output is correct
62 Correct 397 ms 39656 KB Output is correct
63 Correct 520 ms 47056 KB Output is correct
64 Correct 3 ms 4940 KB Output is correct
65 Correct 4 ms 4940 KB Output is correct
66 Correct 3 ms 4940 KB Output is correct
67 Correct 537 ms 48136 KB Output is correct
68 Correct 504 ms 48084 KB Output is correct
69 Correct 499 ms 47784 KB Output is correct
70 Correct 5 ms 5408 KB Output is correct
71 Correct 7 ms 5708 KB Output is correct
72 Correct 217 ms 26408 KB Output is correct
73 Correct 368 ms 37156 KB Output is correct
74 Correct 541 ms 47912 KB Output is correct
75 Correct 515 ms 47384 KB Output is correct
76 Correct 512 ms 48008 KB Output is correct
77 Correct 6 ms 5408 KB Output is correct
78 Correct 8 ms 5836 KB Output is correct
79 Correct 227 ms 26264 KB Output is correct
80 Correct 350 ms 37016 KB Output is correct
81 Correct 498 ms 47768 KB Output is correct
82 Correct 3 ms 4940 KB Output is correct
83 Correct 3 ms 4940 KB Output is correct
84 Correct 3 ms 4940 KB Output is correct
85 Correct 526 ms 48552 KB Output is correct
86 Correct 475 ms 46816 KB Output is correct
87 Correct 482 ms 46676 KB Output is correct
88 Correct 391 ms 40364 KB Output is correct
89 Correct 173 ms 24004 KB Output is correct
90 Correct 173 ms 23976 KB Output is correct
91 Correct 459 ms 39704 KB Output is correct
92 Correct 565 ms 45944 KB Output is correct
93 Correct 549 ms 45948 KB Output is correct
94 Correct 496 ms 45824 KB Output is correct
95 Correct 486 ms 45992 KB Output is correct
96 Correct 3 ms 4940 KB Output is correct
97 Correct 29 ms 8260 KB Output is correct
98 Correct 164 ms 18304 KB Output is correct
99 Correct 508 ms 50980 KB Output is correct
100 Correct 9 ms 6092 KB Output is correct
101 Correct 36 ms 10388 KB Output is correct
102 Correct 75 ms 15896 KB Output is correct
103 Correct 194 ms 23048 KB Output is correct
104 Correct 302 ms 29720 KB Output is correct
105 Correct 379 ms 36608 KB Output is correct
106 Correct 504 ms 43248 KB Output is correct
107 Correct 582 ms 49952 KB Output is correct
108 Correct 3 ms 4908 KB Output is correct
109 Correct 3 ms 4940 KB Output is correct
110 Correct 3 ms 4940 KB Output is correct
111 Correct 3 ms 4996 KB Output is correct
112 Correct 3 ms 4940 KB Output is correct
113 Correct 3 ms 4992 KB Output is correct
114 Correct 3 ms 4940 KB Output is correct
115 Correct 4 ms 4940 KB Output is correct
116 Correct 3 ms 4940 KB Output is correct
117 Correct 3 ms 4940 KB Output is correct
118 Correct 3 ms 4940 KB Output is correct
119 Correct 4 ms 5196 KB Output is correct
120 Correct 5 ms 5324 KB Output is correct
121 Correct 209 ms 27888 KB Output is correct
122 Correct 341 ms 38364 KB Output is correct
123 Correct 338 ms 38296 KB Output is correct
124 Correct 3 ms 4940 KB Output is correct
125 Correct 3 ms 4940 KB Output is correct
126 Correct 3 ms 4940 KB Output is correct
127 Correct 498 ms 49828 KB Output is correct
128 Correct 519 ms 49816 KB Output is correct
129 Correct 507 ms 49460 KB Output is correct
130 Correct 5 ms 5324 KB Output is correct
131 Correct 8 ms 5836 KB Output is correct
132 Correct 206 ms 27276 KB Output is correct
133 Correct 376 ms 38568 KB Output is correct
134 Correct 496 ms 49560 KB Output is correct
135 Correct 457 ms 47524 KB Output is correct
136 Correct 487 ms 47352 KB Output is correct
137 Correct 497 ms 46756 KB Output is correct
138 Correct 531 ms 45004 KB Output is correct
139 Correct 531 ms 41176 KB Output is correct
140 Correct 3 ms 4940 KB Output is correct
141 Correct 62 ms 12204 KB Output is correct
142 Correct 15 ms 7148 KB Output is correct
143 Correct 62 ms 12592 KB Output is correct
144 Correct 98 ms 18016 KB Output is correct
145 Correct 257 ms 27128 KB Output is correct
146 Correct 312 ms 32916 KB Output is correct
147 Correct 404 ms 38480 KB Output is correct
148 Correct 489 ms 43276 KB Output is correct
149 Correct 580 ms 49328 KB Output is correct
150 Correct 494 ms 49048 KB Output is correct
151 Correct 527 ms 49720 KB Output is correct
152 Correct 6 ms 5452 KB Output is correct
153 Correct 8 ms 5964 KB Output is correct
154 Correct 206 ms 27084 KB Output is correct
155 Correct 380 ms 38296 KB Output is correct
156 Correct 503 ms 49400 KB Output is correct
157 Correct 3 ms 4940 KB Output is correct
158 Correct 3 ms 4924 KB Output is correct
159 Correct 3 ms 4940 KB Output is correct
160 Correct 3 ms 4940 KB Output is correct
161 Correct 530 ms 48128 KB Output is correct
162 Correct 468 ms 51088 KB Output is correct
163 Correct 465 ms 49720 KB Output is correct
164 Correct 454 ms 49764 KB Output is correct
165 Correct 436 ms 50608 KB Output is correct
166 Correct 452 ms 49048 KB Output is correct
167 Runtime error 40 ms 19652 KB Execution killed with signal 6
168 Halted 0 ms 0 KB -