Submission #885004

# Submission time Handle Problem Language Result Execution time Memory
885004 2023-12-08T19:29:49 Z Alcabel Maze (JOI23_ho_t3) C++17
100 / 100
1790 ms 155220 KB
#pragma GCC optimize("O3", "Ofast", "unroll-loops")
// #pragma GCC target("avx", "avx2")
#include <iostream>
#include <vector>
#include <algorithm>
#include <utility>
using namespace std;

const int inf = 1e7;
const pair<int, int> deltas[4] = {{-1, 0}, {0, 1}, {1, 0}, {0, -1}};
vector<string> a;
vector<vector<int>> vis, dist;
int r, c, mini, minj, maxi, maxj, tt;
vector<pair<int, int>> q;

void dfs(int i, int j) {
    q.emplace_back(i, j);
    vis[i][j] = tt;
    for (const auto& [di, dj] : deltas) {
        int newi = i + di, newj = j + dj;
        if (newi >= mini && newi <= maxi && newj >= minj && newj <= maxj && vis[newi][newj] < tt && dist[newi][newj] >= dist[i][j]) {
            dist[newi][newj] = dist[i][j];
            dfs(newi, newj);
        }
    }
}

void solve() {
    int n;
    cin >> r >> c >> n;
    int sr, sc, gr, gc;
    cin >> sr >> sc >> gr >> gc;
    --sr, --sc, --gr, --gc;
    a.resize(r);
    for (int i = 0; i < r; ++i) {
        cin >> a[i];
    }
    vis.resize(r, vector<int>(c, -1));
    dist.resize(r, vector<int>(c, inf));
    vector<vector<int>> nxt(r, vector<int>(c, -1));
    vector<pair<int, int>> ext;
    dist[sr][sc] = 0;
    q.emplace_back(sr, sc);
    tt = -1;
    ext.reserve(r * c);
    q.reserve(r * c);
    while (dist[gr][gc] == inf) {
        ++tt;
        while (!q.empty()) {
            auto [i, j] = q.back();
            q.pop_back();
            if (vis[i][j] == tt) {
                continue;
            }
            vis[i][j] = tt;
            ext.emplace_back(i, j);
            if ((i - n <= gr && gr <= i + n && j - n + 1 <= gc && gc <= j + n - 1) || (i - n + 1 <= gr && gr <= i + n - 1 && j - n <= gc && gc <= j + n)) {
                dist[gr][gc] = min(dist[gr][gc], dist[i][j] + 1);
            }
            for (const auto& [di, dj] : deltas) {
                int newi = i + di, newj = j + dj;
                if (newi >= 0 && newi < r && newj >= 0 && newj < c && a[newi][newj] == '.' && dist[newi][newj] > dist[i][j]) {
                    dist[newi][newj] = dist[i][j];
                    q.emplace_back(newi, newj);
                }
            }
        }
        if (dist[gr][gc] != inf) {
            break;
        }
        for (int iter = 0; iter < 4; ++iter) {
            ++tt;
            sort(ext.begin(), ext.end());
            if (iter == 0) {
                // up
                int lastI = -1, start = -1;
                pair<int, int> segj = {0, -1};
                bool sameI;
                for (auto [i, j] : ext) {
                    sameI = (lastI == i);
                    if (lastI == i && segj.second + 1 == j) {
                        ++segj.second;
                    } else {
                        for (int k = segj.first; k <= segj.second; ++k) {
                            nxt[lastI][k] = segj.second + 1;
                        }
                        lastI = i, segj = {j, j};
                    }
                    mini = max(0, i - n), minj = max(0, j - n + 1);
                    maxi = min(r - 1, i - 1), maxj = min(c - 1, j + n - 1);
                    if (i - 1 >= 0) {
                        int newD = dist[i][j] + 1;
                        if (sameI) {
                            j = max(j, start);
                        }
                        start = maxj + 1;
                        --i;
                        if (j <= maxj && dist[i][j] == newD - 1) {
                            j = nxt[i][j];
                        }
                        if (j <= maxj && dist[i][j] > newD - 1) {
                            dist[i][j] = newD;
                            dfs(i, j);
                        }
                    }
                }
            } else if (iter == 1) {
                // left
                int lastJ = -1, start = -1;
                pair<int, int> segi = {0, -1};
                bool sameJ;
                for (auto [j, i] : ext) {
                    i = -i;
                    sameJ = (lastJ == j);
                    if (lastJ == j && segi.first - 1 == i) {
                        --segi.first;
                    } else {
                        for (int k = segi.first; k <= segi.second; ++k) {
                            nxt[k][lastJ] = segi.first - 1;
                        }
                        lastJ = j, segi = {i, i};
                    }
                    mini = max(0, i - n + 1), minj = max(0, j - n);
                    maxi = min(r - 1, i + n - 1), maxj = min(c - 1, j - 1);
                    if (j - 1 >= 0) {
                        int newD = dist[i][j] + 1;
                        if (sameJ) {
                            i = min(i, start);
                        }
                        start = mini - 1;
                        --j;
                        if (i >= mini && dist[i][j] == newD - 1) {
                            i = nxt[i][j];
                        }
                        if (i >= mini && dist[i][j] > newD - 1) {
                            dist[i][j] = newD;
                            dfs(i, j);
                        }
                    }
                }
            } else if (iter == 2) {
                // down
                int lastI = -1, start = -1;
                pair<int, int> segj = {0, -1};
                bool sameI;
                for (auto [i, j] : ext) {
                    i = -i, j = -j;
                    sameI = (lastI == i);
                    if (lastI == i && segj.first - 1 == j) {
                        --segj.first;
                    } else {
                        for (int k = segj.first; k <= segj.second; ++k) {
                            nxt[lastI][k] = segj.first - 1;
                        }
                        lastI = i, segj = {j, j};
                    }
                    mini = max(0, i + 1), minj = max(0, j - n + 1);
                    maxi = min(r - 1, i + n), maxj = min(c - 1, j + n - 1);
                    if (i + 1 < r) {
                        int newD = dist[i][j] + 1;
                        if (sameI) {
                            j = min(j, start);
                        }
                        start = minj - 1;
                        ++i;
                        if (j >= minj && dist[i][j] == newD - 1) {
                            j = nxt[i][j];
                        }
                        if (j >= minj && dist[i][j] > newD - 1) {
                            dist[i][j] = newD;
                            dfs(i, j);
                        }
                    }
                }
            } else {
                // right
                int lastJ = -1, start = -1;
                pair<int, int> segi = {0, -1};
                bool sameJ;
                for (auto [j, i] : ext) {
                    j = -j;
                    sameJ = (lastJ == j);
                    if (lastJ == j && segi.second + 1 == i) {
                        ++segi.second;
                    } else {
                        for (int k = segi.first; k <= segi.second; ++k) {
                            nxt[k][lastJ] = segi.second + 1;
                        }
                        lastJ = j, segi = {i, i};
                    }
                    mini = max(0, i - n + 1), minj = max(0, j + 1);
                    maxi = min(r - 1, i + n - 1), maxj = min(c - 1, j + n);
                    if (j + 1 < c) {
                        int newD = dist[i][j] + 1;
                        if (sameJ) {
                            i = max(i, start);
                        }
                        start = maxi + 1;
                        ++j;
                        if (i <= maxi && dist[i][j] == newD - 1) {
                            i = nxt[i][j];
                        }
                        if (i <= maxi && dist[i][j] > newD - 1) {
                            dist[i][j] = newD;
                            dfs(i, j);
                        }
                    }
                }
            }
            for (int i = 0; i < (int)ext.size(); ++i) {
                ext[i].first = -ext[i].first;
                swap(ext[i].first, ext[i].second);
            }
        }
        ext.clear();
    }
    cout << dist[gr][gc] << '\n';
}

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    int T = 1;
    cin >> T;
    while (T--) {
        solve();
        cerr << "-----------\n";
        cout << "-----------\n";
    }
#else
    int T = 1;
    // cin >> T;
    while (T--) {
        solve();
    }
#endif

    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 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 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 1 ms 344 KB Output is correct
18 Correct 0 ms 344 KB Output is correct
19 Correct 11 ms 1280 KB Output is correct
20 Correct 4 ms 1188 KB Output is correct
21 Correct 3 ms 1884 KB Output is correct
22 Correct 16 ms 1116 KB Output is correct
23 Correct 8 ms 1116 KB Output is correct
24 Correct 5 ms 1540 KB Output is correct
25 Correct 4 ms 1392 KB Output is correct
26 Correct 1 ms 1116 KB Output is correct
27 Correct 2 ms 1116 KB Output is correct
28 Correct 6 ms 1292 KB Output is correct
29 Correct 30 ms 2396 KB Output is correct
30 Correct 6 ms 1372 KB Output is correct
31 Correct 5 ms 4096 KB Output is correct
32 Correct 45 ms 2392 KB Output is correct
33 Correct 26 ms 2460 KB Output is correct
34 Correct 13 ms 2984 KB Output is correct
35 Correct 10 ms 2972 KB Output is correct
36 Correct 26 ms 2652 KB Output is correct
37 Correct 38 ms 2516 KB Output is correct
38 Correct 3 ms 2396 KB Output is correct
39 Correct 424 ms 19856 KB Output is correct
40 Correct 13 ms 2740 KB Output is correct
41 Correct 10 ms 3604 KB Output is correct
42 Correct 68 ms 3260 KB Output is correct
43 Correct 21 ms 3964 KB Output is correct
44 Correct 63 ms 10532 KB Output is correct
45 Correct 57 ms 11140 KB Output is correct
46 Correct 46 ms 38612 KB Output is correct
47 Correct 434 ms 20168 KB Output is correct
48 Correct 296 ms 19852 KB Output is correct
49 Correct 95 ms 25372 KB Output is correct
50 Correct 63 ms 25368 KB Output is correct
51 Correct 355 ms 22612 KB Output is correct
52 Correct 277 ms 20148 KB Output is correct
53 Correct 352 ms 19804 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 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 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 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 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 0 ms 348 KB Output is correct
26 Correct 1 ms 348 KB Output is correct
27 Correct 0 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 1 ms 348 KB Output is correct
30 Correct 0 ms 348 KB Output is correct
31 Correct 0 ms 348 KB Output is correct
32 Correct 1 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 600 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 1 ms 344 KB Output is correct
7 Correct 0 ms 360 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 344 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 1 ms 344 KB Output is correct
15 Correct 0 ms 428 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 0 ms 344 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 344 KB Output is correct
21 Correct 0 ms 344 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 1 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 2 ms 860 KB Output is correct
26 Correct 2 ms 1372 KB Output is correct
27 Correct 2 ms 1884 KB Output is correct
28 Correct 2 ms 1884 KB Output is correct
29 Correct 1 ms 1112 KB Output is correct
30 Correct 1 ms 1116 KB Output is correct
31 Correct 6 ms 1628 KB Output is correct
32 Correct 1 ms 1116 KB Output is correct
33 Correct 1 ms 1116 KB Output is correct
34 Correct 4 ms 2908 KB Output is correct
35 Correct 5 ms 4068 KB Output is correct
36 Correct 5 ms 4188 KB Output is correct
37 Correct 1 ms 2396 KB Output is correct
38 Correct 1 ms 2244 KB Output is correct
39 Correct 14 ms 8832 KB Output is correct
40 Correct 48 ms 26960 KB Output is correct
41 Correct 45 ms 37712 KB Output is correct
42 Correct 51 ms 37204 KB Output is correct
43 Correct 10 ms 19804 KB Output is correct
44 Correct 10 ms 19772 KB Output is correct
45 Correct 51 ms 28536 KB Output is correct
46 Correct 49 ms 31124 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 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 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 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 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 0 ms 348 KB Output is correct
26 Correct 1 ms 348 KB Output is correct
27 Correct 0 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 1 ms 348 KB Output is correct
30 Correct 0 ms 348 KB Output is correct
31 Correct 0 ms 348 KB Output is correct
32 Correct 1 ms 348 KB Output is correct
33 Correct 11 ms 1112 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 1 ms 348 KB Output is correct
36 Correct 2 ms 860 KB Output is correct
37 Correct 3 ms 1188 KB Output is correct
38 Correct 2 ms 1372 KB Output is correct
39 Correct 2 ms 2136 KB Output is correct
40 Correct 16 ms 1116 KB Output is correct
41 Correct 9 ms 1112 KB Output is correct
42 Correct 2 ms 1884 KB Output is correct
43 Correct 1 ms 1112 KB Output is correct
44 Correct 1 ms 1116 KB Output is correct
45 Correct 5 ms 1392 KB Output is correct
46 Correct 4 ms 1388 KB Output is correct
47 Correct 6 ms 1372 KB Output is correct
48 Correct 14 ms 1368 KB Output is correct
49 Correct 12 ms 1116 KB Output is correct
50 Correct 16 ms 1372 KB Output is correct
51 Correct 6 ms 1676 KB Output is correct
52 Correct 1 ms 1112 KB Output is correct
53 Correct 1 ms 1116 KB Output is correct
54 Correct 6 ms 1292 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 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 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 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 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 0 ms 348 KB Output is correct
26 Correct 1 ms 348 KB Output is correct
27 Correct 0 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 1 ms 348 KB Output is correct
30 Correct 0 ms 348 KB Output is correct
31 Correct 0 ms 348 KB Output is correct
32 Correct 1 ms 348 KB Output is correct
33 Correct 11 ms 1112 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 1 ms 348 KB Output is correct
36 Correct 2 ms 860 KB Output is correct
37 Correct 3 ms 1188 KB Output is correct
38 Correct 2 ms 1372 KB Output is correct
39 Correct 2 ms 2136 KB Output is correct
40 Correct 16 ms 1116 KB Output is correct
41 Correct 9 ms 1112 KB Output is correct
42 Correct 2 ms 1884 KB Output is correct
43 Correct 1 ms 1112 KB Output is correct
44 Correct 1 ms 1116 KB Output is correct
45 Correct 5 ms 1392 KB Output is correct
46 Correct 4 ms 1388 KB Output is correct
47 Correct 6 ms 1372 KB Output is correct
48 Correct 14 ms 1368 KB Output is correct
49 Correct 12 ms 1116 KB Output is correct
50 Correct 16 ms 1372 KB Output is correct
51 Correct 6 ms 1676 KB Output is correct
52 Correct 1 ms 1112 KB Output is correct
53 Correct 1 ms 1116 KB Output is correct
54 Correct 6 ms 1292 KB Output is correct
55 Correct 30 ms 2464 KB Output is correct
56 Correct 6 ms 1368 KB Output is correct
57 Correct 5 ms 2904 KB Output is correct
58 Correct 33 ms 2284 KB Output is correct
59 Correct 5 ms 4184 KB Output is correct
60 Correct 45 ms 2392 KB Output is correct
61 Correct 26 ms 2392 KB Output is correct
62 Correct 5 ms 4188 KB Output is correct
63 Correct 1 ms 2396 KB Output is correct
64 Correct 1 ms 2396 KB Output is correct
65 Correct 13 ms 2988 KB Output is correct
66 Correct 11 ms 2716 KB Output is correct
67 Correct 20 ms 2612 KB Output is correct
68 Correct 38 ms 2396 KB Output is correct
69 Correct 41 ms 2396 KB Output is correct
70 Correct 41 ms 2908 KB Output is correct
71 Correct 36 ms 3420 KB Output is correct
72 Correct 26 ms 2652 KB Output is correct
73 Correct 38 ms 2480 KB Output is correct
74 Correct 3 ms 2392 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 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 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 1 ms 344 KB Output is correct
18 Correct 0 ms 344 KB Output is correct
19 Correct 11 ms 1280 KB Output is correct
20 Correct 4 ms 1188 KB Output is correct
21 Correct 3 ms 1884 KB Output is correct
22 Correct 16 ms 1116 KB Output is correct
23 Correct 8 ms 1116 KB Output is correct
24 Correct 5 ms 1540 KB Output is correct
25 Correct 4 ms 1392 KB Output is correct
26 Correct 1 ms 1116 KB Output is correct
27 Correct 2 ms 1116 KB Output is correct
28 Correct 6 ms 1292 KB Output is correct
29 Correct 30 ms 2396 KB Output is correct
30 Correct 6 ms 1372 KB Output is correct
31 Correct 5 ms 4096 KB Output is correct
32 Correct 45 ms 2392 KB Output is correct
33 Correct 26 ms 2460 KB Output is correct
34 Correct 13 ms 2984 KB Output is correct
35 Correct 10 ms 2972 KB Output is correct
36 Correct 26 ms 2652 KB Output is correct
37 Correct 38 ms 2516 KB Output is correct
38 Correct 3 ms 2396 KB Output is correct
39 Correct 424 ms 19856 KB Output is correct
40 Correct 13 ms 2740 KB Output is correct
41 Correct 10 ms 3604 KB Output is correct
42 Correct 68 ms 3260 KB Output is correct
43 Correct 21 ms 3964 KB Output is correct
44 Correct 63 ms 10532 KB Output is correct
45 Correct 57 ms 11140 KB Output is correct
46 Correct 46 ms 38612 KB Output is correct
47 Correct 434 ms 20168 KB Output is correct
48 Correct 296 ms 19852 KB Output is correct
49 Correct 95 ms 25372 KB Output is correct
50 Correct 63 ms 25368 KB Output is correct
51 Correct 355 ms 22612 KB Output is correct
52 Correct 277 ms 20148 KB Output is correct
53 Correct 352 ms 19804 KB Output is correct
54 Correct 0 ms 348 KB Output is correct
55 Correct 0 ms 348 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 0 ms 348 KB Output is correct
58 Correct 1 ms 348 KB Output is correct
59 Correct 0 ms 348 KB Output is correct
60 Correct 0 ms 348 KB Output is correct
61 Correct 0 ms 348 KB Output is correct
62 Correct 0 ms 348 KB Output is correct
63 Correct 0 ms 348 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 0 ms 348 KB Output is correct
68 Correct 0 ms 348 KB Output is correct
69 Correct 0 ms 348 KB Output is correct
70 Correct 0 ms 348 KB Output is correct
71 Correct 0 ms 348 KB Output is correct
72 Correct 0 ms 348 KB Output is correct
73 Correct 0 ms 348 KB Output is correct
74 Correct 0 ms 348 KB Output is correct
75 Correct 0 ms 348 KB Output is correct
76 Correct 0 ms 348 KB Output is correct
77 Correct 0 ms 348 KB Output is correct
78 Correct 0 ms 348 KB Output is correct
79 Correct 1 ms 348 KB Output is correct
80 Correct 0 ms 348 KB Output is correct
81 Correct 0 ms 348 KB Output is correct
82 Correct 1 ms 348 KB Output is correct
83 Correct 0 ms 348 KB Output is correct
84 Correct 0 ms 348 KB Output is correct
85 Correct 1 ms 348 KB Output is correct
86 Correct 0 ms 600 KB Output is correct
87 Correct 0 ms 348 KB Output is correct
88 Correct 0 ms 348 KB Output is correct
89 Correct 0 ms 348 KB Output is correct
90 Correct 1 ms 344 KB Output is correct
91 Correct 1 ms 344 KB Output is correct
92 Correct 0 ms 360 KB Output is correct
93 Correct 1 ms 348 KB Output is correct
94 Correct 0 ms 348 KB Output is correct
95 Correct 0 ms 348 KB Output is correct
96 Correct 0 ms 344 KB Output is correct
97 Correct 0 ms 348 KB Output is correct
98 Correct 0 ms 348 KB Output is correct
99 Correct 1 ms 344 KB Output is correct
100 Correct 0 ms 428 KB Output is correct
101 Correct 0 ms 348 KB Output is correct
102 Correct 0 ms 344 KB Output is correct
103 Correct 0 ms 348 KB Output is correct
104 Correct 0 ms 348 KB Output is correct
105 Correct 0 ms 344 KB Output is correct
106 Correct 0 ms 344 KB Output is correct
107 Correct 0 ms 348 KB Output is correct
108 Correct 1 ms 348 KB Output is correct
109 Correct 0 ms 348 KB Output is correct
110 Correct 2 ms 860 KB Output is correct
111 Correct 2 ms 1372 KB Output is correct
112 Correct 2 ms 1884 KB Output is correct
113 Correct 2 ms 1884 KB Output is correct
114 Correct 1 ms 1112 KB Output is correct
115 Correct 1 ms 1116 KB Output is correct
116 Correct 6 ms 1628 KB Output is correct
117 Correct 1 ms 1116 KB Output is correct
118 Correct 1 ms 1116 KB Output is correct
119 Correct 4 ms 2908 KB Output is correct
120 Correct 5 ms 4068 KB Output is correct
121 Correct 5 ms 4188 KB Output is correct
122 Correct 1 ms 2396 KB Output is correct
123 Correct 1 ms 2244 KB Output is correct
124 Correct 14 ms 8832 KB Output is correct
125 Correct 48 ms 26960 KB Output is correct
126 Correct 45 ms 37712 KB Output is correct
127 Correct 51 ms 37204 KB Output is correct
128 Correct 10 ms 19804 KB Output is correct
129 Correct 10 ms 19772 KB Output is correct
130 Correct 51 ms 28536 KB Output is correct
131 Correct 49 ms 31124 KB Output is correct
132 Correct 11 ms 1112 KB Output is correct
133 Correct 0 ms 348 KB Output is correct
134 Correct 1 ms 348 KB Output is correct
135 Correct 2 ms 860 KB Output is correct
136 Correct 3 ms 1188 KB Output is correct
137 Correct 2 ms 1372 KB Output is correct
138 Correct 2 ms 2136 KB Output is correct
139 Correct 16 ms 1116 KB Output is correct
140 Correct 9 ms 1112 KB Output is correct
141 Correct 2 ms 1884 KB Output is correct
142 Correct 1 ms 1112 KB Output is correct
143 Correct 1 ms 1116 KB Output is correct
144 Correct 5 ms 1392 KB Output is correct
145 Correct 4 ms 1388 KB Output is correct
146 Correct 6 ms 1372 KB Output is correct
147 Correct 14 ms 1368 KB Output is correct
148 Correct 12 ms 1116 KB Output is correct
149 Correct 16 ms 1372 KB Output is correct
150 Correct 6 ms 1676 KB Output is correct
151 Correct 1 ms 1112 KB Output is correct
152 Correct 1 ms 1116 KB Output is correct
153 Correct 6 ms 1292 KB Output is correct
154 Correct 30 ms 2464 KB Output is correct
155 Correct 6 ms 1368 KB Output is correct
156 Correct 5 ms 2904 KB Output is correct
157 Correct 33 ms 2284 KB Output is correct
158 Correct 5 ms 4184 KB Output is correct
159 Correct 45 ms 2392 KB Output is correct
160 Correct 26 ms 2392 KB Output is correct
161 Correct 5 ms 4188 KB Output is correct
162 Correct 1 ms 2396 KB Output is correct
163 Correct 1 ms 2396 KB Output is correct
164 Correct 13 ms 2988 KB Output is correct
165 Correct 11 ms 2716 KB Output is correct
166 Correct 20 ms 2612 KB Output is correct
167 Correct 38 ms 2396 KB Output is correct
168 Correct 41 ms 2396 KB Output is correct
169 Correct 41 ms 2908 KB Output is correct
170 Correct 36 ms 3420 KB Output is correct
171 Correct 26 ms 2652 KB Output is correct
172 Correct 38 ms 2480 KB Output is correct
173 Correct 3 ms 2392 KB Output is correct
174 Correct 17 ms 2908 KB Output is correct
175 Correct 94 ms 4956 KB Output is correct
176 Correct 45 ms 11032 KB Output is correct
177 Correct 186 ms 13732 KB Output is correct
178 Correct 30 ms 17612 KB Output is correct
179 Correct 220 ms 20436 KB Output is correct
180 Correct 430 ms 22508 KB Output is correct
181 Correct 459 ms 22620 KB Output is correct
182 Correct 487 ms 26276 KB Output is correct
183 Correct 456 ms 24452 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 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 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 1 ms 344 KB Output is correct
18 Correct 0 ms 344 KB Output is correct
19 Correct 11 ms 1280 KB Output is correct
20 Correct 4 ms 1188 KB Output is correct
21 Correct 3 ms 1884 KB Output is correct
22 Correct 16 ms 1116 KB Output is correct
23 Correct 8 ms 1116 KB Output is correct
24 Correct 5 ms 1540 KB Output is correct
25 Correct 4 ms 1392 KB Output is correct
26 Correct 1 ms 1116 KB Output is correct
27 Correct 2 ms 1116 KB Output is correct
28 Correct 6 ms 1292 KB Output is correct
29 Correct 30 ms 2396 KB Output is correct
30 Correct 6 ms 1372 KB Output is correct
31 Correct 5 ms 4096 KB Output is correct
32 Correct 45 ms 2392 KB Output is correct
33 Correct 26 ms 2460 KB Output is correct
34 Correct 13 ms 2984 KB Output is correct
35 Correct 10 ms 2972 KB Output is correct
36 Correct 26 ms 2652 KB Output is correct
37 Correct 38 ms 2516 KB Output is correct
38 Correct 3 ms 2396 KB Output is correct
39 Correct 424 ms 19856 KB Output is correct
40 Correct 13 ms 2740 KB Output is correct
41 Correct 10 ms 3604 KB Output is correct
42 Correct 68 ms 3260 KB Output is correct
43 Correct 21 ms 3964 KB Output is correct
44 Correct 63 ms 10532 KB Output is correct
45 Correct 57 ms 11140 KB Output is correct
46 Correct 46 ms 38612 KB Output is correct
47 Correct 434 ms 20168 KB Output is correct
48 Correct 296 ms 19852 KB Output is correct
49 Correct 95 ms 25372 KB Output is correct
50 Correct 63 ms 25368 KB Output is correct
51 Correct 355 ms 22612 KB Output is correct
52 Correct 277 ms 20148 KB Output is correct
53 Correct 352 ms 19804 KB Output is correct
54 Correct 0 ms 348 KB Output is correct
55 Correct 0 ms 348 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 0 ms 348 KB Output is correct
58 Correct 1 ms 348 KB Output is correct
59 Correct 0 ms 348 KB Output is correct
60 Correct 0 ms 348 KB Output is correct
61 Correct 0 ms 348 KB Output is correct
62 Correct 0 ms 348 KB Output is correct
63 Correct 0 ms 348 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 0 ms 348 KB Output is correct
68 Correct 0 ms 348 KB Output is correct
69 Correct 0 ms 348 KB Output is correct
70 Correct 0 ms 348 KB Output is correct
71 Correct 0 ms 348 KB Output is correct
72 Correct 0 ms 348 KB Output is correct
73 Correct 0 ms 348 KB Output is correct
74 Correct 0 ms 348 KB Output is correct
75 Correct 0 ms 348 KB Output is correct
76 Correct 0 ms 348 KB Output is correct
77 Correct 0 ms 348 KB Output is correct
78 Correct 0 ms 348 KB Output is correct
79 Correct 1 ms 348 KB Output is correct
80 Correct 0 ms 348 KB Output is correct
81 Correct 0 ms 348 KB Output is correct
82 Correct 1 ms 348 KB Output is correct
83 Correct 0 ms 348 KB Output is correct
84 Correct 0 ms 348 KB Output is correct
85 Correct 1 ms 348 KB Output is correct
86 Correct 0 ms 600 KB Output is correct
87 Correct 0 ms 348 KB Output is correct
88 Correct 0 ms 348 KB Output is correct
89 Correct 0 ms 348 KB Output is correct
90 Correct 1 ms 344 KB Output is correct
91 Correct 1 ms 344 KB Output is correct
92 Correct 0 ms 360 KB Output is correct
93 Correct 1 ms 348 KB Output is correct
94 Correct 0 ms 348 KB Output is correct
95 Correct 0 ms 348 KB Output is correct
96 Correct 0 ms 344 KB Output is correct
97 Correct 0 ms 348 KB Output is correct
98 Correct 0 ms 348 KB Output is correct
99 Correct 1 ms 344 KB Output is correct
100 Correct 0 ms 428 KB Output is correct
101 Correct 0 ms 348 KB Output is correct
102 Correct 0 ms 344 KB Output is correct
103 Correct 0 ms 348 KB Output is correct
104 Correct 0 ms 348 KB Output is correct
105 Correct 0 ms 344 KB Output is correct
106 Correct 0 ms 344 KB Output is correct
107 Correct 0 ms 348 KB Output is correct
108 Correct 1 ms 348 KB Output is correct
109 Correct 0 ms 348 KB Output is correct
110 Correct 2 ms 860 KB Output is correct
111 Correct 2 ms 1372 KB Output is correct
112 Correct 2 ms 1884 KB Output is correct
113 Correct 2 ms 1884 KB Output is correct
114 Correct 1 ms 1112 KB Output is correct
115 Correct 1 ms 1116 KB Output is correct
116 Correct 6 ms 1628 KB Output is correct
117 Correct 1 ms 1116 KB Output is correct
118 Correct 1 ms 1116 KB Output is correct
119 Correct 4 ms 2908 KB Output is correct
120 Correct 5 ms 4068 KB Output is correct
121 Correct 5 ms 4188 KB Output is correct
122 Correct 1 ms 2396 KB Output is correct
123 Correct 1 ms 2244 KB Output is correct
124 Correct 14 ms 8832 KB Output is correct
125 Correct 48 ms 26960 KB Output is correct
126 Correct 45 ms 37712 KB Output is correct
127 Correct 51 ms 37204 KB Output is correct
128 Correct 10 ms 19804 KB Output is correct
129 Correct 10 ms 19772 KB Output is correct
130 Correct 51 ms 28536 KB Output is correct
131 Correct 49 ms 31124 KB Output is correct
132 Correct 11 ms 1112 KB Output is correct
133 Correct 0 ms 348 KB Output is correct
134 Correct 1 ms 348 KB Output is correct
135 Correct 2 ms 860 KB Output is correct
136 Correct 3 ms 1188 KB Output is correct
137 Correct 2 ms 1372 KB Output is correct
138 Correct 2 ms 2136 KB Output is correct
139 Correct 16 ms 1116 KB Output is correct
140 Correct 9 ms 1112 KB Output is correct
141 Correct 2 ms 1884 KB Output is correct
142 Correct 1 ms 1112 KB Output is correct
143 Correct 1 ms 1116 KB Output is correct
144 Correct 5 ms 1392 KB Output is correct
145 Correct 4 ms 1388 KB Output is correct
146 Correct 6 ms 1372 KB Output is correct
147 Correct 14 ms 1368 KB Output is correct
148 Correct 12 ms 1116 KB Output is correct
149 Correct 16 ms 1372 KB Output is correct
150 Correct 6 ms 1676 KB Output is correct
151 Correct 1 ms 1112 KB Output is correct
152 Correct 1 ms 1116 KB Output is correct
153 Correct 6 ms 1292 KB Output is correct
154 Correct 30 ms 2464 KB Output is correct
155 Correct 6 ms 1368 KB Output is correct
156 Correct 5 ms 2904 KB Output is correct
157 Correct 33 ms 2284 KB Output is correct
158 Correct 5 ms 4184 KB Output is correct
159 Correct 45 ms 2392 KB Output is correct
160 Correct 26 ms 2392 KB Output is correct
161 Correct 5 ms 4188 KB Output is correct
162 Correct 1 ms 2396 KB Output is correct
163 Correct 1 ms 2396 KB Output is correct
164 Correct 13 ms 2988 KB Output is correct
165 Correct 11 ms 2716 KB Output is correct
166 Correct 20 ms 2612 KB Output is correct
167 Correct 38 ms 2396 KB Output is correct
168 Correct 41 ms 2396 KB Output is correct
169 Correct 41 ms 2908 KB Output is correct
170 Correct 36 ms 3420 KB Output is correct
171 Correct 26 ms 2652 KB Output is correct
172 Correct 38 ms 2480 KB Output is correct
173 Correct 3 ms 2392 KB Output is correct
174 Correct 17 ms 2908 KB Output is correct
175 Correct 94 ms 4956 KB Output is correct
176 Correct 45 ms 11032 KB Output is correct
177 Correct 186 ms 13732 KB Output is correct
178 Correct 30 ms 17612 KB Output is correct
179 Correct 220 ms 20436 KB Output is correct
180 Correct 430 ms 22508 KB Output is correct
181 Correct 459 ms 22620 KB Output is correct
182 Correct 487 ms 26276 KB Output is correct
183 Correct 456 ms 24452 KB Output is correct
184 Correct 885 ms 41044 KB Output is correct
185 Correct 122 ms 21916 KB Output is correct
186 Correct 61 ms 36944 KB Output is correct
187 Correct 67 ms 31828 KB Output is correct
188 Correct 106 ms 74216 KB Output is correct
189 Correct 775 ms 41292 KB Output is correct
190 Correct 254 ms 39004 KB Output is correct
191 Correct 99 ms 74836 KB Output is correct
192 Correct 23 ms 38940 KB Output is correct
193 Correct 19 ms 39004 KB Output is correct
194 Correct 246 ms 50408 KB Output is correct
195 Correct 137 ms 50752 KB Output is correct
196 Correct 850 ms 41696 KB Output is correct
197 Correct 455 ms 41164 KB Output is correct
198 Correct 449 ms 43272 KB Output is correct
199 Correct 931 ms 48132 KB Output is correct
200 Correct 382 ms 41828 KB Output is correct
201 Correct 638 ms 41556 KB Output is correct
202 Correct 891 ms 39252 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 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 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 1 ms 344 KB Output is correct
18 Correct 0 ms 344 KB Output is correct
19 Correct 11 ms 1280 KB Output is correct
20 Correct 4 ms 1188 KB Output is correct
21 Correct 3 ms 1884 KB Output is correct
22 Correct 16 ms 1116 KB Output is correct
23 Correct 8 ms 1116 KB Output is correct
24 Correct 5 ms 1540 KB Output is correct
25 Correct 4 ms 1392 KB Output is correct
26 Correct 1 ms 1116 KB Output is correct
27 Correct 2 ms 1116 KB Output is correct
28 Correct 6 ms 1292 KB Output is correct
29 Correct 30 ms 2396 KB Output is correct
30 Correct 6 ms 1372 KB Output is correct
31 Correct 5 ms 4096 KB Output is correct
32 Correct 45 ms 2392 KB Output is correct
33 Correct 26 ms 2460 KB Output is correct
34 Correct 13 ms 2984 KB Output is correct
35 Correct 10 ms 2972 KB Output is correct
36 Correct 26 ms 2652 KB Output is correct
37 Correct 38 ms 2516 KB Output is correct
38 Correct 3 ms 2396 KB Output is correct
39 Correct 424 ms 19856 KB Output is correct
40 Correct 13 ms 2740 KB Output is correct
41 Correct 10 ms 3604 KB Output is correct
42 Correct 68 ms 3260 KB Output is correct
43 Correct 21 ms 3964 KB Output is correct
44 Correct 63 ms 10532 KB Output is correct
45 Correct 57 ms 11140 KB Output is correct
46 Correct 46 ms 38612 KB Output is correct
47 Correct 434 ms 20168 KB Output is correct
48 Correct 296 ms 19852 KB Output is correct
49 Correct 95 ms 25372 KB Output is correct
50 Correct 63 ms 25368 KB Output is correct
51 Correct 355 ms 22612 KB Output is correct
52 Correct 277 ms 20148 KB Output is correct
53 Correct 352 ms 19804 KB Output is correct
54 Correct 0 ms 348 KB Output is correct
55 Correct 0 ms 348 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 0 ms 348 KB Output is correct
58 Correct 1 ms 348 KB Output is correct
59 Correct 0 ms 348 KB Output is correct
60 Correct 0 ms 348 KB Output is correct
61 Correct 0 ms 348 KB Output is correct
62 Correct 0 ms 348 KB Output is correct
63 Correct 0 ms 348 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 0 ms 348 KB Output is correct
68 Correct 0 ms 348 KB Output is correct
69 Correct 0 ms 348 KB Output is correct
70 Correct 0 ms 348 KB Output is correct
71 Correct 0 ms 348 KB Output is correct
72 Correct 0 ms 348 KB Output is correct
73 Correct 0 ms 348 KB Output is correct
74 Correct 0 ms 348 KB Output is correct
75 Correct 0 ms 348 KB Output is correct
76 Correct 0 ms 348 KB Output is correct
77 Correct 0 ms 348 KB Output is correct
78 Correct 0 ms 348 KB Output is correct
79 Correct 1 ms 348 KB Output is correct
80 Correct 0 ms 348 KB Output is correct
81 Correct 0 ms 348 KB Output is correct
82 Correct 1 ms 348 KB Output is correct
83 Correct 0 ms 348 KB Output is correct
84 Correct 0 ms 348 KB Output is correct
85 Correct 1 ms 348 KB Output is correct
86 Correct 0 ms 600 KB Output is correct
87 Correct 0 ms 348 KB Output is correct
88 Correct 0 ms 348 KB Output is correct
89 Correct 0 ms 348 KB Output is correct
90 Correct 1 ms 344 KB Output is correct
91 Correct 1 ms 344 KB Output is correct
92 Correct 0 ms 360 KB Output is correct
93 Correct 1 ms 348 KB Output is correct
94 Correct 0 ms 348 KB Output is correct
95 Correct 0 ms 348 KB Output is correct
96 Correct 0 ms 344 KB Output is correct
97 Correct 0 ms 348 KB Output is correct
98 Correct 0 ms 348 KB Output is correct
99 Correct 1 ms 344 KB Output is correct
100 Correct 0 ms 428 KB Output is correct
101 Correct 0 ms 348 KB Output is correct
102 Correct 0 ms 344 KB Output is correct
103 Correct 0 ms 348 KB Output is correct
104 Correct 0 ms 348 KB Output is correct
105 Correct 0 ms 344 KB Output is correct
106 Correct 0 ms 344 KB Output is correct
107 Correct 0 ms 348 KB Output is correct
108 Correct 1 ms 348 KB Output is correct
109 Correct 0 ms 348 KB Output is correct
110 Correct 2 ms 860 KB Output is correct
111 Correct 2 ms 1372 KB Output is correct
112 Correct 2 ms 1884 KB Output is correct
113 Correct 2 ms 1884 KB Output is correct
114 Correct 1 ms 1112 KB Output is correct
115 Correct 1 ms 1116 KB Output is correct
116 Correct 6 ms 1628 KB Output is correct
117 Correct 1 ms 1116 KB Output is correct
118 Correct 1 ms 1116 KB Output is correct
119 Correct 4 ms 2908 KB Output is correct
120 Correct 5 ms 4068 KB Output is correct
121 Correct 5 ms 4188 KB Output is correct
122 Correct 1 ms 2396 KB Output is correct
123 Correct 1 ms 2244 KB Output is correct
124 Correct 14 ms 8832 KB Output is correct
125 Correct 48 ms 26960 KB Output is correct
126 Correct 45 ms 37712 KB Output is correct
127 Correct 51 ms 37204 KB Output is correct
128 Correct 10 ms 19804 KB Output is correct
129 Correct 10 ms 19772 KB Output is correct
130 Correct 51 ms 28536 KB Output is correct
131 Correct 49 ms 31124 KB Output is correct
132 Correct 11 ms 1112 KB Output is correct
133 Correct 0 ms 348 KB Output is correct
134 Correct 1 ms 348 KB Output is correct
135 Correct 2 ms 860 KB Output is correct
136 Correct 3 ms 1188 KB Output is correct
137 Correct 2 ms 1372 KB Output is correct
138 Correct 2 ms 2136 KB Output is correct
139 Correct 16 ms 1116 KB Output is correct
140 Correct 9 ms 1112 KB Output is correct
141 Correct 2 ms 1884 KB Output is correct
142 Correct 1 ms 1112 KB Output is correct
143 Correct 1 ms 1116 KB Output is correct
144 Correct 5 ms 1392 KB Output is correct
145 Correct 4 ms 1388 KB Output is correct
146 Correct 6 ms 1372 KB Output is correct
147 Correct 14 ms 1368 KB Output is correct
148 Correct 12 ms 1116 KB Output is correct
149 Correct 16 ms 1372 KB Output is correct
150 Correct 6 ms 1676 KB Output is correct
151 Correct 1 ms 1112 KB Output is correct
152 Correct 1 ms 1116 KB Output is correct
153 Correct 6 ms 1292 KB Output is correct
154 Correct 30 ms 2464 KB Output is correct
155 Correct 6 ms 1368 KB Output is correct
156 Correct 5 ms 2904 KB Output is correct
157 Correct 33 ms 2284 KB Output is correct
158 Correct 5 ms 4184 KB Output is correct
159 Correct 45 ms 2392 KB Output is correct
160 Correct 26 ms 2392 KB Output is correct
161 Correct 5 ms 4188 KB Output is correct
162 Correct 1 ms 2396 KB Output is correct
163 Correct 1 ms 2396 KB Output is correct
164 Correct 13 ms 2988 KB Output is correct
165 Correct 11 ms 2716 KB Output is correct
166 Correct 20 ms 2612 KB Output is correct
167 Correct 38 ms 2396 KB Output is correct
168 Correct 41 ms 2396 KB Output is correct
169 Correct 41 ms 2908 KB Output is correct
170 Correct 36 ms 3420 KB Output is correct
171 Correct 26 ms 2652 KB Output is correct
172 Correct 38 ms 2480 KB Output is correct
173 Correct 3 ms 2392 KB Output is correct
174 Correct 17 ms 2908 KB Output is correct
175 Correct 94 ms 4956 KB Output is correct
176 Correct 45 ms 11032 KB Output is correct
177 Correct 186 ms 13732 KB Output is correct
178 Correct 30 ms 17612 KB Output is correct
179 Correct 220 ms 20436 KB Output is correct
180 Correct 430 ms 22508 KB Output is correct
181 Correct 459 ms 22620 KB Output is correct
182 Correct 487 ms 26276 KB Output is correct
183 Correct 456 ms 24452 KB Output is correct
184 Correct 885 ms 41044 KB Output is correct
185 Correct 122 ms 21916 KB Output is correct
186 Correct 61 ms 36944 KB Output is correct
187 Correct 67 ms 31828 KB Output is correct
188 Correct 106 ms 74216 KB Output is correct
189 Correct 775 ms 41292 KB Output is correct
190 Correct 254 ms 39004 KB Output is correct
191 Correct 99 ms 74836 KB Output is correct
192 Correct 23 ms 38940 KB Output is correct
193 Correct 19 ms 39004 KB Output is correct
194 Correct 246 ms 50408 KB Output is correct
195 Correct 137 ms 50752 KB Output is correct
196 Correct 850 ms 41696 KB Output is correct
197 Correct 455 ms 41164 KB Output is correct
198 Correct 449 ms 43272 KB Output is correct
199 Correct 931 ms 48132 KB Output is correct
200 Correct 382 ms 41828 KB Output is correct
201 Correct 638 ms 41556 KB Output is correct
202 Correct 891 ms 39252 KB Output is correct
203 Correct 1616 ms 77648 KB Output is correct
204 Correct 883 ms 68660 KB Output is correct
205 Correct 1160 ms 50772 KB Output is correct
206 Correct 335 ms 80172 KB Output is correct
207 Correct 191 ms 151124 KB Output is correct
208 Correct 1512 ms 83864 KB Output is correct
209 Correct 1373 ms 83652 KB Output is correct
210 Correct 202 ms 155220 KB Output is correct
211 Correct 43 ms 83380 KB Output is correct
212 Correct 41 ms 83280 KB Output is correct
213 Correct 337 ms 107692 KB Output is correct
214 Correct 323 ms 107796 KB Output is correct
215 Correct 1596 ms 84392 KB Output is correct
216 Correct 1513 ms 87956 KB Output is correct
217 Correct 1790 ms 88928 KB Output is correct
218 Correct 1386 ms 97736 KB Output is correct
219 Correct 1269 ms 108996 KB Output is correct
220 Correct 138 ms 104456 KB Output is correct
221 Correct 200 ms 115444 KB Output is correct
222 Correct 197 ms 115916 KB Output is correct
223 Correct 1390 ms 85208 KB Output is correct
224 Correct 1421 ms 84432 KB Output is correct
225 Correct 776 ms 83912 KB Output is correct