답안 #814370

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
814370 2023-08-08T07:06:11 Z LittleCube 분수 공원 (IOI21_parks) C++17
70 / 100
772 ms 71780 KB
#pragma GCC optimize("Ofast,unroll-loops")
#include "parks.h"
#include <bits/stdc++.h>
#define ll long long
#define pii pair<int, int>
#define pll pair<ll, ll>
#define F first
#define S second
using namespace std;

map<pii, int> id;
int n, m, deg[200000], dsu[200000], vis[400001], use[400001], hmm;
pii pos[400001];
vector<pair<pii, pii>> edge;
vector<pii> E[400001];
vector<int> ru, rv, bx, by;

int find(int k)
{
    return dsu[k] == k ? k : dsu[k] = find(dsu[k]);
}

void merge(int x, int y)
{
    x = find(x), y = find(y);
    dsu[x] = y;
}

int node(int x, int y)
{
    if (!id[pii(x, y)])
    {
        id[pii(x, y)] = ++m;
        pos[m] = pii(x, y);
    }
    return id[pii(x, y)];
}

void dfs(int u, int p)
{
    vis[u] = 1;
    int flag = 1;
    for (auto [v, i] : E[u])
        if (!vis[v])
            dfs(v, u);
    hmm += E[u].size();
    hmm -= 2;
    for (auto [v, i] : E[u])
        if (v != p && !use[i] && flag)
        {
            flag--;
            use[i] = 1;
            tie(bx[i], by[i]) = pos[u];
        }
    for (auto [v, i] : E[u])
        if (!use[i] && flag)
        {
            flag--;
            use[i] = 1;
            tie(bx[i], by[i]) = pos[u];
        }
}

int construct_roads(vector<int> x, vector<int> y)
{
    for (int t = 0; t <= 4; t++)
    n = x.size();
    for (int i = 0; i < n; i++)
        dsu[i] = i;
    for (int i = 0; i < n; i++)
        id[pii(x[i], y[i])] = i + 1;

    bx.resize(n - 1), by.resize(n - 1);
    for (int i = 0; i < n; i++)
    {
        if (id.find(pii(x[i], y[i] - 2)) != id.end())
        {
            int j = id[pii(x[i], y[i] - 2)] - 1;
            merge(i, j);
            ru.emplace_back(i);
            rv.emplace_back(j);
        }
        if (id.find(pii(x[i] - 2, y[i])) != id.end())
        {
            int j = id[pii(x[i] - 2, y[i])] - 1;
            edge.emplace_back(make_pair(pii(x[i] - 1, y[i]), pii(i, j)));
        }
    }
    // sort(edge.begin(), edge.end(), [&](pair<pii, pii> f, pair<pii, pii> s)
    //      {
    //     pii p = f.F, q = s.F;
    //     if(p.F != q.F)
    //         return p.F < q.F;
    //     if(p.F % 4 == 1)
    //         return p.S < q.S;
    //     return p.S > q.S; });
    mt19937 rd(chrono::steady_clock::now().time_since_epoch().count());
    shuffle(edge.begin(), edge.end(), rd);
    for (auto [_, p] : edge)
    {
        auto [u, v] = p;
        if (find(u) != find(v))
        {
            ru.emplace_back(u);
            rv.emplace_back(v);
            merge(u, v);
        }
    }
    if (ru.size() < n - 1)
        return 0;
    id.clear();
    for (int i = 0; i < n - 1; i++)
    {
        int u = ru[i], v = rv[i];
        if (x[u] == x[v])
        {
            int a = node(x[u] - 1, (y[u] + y[v]) / 2),
                b = node(x[u] + 1, (y[u] + y[v]) / 2);
            E[a].emplace_back(pii(b, i));
            E[b].emplace_back(pii(a, i));
        }
        else
        {
            int a = node((x[u] + x[v]) / 2, y[u] + 1),
                b = node((x[u] + x[v]) / 2, y[u] - 1);
            E[a].emplace_back(pii(b, i));
            E[b].emplace_back(pii(a, i));
        }
    }
    for (int i = 1; i <= m; i++)
        if (!vis[i])
        {
            hmm = 0;
            dfs(i, i);
            if(hmm > 0)
                return 0;
        }
    build(ru, rv, bx, by);
    return 1;
}

Compilation message

parks.cpp: In function 'int construct_roads(std::vector<int>, std::vector<int>)':
parks.cpp:109:19: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
  109 |     if (ru.size() < n - 1)
      |         ~~~~~~~~~~^~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 9684 KB Output is correct
2 Correct 5 ms 9684 KB Output is correct
3 Correct 5 ms 9616 KB Output is correct
4 Correct 6 ms 9684 KB Output is correct
5 Correct 5 ms 9684 KB Output is correct
6 Correct 6 ms 9684 KB Output is correct
7 Correct 5 ms 9684 KB Output is correct
8 Correct 5 ms 9648 KB Output is correct
9 Correct 287 ms 37816 KB Output is correct
10 Correct 18 ms 12684 KB Output is correct
11 Correct 99 ms 24852 KB Output is correct
12 Correct 25 ms 14164 KB Output is correct
13 Correct 26 ms 14268 KB Output is correct
14 Correct 5 ms 9812 KB Output is correct
15 Correct 6 ms 9812 KB Output is correct
16 Correct 244 ms 37896 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 9684 KB Output is correct
2 Correct 5 ms 9684 KB Output is correct
3 Correct 5 ms 9616 KB Output is correct
4 Correct 6 ms 9684 KB Output is correct
5 Correct 5 ms 9684 KB Output is correct
6 Correct 6 ms 9684 KB Output is correct
7 Correct 5 ms 9684 KB Output is correct
8 Correct 5 ms 9648 KB Output is correct
9 Correct 287 ms 37816 KB Output is correct
10 Correct 18 ms 12684 KB Output is correct
11 Correct 99 ms 24852 KB Output is correct
12 Correct 25 ms 14164 KB Output is correct
13 Correct 26 ms 14268 KB Output is correct
14 Correct 5 ms 9812 KB Output is correct
15 Correct 6 ms 9812 KB Output is correct
16 Correct 244 ms 37896 KB Output is correct
17 Correct 5 ms 9684 KB Output is correct
18 Correct 5 ms 9684 KB Output is correct
19 Correct 5 ms 9684 KB Output is correct
20 Correct 5 ms 9600 KB Output is correct
21 Correct 5 ms 9684 KB Output is correct
22 Correct 5 ms 9684 KB Output is correct
23 Correct 690 ms 59808 KB Output is correct
24 Correct 5 ms 9684 KB Output is correct
25 Correct 7 ms 9968 KB Output is correct
26 Correct 9 ms 10044 KB Output is correct
27 Correct 7 ms 10160 KB Output is correct
28 Correct 200 ms 29620 KB Output is correct
29 Correct 365 ms 39728 KB Output is correct
30 Correct 488 ms 49808 KB Output is correct
31 Correct 772 ms 59996 KB Output is correct
32 Correct 6 ms 9684 KB Output is correct
33 Correct 5 ms 9684 KB Output is correct
34 Correct 5 ms 9684 KB Output is correct
35 Correct 5 ms 9684 KB Output is correct
36 Correct 5 ms 9684 KB Output is correct
37 Correct 5 ms 9684 KB Output is correct
38 Correct 6 ms 9684 KB Output is correct
39 Correct 5 ms 9684 KB Output is correct
40 Correct 5 ms 9684 KB Output is correct
41 Correct 6 ms 9684 KB Output is correct
42 Correct 5 ms 9684 KB Output is correct
43 Correct 6 ms 9812 KB Output is correct
44 Correct 7 ms 10020 KB Output is correct
45 Correct 282 ms 31760 KB Output is correct
46 Correct 437 ms 41820 KB Output is correct
47 Correct 400 ms 41748 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 9684 KB Output is correct
2 Correct 5 ms 9684 KB Output is correct
3 Correct 5 ms 9616 KB Output is correct
4 Correct 6 ms 9684 KB Output is correct
5 Correct 5 ms 9684 KB Output is correct
6 Correct 6 ms 9684 KB Output is correct
7 Correct 5 ms 9684 KB Output is correct
8 Correct 5 ms 9648 KB Output is correct
9 Correct 287 ms 37816 KB Output is correct
10 Correct 18 ms 12684 KB Output is correct
11 Correct 99 ms 24852 KB Output is correct
12 Correct 25 ms 14164 KB Output is correct
13 Correct 26 ms 14268 KB Output is correct
14 Correct 5 ms 9812 KB Output is correct
15 Correct 6 ms 9812 KB Output is correct
16 Correct 244 ms 37896 KB Output is correct
17 Correct 5 ms 9684 KB Output is correct
18 Correct 5 ms 9684 KB Output is correct
19 Correct 5 ms 9684 KB Output is correct
20 Correct 5 ms 9600 KB Output is correct
21 Correct 5 ms 9684 KB Output is correct
22 Correct 5 ms 9684 KB Output is correct
23 Correct 690 ms 59808 KB Output is correct
24 Correct 5 ms 9684 KB Output is correct
25 Correct 7 ms 9968 KB Output is correct
26 Correct 9 ms 10044 KB Output is correct
27 Correct 7 ms 10160 KB Output is correct
28 Correct 200 ms 29620 KB Output is correct
29 Correct 365 ms 39728 KB Output is correct
30 Correct 488 ms 49808 KB Output is correct
31 Correct 772 ms 59996 KB Output is correct
32 Correct 6 ms 9684 KB Output is correct
33 Correct 5 ms 9684 KB Output is correct
34 Correct 5 ms 9684 KB Output is correct
35 Correct 5 ms 9684 KB Output is correct
36 Correct 5 ms 9684 KB Output is correct
37 Correct 5 ms 9684 KB Output is correct
38 Correct 6 ms 9684 KB Output is correct
39 Correct 5 ms 9684 KB Output is correct
40 Correct 5 ms 9684 KB Output is correct
41 Correct 6 ms 9684 KB Output is correct
42 Correct 5 ms 9684 KB Output is correct
43 Correct 6 ms 9812 KB Output is correct
44 Correct 7 ms 10020 KB Output is correct
45 Correct 282 ms 31760 KB Output is correct
46 Correct 437 ms 41820 KB Output is correct
47 Correct 400 ms 41748 KB Output is correct
48 Correct 5 ms 9684 KB Output is correct
49 Correct 5 ms 9684 KB Output is correct
50 Correct 5 ms 9616 KB Output is correct
51 Correct 5 ms 9684 KB Output is correct
52 Correct 5 ms 9684 KB Output is correct
53 Correct 7 ms 9684 KB Output is correct
54 Correct 5 ms 9684 KB Output is correct
55 Correct 705 ms 56632 KB Output is correct
56 Correct 6 ms 9684 KB Output is correct
57 Correct 9 ms 10088 KB Output is correct
58 Correct 15 ms 11084 KB Output is correct
59 Correct 12 ms 10836 KB Output is correct
60 Correct 256 ms 33128 KB Output is correct
61 Correct 419 ms 41260 KB Output is correct
62 Correct 545 ms 49028 KB Output is correct
63 Correct 745 ms 56724 KB Output is correct
64 Correct 5 ms 9684 KB Output is correct
65 Correct 5 ms 9684 KB Output is correct
66 Correct 6 ms 9672 KB Output is correct
67 Correct 588 ms 65968 KB Output is correct
68 Correct 579 ms 66088 KB Output is correct
69 Correct 592 ms 65784 KB Output is correct
70 Correct 7 ms 10144 KB Output is correct
71 Correct 10 ms 10580 KB Output is correct
72 Correct 241 ms 32596 KB Output is correct
73 Correct 476 ms 42196 KB Output is correct
74 Correct 651 ms 55884 KB Output is correct
75 Correct 628 ms 61644 KB Output is correct
76 Correct 616 ms 66008 KB Output is correct
77 Correct 8 ms 10264 KB Output is correct
78 Correct 11 ms 10740 KB Output is correct
79 Correct 299 ms 33732 KB Output is correct
80 Correct 438 ms 43864 KB Output is correct
81 Correct 678 ms 58160 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 9684 KB Output is correct
2 Correct 5 ms 9684 KB Output is correct
3 Correct 5 ms 9616 KB Output is correct
4 Correct 6 ms 9684 KB Output is correct
5 Correct 5 ms 9684 KB Output is correct
6 Correct 6 ms 9684 KB Output is correct
7 Correct 5 ms 9684 KB Output is correct
8 Correct 5 ms 9648 KB Output is correct
9 Correct 287 ms 37816 KB Output is correct
10 Correct 18 ms 12684 KB Output is correct
11 Correct 99 ms 24852 KB Output is correct
12 Correct 25 ms 14164 KB Output is correct
13 Correct 26 ms 14268 KB Output is correct
14 Correct 5 ms 9812 KB Output is correct
15 Correct 6 ms 9812 KB Output is correct
16 Correct 244 ms 37896 KB Output is correct
17 Correct 5 ms 9684 KB Output is correct
18 Correct 5 ms 9684 KB Output is correct
19 Correct 5 ms 9684 KB Output is correct
20 Correct 632 ms 65360 KB Output is correct
21 Correct 597 ms 56728 KB Output is correct
22 Correct 647 ms 55548 KB Output is correct
23 Correct 497 ms 62332 KB Output is correct
24 Correct 207 ms 27716 KB Output is correct
25 Correct 287 ms 33812 KB Output is correct
26 Correct 241 ms 29432 KB Output is correct
27 Correct 646 ms 65968 KB Output is correct
28 Correct 638 ms 66020 KB Output is correct
29 Correct 643 ms 71780 KB Output is correct
30 Correct 629 ms 71680 KB Output is correct
31 Correct 5 ms 9684 KB Output is correct
32 Correct 32 ms 12968 KB Output is correct
33 Correct 74 ms 18604 KB Output is correct
34 Correct 556 ms 62800 KB Output is correct
35 Correct 15 ms 10880 KB Output is correct
36 Correct 50 ms 15028 KB Output is correct
37 Correct 108 ms 20676 KB Output is correct
38 Correct 227 ms 27384 KB Output is correct
39 Correct 335 ms 34004 KB Output is correct
40 Correct 417 ms 41152 KB Output is correct
41 Correct 617 ms 47388 KB Output is correct
42 Correct 751 ms 54364 KB Output is correct
43 Correct 6 ms 9684 KB Output is correct
44 Correct 6 ms 9684 KB Output is correct
45 Correct 5 ms 9684 KB Output is correct
46 Correct 5 ms 9684 KB Output is correct
47 Correct 6 ms 9684 KB Output is correct
48 Correct 5 ms 9684 KB Output is correct
49 Correct 6 ms 9684 KB Output is correct
50 Correct 5 ms 9684 KB Output is correct
51 Correct 5 ms 9684 KB Output is correct
52 Correct 5 ms 9684 KB Output is correct
53 Correct 5 ms 9684 KB Output is correct
54 Correct 6 ms 9812 KB Output is correct
55 Correct 8 ms 9940 KB Output is correct
56 Correct 251 ms 31724 KB Output is correct
57 Correct 427 ms 41788 KB Output is correct
58 Correct 407 ms 41776 KB Output is correct
59 Correct 5 ms 9684 KB Output is correct
60 Correct 6 ms 9684 KB Output is correct
61 Correct 5 ms 9684 KB Output is correct
62 Correct 557 ms 66036 KB Output is correct
63 Correct 634 ms 66168 KB Output is correct
64 Correct 591 ms 65752 KB Output is correct
65 Correct 9 ms 10064 KB Output is correct
66 Correct 10 ms 10572 KB Output is correct
67 Correct 300 ms 32640 KB Output is correct
68 Correct 427 ms 42176 KB Output is correct
69 Correct 633 ms 55680 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 9684 KB Output is correct
2 Correct 5 ms 9684 KB Output is correct
3 Correct 5 ms 9616 KB Output is correct
4 Correct 6 ms 9684 KB Output is correct
5 Correct 5 ms 9684 KB Output is correct
6 Correct 6 ms 9684 KB Output is correct
7 Correct 5 ms 9684 KB Output is correct
8 Correct 5 ms 9648 KB Output is correct
9 Correct 287 ms 37816 KB Output is correct
10 Correct 18 ms 12684 KB Output is correct
11 Correct 99 ms 24852 KB Output is correct
12 Correct 25 ms 14164 KB Output is correct
13 Correct 26 ms 14268 KB Output is correct
14 Correct 5 ms 9812 KB Output is correct
15 Correct 6 ms 9812 KB Output is correct
16 Correct 244 ms 37896 KB Output is correct
17 Correct 654 ms 70912 KB Output is correct
18 Correct 542 ms 71064 KB Output is correct
19 Correct 633 ms 64268 KB Output is correct
20 Correct 732 ms 55788 KB Output is correct
21 Correct 608 ms 56808 KB Output is correct
22 Correct 7 ms 9684 KB Output is correct
23 Correct 70 ms 17144 KB Output is correct
24 Correct 22 ms 12028 KB Output is correct
25 Correct 83 ms 17740 KB Output is correct
26 Correct 133 ms 23700 KB Output is correct
27 Correct 255 ms 32920 KB Output is correct
28 Correct 371 ms 38848 KB Output is correct
29 Correct 438 ms 44648 KB Output is correct
30 Correct 653 ms 50552 KB Output is correct
31 Correct 700 ms 56228 KB Output is correct
32 Correct 708 ms 61592 KB Output is correct
33 Correct 706 ms 65980 KB Output is correct
34 Correct 11 ms 10156 KB Output is correct
35 Correct 11 ms 10672 KB Output is correct
36 Correct 270 ms 33672 KB Output is correct
37 Correct 539 ms 43892 KB Output is correct
38 Correct 645 ms 58244 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 9684 KB Output is correct
2 Correct 5 ms 9684 KB Output is correct
3 Correct 5 ms 9616 KB Output is correct
4 Correct 6 ms 9684 KB Output is correct
5 Correct 5 ms 9684 KB Output is correct
6 Correct 6 ms 9684 KB Output is correct
7 Correct 5 ms 9684 KB Output is correct
8 Correct 5 ms 9648 KB Output is correct
9 Correct 287 ms 37816 KB Output is correct
10 Correct 18 ms 12684 KB Output is correct
11 Correct 99 ms 24852 KB Output is correct
12 Correct 25 ms 14164 KB Output is correct
13 Correct 26 ms 14268 KB Output is correct
14 Correct 5 ms 9812 KB Output is correct
15 Correct 6 ms 9812 KB Output is correct
16 Correct 244 ms 37896 KB Output is correct
17 Correct 5 ms 9684 KB Output is correct
18 Correct 5 ms 9684 KB Output is correct
19 Correct 5 ms 9684 KB Output is correct
20 Correct 5 ms 9600 KB Output is correct
21 Correct 5 ms 9684 KB Output is correct
22 Correct 5 ms 9684 KB Output is correct
23 Correct 690 ms 59808 KB Output is correct
24 Correct 5 ms 9684 KB Output is correct
25 Correct 7 ms 9968 KB Output is correct
26 Correct 9 ms 10044 KB Output is correct
27 Correct 7 ms 10160 KB Output is correct
28 Correct 200 ms 29620 KB Output is correct
29 Correct 365 ms 39728 KB Output is correct
30 Correct 488 ms 49808 KB Output is correct
31 Correct 772 ms 59996 KB Output is correct
32 Correct 6 ms 9684 KB Output is correct
33 Correct 5 ms 9684 KB Output is correct
34 Correct 5 ms 9684 KB Output is correct
35 Correct 5 ms 9684 KB Output is correct
36 Correct 5 ms 9684 KB Output is correct
37 Correct 5 ms 9684 KB Output is correct
38 Correct 6 ms 9684 KB Output is correct
39 Correct 5 ms 9684 KB Output is correct
40 Correct 5 ms 9684 KB Output is correct
41 Correct 6 ms 9684 KB Output is correct
42 Correct 5 ms 9684 KB Output is correct
43 Correct 6 ms 9812 KB Output is correct
44 Correct 7 ms 10020 KB Output is correct
45 Correct 282 ms 31760 KB Output is correct
46 Correct 437 ms 41820 KB Output is correct
47 Correct 400 ms 41748 KB Output is correct
48 Correct 5 ms 9684 KB Output is correct
49 Correct 5 ms 9684 KB Output is correct
50 Correct 5 ms 9616 KB Output is correct
51 Correct 5 ms 9684 KB Output is correct
52 Correct 5 ms 9684 KB Output is correct
53 Correct 7 ms 9684 KB Output is correct
54 Correct 5 ms 9684 KB Output is correct
55 Correct 705 ms 56632 KB Output is correct
56 Correct 6 ms 9684 KB Output is correct
57 Correct 9 ms 10088 KB Output is correct
58 Correct 15 ms 11084 KB Output is correct
59 Correct 12 ms 10836 KB Output is correct
60 Correct 256 ms 33128 KB Output is correct
61 Correct 419 ms 41260 KB Output is correct
62 Correct 545 ms 49028 KB Output is correct
63 Correct 745 ms 56724 KB Output is correct
64 Correct 5 ms 9684 KB Output is correct
65 Correct 5 ms 9684 KB Output is correct
66 Correct 6 ms 9672 KB Output is correct
67 Correct 588 ms 65968 KB Output is correct
68 Correct 579 ms 66088 KB Output is correct
69 Correct 592 ms 65784 KB Output is correct
70 Correct 7 ms 10144 KB Output is correct
71 Correct 10 ms 10580 KB Output is correct
72 Correct 241 ms 32596 KB Output is correct
73 Correct 476 ms 42196 KB Output is correct
74 Correct 651 ms 55884 KB Output is correct
75 Correct 628 ms 61644 KB Output is correct
76 Correct 616 ms 66008 KB Output is correct
77 Correct 8 ms 10264 KB Output is correct
78 Correct 11 ms 10740 KB Output is correct
79 Correct 299 ms 33732 KB Output is correct
80 Correct 438 ms 43864 KB Output is correct
81 Correct 678 ms 58160 KB Output is correct
82 Correct 5 ms 9684 KB Output is correct
83 Correct 5 ms 9684 KB Output is correct
84 Correct 5 ms 9684 KB Output is correct
85 Correct 632 ms 65360 KB Output is correct
86 Correct 597 ms 56728 KB Output is correct
87 Correct 647 ms 55548 KB Output is correct
88 Correct 497 ms 62332 KB Output is correct
89 Correct 207 ms 27716 KB Output is correct
90 Correct 287 ms 33812 KB Output is correct
91 Correct 241 ms 29432 KB Output is correct
92 Correct 646 ms 65968 KB Output is correct
93 Correct 638 ms 66020 KB Output is correct
94 Correct 643 ms 71780 KB Output is correct
95 Correct 629 ms 71680 KB Output is correct
96 Correct 5 ms 9684 KB Output is correct
97 Correct 32 ms 12968 KB Output is correct
98 Correct 74 ms 18604 KB Output is correct
99 Correct 556 ms 62800 KB Output is correct
100 Correct 15 ms 10880 KB Output is correct
101 Correct 50 ms 15028 KB Output is correct
102 Correct 108 ms 20676 KB Output is correct
103 Correct 227 ms 27384 KB Output is correct
104 Correct 335 ms 34004 KB Output is correct
105 Correct 417 ms 41152 KB Output is correct
106 Correct 617 ms 47388 KB Output is correct
107 Correct 751 ms 54364 KB Output is correct
108 Correct 6 ms 9684 KB Output is correct
109 Correct 6 ms 9684 KB Output is correct
110 Correct 5 ms 9684 KB Output is correct
111 Correct 5 ms 9684 KB Output is correct
112 Correct 6 ms 9684 KB Output is correct
113 Correct 5 ms 9684 KB Output is correct
114 Correct 6 ms 9684 KB Output is correct
115 Correct 5 ms 9684 KB Output is correct
116 Correct 5 ms 9684 KB Output is correct
117 Correct 5 ms 9684 KB Output is correct
118 Correct 5 ms 9684 KB Output is correct
119 Correct 6 ms 9812 KB Output is correct
120 Correct 8 ms 9940 KB Output is correct
121 Correct 251 ms 31724 KB Output is correct
122 Correct 427 ms 41788 KB Output is correct
123 Correct 407 ms 41776 KB Output is correct
124 Correct 5 ms 9684 KB Output is correct
125 Correct 6 ms 9684 KB Output is correct
126 Correct 5 ms 9684 KB Output is correct
127 Correct 557 ms 66036 KB Output is correct
128 Correct 634 ms 66168 KB Output is correct
129 Correct 591 ms 65752 KB Output is correct
130 Correct 9 ms 10064 KB Output is correct
131 Correct 10 ms 10572 KB Output is correct
132 Correct 300 ms 32640 KB Output is correct
133 Correct 427 ms 42176 KB Output is correct
134 Correct 633 ms 55680 KB Output is correct
135 Correct 654 ms 70912 KB Output is correct
136 Correct 542 ms 71064 KB Output is correct
137 Correct 633 ms 64268 KB Output is correct
138 Correct 732 ms 55788 KB Output is correct
139 Correct 608 ms 56808 KB Output is correct
140 Correct 7 ms 9684 KB Output is correct
141 Correct 70 ms 17144 KB Output is correct
142 Correct 22 ms 12028 KB Output is correct
143 Correct 83 ms 17740 KB Output is correct
144 Correct 133 ms 23700 KB Output is correct
145 Correct 255 ms 32920 KB Output is correct
146 Correct 371 ms 38848 KB Output is correct
147 Correct 438 ms 44648 KB Output is correct
148 Correct 653 ms 50552 KB Output is correct
149 Correct 700 ms 56228 KB Output is correct
150 Correct 708 ms 61592 KB Output is correct
151 Correct 706 ms 65980 KB Output is correct
152 Correct 11 ms 10156 KB Output is correct
153 Correct 11 ms 10672 KB Output is correct
154 Correct 270 ms 33672 KB Output is correct
155 Correct 539 ms 43892 KB Output is correct
156 Correct 645 ms 58244 KB Output is correct
157 Correct 5 ms 9728 KB Output is correct
158 Correct 5 ms 9684 KB Output is correct
159 Correct 5 ms 9684 KB Output is correct
160 Correct 5 ms 9684 KB Output is correct
161 Incorrect 722 ms 41864 KB Solution announced impossible, but it is possible.
162 Halted 0 ms 0 KB -