Submission #1115454

# Submission time Handle Problem Language Result Execution time Memory
1115454 2024-11-20T13:13:48 Z _callmelucian Maze (JOI23_ho_t3) C++14
100 / 100
1944 ms 1451960 KB
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> pl;
typedef pair<int,int> pii;
typedef tuple<int,int,int> tpl;

#define all(a) a.begin(), a.end()
#define filter(a) a.erase(unique(all(a)), a.end())

const int dr[4] = {-1, 0, 1, 0};
const int dc[4] = {0, -1, 0, 1};

int n, m, k, stx, sty, enx, eny;
vector<vector<int>> toL, toR, toU, toD, dist;
vector<vector<bool>> vis;
vector<vector<char>> ch;
deque<pii> q;

struct DSU {
    vector<int> lab, lo, hi;
    DSU (int sz) : lab(sz + 1, -1), lo(sz + 1), hi(sz + 1) {}

    int get (int u) {
        if (lab[u] < 0) return u;
        return lab[u] = get(lab[u]);
    }

    void asgn (int u, int val) {
        assert(lab[u] < 0);
        lo[u] = hi[u] = val;
    }

    int getLo (int u) { return lo[get(u)]; }
    int getHi (int u) { return hi[get(u)]; }

    void unite (int a, int b) {
        a = get(a), b = get(b);
        if (a == b) return;
        if (-lab[a] < -lab[b]) swap(a, b);
        lab[a] += lab[b], lab[b] = a;
        lo[a] = min(lo[a], lo[b]), hi[a] = max(hi[a], hi[b]);
    }
};

vector<DSU> dsuCol, dsuRow;

bool ok (int i, int j) {
    if (i < 1 || j < 1 || i > n || j > m) return 0;
    return 1;
}

void removeCell (int i, int j, int d) {
//    cout << "remove cell " << i << " " << j << " " << d << "\n";
    if (vis[i][j]) return;
    if (ch[i][j] == '#') q.emplace_back(i, j), dist[i][j] = d + 1;
    else q.emplace_front(i, j), dist[i][j] = d;
    vis[i][j] = 1;

    if (ok(i, toL[i][j])) toR[i][toL[i][j]] = toR[i][j];
    if (ok(i, toR[i][j])) toL[i][toR[i][j]] = toL[i][j];
    if (ok(toU[i][j], j)) toD[toU[i][j]][j] = toD[i][j];
    if (ok(toD[i][j], j)) toU[toD[i][j]][j] = toU[i][j];

    dsuRow[i].asgn(j, j);
    if (j + 1 <= m && dsuRow[i].getHi(j + 1)) dsuRow[i].unite(j, j + 1);
    if (j - 1 >= 1 && dsuRow[i].getLo(j - 1)) dsuRow[i].unite(j - 1, j);

    dsuCol[j].asgn(i, i);
    if (i + 1 <= n && dsuCol[j].getHi(i + 1)) dsuCol[j].unite(i, i + 1);
    if (i - 1 >= 1 && dsuCol[j].getLo(i - 1)) dsuCol[j].unite(i - 1, i);
}

void transitionRow (int row, int initCol, int d) {
    int prv = dsuRow[row].getLo(initCol), nxt = dsuRow[row].getHi(initCol);
    for (int col = (!prv ? initCol : prv - 1); col >= max(1, initCol - k + 1); col = toL[row][col]) removeCell(row, col, d);
    for (int col = (!nxt ? initCol : nxt + 1); col <= min(m, initCol + k - 1); col = toR[row][col]) removeCell(row, col, d);
}

void transitionCol (int initRow, int col, int d) {
    int prv = dsuCol[col].getLo(initRow), nxt = dsuCol[col].getHi(initRow);
    for (int row = (!prv ? initRow : prv - 1); row >= max(1, initRow - k + 1); row = toU[row][col]) removeCell(row, col, d);
    for (int row = (!nxt ? initRow : nxt + 1); row <= min(n, initRow + k - 1); row = toD[row][col]) removeCell(row, col, d);
}

int distance (int i, int j, int x, int y) {
    return max(abs(i - x), abs(j - y));
}

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);

    // read input + initialization
    cin >> n >> m >> k;
    cin >> stx >> sty >> enx >> eny;

    ch = vector<vector<char>>(n + 1, vector<char>(m + 1));
    toL = toR = toU = toD = dist = vector<vector<int>>(n + 1, vector<int>(m + 1));
    vis = vector<vector<bool>>(n + 1, vector<bool>(m + 1));
    dsuCol = vector<DSU>(m + 1, DSU(n));
    dsuRow = vector<DSU>(n + 1, DSU(m));

    for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= m; j++) {
            cin >> ch[i][j];
            toL[i][j] = j - 1, toR[i][j] = j + 1;
            toU[i][j] = i - 1, toD[i][j] = i + 1;
        }
    }

    // setup BFS + run
    removeCell(stx, sty, 0);
    while (q.size()) {
        int i, j; tie(i, j) = q.front(); q.pop_front();
        if (ch[i][j] == '#' && distance(i, j, enx, eny) < k)
            return cout << dist[i][j], 0;
        if (i == enx && j == eny)
            return cout << dist[i][j], 0;

//        cout << "visiting " << i << " " << j << " " << dist[i][j] << "\n";

        if (ch[i][j] == '#') {
            if (1 <= i - k) transitionRow(i - k, j, dist[i][j]);
            if (i + k <= n) transitionRow(i + k, j, dist[i][j]);
            if (1 <= j - k) transitionCol(i, j - k, dist[i][j]);
            if (j + k <= m) transitionCol(i, j + k, dist[i][j]);
        }
        else {
            for (int it = 0; it < 4; it++) {
                int i2 = i + dr[it], j2 = j + dc[it];
                if (ok(i2, j2) && !vis[i2][j2]) removeCell(i2, j2, dist[i][j]);
            }
        }
    }

    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Correct 1 ms 336 KB Output is correct
4 Correct 1 ms 504 KB Output is correct
5 Correct 1 ms 336 KB Output is correct
6 Correct 1 ms 336 KB Output is correct
7 Correct 1 ms 592 KB Output is correct
8 Correct 1 ms 592 KB Output is correct
9 Correct 1 ms 336 KB Output is correct
10 Correct 1 ms 504 KB Output is correct
11 Correct 1 ms 336 KB Output is correct
12 Correct 1 ms 336 KB Output is correct
13 Correct 1 ms 336 KB Output is correct
14 Correct 1 ms 336 KB Output is correct
15 Correct 1 ms 504 KB Output is correct
16 Correct 1 ms 336 KB Output is correct
17 Correct 1 ms 336 KB Output is correct
18 Correct 1 ms 452 KB Output is correct
19 Correct 8 ms 3152 KB Output is correct
20 Correct 16 ms 11676 KB Output is correct
21 Correct 6 ms 3576 KB Output is correct
22 Correct 8 ms 3300 KB Output is correct
23 Correct 9 ms 3324 KB Output is correct
24 Correct 15 ms 14948 KB Output is correct
25 Correct 17 ms 14992 KB Output is correct
26 Correct 4 ms 3320 KB Output is correct
27 Correct 3 ms 3152 KB Output is correct
28 Correct 5 ms 3152 KB Output is correct
29 Correct 22 ms 7248 KB Output is correct
30 Correct 11 ms 8796 KB Output is correct
31 Correct 10 ms 7504 KB Output is correct
32 Correct 25 ms 7248 KB Output is correct
33 Correct 22 ms 7248 KB Output is correct
34 Correct 36 ms 36612 KB Output is correct
35 Correct 38 ms 36720 KB Output is correct
36 Correct 14 ms 7504 KB Output is correct
37 Correct 19 ms 7248 KB Output is correct
38 Correct 7 ms 7384 KB Output is correct
39 Correct 337 ms 68816 KB Output is correct
40 Correct 14 ms 9808 KB Output is correct
41 Correct 45 ms 44984 KB Output is correct
42 Correct 44 ms 10320 KB Output is correct
43 Correct 66 ms 33660 KB Output is correct
44 Correct 76 ms 56676 KB Output is correct
45 Correct 96 ms 60724 KB Output is correct
46 Correct 196 ms 75080 KB Output is correct
47 Correct 276 ms 68688 KB Output is correct
48 Correct 274 ms 68668 KB Output is correct
49 Correct 452 ms 363208 KB Output is correct
50 Correct 474 ms 363300 KB Output is correct
51 Correct 239 ms 69048 KB Output is correct
52 Correct 188 ms 68904 KB Output is correct
53 Correct 309 ms 68812 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Correct 1 ms 336 KB Output is correct
4 Correct 2 ms 336 KB Output is correct
5 Correct 1 ms 336 KB Output is correct
6 Correct 1 ms 336 KB Output is correct
7 Correct 1 ms 336 KB Output is correct
8 Correct 1 ms 504 KB Output is correct
9 Correct 1 ms 464 KB Output is correct
10 Correct 1 ms 336 KB Output is correct
11 Correct 1 ms 336 KB Output is correct
12 Correct 1 ms 336 KB Output is correct
13 Correct 1 ms 336 KB Output is correct
14 Correct 1 ms 336 KB Output is correct
15 Correct 2 ms 592 KB Output is correct
16 Correct 1 ms 592 KB Output is correct
17 Correct 1 ms 760 KB Output is correct
18 Correct 1 ms 336 KB Output is correct
19 Correct 1 ms 336 KB Output is correct
20 Correct 1 ms 336 KB Output is correct
21 Correct 1 ms 336 KB Output is correct
22 Correct 1 ms 504 KB Output is correct
23 Correct 1 ms 336 KB Output is correct
24 Correct 1 ms 336 KB Output is correct
25 Correct 1 ms 336 KB Output is correct
26 Correct 1 ms 336 KB Output is correct
27 Correct 1 ms 336 KB Output is correct
28 Correct 1 ms 336 KB Output is correct
29 Correct 2 ms 340 KB Output is correct
30 Correct 1 ms 336 KB Output is correct
31 Correct 2 ms 336 KB Output is correct
32 Correct 1 ms 336 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Correct 1 ms 336 KB Output is correct
4 Correct 1 ms 336 KB Output is correct
5 Correct 1 ms 336 KB Output is correct
6 Correct 1 ms 336 KB Output is correct
7 Correct 1 ms 336 KB Output is correct
8 Correct 1 ms 336 KB Output is correct
9 Correct 1 ms 336 KB Output is correct
10 Correct 1 ms 336 KB Output is correct
11 Correct 1 ms 336 KB Output is correct
12 Correct 1 ms 592 KB Output is correct
13 Correct 1 ms 336 KB Output is correct
14 Correct 1 ms 336 KB Output is correct
15 Correct 1 ms 336 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 1 ms 336 KB Output is correct
18 Correct 2 ms 336 KB Output is correct
19 Correct 1 ms 336 KB Output is correct
20 Correct 1 ms 336 KB Output is correct
21 Correct 1 ms 336 KB Output is correct
22 Correct 1 ms 336 KB Output is correct
23 Correct 1 ms 592 KB Output is correct
24 Correct 1 ms 460 KB Output is correct
25 Correct 4 ms 2128 KB Output is correct
26 Correct 5 ms 3152 KB Output is correct
27 Correct 7 ms 3408 KB Output is correct
28 Correct 4 ms 3300 KB Output is correct
29 Correct 3 ms 3152 KB Output is correct
30 Correct 4 ms 3152 KB Output is correct
31 Correct 5 ms 3152 KB Output is correct
32 Correct 4 ms 3320 KB Output is correct
33 Correct 4 ms 3152 KB Output is correct
34 Correct 12 ms 6224 KB Output is correct
35 Correct 13 ms 7456 KB Output is correct
36 Correct 14 ms 8016 KB Output is correct
37 Correct 7 ms 7260 KB Output is correct
38 Correct 7 ms 7248 KB Output is correct
39 Correct 45 ms 21596 KB Output is correct
40 Correct 120 ms 62792 KB Output is correct
41 Correct 187 ms 75080 KB Output is correct
42 Correct 194 ms 75088 KB Output is correct
43 Correct 63 ms 68680 KB Output is correct
44 Correct 62 ms 68692 KB Output is correct
45 Correct 114 ms 73032 KB Output is correct
46 Correct 122 ms 72520 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Correct 1 ms 336 KB Output is correct
4 Correct 2 ms 336 KB Output is correct
5 Correct 1 ms 336 KB Output is correct
6 Correct 1 ms 336 KB Output is correct
7 Correct 1 ms 336 KB Output is correct
8 Correct 1 ms 504 KB Output is correct
9 Correct 1 ms 464 KB Output is correct
10 Correct 1 ms 336 KB Output is correct
11 Correct 1 ms 336 KB Output is correct
12 Correct 1 ms 336 KB Output is correct
13 Correct 1 ms 336 KB Output is correct
14 Correct 1 ms 336 KB Output is correct
15 Correct 2 ms 592 KB Output is correct
16 Correct 1 ms 592 KB Output is correct
17 Correct 1 ms 760 KB Output is correct
18 Correct 1 ms 336 KB Output is correct
19 Correct 1 ms 336 KB Output is correct
20 Correct 1 ms 336 KB Output is correct
21 Correct 1 ms 336 KB Output is correct
22 Correct 1 ms 504 KB Output is correct
23 Correct 1 ms 336 KB Output is correct
24 Correct 1 ms 336 KB Output is correct
25 Correct 1 ms 336 KB Output is correct
26 Correct 1 ms 336 KB Output is correct
27 Correct 1 ms 336 KB Output is correct
28 Correct 1 ms 336 KB Output is correct
29 Correct 2 ms 340 KB Output is correct
30 Correct 1 ms 336 KB Output is correct
31 Correct 2 ms 336 KB Output is correct
32 Correct 1 ms 336 KB Output is correct
33 Correct 14 ms 3152 KB Output is correct
34 Correct 1 ms 336 KB Output is correct
35 Correct 2 ms 848 KB Output is correct
36 Correct 3 ms 2312 KB Output is correct
37 Correct 19 ms 11672 KB Output is correct
38 Correct 5 ms 3152 KB Output is correct
39 Correct 6 ms 3408 KB Output is correct
40 Correct 10 ms 3152 KB Output is correct
41 Correct 13 ms 3152 KB Output is correct
42 Correct 4 ms 3164 KB Output is correct
43 Correct 5 ms 3152 KB Output is correct
44 Correct 4 ms 3152 KB Output is correct
45 Correct 17 ms 14948 KB Output is correct
46 Correct 17 ms 14948 KB Output is correct
47 Correct 12 ms 8540 KB Output is correct
48 Correct 7 ms 3664 KB Output is correct
49 Correct 8 ms 3408 KB Output is correct
50 Correct 12 ms 3408 KB Output is correct
51 Correct 5 ms 3408 KB Output is correct
52 Correct 5 ms 3664 KB Output is correct
53 Correct 4 ms 3152 KB Output is correct
54 Correct 6 ms 3300 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Correct 1 ms 336 KB Output is correct
4 Correct 2 ms 336 KB Output is correct
5 Correct 1 ms 336 KB Output is correct
6 Correct 1 ms 336 KB Output is correct
7 Correct 1 ms 336 KB Output is correct
8 Correct 1 ms 504 KB Output is correct
9 Correct 1 ms 464 KB Output is correct
10 Correct 1 ms 336 KB Output is correct
11 Correct 1 ms 336 KB Output is correct
12 Correct 1 ms 336 KB Output is correct
13 Correct 1 ms 336 KB Output is correct
14 Correct 1 ms 336 KB Output is correct
15 Correct 2 ms 592 KB Output is correct
16 Correct 1 ms 592 KB Output is correct
17 Correct 1 ms 760 KB Output is correct
18 Correct 1 ms 336 KB Output is correct
19 Correct 1 ms 336 KB Output is correct
20 Correct 1 ms 336 KB Output is correct
21 Correct 1 ms 336 KB Output is correct
22 Correct 1 ms 504 KB Output is correct
23 Correct 1 ms 336 KB Output is correct
24 Correct 1 ms 336 KB Output is correct
25 Correct 1 ms 336 KB Output is correct
26 Correct 1 ms 336 KB Output is correct
27 Correct 1 ms 336 KB Output is correct
28 Correct 1 ms 336 KB Output is correct
29 Correct 2 ms 340 KB Output is correct
30 Correct 1 ms 336 KB Output is correct
31 Correct 2 ms 336 KB Output is correct
32 Correct 1 ms 336 KB Output is correct
33 Correct 14 ms 3152 KB Output is correct
34 Correct 1 ms 336 KB Output is correct
35 Correct 2 ms 848 KB Output is correct
36 Correct 3 ms 2312 KB Output is correct
37 Correct 19 ms 11672 KB Output is correct
38 Correct 5 ms 3152 KB Output is correct
39 Correct 6 ms 3408 KB Output is correct
40 Correct 10 ms 3152 KB Output is correct
41 Correct 13 ms 3152 KB Output is correct
42 Correct 4 ms 3164 KB Output is correct
43 Correct 5 ms 3152 KB Output is correct
44 Correct 4 ms 3152 KB Output is correct
45 Correct 17 ms 14948 KB Output is correct
46 Correct 17 ms 14948 KB Output is correct
47 Correct 12 ms 8540 KB Output is correct
48 Correct 7 ms 3664 KB Output is correct
49 Correct 8 ms 3408 KB Output is correct
50 Correct 12 ms 3408 KB Output is correct
51 Correct 5 ms 3408 KB Output is correct
52 Correct 5 ms 3664 KB Output is correct
53 Correct 4 ms 3152 KB Output is correct
54 Correct 6 ms 3300 KB Output is correct
55 Correct 25 ms 7460 KB Output is correct
56 Correct 12 ms 8952 KB Output is correct
57 Correct 17 ms 6224 KB Output is correct
58 Correct 21 ms 8016 KB Output is correct
59 Correct 10 ms 7504 KB Output is correct
60 Correct 26 ms 7248 KB Output is correct
61 Correct 21 ms 7248 KB Output is correct
62 Correct 18 ms 8016 KB Output is correct
63 Correct 8 ms 7248 KB Output is correct
64 Correct 7 ms 7248 KB Output is correct
65 Correct 38 ms 36720 KB Output is correct
66 Correct 49 ms 36696 KB Output is correct
67 Correct 35 ms 21032 KB Output is correct
68 Correct 18 ms 8312 KB Output is correct
69 Correct 20 ms 7760 KB Output is correct
70 Correct 19 ms 7540 KB Output is correct
71 Correct 17 ms 7504 KB Output is correct
72 Correct 15 ms 7504 KB Output is correct
73 Correct 24 ms 7428 KB Output is correct
74 Correct 11 ms 7248 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Correct 1 ms 336 KB Output is correct
4 Correct 1 ms 504 KB Output is correct
5 Correct 1 ms 336 KB Output is correct
6 Correct 1 ms 336 KB Output is correct
7 Correct 1 ms 592 KB Output is correct
8 Correct 1 ms 592 KB Output is correct
9 Correct 1 ms 336 KB Output is correct
10 Correct 1 ms 504 KB Output is correct
11 Correct 1 ms 336 KB Output is correct
12 Correct 1 ms 336 KB Output is correct
13 Correct 1 ms 336 KB Output is correct
14 Correct 1 ms 336 KB Output is correct
15 Correct 1 ms 504 KB Output is correct
16 Correct 1 ms 336 KB Output is correct
17 Correct 1 ms 336 KB Output is correct
18 Correct 1 ms 452 KB Output is correct
19 Correct 8 ms 3152 KB Output is correct
20 Correct 16 ms 11676 KB Output is correct
21 Correct 6 ms 3576 KB Output is correct
22 Correct 8 ms 3300 KB Output is correct
23 Correct 9 ms 3324 KB Output is correct
24 Correct 15 ms 14948 KB Output is correct
25 Correct 17 ms 14992 KB Output is correct
26 Correct 4 ms 3320 KB Output is correct
27 Correct 3 ms 3152 KB Output is correct
28 Correct 5 ms 3152 KB Output is correct
29 Correct 22 ms 7248 KB Output is correct
30 Correct 11 ms 8796 KB Output is correct
31 Correct 10 ms 7504 KB Output is correct
32 Correct 25 ms 7248 KB Output is correct
33 Correct 22 ms 7248 KB Output is correct
34 Correct 36 ms 36612 KB Output is correct
35 Correct 38 ms 36720 KB Output is correct
36 Correct 14 ms 7504 KB Output is correct
37 Correct 19 ms 7248 KB Output is correct
38 Correct 7 ms 7384 KB Output is correct
39 Correct 337 ms 68816 KB Output is correct
40 Correct 14 ms 9808 KB Output is correct
41 Correct 45 ms 44984 KB Output is correct
42 Correct 44 ms 10320 KB Output is correct
43 Correct 66 ms 33660 KB Output is correct
44 Correct 76 ms 56676 KB Output is correct
45 Correct 96 ms 60724 KB Output is correct
46 Correct 196 ms 75080 KB Output is correct
47 Correct 276 ms 68688 KB Output is correct
48 Correct 274 ms 68668 KB Output is correct
49 Correct 452 ms 363208 KB Output is correct
50 Correct 474 ms 363300 KB Output is correct
51 Correct 239 ms 69048 KB Output is correct
52 Correct 188 ms 68904 KB Output is correct
53 Correct 309 ms 68812 KB Output is correct
54 Correct 1 ms 336 KB Output is correct
55 Correct 1 ms 336 KB Output is correct
56 Correct 1 ms 336 KB Output is correct
57 Correct 2 ms 336 KB Output is correct
58 Correct 1 ms 336 KB Output is correct
59 Correct 1 ms 336 KB Output is correct
60 Correct 1 ms 336 KB Output is correct
61 Correct 1 ms 504 KB Output is correct
62 Correct 1 ms 464 KB Output is correct
63 Correct 1 ms 336 KB Output is correct
64 Correct 1 ms 336 KB Output is correct
65 Correct 1 ms 336 KB Output is correct
66 Correct 1 ms 336 KB Output is correct
67 Correct 1 ms 336 KB Output is correct
68 Correct 2 ms 592 KB Output is correct
69 Correct 1 ms 592 KB Output is correct
70 Correct 1 ms 760 KB Output is correct
71 Correct 1 ms 336 KB Output is correct
72 Correct 1 ms 336 KB Output is correct
73 Correct 1 ms 336 KB Output is correct
74 Correct 1 ms 336 KB Output is correct
75 Correct 1 ms 504 KB Output is correct
76 Correct 1 ms 336 KB Output is correct
77 Correct 1 ms 336 KB Output is correct
78 Correct 1 ms 336 KB Output is correct
79 Correct 1 ms 336 KB Output is correct
80 Correct 1 ms 336 KB Output is correct
81 Correct 1 ms 336 KB Output is correct
82 Correct 2 ms 340 KB Output is correct
83 Correct 1 ms 336 KB Output is correct
84 Correct 2 ms 336 KB Output is correct
85 Correct 1 ms 336 KB Output is correct
86 Correct 1 ms 336 KB Output is correct
87 Correct 1 ms 336 KB Output is correct
88 Correct 1 ms 336 KB Output is correct
89 Correct 1 ms 336 KB Output is correct
90 Correct 1 ms 336 KB Output is correct
91 Correct 1 ms 336 KB Output is correct
92 Correct 1 ms 336 KB Output is correct
93 Correct 1 ms 336 KB Output is correct
94 Correct 1 ms 336 KB Output is correct
95 Correct 1 ms 336 KB Output is correct
96 Correct 1 ms 336 KB Output is correct
97 Correct 1 ms 592 KB Output is correct
98 Correct 1 ms 336 KB Output is correct
99 Correct 1 ms 336 KB Output is correct
100 Correct 1 ms 336 KB Output is correct
101 Correct 1 ms 340 KB Output is correct
102 Correct 1 ms 336 KB Output is correct
103 Correct 2 ms 336 KB Output is correct
104 Correct 1 ms 336 KB Output is correct
105 Correct 1 ms 336 KB Output is correct
106 Correct 1 ms 336 KB Output is correct
107 Correct 1 ms 336 KB Output is correct
108 Correct 1 ms 592 KB Output is correct
109 Correct 1 ms 460 KB Output is correct
110 Correct 4 ms 2128 KB Output is correct
111 Correct 5 ms 3152 KB Output is correct
112 Correct 7 ms 3408 KB Output is correct
113 Correct 4 ms 3300 KB Output is correct
114 Correct 3 ms 3152 KB Output is correct
115 Correct 4 ms 3152 KB Output is correct
116 Correct 5 ms 3152 KB Output is correct
117 Correct 4 ms 3320 KB Output is correct
118 Correct 4 ms 3152 KB Output is correct
119 Correct 12 ms 6224 KB Output is correct
120 Correct 13 ms 7456 KB Output is correct
121 Correct 14 ms 8016 KB Output is correct
122 Correct 7 ms 7260 KB Output is correct
123 Correct 7 ms 7248 KB Output is correct
124 Correct 45 ms 21596 KB Output is correct
125 Correct 120 ms 62792 KB Output is correct
126 Correct 187 ms 75080 KB Output is correct
127 Correct 194 ms 75088 KB Output is correct
128 Correct 63 ms 68680 KB Output is correct
129 Correct 62 ms 68692 KB Output is correct
130 Correct 114 ms 73032 KB Output is correct
131 Correct 122 ms 72520 KB Output is correct
132 Correct 14 ms 3152 KB Output is correct
133 Correct 1 ms 336 KB Output is correct
134 Correct 2 ms 848 KB Output is correct
135 Correct 3 ms 2312 KB Output is correct
136 Correct 19 ms 11672 KB Output is correct
137 Correct 5 ms 3152 KB Output is correct
138 Correct 6 ms 3408 KB Output is correct
139 Correct 10 ms 3152 KB Output is correct
140 Correct 13 ms 3152 KB Output is correct
141 Correct 4 ms 3164 KB Output is correct
142 Correct 5 ms 3152 KB Output is correct
143 Correct 4 ms 3152 KB Output is correct
144 Correct 17 ms 14948 KB Output is correct
145 Correct 17 ms 14948 KB Output is correct
146 Correct 12 ms 8540 KB Output is correct
147 Correct 7 ms 3664 KB Output is correct
148 Correct 8 ms 3408 KB Output is correct
149 Correct 12 ms 3408 KB Output is correct
150 Correct 5 ms 3408 KB Output is correct
151 Correct 5 ms 3664 KB Output is correct
152 Correct 4 ms 3152 KB Output is correct
153 Correct 6 ms 3300 KB Output is correct
154 Correct 25 ms 7460 KB Output is correct
155 Correct 12 ms 8952 KB Output is correct
156 Correct 17 ms 6224 KB Output is correct
157 Correct 21 ms 8016 KB Output is correct
158 Correct 10 ms 7504 KB Output is correct
159 Correct 26 ms 7248 KB Output is correct
160 Correct 21 ms 7248 KB Output is correct
161 Correct 18 ms 8016 KB Output is correct
162 Correct 8 ms 7248 KB Output is correct
163 Correct 7 ms 7248 KB Output is correct
164 Correct 38 ms 36720 KB Output is correct
165 Correct 49 ms 36696 KB Output is correct
166 Correct 35 ms 21032 KB Output is correct
167 Correct 18 ms 8312 KB Output is correct
168 Correct 20 ms 7760 KB Output is correct
169 Correct 19 ms 7540 KB Output is correct
170 Correct 17 ms 7504 KB Output is correct
171 Correct 15 ms 7504 KB Output is correct
172 Correct 24 ms 7428 KB Output is correct
173 Correct 11 ms 7248 KB Output is correct
174 Correct 17 ms 11572 KB Output is correct
175 Correct 57 ms 16464 KB Output is correct
176 Correct 131 ms 78952 KB Output is correct
177 Correct 148 ms 54144 KB Output is correct
178 Correct 76 ms 65052 KB Output is correct
179 Correct 148 ms 73428 KB Output is correct
180 Correct 224 ms 71752 KB Output is correct
181 Correct 258 ms 70712 KB Output is correct
182 Correct 250 ms 69956 KB Output is correct
183 Correct 218 ms 73724 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Correct 1 ms 336 KB Output is correct
4 Correct 1 ms 504 KB Output is correct
5 Correct 1 ms 336 KB Output is correct
6 Correct 1 ms 336 KB Output is correct
7 Correct 1 ms 592 KB Output is correct
8 Correct 1 ms 592 KB Output is correct
9 Correct 1 ms 336 KB Output is correct
10 Correct 1 ms 504 KB Output is correct
11 Correct 1 ms 336 KB Output is correct
12 Correct 1 ms 336 KB Output is correct
13 Correct 1 ms 336 KB Output is correct
14 Correct 1 ms 336 KB Output is correct
15 Correct 1 ms 504 KB Output is correct
16 Correct 1 ms 336 KB Output is correct
17 Correct 1 ms 336 KB Output is correct
18 Correct 1 ms 452 KB Output is correct
19 Correct 8 ms 3152 KB Output is correct
20 Correct 16 ms 11676 KB Output is correct
21 Correct 6 ms 3576 KB Output is correct
22 Correct 8 ms 3300 KB Output is correct
23 Correct 9 ms 3324 KB Output is correct
24 Correct 15 ms 14948 KB Output is correct
25 Correct 17 ms 14992 KB Output is correct
26 Correct 4 ms 3320 KB Output is correct
27 Correct 3 ms 3152 KB Output is correct
28 Correct 5 ms 3152 KB Output is correct
29 Correct 22 ms 7248 KB Output is correct
30 Correct 11 ms 8796 KB Output is correct
31 Correct 10 ms 7504 KB Output is correct
32 Correct 25 ms 7248 KB Output is correct
33 Correct 22 ms 7248 KB Output is correct
34 Correct 36 ms 36612 KB Output is correct
35 Correct 38 ms 36720 KB Output is correct
36 Correct 14 ms 7504 KB Output is correct
37 Correct 19 ms 7248 KB Output is correct
38 Correct 7 ms 7384 KB Output is correct
39 Correct 337 ms 68816 KB Output is correct
40 Correct 14 ms 9808 KB Output is correct
41 Correct 45 ms 44984 KB Output is correct
42 Correct 44 ms 10320 KB Output is correct
43 Correct 66 ms 33660 KB Output is correct
44 Correct 76 ms 56676 KB Output is correct
45 Correct 96 ms 60724 KB Output is correct
46 Correct 196 ms 75080 KB Output is correct
47 Correct 276 ms 68688 KB Output is correct
48 Correct 274 ms 68668 KB Output is correct
49 Correct 452 ms 363208 KB Output is correct
50 Correct 474 ms 363300 KB Output is correct
51 Correct 239 ms 69048 KB Output is correct
52 Correct 188 ms 68904 KB Output is correct
53 Correct 309 ms 68812 KB Output is correct
54 Correct 1 ms 336 KB Output is correct
55 Correct 1 ms 336 KB Output is correct
56 Correct 1 ms 336 KB Output is correct
57 Correct 2 ms 336 KB Output is correct
58 Correct 1 ms 336 KB Output is correct
59 Correct 1 ms 336 KB Output is correct
60 Correct 1 ms 336 KB Output is correct
61 Correct 1 ms 504 KB Output is correct
62 Correct 1 ms 464 KB Output is correct
63 Correct 1 ms 336 KB Output is correct
64 Correct 1 ms 336 KB Output is correct
65 Correct 1 ms 336 KB Output is correct
66 Correct 1 ms 336 KB Output is correct
67 Correct 1 ms 336 KB Output is correct
68 Correct 2 ms 592 KB Output is correct
69 Correct 1 ms 592 KB Output is correct
70 Correct 1 ms 760 KB Output is correct
71 Correct 1 ms 336 KB Output is correct
72 Correct 1 ms 336 KB Output is correct
73 Correct 1 ms 336 KB Output is correct
74 Correct 1 ms 336 KB Output is correct
75 Correct 1 ms 504 KB Output is correct
76 Correct 1 ms 336 KB Output is correct
77 Correct 1 ms 336 KB Output is correct
78 Correct 1 ms 336 KB Output is correct
79 Correct 1 ms 336 KB Output is correct
80 Correct 1 ms 336 KB Output is correct
81 Correct 1 ms 336 KB Output is correct
82 Correct 2 ms 340 KB Output is correct
83 Correct 1 ms 336 KB Output is correct
84 Correct 2 ms 336 KB Output is correct
85 Correct 1 ms 336 KB Output is correct
86 Correct 1 ms 336 KB Output is correct
87 Correct 1 ms 336 KB Output is correct
88 Correct 1 ms 336 KB Output is correct
89 Correct 1 ms 336 KB Output is correct
90 Correct 1 ms 336 KB Output is correct
91 Correct 1 ms 336 KB Output is correct
92 Correct 1 ms 336 KB Output is correct
93 Correct 1 ms 336 KB Output is correct
94 Correct 1 ms 336 KB Output is correct
95 Correct 1 ms 336 KB Output is correct
96 Correct 1 ms 336 KB Output is correct
97 Correct 1 ms 592 KB Output is correct
98 Correct 1 ms 336 KB Output is correct
99 Correct 1 ms 336 KB Output is correct
100 Correct 1 ms 336 KB Output is correct
101 Correct 1 ms 340 KB Output is correct
102 Correct 1 ms 336 KB Output is correct
103 Correct 2 ms 336 KB Output is correct
104 Correct 1 ms 336 KB Output is correct
105 Correct 1 ms 336 KB Output is correct
106 Correct 1 ms 336 KB Output is correct
107 Correct 1 ms 336 KB Output is correct
108 Correct 1 ms 592 KB Output is correct
109 Correct 1 ms 460 KB Output is correct
110 Correct 4 ms 2128 KB Output is correct
111 Correct 5 ms 3152 KB Output is correct
112 Correct 7 ms 3408 KB Output is correct
113 Correct 4 ms 3300 KB Output is correct
114 Correct 3 ms 3152 KB Output is correct
115 Correct 4 ms 3152 KB Output is correct
116 Correct 5 ms 3152 KB Output is correct
117 Correct 4 ms 3320 KB Output is correct
118 Correct 4 ms 3152 KB Output is correct
119 Correct 12 ms 6224 KB Output is correct
120 Correct 13 ms 7456 KB Output is correct
121 Correct 14 ms 8016 KB Output is correct
122 Correct 7 ms 7260 KB Output is correct
123 Correct 7 ms 7248 KB Output is correct
124 Correct 45 ms 21596 KB Output is correct
125 Correct 120 ms 62792 KB Output is correct
126 Correct 187 ms 75080 KB Output is correct
127 Correct 194 ms 75088 KB Output is correct
128 Correct 63 ms 68680 KB Output is correct
129 Correct 62 ms 68692 KB Output is correct
130 Correct 114 ms 73032 KB Output is correct
131 Correct 122 ms 72520 KB Output is correct
132 Correct 14 ms 3152 KB Output is correct
133 Correct 1 ms 336 KB Output is correct
134 Correct 2 ms 848 KB Output is correct
135 Correct 3 ms 2312 KB Output is correct
136 Correct 19 ms 11672 KB Output is correct
137 Correct 5 ms 3152 KB Output is correct
138 Correct 6 ms 3408 KB Output is correct
139 Correct 10 ms 3152 KB Output is correct
140 Correct 13 ms 3152 KB Output is correct
141 Correct 4 ms 3164 KB Output is correct
142 Correct 5 ms 3152 KB Output is correct
143 Correct 4 ms 3152 KB Output is correct
144 Correct 17 ms 14948 KB Output is correct
145 Correct 17 ms 14948 KB Output is correct
146 Correct 12 ms 8540 KB Output is correct
147 Correct 7 ms 3664 KB Output is correct
148 Correct 8 ms 3408 KB Output is correct
149 Correct 12 ms 3408 KB Output is correct
150 Correct 5 ms 3408 KB Output is correct
151 Correct 5 ms 3664 KB Output is correct
152 Correct 4 ms 3152 KB Output is correct
153 Correct 6 ms 3300 KB Output is correct
154 Correct 25 ms 7460 KB Output is correct
155 Correct 12 ms 8952 KB Output is correct
156 Correct 17 ms 6224 KB Output is correct
157 Correct 21 ms 8016 KB Output is correct
158 Correct 10 ms 7504 KB Output is correct
159 Correct 26 ms 7248 KB Output is correct
160 Correct 21 ms 7248 KB Output is correct
161 Correct 18 ms 8016 KB Output is correct
162 Correct 8 ms 7248 KB Output is correct
163 Correct 7 ms 7248 KB Output is correct
164 Correct 38 ms 36720 KB Output is correct
165 Correct 49 ms 36696 KB Output is correct
166 Correct 35 ms 21032 KB Output is correct
167 Correct 18 ms 8312 KB Output is correct
168 Correct 20 ms 7760 KB Output is correct
169 Correct 19 ms 7540 KB Output is correct
170 Correct 17 ms 7504 KB Output is correct
171 Correct 15 ms 7504 KB Output is correct
172 Correct 24 ms 7428 KB Output is correct
173 Correct 11 ms 7248 KB Output is correct
174 Correct 17 ms 11572 KB Output is correct
175 Correct 57 ms 16464 KB Output is correct
176 Correct 131 ms 78952 KB Output is correct
177 Correct 148 ms 54144 KB Output is correct
178 Correct 76 ms 65052 KB Output is correct
179 Correct 148 ms 73428 KB Output is correct
180 Correct 224 ms 71752 KB Output is correct
181 Correct 258 ms 70712 KB Output is correct
182 Correct 250 ms 69956 KB Output is correct
183 Correct 218 ms 73724 KB Output is correct
184 Correct 686 ms 136776 KB Output is correct
185 Correct 122 ms 84104 KB Output is correct
186 Correct 184 ms 85064 KB Output is correct
187 Correct 116 ms 98184 KB Output is correct
188 Correct 316 ms 148184 KB Output is correct
189 Correct 403 ms 136776 KB Output is correct
190 Correct 261 ms 136776 KB Output is correct
191 Correct 380 ms 149360 KB Output is correct
192 Correct 134 ms 136776 KB Output is correct
193 Correct 132 ms 136776 KB Output is correct
194 Correct 948 ms 726188 KB Output is correct
195 Correct 867 ms 726216 KB Output is correct
196 Correct 491 ms 144248 KB Output is correct
197 Correct 279 ms 142788 KB Output is correct
198 Correct 332 ms 139336 KB Output is correct
199 Correct 524 ms 138312 KB Output is correct
200 Correct 311 ms 137044 KB Output is correct
201 Correct 371 ms 136776 KB Output is correct
202 Correct 655 ms 136780 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 336 KB Output is correct
2 Correct 1 ms 336 KB Output is correct
3 Correct 1 ms 336 KB Output is correct
4 Correct 1 ms 504 KB Output is correct
5 Correct 1 ms 336 KB Output is correct
6 Correct 1 ms 336 KB Output is correct
7 Correct 1 ms 592 KB Output is correct
8 Correct 1 ms 592 KB Output is correct
9 Correct 1 ms 336 KB Output is correct
10 Correct 1 ms 504 KB Output is correct
11 Correct 1 ms 336 KB Output is correct
12 Correct 1 ms 336 KB Output is correct
13 Correct 1 ms 336 KB Output is correct
14 Correct 1 ms 336 KB Output is correct
15 Correct 1 ms 504 KB Output is correct
16 Correct 1 ms 336 KB Output is correct
17 Correct 1 ms 336 KB Output is correct
18 Correct 1 ms 452 KB Output is correct
19 Correct 8 ms 3152 KB Output is correct
20 Correct 16 ms 11676 KB Output is correct
21 Correct 6 ms 3576 KB Output is correct
22 Correct 8 ms 3300 KB Output is correct
23 Correct 9 ms 3324 KB Output is correct
24 Correct 15 ms 14948 KB Output is correct
25 Correct 17 ms 14992 KB Output is correct
26 Correct 4 ms 3320 KB Output is correct
27 Correct 3 ms 3152 KB Output is correct
28 Correct 5 ms 3152 KB Output is correct
29 Correct 22 ms 7248 KB Output is correct
30 Correct 11 ms 8796 KB Output is correct
31 Correct 10 ms 7504 KB Output is correct
32 Correct 25 ms 7248 KB Output is correct
33 Correct 22 ms 7248 KB Output is correct
34 Correct 36 ms 36612 KB Output is correct
35 Correct 38 ms 36720 KB Output is correct
36 Correct 14 ms 7504 KB Output is correct
37 Correct 19 ms 7248 KB Output is correct
38 Correct 7 ms 7384 KB Output is correct
39 Correct 337 ms 68816 KB Output is correct
40 Correct 14 ms 9808 KB Output is correct
41 Correct 45 ms 44984 KB Output is correct
42 Correct 44 ms 10320 KB Output is correct
43 Correct 66 ms 33660 KB Output is correct
44 Correct 76 ms 56676 KB Output is correct
45 Correct 96 ms 60724 KB Output is correct
46 Correct 196 ms 75080 KB Output is correct
47 Correct 276 ms 68688 KB Output is correct
48 Correct 274 ms 68668 KB Output is correct
49 Correct 452 ms 363208 KB Output is correct
50 Correct 474 ms 363300 KB Output is correct
51 Correct 239 ms 69048 KB Output is correct
52 Correct 188 ms 68904 KB Output is correct
53 Correct 309 ms 68812 KB Output is correct
54 Correct 1 ms 336 KB Output is correct
55 Correct 1 ms 336 KB Output is correct
56 Correct 1 ms 336 KB Output is correct
57 Correct 2 ms 336 KB Output is correct
58 Correct 1 ms 336 KB Output is correct
59 Correct 1 ms 336 KB Output is correct
60 Correct 1 ms 336 KB Output is correct
61 Correct 1 ms 504 KB Output is correct
62 Correct 1 ms 464 KB Output is correct
63 Correct 1 ms 336 KB Output is correct
64 Correct 1 ms 336 KB Output is correct
65 Correct 1 ms 336 KB Output is correct
66 Correct 1 ms 336 KB Output is correct
67 Correct 1 ms 336 KB Output is correct
68 Correct 2 ms 592 KB Output is correct
69 Correct 1 ms 592 KB Output is correct
70 Correct 1 ms 760 KB Output is correct
71 Correct 1 ms 336 KB Output is correct
72 Correct 1 ms 336 KB Output is correct
73 Correct 1 ms 336 KB Output is correct
74 Correct 1 ms 336 KB Output is correct
75 Correct 1 ms 504 KB Output is correct
76 Correct 1 ms 336 KB Output is correct
77 Correct 1 ms 336 KB Output is correct
78 Correct 1 ms 336 KB Output is correct
79 Correct 1 ms 336 KB Output is correct
80 Correct 1 ms 336 KB Output is correct
81 Correct 1 ms 336 KB Output is correct
82 Correct 2 ms 340 KB Output is correct
83 Correct 1 ms 336 KB Output is correct
84 Correct 2 ms 336 KB Output is correct
85 Correct 1 ms 336 KB Output is correct
86 Correct 1 ms 336 KB Output is correct
87 Correct 1 ms 336 KB Output is correct
88 Correct 1 ms 336 KB Output is correct
89 Correct 1 ms 336 KB Output is correct
90 Correct 1 ms 336 KB Output is correct
91 Correct 1 ms 336 KB Output is correct
92 Correct 1 ms 336 KB Output is correct
93 Correct 1 ms 336 KB Output is correct
94 Correct 1 ms 336 KB Output is correct
95 Correct 1 ms 336 KB Output is correct
96 Correct 1 ms 336 KB Output is correct
97 Correct 1 ms 592 KB Output is correct
98 Correct 1 ms 336 KB Output is correct
99 Correct 1 ms 336 KB Output is correct
100 Correct 1 ms 336 KB Output is correct
101 Correct 1 ms 340 KB Output is correct
102 Correct 1 ms 336 KB Output is correct
103 Correct 2 ms 336 KB Output is correct
104 Correct 1 ms 336 KB Output is correct
105 Correct 1 ms 336 KB Output is correct
106 Correct 1 ms 336 KB Output is correct
107 Correct 1 ms 336 KB Output is correct
108 Correct 1 ms 592 KB Output is correct
109 Correct 1 ms 460 KB Output is correct
110 Correct 4 ms 2128 KB Output is correct
111 Correct 5 ms 3152 KB Output is correct
112 Correct 7 ms 3408 KB Output is correct
113 Correct 4 ms 3300 KB Output is correct
114 Correct 3 ms 3152 KB Output is correct
115 Correct 4 ms 3152 KB Output is correct
116 Correct 5 ms 3152 KB Output is correct
117 Correct 4 ms 3320 KB Output is correct
118 Correct 4 ms 3152 KB Output is correct
119 Correct 12 ms 6224 KB Output is correct
120 Correct 13 ms 7456 KB Output is correct
121 Correct 14 ms 8016 KB Output is correct
122 Correct 7 ms 7260 KB Output is correct
123 Correct 7 ms 7248 KB Output is correct
124 Correct 45 ms 21596 KB Output is correct
125 Correct 120 ms 62792 KB Output is correct
126 Correct 187 ms 75080 KB Output is correct
127 Correct 194 ms 75088 KB Output is correct
128 Correct 63 ms 68680 KB Output is correct
129 Correct 62 ms 68692 KB Output is correct
130 Correct 114 ms 73032 KB Output is correct
131 Correct 122 ms 72520 KB Output is correct
132 Correct 14 ms 3152 KB Output is correct
133 Correct 1 ms 336 KB Output is correct
134 Correct 2 ms 848 KB Output is correct
135 Correct 3 ms 2312 KB Output is correct
136 Correct 19 ms 11672 KB Output is correct
137 Correct 5 ms 3152 KB Output is correct
138 Correct 6 ms 3408 KB Output is correct
139 Correct 10 ms 3152 KB Output is correct
140 Correct 13 ms 3152 KB Output is correct
141 Correct 4 ms 3164 KB Output is correct
142 Correct 5 ms 3152 KB Output is correct
143 Correct 4 ms 3152 KB Output is correct
144 Correct 17 ms 14948 KB Output is correct
145 Correct 17 ms 14948 KB Output is correct
146 Correct 12 ms 8540 KB Output is correct
147 Correct 7 ms 3664 KB Output is correct
148 Correct 8 ms 3408 KB Output is correct
149 Correct 12 ms 3408 KB Output is correct
150 Correct 5 ms 3408 KB Output is correct
151 Correct 5 ms 3664 KB Output is correct
152 Correct 4 ms 3152 KB Output is correct
153 Correct 6 ms 3300 KB Output is correct
154 Correct 25 ms 7460 KB Output is correct
155 Correct 12 ms 8952 KB Output is correct
156 Correct 17 ms 6224 KB Output is correct
157 Correct 21 ms 8016 KB Output is correct
158 Correct 10 ms 7504 KB Output is correct
159 Correct 26 ms 7248 KB Output is correct
160 Correct 21 ms 7248 KB Output is correct
161 Correct 18 ms 8016 KB Output is correct
162 Correct 8 ms 7248 KB Output is correct
163 Correct 7 ms 7248 KB Output is correct
164 Correct 38 ms 36720 KB Output is correct
165 Correct 49 ms 36696 KB Output is correct
166 Correct 35 ms 21032 KB Output is correct
167 Correct 18 ms 8312 KB Output is correct
168 Correct 20 ms 7760 KB Output is correct
169 Correct 19 ms 7540 KB Output is correct
170 Correct 17 ms 7504 KB Output is correct
171 Correct 15 ms 7504 KB Output is correct
172 Correct 24 ms 7428 KB Output is correct
173 Correct 11 ms 7248 KB Output is correct
174 Correct 17 ms 11572 KB Output is correct
175 Correct 57 ms 16464 KB Output is correct
176 Correct 131 ms 78952 KB Output is correct
177 Correct 148 ms 54144 KB Output is correct
178 Correct 76 ms 65052 KB Output is correct
179 Correct 148 ms 73428 KB Output is correct
180 Correct 224 ms 71752 KB Output is correct
181 Correct 258 ms 70712 KB Output is correct
182 Correct 250 ms 69956 KB Output is correct
183 Correct 218 ms 73724 KB Output is correct
184 Correct 686 ms 136776 KB Output is correct
185 Correct 122 ms 84104 KB Output is correct
186 Correct 184 ms 85064 KB Output is correct
187 Correct 116 ms 98184 KB Output is correct
188 Correct 316 ms 148184 KB Output is correct
189 Correct 403 ms 136776 KB Output is correct
190 Correct 261 ms 136776 KB Output is correct
191 Correct 380 ms 149360 KB Output is correct
192 Correct 134 ms 136776 KB Output is correct
193 Correct 132 ms 136776 KB Output is correct
194 Correct 948 ms 726188 KB Output is correct
195 Correct 867 ms 726216 KB Output is correct
196 Correct 491 ms 144248 KB Output is correct
197 Correct 279 ms 142788 KB Output is correct
198 Correct 332 ms 139336 KB Output is correct
199 Correct 524 ms 138312 KB Output is correct
200 Correct 311 ms 137044 KB Output is correct
201 Correct 371 ms 136776 KB Output is correct
202 Correct 655 ms 136780 KB Output is correct
203 Correct 1434 ms 272200 KB Output is correct
204 Correct 455 ms 150232 KB Output is correct
205 Correct 599 ms 166984 KB Output is correct
206 Correct 412 ms 297168 KB Output is correct
207 Correct 733 ms 297356 KB Output is correct
208 Correct 846 ms 272456 KB Output is correct
209 Correct 1299 ms 272444 KB Output is correct
210 Correct 560 ms 287228 KB Output is correct
211 Correct 279 ms 272200 KB Output is correct
212 Correct 261 ms 272304 KB Output is correct
213 Correct 1939 ms 1451864 KB Output is correct
214 Correct 1944 ms 1451960 KB Output is correct
215 Correct 871 ms 285640 KB Output is correct
216 Correct 861 ms 282232 KB Output is correct
217 Correct 1111 ms 278836 KB Output is correct
218 Correct 911 ms 276100 KB Output is correct
219 Correct 784 ms 291224 KB Output is correct
220 Correct 463 ms 291328 KB Output is correct
221 Correct 661 ms 294264 KB Output is correct
222 Correct 929 ms 294252 KB Output is correct
223 Correct 866 ms 272892 KB Output is correct
224 Correct 922 ms 272712 KB Output is correct
225 Correct 679 ms 272508 KB Output is correct