답안 #1022337

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1022337 2024-07-13T12:08:26 Z mdn2002 분수 공원 (IOI21_parks) C++17
70 / 100
2715 ms 194720 KB
/*
Mayoeba Yabureru
*/
#include "parks.h"
#include<bits/stdc++.h>
using namespace std;
static vector<int> _u, _v, _a, _b;

int construct_roads(vector<int> x, vector<int> y) {
    int n = x.size();
    vector<vector<int>> gr(n + 1);
    vector<int> dsu(n + 1);
    map<pair<int, int>, int> mp;
    map<pair<int, int>, pair<int, int>> mpp;
    vector<pair<int, int>> vv;
    x.insert(x.begin(), 0);
    y.insert(y.begin(), 0);
    for (int i = 1; i <= n; i ++) {
        mp[{x[i], y[i]}] = i;
        vv.push_back({x[i], y[i]});
        dsu[i] = i;
    }
    vector<int> u, v, a, b;
    map<pair<int, int>, int> taken;
    map<pair<int, int>, int> connected;

    function<int(int)> fp = [&](int x) {
        if (dsu[x] == x) return x;
        return dsu[x] = fp(dsu[x]);
    };
    function cmp = [&] (pair<int, int> a, pair<int, int> b) {
        if (a.first + a.second < b.first + b.second) return 1;
        return 0;
    };
    sort(vv.begin(), vv.end(), cmp);
    for (int i = 0; i < n; i ++) {
        vector nx = {0, 0}, ny = {2, -2};
        for (int j = 0; j < 4; j ++) {
            auto xx = make_pair(vv[i].first + nx[j], vv[i].second + ny[j]);
            if (mp[xx]) {
                int fx = fp(mp[vv[i]]), fy = fp(mp[xx]);
                if (fx != fy) {
                    if (vv[i].first < xx.first || vv[i].second < xx.second) {
                        u.push_back(mp[vv[i]]);
                        v.push_back(mp[xx]);
                    }
                    else {
                        v.push_back(mp[vv[i]]);
                        u.push_back(mp[xx]);
                    }
                    gr[mp[vv[i]]].push_back(mp[xx]);
                    gr[mp[xx]].push_back(mp[vv[i]]);
                    dsu[fx] = fy;
                    connected[{mp[vv[i]], mp[xx]}] = 1;
                    connected[{mp[xx], mp[vv[i]]}] = 1;
                }
            }
        }
    }
    for (int i = 0; i < n; i ++) {
        vector nx = {2, -2}, ny = {0, 0};
        for (int j = 0; j < 4; j ++) {
            auto xx = make_pair(vv[i].first + nx[j], vv[i].second + ny[j]);
            if (mp[xx]) {
                int fx = fp(mp[vv[i]]), fy = fp(mp[xx]);
                if (fx != fy) {
                    if (vv[i].first < xx.first || vv[i].second < xx.second) {
                        u.push_back(mp[vv[i]]);
                        v.push_back(mp[xx]);
                    }
                    else {
                        v.push_back(mp[vv[i]]);
                        u.push_back(mp[xx]);
                    }
                    gr[mp[vv[i]]].push_back(mp[xx]);
                    gr[mp[xx]].push_back(mp[vv[i]]);
                    dsu[fx] = fy;
                    connected[{mp[vv[i]], mp[xx]}] = 1;
                    connected[{mp[xx], mp[vv[i]]}] = 1;
                }
            }
        }
    }

    int num = 0, st = 1;
    vector<int> vis(n + 1);
    for (int i = 1; i <= n; i ++) {
        if (mp[{x[i], y[i] + 2}]) {
            st = i;
            break;
        }
    }

    function<void(int)> go = [&] (int v) {
        num ++;
        vis[v] = 1;
        vector nx = {0, 2, 0, -2}, ny = {2, 0, -2, 0};
        int ii = 0;
        for (int i = 0; i < 4; i ++) {
            int u = mp[{x[v] + nx[i], y[v] + ny[i]}];
            if (u == 0) continue;
            if (vis[u]) {
                ii = (i + 1) % 4;
                break;
            }
        }
        int nummmm = 10;
        while (nummmm --) {
            int i = ii;
            ii = (ii + 1) % 4;
            int u = mp[{x[v] + nx[i], y[v] + ny[i]}];
            if (u == 0 || vis[u] || connected[{u, v}] == 0) continue;
            if (x[v] != x[u]) {
                int xx = v, uu = u;
                if (x[xx] > x[uu]) {
                    if (taken[{x[uu] + 1, y[uu] - 1}] == 0) {
                        mpp[{uu, xx}] = {x[uu] + 1, y[uu] - 1};
                        taken[{x[uu] + 1, y[uu] - 1}] = 1;
                    }
                    else if (taken[{x[uu] + 1, y[uu] + 1}] == 0) {
                        mpp[{uu, xx}] = {x[uu] + 1, y[uu] + 1};
                        taken[{x[uu] + 1, y[uu] + 1}] = 1;
                    }
                    else assert(0);
                }
                else {
                    if (taken[{x[xx] + 1, y[xx] + 1}] == 0) {
                        mpp[{xx, uu}] = {x[xx] + 1, y[xx] + 1};
                        taken[{x[xx] + 1, y[xx] + 1}] = 1;
                    }
                    else if (taken[{x[xx] + 1, y[xx] - 1}] == 0) {
                        mpp[{xx, uu}] = {x[xx] + 1, y[xx] - 1};
                        taken[{x[xx] + 1, y[xx] - 1}] = 1;
                    }
                    else assert(0);
                }
            }
            else {
                int xx = v, uu = u;
                if (y[xx] > y[uu]) {
                    if (taken[{x[uu] + 1, y[uu] + 1}] == 0) {
                        mpp[{uu, xx}] = {x[uu] + 1, y[uu] + 1};
                        taken[{x[uu] + 1, y[uu] + 1}] = 1;
                    }
                    else if (taken[{x[uu] - 1, y[uu] + 1}] == 0) {
                        mpp[{uu, xx}] = {x[uu] - 1, y[uu] + 1};
                        taken[{x[uu] - 1, y[uu] + 1}] = 1;
                    }
                    else assert(0);
                }
                else {
                    if (taken[{x[xx] - 1, y[xx] + 1}] == 0) {
                        mpp[{xx, uu}] = {x[xx] - 1, y[xx] + 1};
                        taken[{x[xx] - 1, y[xx] + 1}] = 1;
                    }
                    else if (taken[{x[xx] + 1, y[xx] + 1}] == 0) {
                        mpp[{xx, uu}] = {x[xx] + 1, y[xx] + 1};
                        taken[{x[xx] + 1, y[xx] + 1}] = 1;
                    }
                    else assert(0);
                }
            }
            go(u);
        }
    };
    go(st);
    for (int i = 0; i < u.size(); i ++) {
        a.push_back(mpp[{u[i], v[i]}].first);
        b.push_back(mpp[{u[i], v[i]}].second);
        u[i] --;
        v[i] --;
    }
    if (num == n) {
        build(u, v, a, b);
        return 1;
    }
    return 0;
}

Compilation message

parks.cpp: In function 'int construct_roads(std::vector<int>, std::vector<int>)':
parks.cpp:167:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  167 |     for (int i = 0; i < u.size(); i ++) {
      |                     ~~^~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 918 ms 98268 KB Output is correct
10 Correct 46 ms 10580 KB Output is correct
11 Correct 346 ms 55308 KB Output is correct
12 Correct 74 ms 15700 KB Output is correct
13 Correct 221 ms 36340 KB Output is correct
14 Correct 4 ms 860 KB Output is correct
15 Correct 7 ms 1476 KB Output is correct
16 Correct 849 ms 81340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 918 ms 98268 KB Output is correct
10 Correct 46 ms 10580 KB Output is correct
11 Correct 346 ms 55308 KB Output is correct
12 Correct 74 ms 15700 KB Output is correct
13 Correct 221 ms 36340 KB Output is correct
14 Correct 4 ms 860 KB Output is correct
15 Correct 7 ms 1476 KB Output is correct
16 Correct 849 ms 81340 KB Output is correct
17 Correct 1 ms 344 KB Output is correct
18 Correct 1 ms 348 KB Output is correct
19 Correct 1 ms 348 KB Output is correct
20 Correct 1 ms 348 KB Output is correct
21 Correct 1 ms 348 KB Output is correct
22 Correct 1 ms 348 KB Output is correct
23 Correct 2137 ms 187740 KB Output is correct
24 Correct 1 ms 344 KB Output is correct
25 Correct 6 ms 1368 KB Output is correct
26 Correct 15 ms 2140 KB Output is correct
27 Correct 14 ms 2364 KB Output is correct
28 Correct 865 ms 78760 KB Output is correct
29 Correct 1365 ms 98720 KB Output is correct
30 Correct 1891 ms 125984 KB Output is correct
31 Correct 2177 ms 184536 KB Output is correct
32 Correct 0 ms 432 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 1 ms 348 KB Output is correct
35 Correct 1 ms 348 KB Output is correct
36 Correct 1 ms 348 KB Output is correct
37 Correct 1 ms 348 KB Output is correct
38 Correct 1 ms 348 KB Output is correct
39 Correct 1 ms 344 KB Output is correct
40 Correct 1 ms 348 KB Output is correct
41 Correct 1 ms 348 KB Output is correct
42 Correct 1 ms 348 KB Output is correct
43 Correct 10 ms 1372 KB Output is correct
44 Correct 11 ms 1884 KB Output is correct
45 Correct 881 ms 81164 KB Output is correct
46 Correct 1449 ms 119256 KB Output is correct
47 Correct 1500 ms 116896 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 918 ms 98268 KB Output is correct
10 Correct 46 ms 10580 KB Output is correct
11 Correct 346 ms 55308 KB Output is correct
12 Correct 74 ms 15700 KB Output is correct
13 Correct 221 ms 36340 KB Output is correct
14 Correct 4 ms 860 KB Output is correct
15 Correct 7 ms 1476 KB Output is correct
16 Correct 849 ms 81340 KB Output is correct
17 Correct 1 ms 344 KB Output is correct
18 Correct 1 ms 348 KB Output is correct
19 Correct 1 ms 348 KB Output is correct
20 Correct 1 ms 348 KB Output is correct
21 Correct 1 ms 348 KB Output is correct
22 Correct 1 ms 348 KB Output is correct
23 Correct 2137 ms 187740 KB Output is correct
24 Correct 1 ms 344 KB Output is correct
25 Correct 6 ms 1368 KB Output is correct
26 Correct 15 ms 2140 KB Output is correct
27 Correct 14 ms 2364 KB Output is correct
28 Correct 865 ms 78760 KB Output is correct
29 Correct 1365 ms 98720 KB Output is correct
30 Correct 1891 ms 125984 KB Output is correct
31 Correct 2177 ms 184536 KB Output is correct
32 Correct 0 ms 432 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 1 ms 348 KB Output is correct
35 Correct 1 ms 348 KB Output is correct
36 Correct 1 ms 348 KB Output is correct
37 Correct 1 ms 348 KB Output is correct
38 Correct 1 ms 348 KB Output is correct
39 Correct 1 ms 344 KB Output is correct
40 Correct 1 ms 348 KB Output is correct
41 Correct 1 ms 348 KB Output is correct
42 Correct 1 ms 348 KB Output is correct
43 Correct 10 ms 1372 KB Output is correct
44 Correct 11 ms 1884 KB Output is correct
45 Correct 881 ms 81164 KB Output is correct
46 Correct 1449 ms 119256 KB Output is correct
47 Correct 1500 ms 116896 KB Output is correct
48 Correct 1 ms 428 KB Output is correct
49 Correct 1 ms 344 KB Output is correct
50 Correct 1 ms 348 KB Output is correct
51 Correct 1 ms 348 KB Output is correct
52 Correct 1 ms 344 KB Output is correct
53 Correct 1 ms 348 KB Output is correct
54 Correct 1 ms 344 KB Output is correct
55 Correct 2322 ms 155832 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 8 ms 1872 KB Output is correct
58 Correct 32 ms 5112 KB Output is correct
59 Correct 41 ms 4944 KB Output is correct
60 Correct 1119 ms 70208 KB Output is correct
61 Correct 1498 ms 108056 KB Output is correct
62 Correct 1877 ms 128824 KB Output is correct
63 Correct 2509 ms 145796 KB Output is correct
64 Correct 0 ms 344 KB Output is correct
65 Correct 1 ms 348 KB Output is correct
66 Correct 1 ms 344 KB Output is correct
67 Correct 2115 ms 167812 KB Output is correct
68 Correct 2189 ms 174600 KB Output is correct
69 Correct 2143 ms 183324 KB Output is correct
70 Correct 17 ms 2396 KB Output is correct
71 Correct 32 ms 4436 KB Output is correct
72 Correct 1012 ms 66888 KB Output is correct
73 Correct 1659 ms 108008 KB Output is correct
74 Correct 2213 ms 133448 KB Output is correct
75 Correct 2316 ms 142900 KB Output is correct
76 Correct 2120 ms 182828 KB Output is correct
77 Correct 27 ms 3164 KB Output is correct
78 Correct 43 ms 4940 KB Output is correct
79 Correct 964 ms 64664 KB Output is correct
80 Correct 1595 ms 106004 KB Output is correct
81 Correct 2307 ms 135696 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 918 ms 98268 KB Output is correct
10 Correct 46 ms 10580 KB Output is correct
11 Correct 346 ms 55308 KB Output is correct
12 Correct 74 ms 15700 KB Output is correct
13 Correct 221 ms 36340 KB Output is correct
14 Correct 4 ms 860 KB Output is correct
15 Correct 7 ms 1476 KB Output is correct
16 Correct 849 ms 81340 KB Output is correct
17 Correct 1 ms 348 KB Output is correct
18 Correct 1 ms 348 KB Output is correct
19 Correct 1 ms 348 KB Output is correct
20 Correct 2627 ms 188744 KB Output is correct
21 Correct 2248 ms 171648 KB Output is correct
22 Correct 2715 ms 163888 KB Output is correct
23 Correct 1919 ms 146744 KB Output is correct
24 Correct 1042 ms 50668 KB Output is correct
25 Correct 1836 ms 85024 KB Output is correct
26 Correct 1641 ms 85188 KB Output is correct
27 Correct 2588 ms 105360 KB Output is correct
28 Correct 2424 ms 104748 KB Output is correct
29 Correct 2603 ms 104784 KB Output is correct
30 Correct 2633 ms 105004 KB Output is correct
31 Correct 1 ms 432 KB Output is correct
32 Correct 93 ms 10792 KB Output is correct
33 Correct 206 ms 25920 KB Output is correct
34 Correct 1968 ms 160812 KB Output is correct
35 Correct 47 ms 4696 KB Output is correct
36 Correct 304 ms 21612 KB Output is correct
37 Correct 659 ms 41896 KB Output is correct
38 Correct 812 ms 40916 KB Output is correct
39 Correct 1153 ms 56048 KB Output is correct
40 Correct 1573 ms 70960 KB Output is correct
41 Correct 2059 ms 85752 KB Output is correct
42 Correct 2482 ms 101460 KB Output is correct
43 Correct 1 ms 348 KB Output is correct
44 Correct 0 ms 348 KB Output is correct
45 Correct 1 ms 344 KB Output is correct
46 Correct 1 ms 348 KB Output is correct
47 Correct 0 ms 348 KB Output is correct
48 Correct 0 ms 436 KB Output is correct
49 Correct 1 ms 348 KB Output is correct
50 Correct 0 ms 348 KB Output is correct
51 Correct 1 ms 344 KB Output is correct
52 Correct 1 ms 600 KB Output is correct
53 Correct 1 ms 344 KB Output is correct
54 Correct 8 ms 1472 KB Output is correct
55 Correct 14 ms 1884 KB Output is correct
56 Correct 838 ms 81188 KB Output is correct
57 Correct 1395 ms 119264 KB Output is correct
58 Correct 1397 ms 116752 KB Output is correct
59 Correct 0 ms 344 KB Output is correct
60 Correct 0 ms 440 KB Output is correct
61 Correct 1 ms 348 KB Output is correct
62 Correct 2052 ms 166680 KB Output is correct
63 Correct 2206 ms 174704 KB Output is correct
64 Correct 2005 ms 183400 KB Output is correct
65 Correct 19 ms 2396 KB Output is correct
66 Correct 29 ms 4292 KB Output is correct
67 Correct 910 ms 66692 KB Output is correct
68 Correct 1546 ms 107948 KB Output is correct
69 Correct 2078 ms 133240 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 918 ms 98268 KB Output is correct
10 Correct 46 ms 10580 KB Output is correct
11 Correct 346 ms 55308 KB Output is correct
12 Correct 74 ms 15700 KB Output is correct
13 Correct 221 ms 36340 KB Output is correct
14 Correct 4 ms 860 KB Output is correct
15 Correct 7 ms 1476 KB Output is correct
16 Correct 849 ms 81340 KB Output is correct
17 Correct 2078 ms 194720 KB Output is correct
18 Correct 2079 ms 174904 KB Output is correct
19 Correct 2272 ms 167288 KB Output is correct
20 Correct 2389 ms 98848 KB Output is correct
21 Correct 2121 ms 97200 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 209 ms 17688 KB Output is correct
24 Correct 127 ms 9252 KB Output is correct
25 Correct 432 ms 29564 KB Output is correct
26 Correct 734 ms 49056 KB Output is correct
27 Correct 1118 ms 51296 KB Output is correct
28 Correct 1400 ms 64172 KB Output is correct
29 Correct 1752 ms 76564 KB Output is correct
30 Correct 2218 ms 89124 KB Output is correct
31 Correct 2483 ms 101992 KB Output is correct
32 Correct 2033 ms 142760 KB Output is correct
33 Correct 1933 ms 182828 KB Output is correct
34 Correct 20 ms 3164 KB Output is correct
35 Correct 36 ms 4888 KB Output is correct
36 Correct 829 ms 64624 KB Output is correct
37 Correct 1364 ms 105836 KB Output is correct
38 Correct 1959 ms 135728 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 918 ms 98268 KB Output is correct
10 Correct 46 ms 10580 KB Output is correct
11 Correct 346 ms 55308 KB Output is correct
12 Correct 74 ms 15700 KB Output is correct
13 Correct 221 ms 36340 KB Output is correct
14 Correct 4 ms 860 KB Output is correct
15 Correct 7 ms 1476 KB Output is correct
16 Correct 849 ms 81340 KB Output is correct
17 Correct 1 ms 344 KB Output is correct
18 Correct 1 ms 348 KB Output is correct
19 Correct 1 ms 348 KB Output is correct
20 Correct 1 ms 348 KB Output is correct
21 Correct 1 ms 348 KB Output is correct
22 Correct 1 ms 348 KB Output is correct
23 Correct 2137 ms 187740 KB Output is correct
24 Correct 1 ms 344 KB Output is correct
25 Correct 6 ms 1368 KB Output is correct
26 Correct 15 ms 2140 KB Output is correct
27 Correct 14 ms 2364 KB Output is correct
28 Correct 865 ms 78760 KB Output is correct
29 Correct 1365 ms 98720 KB Output is correct
30 Correct 1891 ms 125984 KB Output is correct
31 Correct 2177 ms 184536 KB Output is correct
32 Correct 0 ms 432 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 1 ms 348 KB Output is correct
35 Correct 1 ms 348 KB Output is correct
36 Correct 1 ms 348 KB Output is correct
37 Correct 1 ms 348 KB Output is correct
38 Correct 1 ms 348 KB Output is correct
39 Correct 1 ms 344 KB Output is correct
40 Correct 1 ms 348 KB Output is correct
41 Correct 1 ms 348 KB Output is correct
42 Correct 1 ms 348 KB Output is correct
43 Correct 10 ms 1372 KB Output is correct
44 Correct 11 ms 1884 KB Output is correct
45 Correct 881 ms 81164 KB Output is correct
46 Correct 1449 ms 119256 KB Output is correct
47 Correct 1500 ms 116896 KB Output is correct
48 Correct 1 ms 428 KB Output is correct
49 Correct 1 ms 344 KB Output is correct
50 Correct 1 ms 348 KB Output is correct
51 Correct 1 ms 348 KB Output is correct
52 Correct 1 ms 344 KB Output is correct
53 Correct 1 ms 348 KB Output is correct
54 Correct 1 ms 344 KB Output is correct
55 Correct 2322 ms 155832 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 8 ms 1872 KB Output is correct
58 Correct 32 ms 5112 KB Output is correct
59 Correct 41 ms 4944 KB Output is correct
60 Correct 1119 ms 70208 KB Output is correct
61 Correct 1498 ms 108056 KB Output is correct
62 Correct 1877 ms 128824 KB Output is correct
63 Correct 2509 ms 145796 KB Output is correct
64 Correct 0 ms 344 KB Output is correct
65 Correct 1 ms 348 KB Output is correct
66 Correct 1 ms 344 KB Output is correct
67 Correct 2115 ms 167812 KB Output is correct
68 Correct 2189 ms 174600 KB Output is correct
69 Correct 2143 ms 183324 KB Output is correct
70 Correct 17 ms 2396 KB Output is correct
71 Correct 32 ms 4436 KB Output is correct
72 Correct 1012 ms 66888 KB Output is correct
73 Correct 1659 ms 108008 KB Output is correct
74 Correct 2213 ms 133448 KB Output is correct
75 Correct 2316 ms 142900 KB Output is correct
76 Correct 2120 ms 182828 KB Output is correct
77 Correct 27 ms 3164 KB Output is correct
78 Correct 43 ms 4940 KB Output is correct
79 Correct 964 ms 64664 KB Output is correct
80 Correct 1595 ms 106004 KB Output is correct
81 Correct 2307 ms 135696 KB Output is correct
82 Correct 1 ms 348 KB Output is correct
83 Correct 1 ms 348 KB Output is correct
84 Correct 1 ms 348 KB Output is correct
85 Correct 2627 ms 188744 KB Output is correct
86 Correct 2248 ms 171648 KB Output is correct
87 Correct 2715 ms 163888 KB Output is correct
88 Correct 1919 ms 146744 KB Output is correct
89 Correct 1042 ms 50668 KB Output is correct
90 Correct 1836 ms 85024 KB Output is correct
91 Correct 1641 ms 85188 KB Output is correct
92 Correct 2588 ms 105360 KB Output is correct
93 Correct 2424 ms 104748 KB Output is correct
94 Correct 2603 ms 104784 KB Output is correct
95 Correct 2633 ms 105004 KB Output is correct
96 Correct 1 ms 432 KB Output is correct
97 Correct 93 ms 10792 KB Output is correct
98 Correct 206 ms 25920 KB Output is correct
99 Correct 1968 ms 160812 KB Output is correct
100 Correct 47 ms 4696 KB Output is correct
101 Correct 304 ms 21612 KB Output is correct
102 Correct 659 ms 41896 KB Output is correct
103 Correct 812 ms 40916 KB Output is correct
104 Correct 1153 ms 56048 KB Output is correct
105 Correct 1573 ms 70960 KB Output is correct
106 Correct 2059 ms 85752 KB Output is correct
107 Correct 2482 ms 101460 KB Output is correct
108 Correct 1 ms 348 KB Output is correct
109 Correct 0 ms 348 KB Output is correct
110 Correct 1 ms 344 KB Output is correct
111 Correct 1 ms 348 KB Output is correct
112 Correct 0 ms 348 KB Output is correct
113 Correct 0 ms 436 KB Output is correct
114 Correct 1 ms 348 KB Output is correct
115 Correct 0 ms 348 KB Output is correct
116 Correct 1 ms 344 KB Output is correct
117 Correct 1 ms 600 KB Output is correct
118 Correct 1 ms 344 KB Output is correct
119 Correct 8 ms 1472 KB Output is correct
120 Correct 14 ms 1884 KB Output is correct
121 Correct 838 ms 81188 KB Output is correct
122 Correct 1395 ms 119264 KB Output is correct
123 Correct 1397 ms 116752 KB Output is correct
124 Correct 0 ms 344 KB Output is correct
125 Correct 0 ms 440 KB Output is correct
126 Correct 1 ms 348 KB Output is correct
127 Correct 2052 ms 166680 KB Output is correct
128 Correct 2206 ms 174704 KB Output is correct
129 Correct 2005 ms 183400 KB Output is correct
130 Correct 19 ms 2396 KB Output is correct
131 Correct 29 ms 4292 KB Output is correct
132 Correct 910 ms 66692 KB Output is correct
133 Correct 1546 ms 107948 KB Output is correct
134 Correct 2078 ms 133240 KB Output is correct
135 Correct 2078 ms 194720 KB Output is correct
136 Correct 2079 ms 174904 KB Output is correct
137 Correct 2272 ms 167288 KB Output is correct
138 Correct 2389 ms 98848 KB Output is correct
139 Correct 2121 ms 97200 KB Output is correct
140 Correct 0 ms 348 KB Output is correct
141 Correct 209 ms 17688 KB Output is correct
142 Correct 127 ms 9252 KB Output is correct
143 Correct 432 ms 29564 KB Output is correct
144 Correct 734 ms 49056 KB Output is correct
145 Correct 1118 ms 51296 KB Output is correct
146 Correct 1400 ms 64172 KB Output is correct
147 Correct 1752 ms 76564 KB Output is correct
148 Correct 2218 ms 89124 KB Output is correct
149 Correct 2483 ms 101992 KB Output is correct
150 Correct 2033 ms 142760 KB Output is correct
151 Correct 1933 ms 182828 KB Output is correct
152 Correct 20 ms 3164 KB Output is correct
153 Correct 36 ms 4888 KB Output is correct
154 Correct 829 ms 64624 KB Output is correct
155 Correct 1364 ms 105836 KB Output is correct
156 Correct 1959 ms 135728 KB Output is correct
157 Correct 0 ms 348 KB Output is correct
158 Correct 0 ms 348 KB Output is correct
159 Correct 0 ms 344 KB Output is correct
160 Correct 0 ms 348 KB Output is correct
161 Correct 2420 ms 105040 KB Output is correct
162 Correct 1809 ms 163632 KB Output is correct
163 Correct 1875 ms 152196 KB Output is correct
164 Correct 1827 ms 131992 KB Output is correct
165 Runtime error 854 ms 122780 KB Execution killed with signal 6
166 Halted 0 ms 0 KB -