답안 #1068716

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1068716 2024-08-21T11:30:11 Z Boas 분수 공원 (IOI21_parks) C++17
70 / 100
3500 ms 90020 KB
#include "parks.h"

#include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef vector<signed> vi32;
typedef vector<bool> vb;
typedef vector<vi> vvi;
typedef set<int> si;
typedef pair<int, int> ii;
typedef tuple<int, int, int> iii;
typedef vector<ii> vii;
typedef set<iii> siii;
typedef set<ii> sii;
typedef vector<vii> vvii;
#define pb push_back
#define loop(x, i) for (int i = 0; i < x; i++)
#define ALL(x) begin(x), end(x)
#define sz(x) (int)x.size()

vii adj = {{-2, 0}, {2, 0}, {0, 2}, {0, -2}};

siii benchPoints; // neighbour count

void addNeighbour(int x, int y, int dif = 1)
{
    if (benchPoints.count({1, x, y}))
    {
        benchPoints.erase({1, x, y});
        if (dif == 1)
        {
            benchPoints.insert({2, x, y});
        }
    }
    else if (benchPoints.count({2, x, y}))
    {
        benchPoints.erase({2, x, y});
        benchPoints.insert({2 + dif, x, y});
    }
    else if (benchPoints.count({3, x, y}))
    {
        benchPoints.erase({3, x, y});
        if (dif == 1)
            throw;
        benchPoints.insert({2, x, y});
    }
    else if (dif == 1)
    {
        benchPoints.insert({1, x, y});
    }
}

int construct_roads(vi xs, vi ys)
{
    map<ii, int> fountains;
    map<ii, int> roads;
    // set<ii> gotBench;
    int n = sz(xs);
    loop(n, i)
    {
        fountains[{xs[i], ys[i]}] = i;
    }
    vb vis(n);
    vi u, v, a, b;
    a = b = vi(n - 1);
    int visCnt = 1;
    auto dfs = [&](auto &&self, int i) -> void
    {
        int x = xs[i], y = ys[i];
        for (const auto &[dx, dy] : adj)
        {
            ii pos = {x + dx, y + dy};
            if (fountains.count(pos))
            {
                int j = fountains[pos];
                if (vis[j])
                    continue;
                if (dx != 0)
                {
                    roads[{x + dx / 2, y}] = sz(u);
                    addNeighbour(x + dx / 2, y + 1);
                    addNeighbour(x + dx / 2, y - 1);
                }
                else
                {
                    roads[{x, y + dy / 2}] = sz(u);
                    addNeighbour(x + 1, y + dy / 2);
                    addNeighbour(x - 1, y + dy / 2);
                }
                u.pb(i);
                v.pb(j);
                vis[j] = 1;
                visCnt++;
                self(self, j);
            }
        }
    };
    vis[0] = 1;
    dfs(dfs, 0);
    if (visCnt != n)
        return 0;
    for (int benchesBuilt = 0; benchesBuilt < n - 1; benchesBuilt++)
    {
        auto [cnt, x, y] = *benchPoints.begin();
        benchPoints.erase(benchPoints.begin());
        ii loc;
        if (roads.count({x + 1, y}))
        {
            loc = {x + 1, y};
            addNeighbour(x + 2, y, -1);
        }
        else if (roads.count({x - 1, y}))
        {
            loc = {x - 1, y};
            addNeighbour(x - 2, y, -1);
        }
        else if (roads.count({x, y + 1}))
        {
            loc = {x, y + 1};
            addNeighbour(x, y + 2, -1);
        }
        else
        {
            loc = {x, y - 1};
            addNeighbour(x, y - 2, -1);
        }
        int ix = roads[loc];
        roads.erase(loc);
        a[ix] = x;
        b[ix] = y;
    }
    build(u, v, a, b);
    return 1;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 436 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 436 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 255 ms 43692 KB Output is correct
10 Correct 19 ms 4700 KB Output is correct
11 Correct 137 ms 24484 KB Output is correct
12 Correct 34 ms 7004 KB Output is correct
13 Correct 62 ms 15184 KB Output is correct
14 Correct 1 ms 600 KB Output is correct
15 Correct 2 ms 604 KB Output is correct
16 Correct 267 ms 37356 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 436 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 436 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 255 ms 43692 KB Output is correct
10 Correct 19 ms 4700 KB Output is correct
11 Correct 137 ms 24484 KB Output is correct
12 Correct 34 ms 7004 KB Output is correct
13 Correct 62 ms 15184 KB Output is correct
14 Correct 1 ms 600 KB Output is correct
15 Correct 2 ms 604 KB Output is correct
16 Correct 267 ms 37356 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 1 ms 432 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 692 ms 73512 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 2 ms 860 KB Output is correct
26 Correct 3 ms 860 KB Output is correct
27 Correct 2 ms 860 KB Output is correct
28 Correct 232 ms 30732 KB Output is correct
29 Correct 401 ms 42052 KB Output is correct
30 Correct 516 ms 60156 KB Output is correct
31 Correct 664 ms 70716 KB Output is correct
32 Correct 0 ms 344 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 0 ms 348 KB Output is correct
36 Correct 1 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 0 ms 348 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 0 ms 348 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 0 ms 348 KB Output is correct
43 Correct 2 ms 860 KB Output is correct
44 Correct 2 ms 860 KB Output is correct
45 Correct 250 ms 35048 KB Output is correct
46 Correct 380 ms 51880 KB Output is correct
47 Correct 396 ms 50744 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 436 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 436 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 255 ms 43692 KB Output is correct
10 Correct 19 ms 4700 KB Output is correct
11 Correct 137 ms 24484 KB Output is correct
12 Correct 34 ms 7004 KB Output is correct
13 Correct 62 ms 15184 KB Output is correct
14 Correct 1 ms 600 KB Output is correct
15 Correct 2 ms 604 KB Output is correct
16 Correct 267 ms 37356 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 1 ms 432 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 692 ms 73512 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 2 ms 860 KB Output is correct
26 Correct 3 ms 860 KB Output is correct
27 Correct 2 ms 860 KB Output is correct
28 Correct 232 ms 30732 KB Output is correct
29 Correct 401 ms 42052 KB Output is correct
30 Correct 516 ms 60156 KB Output is correct
31 Correct 664 ms 70716 KB Output is correct
32 Correct 0 ms 344 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 0 ms 348 KB Output is correct
36 Correct 1 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 0 ms 348 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 0 ms 348 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 0 ms 348 KB Output is correct
43 Correct 2 ms 860 KB Output is correct
44 Correct 2 ms 860 KB Output is correct
45 Correct 250 ms 35048 KB Output is correct
46 Correct 380 ms 51880 KB Output is correct
47 Correct 396 ms 50744 KB Output is correct
48 Correct 0 ms 348 KB Output is correct
49 Correct 0 ms 400 KB Output is correct
50 Correct 0 ms 348 KB Output is correct
51 Correct 0 ms 348 KB Output is correct
52 Correct 0 ms 348 KB Output is correct
53 Correct 0 ms 348 KB Output is correct
54 Correct 0 ms 348 KB Output is correct
55 Correct 653 ms 68012 KB Output is correct
56 Correct 1 ms 344 KB Output is correct
57 Correct 3 ms 860 KB Output is correct
58 Correct 12 ms 2648 KB Output is correct
59 Correct 6 ms 1884 KB Output is correct
60 Correct 300 ms 37696 KB Output is correct
61 Correct 408 ms 49948 KB Output is correct
62 Correct 542 ms 57404 KB Output is correct
63 Correct 680 ms 66992 KB Output is correct
64 Correct 0 ms 348 KB Output is correct
65 Correct 0 ms 348 KB Output is correct
66 Correct 0 ms 348 KB Output is correct
67 Correct 529 ms 80676 KB Output is correct
68 Correct 584 ms 81128 KB Output is correct
69 Correct 555 ms 84280 KB Output is correct
70 Correct 3 ms 1116 KB Output is correct
71 Correct 5 ms 1608 KB Output is correct
72 Correct 240 ms 30212 KB Output is correct
73 Correct 421 ms 49208 KB Output is correct
74 Correct 599 ms 60792 KB Output is correct
75 Correct 610 ms 75064 KB Output is correct
76 Correct 502 ms 89692 KB Output is correct
77 Correct 4 ms 1372 KB Output is correct
78 Correct 7 ms 2116 KB Output is correct
79 Correct 244 ms 33464 KB Output is correct
80 Correct 418 ms 51004 KB Output is correct
81 Correct 612 ms 68440 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 436 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 436 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 255 ms 43692 KB Output is correct
10 Correct 19 ms 4700 KB Output is correct
11 Correct 137 ms 24484 KB Output is correct
12 Correct 34 ms 7004 KB Output is correct
13 Correct 62 ms 15184 KB Output is correct
14 Correct 1 ms 600 KB Output is correct
15 Correct 2 ms 604 KB Output is correct
16 Correct 267 ms 37356 KB Output is correct
17 Correct 0 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 584 ms 77768 KB Output is correct
21 Correct 585 ms 71356 KB Output is correct
22 Correct 594 ms 67664 KB Output is correct
23 Correct 433 ms 67120 KB Output is correct
24 Correct 111 ms 19284 KB Output is correct
25 Correct 105 ms 19280 KB Output is correct
26 Correct 110 ms 19276 KB Output is correct
27 Correct 473 ms 58528 KB Output is correct
28 Correct 463 ms 58428 KB Output is correct
29 Correct 590 ms 58376 KB Output is correct
30 Correct 582 ms 58424 KB Output is correct
31 Correct 0 ms 348 KB Output is correct
32 Correct 30 ms 4700 KB Output is correct
33 Correct 43 ms 10064 KB Output is correct
34 Correct 498 ms 72652 KB Output is correct
35 Correct 10 ms 1932 KB Output is correct
36 Correct 33 ms 6836 KB Output is correct
37 Correct 62 ms 11856 KB Output is correct
38 Correct 191 ms 20048 KB Output is correct
39 Correct 312 ms 27200 KB Output is correct
40 Correct 395 ms 34908 KB Output is correct
41 Correct 483 ms 41872 KB Output is correct
42 Correct 600 ms 49840 KB Output is correct
43 Correct 1 ms 348 KB Output is correct
44 Correct 0 ms 348 KB Output is correct
45 Correct 0 ms 348 KB Output is correct
46 Correct 0 ms 344 KB Output is correct
47 Correct 0 ms 348 KB Output is correct
48 Correct 1 ms 348 KB Output is correct
49 Correct 0 ms 348 KB Output is correct
50 Correct 1 ms 344 KB Output is correct
51 Correct 0 ms 348 KB Output is correct
52 Correct 0 ms 348 KB Output is correct
53 Correct 0 ms 348 KB Output is correct
54 Correct 2 ms 904 KB Output is correct
55 Correct 2 ms 860 KB Output is correct
56 Correct 241 ms 35072 KB Output is correct
57 Correct 355 ms 51772 KB Output is correct
58 Correct 391 ms 50756 KB Output is correct
59 Correct 1 ms 348 KB Output is correct
60 Correct 1 ms 348 KB Output is correct
61 Correct 0 ms 348 KB Output is correct
62 Correct 537 ms 80508 KB Output is correct
63 Correct 584 ms 81468 KB Output is correct
64 Correct 605 ms 84280 KB Output is correct
65 Correct 4 ms 1112 KB Output is correct
66 Correct 5 ms 1624 KB Output is correct
67 Correct 258 ms 30408 KB Output is correct
68 Correct 419 ms 49212 KB Output is correct
69 Correct 571 ms 60724 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 436 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 436 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 255 ms 43692 KB Output is correct
10 Correct 19 ms 4700 KB Output is correct
11 Correct 137 ms 24484 KB Output is correct
12 Correct 34 ms 7004 KB Output is correct
13 Correct 62 ms 15184 KB Output is correct
14 Correct 1 ms 600 KB Output is correct
15 Correct 2 ms 604 KB Output is correct
16 Correct 267 ms 37356 KB Output is correct
17 Correct 568 ms 90020 KB Output is correct
18 Correct 566 ms 87096 KB Output is correct
19 Correct 569 ms 78000 KB Output is correct
20 Correct 683 ms 66604 KB Output is correct
21 Correct 513 ms 60268 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 78 ms 9152 KB Output is correct
24 Correct 23 ms 4444 KB Output is correct
25 Correct 52 ms 9544 KB Output is correct
26 Correct 83 ms 14496 KB Output is correct
27 Correct 299 ms 31992 KB Output is correct
28 Correct 378 ms 40104 KB Output is correct
29 Correct 468 ms 48188 KB Output is correct
30 Correct 551 ms 55796 KB Output is correct
31 Correct 668 ms 64052 KB Output is correct
32 Correct 708 ms 75180 KB Output is correct
33 Correct 535 ms 89660 KB Output is correct
34 Correct 5 ms 1372 KB Output is correct
35 Correct 8 ms 2200 KB Output is correct
36 Correct 282 ms 33348 KB Output is correct
37 Correct 458 ms 50980 KB Output is correct
38 Correct 632 ms 68272 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 436 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 436 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 255 ms 43692 KB Output is correct
10 Correct 19 ms 4700 KB Output is correct
11 Correct 137 ms 24484 KB Output is correct
12 Correct 34 ms 7004 KB Output is correct
13 Correct 62 ms 15184 KB Output is correct
14 Correct 1 ms 600 KB Output is correct
15 Correct 2 ms 604 KB Output is correct
16 Correct 267 ms 37356 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 1 ms 432 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 692 ms 73512 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 2 ms 860 KB Output is correct
26 Correct 3 ms 860 KB Output is correct
27 Correct 2 ms 860 KB Output is correct
28 Correct 232 ms 30732 KB Output is correct
29 Correct 401 ms 42052 KB Output is correct
30 Correct 516 ms 60156 KB Output is correct
31 Correct 664 ms 70716 KB Output is correct
32 Correct 0 ms 344 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 0 ms 348 KB Output is correct
36 Correct 1 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 0 ms 348 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 0 ms 348 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 0 ms 348 KB Output is correct
43 Correct 2 ms 860 KB Output is correct
44 Correct 2 ms 860 KB Output is correct
45 Correct 250 ms 35048 KB Output is correct
46 Correct 380 ms 51880 KB Output is correct
47 Correct 396 ms 50744 KB Output is correct
48 Correct 0 ms 348 KB Output is correct
49 Correct 0 ms 400 KB Output is correct
50 Correct 0 ms 348 KB Output is correct
51 Correct 0 ms 348 KB Output is correct
52 Correct 0 ms 348 KB Output is correct
53 Correct 0 ms 348 KB Output is correct
54 Correct 0 ms 348 KB Output is correct
55 Correct 653 ms 68012 KB Output is correct
56 Correct 1 ms 344 KB Output is correct
57 Correct 3 ms 860 KB Output is correct
58 Correct 12 ms 2648 KB Output is correct
59 Correct 6 ms 1884 KB Output is correct
60 Correct 300 ms 37696 KB Output is correct
61 Correct 408 ms 49948 KB Output is correct
62 Correct 542 ms 57404 KB Output is correct
63 Correct 680 ms 66992 KB Output is correct
64 Correct 0 ms 348 KB Output is correct
65 Correct 0 ms 348 KB Output is correct
66 Correct 0 ms 348 KB Output is correct
67 Correct 529 ms 80676 KB Output is correct
68 Correct 584 ms 81128 KB Output is correct
69 Correct 555 ms 84280 KB Output is correct
70 Correct 3 ms 1116 KB Output is correct
71 Correct 5 ms 1608 KB Output is correct
72 Correct 240 ms 30212 KB Output is correct
73 Correct 421 ms 49208 KB Output is correct
74 Correct 599 ms 60792 KB Output is correct
75 Correct 610 ms 75064 KB Output is correct
76 Correct 502 ms 89692 KB Output is correct
77 Correct 4 ms 1372 KB Output is correct
78 Correct 7 ms 2116 KB Output is correct
79 Correct 244 ms 33464 KB Output is correct
80 Correct 418 ms 51004 KB Output is correct
81 Correct 612 ms 68440 KB Output is correct
82 Correct 0 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 584 ms 77768 KB Output is correct
86 Correct 585 ms 71356 KB Output is correct
87 Correct 594 ms 67664 KB Output is correct
88 Correct 433 ms 67120 KB Output is correct
89 Correct 111 ms 19284 KB Output is correct
90 Correct 105 ms 19280 KB Output is correct
91 Correct 110 ms 19276 KB Output is correct
92 Correct 473 ms 58528 KB Output is correct
93 Correct 463 ms 58428 KB Output is correct
94 Correct 590 ms 58376 KB Output is correct
95 Correct 582 ms 58424 KB Output is correct
96 Correct 0 ms 348 KB Output is correct
97 Correct 30 ms 4700 KB Output is correct
98 Correct 43 ms 10064 KB Output is correct
99 Correct 498 ms 72652 KB Output is correct
100 Correct 10 ms 1932 KB Output is correct
101 Correct 33 ms 6836 KB Output is correct
102 Correct 62 ms 11856 KB Output is correct
103 Correct 191 ms 20048 KB Output is correct
104 Correct 312 ms 27200 KB Output is correct
105 Correct 395 ms 34908 KB Output is correct
106 Correct 483 ms 41872 KB Output is correct
107 Correct 600 ms 49840 KB Output is correct
108 Correct 1 ms 348 KB Output is correct
109 Correct 0 ms 348 KB Output is correct
110 Correct 0 ms 348 KB Output is correct
111 Correct 0 ms 344 KB Output is correct
112 Correct 0 ms 348 KB Output is correct
113 Correct 1 ms 348 KB Output is correct
114 Correct 0 ms 348 KB Output is correct
115 Correct 1 ms 344 KB Output is correct
116 Correct 0 ms 348 KB Output is correct
117 Correct 0 ms 348 KB Output is correct
118 Correct 0 ms 348 KB Output is correct
119 Correct 2 ms 904 KB Output is correct
120 Correct 2 ms 860 KB Output is correct
121 Correct 241 ms 35072 KB Output is correct
122 Correct 355 ms 51772 KB Output is correct
123 Correct 391 ms 50756 KB Output is correct
124 Correct 1 ms 348 KB Output is correct
125 Correct 1 ms 348 KB Output is correct
126 Correct 0 ms 348 KB Output is correct
127 Correct 537 ms 80508 KB Output is correct
128 Correct 584 ms 81468 KB Output is correct
129 Correct 605 ms 84280 KB Output is correct
130 Correct 4 ms 1112 KB Output is correct
131 Correct 5 ms 1624 KB Output is correct
132 Correct 258 ms 30408 KB Output is correct
133 Correct 419 ms 49212 KB Output is correct
134 Correct 571 ms 60724 KB Output is correct
135 Correct 568 ms 90020 KB Output is correct
136 Correct 566 ms 87096 KB Output is correct
137 Correct 569 ms 78000 KB Output is correct
138 Correct 683 ms 66604 KB Output is correct
139 Correct 513 ms 60268 KB Output is correct
140 Correct 0 ms 348 KB Output is correct
141 Correct 78 ms 9152 KB Output is correct
142 Correct 23 ms 4444 KB Output is correct
143 Correct 52 ms 9544 KB Output is correct
144 Correct 83 ms 14496 KB Output is correct
145 Correct 299 ms 31992 KB Output is correct
146 Correct 378 ms 40104 KB Output is correct
147 Correct 468 ms 48188 KB Output is correct
148 Correct 551 ms 55796 KB Output is correct
149 Correct 668 ms 64052 KB Output is correct
150 Correct 708 ms 75180 KB Output is correct
151 Correct 535 ms 89660 KB Output is correct
152 Correct 5 ms 1372 KB Output is correct
153 Correct 8 ms 2200 KB Output is correct
154 Correct 282 ms 33348 KB Output is correct
155 Correct 458 ms 50980 KB Output is correct
156 Correct 632 ms 68272 KB Output is correct
157 Correct 0 ms 344 KB Output is correct
158 Correct 1 ms 348 KB Output is correct
159 Correct 0 ms 348 KB Output is correct
160 Correct 0 ms 348 KB Output is correct
161 Correct 698 ms 65340 KB Output is correct
162 Correct 567 ms 68100 KB Output is correct
163 Correct 556 ms 59708 KB Output is correct
164 Correct 612 ms 58804 KB Output is correct
165 Correct 626 ms 74572 KB Output is correct
166 Correct 611 ms 76388 KB Output is correct
167 Execution timed out 3533 ms 12872 KB Time limit exceeded
168 Halted 0 ms 0 KB -