답안 #769542

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
769542 2023-06-29T18:38:23 Z danikoynov Maze (JOI23_ho_t3) C++14
62 / 100
1172 ms 792984 KB
#include<bits/stdc++.h>
#define endl '\n'

using namespace std;
typedef long long ll;

void speed()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}

const int maxn = 6e6 + 10, block = sqrt(maxn) + 10;

struct cell
{
    int x, y;

    cell(int _x = 0, int _y = 0)
    {
        x = _x;
        y = _y;
    }

    cell add(const cell &r) const
    {
        cell d;
        d.x = x + r.x;
        d.y = y + r.y;
        return d;
    }
};

cell neib[4] = {{0, 1}, {1, 0}, {-1, 0}, {0, -1}};

int n, m, h;

vector < int > a[block], tr[block], tl[block];
vector < int > tu[block], td[block];
vector < int > ver_idx[block];

vector < pair < int, bool > > adj[3 * maxn];

int stx, sty, enx, eny;

int nxt;

int visit[3 * maxn], dist[3 * maxn];
int is_div[maxn];
void add_edges_row(int row, int i, int j, int ver)
{
    if (j - i + 1 == 2 * h - 1)
    {
        adj[ver].push_back({tr[row][i], 1});
        adj[ver].push_back({tl[row][j], 1});
    }
    else
    {
        if (i == 1)
            adj[ver].push_back({tl[row][j], 1});
        else
        {
            int to = i;
            if (!is_div[i])
                to = 2 * h - 1 - i % (2 * h - 1) + i;
            if (to >= j)
                adj[ver].push_back({tr[row][i], 1});
            else
            {
                adj[ver].push_back({tr[row][i], 1});
                adj[ver].push_back({tl[row][j], 1});
            }
        }
    }
}



void add_edges_col(int col, int i, int j, int ver)
{
    if (j - i + 1 == 2 * h - 1)
    {
        adj[ver].push_back({td[i][col], 1});
        adj[ver].push_back({tu[j][col], 1});
    }
    else
    {
        if (i == 1)
            adj[ver].push_back({tu[j][col], 1});
        else
        {
            int to = i;
            if (!is_div[i])
                to = 2 * h - 1 - i % (2 * h - 1) + i;
            if (to >= j)
                adj[ver].push_back({td[i][col], 1});
            else
            {
                adj[ver].push_back({td[i][col], 1});
                adj[ver].push_back({tu[j][col], 1});
            }
        }
    }
}

int type[5 * maxn];
pair < int, int > cor[5 * maxn];
void solve()
{
    cin >> n >> m >> h;
    cin >> stx >> sty;
    cin >> enx >> eny;
    for (int i = 0; i <= max(n, m); i ++)
    {
        if (i % (2 * h - 1) == 0)
            is_div[i] = 1;
    }
    for (int i = 1; i <= n; i ++)
    {
        a[i].resize(m + 2);
        tl[i].resize(m + 2);
        tr[i].resize(m + 2);
        td[i].resize(m + 2);
        tu[i].resize(m + 2);
        ver_idx[i].resize(m + 2);

        string s;
        cin >> s;
        char c;
        for (int j = 1; j <= m; j ++)
        {
            c = s[j - 1];
            if (c == '.')
                a[i][j] = 0;
            else
                a[i][j] = 1;
        }
    }

    int cnt = 0;
    nxt = n * m;
    for (int i = 1; i <= n; i ++)
    {
        for (int j = 1; j <= m; j ++)
        {
            ver_idx[i][j] = ++ cnt;
        }
    }

    for (int i = 1; i <= n; i ++)
    {
        for (int j = 1; j <= m; j ++)
        {
            tr[i][j] = ++ nxt;
            type[nxt] = 1;
            cor[nxt] = {i, j};
            tl[i][j] = ++ nxt;
            type[nxt] = 2;
            cor[nxt] = {i, j};
        }

    }

    for (int j = 1; j <= m; j ++)
    {
        for (int i = 1; i <= n; i ++)
        {
            tu[i][j] = ++ nxt;
            type[nxt] = 3;
            cor[nxt] = {i, j};
            td[i][j] = ++ nxt;
            type[nxt] = 4;
            cor[nxt] = {i, j};

        }

        for (int i = 1; i <= n; i ++)
        {
            if (!is_div[i] && i != n)
                adj[td[i][j]].push_back({td[i + 1][j], 0});
            adj[td[i][j]].push_back({ver_idx[i][j], 0});

            if (!is_div[i - 1])
                adj[tu[i][j]].push_back({tu[i - 1][j], 0});
            adj[tu[i][j]].push_back({ver_idx[i][j], 0});
        }
    }

    ///exit(0);
    for (int i = 1; i <= n; i ++)
        for (int j = 1; j <= m; j ++)
        {



            int st_row = max(1, i - h), en_row = min(n, i + h);
            int st_col = max(1, j - h), en_col = min(m, j + h);
            int fs_row = st_row, ds_row = en_row;
            if (fs_row == i - h)
                fs_row ++;
            if (ds_row == i + h)
                ds_row --;

            bool f1 = false, f2 = false;
            if (st_row == i - h)
            {
                if (st_col == j - h)
                    st_col ++, f1 = true;
                if (en_col == j + h)
                    en_col --, f2 = true;
            }
            add_edges_row(st_row, st_col, en_col, ver_idx[i][j]);
            if (st_row == i - h)
            {
                if (f1)
                    st_col --;
                if (f2)
                    en_col ++;
            }



            /// down row
            f1 = f2 = false;
            if (en_row == i + h)
            {
                if (st_col == j - h)
                    st_col ++, f1 = true;
                if (en_col == j + h)
                    en_col --, f2 = true;
            }
            ////cout << i << " " << j << " range " << st_col << " " << en_col << endl;
            ///add_edges(row_root[en_row], 1, m, st_col, en_col, ver_idx[i][j], 1);
            add_edges_row(en_row, st_col, en_col, ver_idx[i][j]);

            if (en_row == i + h)
            {
                if (f1)
                    st_col --;
                if (f2)
                    en_col ++;
            }


            /// left col
            f1 = f2 = false;
            if (st_col == j - h)
            {
                if (st_row == i - h)
                    st_row ++, f1 = true;
                if (en_row == i + h)
                    en_row --, f2 = true;
            }
            ///add_edges(col_root[st_col], 1, n, st_row, en_row, ver_idx[i][j], 1);
            add_edges_col(st_col, st_row, en_row, ver_idx[i][j]);
            if (st_col == j - h)
            {
                if (f1)
                    st_row --;
                if (f2)
                    en_row ++;
            }

            /// right col
            f1 = f2 = false;
            if (en_col == j + h)
            {
                if (st_row == i - h)
                    st_row ++, f1 = true;
                if (en_row == i + h)
                    en_row --, f2 = true;
            }
            ///cout << i << " " << j << " " << "range " << st_row << " " << en_row << " col " << en_col << endl;
            ///add_edges(col_root[en_col], 1, n, st_row, en_row, ver_idx[i][j], 1);
            add_edges_col(en_col, st_row, en_row, ver_idx[i][j]);
            if (en_col == j + h)
            {
                if (f1)
                    st_row --;
                if (f2)
                    en_row ++;
            }
            /**for (int row = st_row; row <= en_row; row ++)
            {
                if (row == i - h || row == i + h)
                {
                    st_col ++, en_col --;

                    add_edges(row_root[row], 1, m, st_col, en_col, ver_idx[i][j], 1);
                    st_col --, en_col ++;
                }
                else
                {
                    adj[ver_idx[cur.x][cur.y]].push_back({fict[row][cur.y], 1});
                }
            }*/

        }


    for (int i = 1; i <= nxt; i ++)
        dist[i] = 1e9;

    deque < int > dq;
    dq.push_back(ver_idx[stx][sty]);
    dist[ver_idx[stx][sty]] = 0;
    while(!dq.empty())
    {
        int cur = dq.front();
        dq.pop_front();
        if (cur == ver_idx[enx][eny])
        {
            cout << dist[cur] << endl;
            return;
        }
        if (cur <= n * m)
        {
            cell c(cur / m + 1, cur % m);
            if (cur % m == 0)
                c.x --, c.y = m;

            for (int i = 0; i < 4; i ++)
            {
                cell nb = neib[i].add(c);
                if (nb.x == 0 || nb.x == n + 1 || nb.y == 0 || nb.y == m + 1 || a[nb.x][nb.y] == 1)
                    continue;
                int u = ver_idx[nb.x][nb.y];
                int w = 0;
                if (dist[u] > dist[cur] + w)
                {
                    dist[u] = dist[cur] + w;
                    if (w == 0)
                        dq.push_front(u);
                    else
                        dq.push_back(u);
                }
            }
        }
        if (type[cur] == 1)
        {
            int x = cor[cur].first, y = cor[cur].second;
            if (y != m && !is_div[y])
            {
                if (dist[ver_idx[x][y + 1]] > dist[cur])
                {
                    dist[ver_idx[x][y + 1]] = dist[cur];
                    dq.push_front(ver_idx[x][y + 1]);
                }
            }
            if (dist[ver_idx[x][y]] > dist[cur])
            {
                dist[ver_idx[x][y]] = dist[cur];
                dq.push_front(ver_idx[x][y]);
            }
        }
        if (type[cur] == 2)
        {
            int x = cor[cur].first, y = cor[cur].second;
            if (!is_div[y - 1])
            {
                if (dist[ver_idx[x][y - 1]] > dist[cur])
                {
                    dist[ver_idx[x][y - 1]] = dist[cur];
                    dq.push_front(ver_idx[x][y - 1]);
                }
            }
            if (dist[ver_idx[x][y]] > dist[cur])
            {
                dist[ver_idx[x][y]] = dist[cur];
                dq.push_front(ver_idx[x][y]);
            }
        }

        if (type[cur] == 3)
        {
            int x = cor[cur].first, y = cor[cur].second;
            if (x != n && !is_div[x])
            {
                if (dist[ver_idx[x + 1][y]] > dist[cur])
                {
                    dist[ver_idx[x + 1][y]] = dist[cur];
                    dq.push_front(ver_idx[x + 1][y]);
                }
            }
            if (dist[ver_idx[x][y]] > dist[cur])
            {
                dist[ver_idx[x][y]] = dist[cur];
                dq.push_front(ver_idx[x][y]);
            }
        }
        if (type[cur] == 4)
        {
            int x = cor[cur].first, y = cor[cur].second;
            if (!is_div[x - 1])
            {
                if (dist[ver_idx[x - 1][y]] > dist[cur])
                {
                    dist[ver_idx[x - 1][y]] = dist[cur];
                    dq.push_front(ver_idx[x - 1][y]);
                }
            }
            if (dist[ver_idx[x][y]] > dist[cur])
            {
                dist[ver_idx[x][y]] = dist[cur];
                dq.push_front(ver_idx[x][y]);
            }
        }
        for (pair < int, int > nb : adj[cur])
        {
            int u = nb.first;
            int w = nb.second;
            if (dist[u] > dist[cur] + w)
            {
                dist[u] = dist[cur] + w;
                if (w == 0)
                    dq.push_front(u);
                else
                    dq.push_back(u);
            }
        }
    }
    /**for (int i = 1; i <= n; i ++, cout << endl)
        for (int j = 1; j <= m; j ++)
            cout << dist[ver_idx[i][j]] << " ";*/

    int ans = dist[ver_idx[enx][eny]];
    for (int i = 1; i <= n; i ++)
        for (int j = 1; j <= m; j ++)
        {
            if (abs(i - enx) <= h && abs(j - eny) <= h)
            {
                if (abs(i - enx) + abs(j - eny) != 2 * h)
                {
                    ans = min(ans, dist[ver_idx[i][j]] + 1);
                }
            }
        }
    cout << ans << endl;


}

int main()
{
    ///freopen("test.txt", "r", stdin);
    speed();
    solve();
    return 0;
}
/**
3 3 2
1 1
3 3
.#.
##.
...
*/
# 결과 실행 시간 메모리 Grader output
1 Correct 223 ms 423308 KB Output is correct
2 Correct 173 ms 423328 KB Output is correct
3 Correct 181 ms 423500 KB Output is correct
4 Correct 179 ms 423760 KB Output is correct
5 Correct 176 ms 423496 KB Output is correct
6 Correct 175 ms 423564 KB Output is correct
7 Correct 177 ms 423572 KB Output is correct
8 Correct 172 ms 423508 KB Output is correct
9 Correct 173 ms 423288 KB Output is correct
10 Correct 176 ms 423288 KB Output is correct
11 Correct 180 ms 423356 KB Output is correct
12 Correct 193 ms 423260 KB Output is correct
13 Correct 182 ms 423408 KB Output is correct
14 Correct 177 ms 423500 KB Output is correct
15 Correct 174 ms 423276 KB Output is correct
16 Correct 191 ms 423572 KB Output is correct
17 Correct 172 ms 423620 KB Output is correct
18 Correct 174 ms 423692 KB Output is correct
19 Correct 200 ms 437236 KB Output is correct
20 Correct 190 ms 434248 KB Output is correct
21 Correct 193 ms 437196 KB Output is correct
22 Correct 201 ms 437260 KB Output is correct
23 Correct 207 ms 437244 KB Output is correct
24 Correct 194 ms 437456 KB Output is correct
25 Correct 193 ms 437504 KB Output is correct
26 Correct 193 ms 437324 KB Output is correct
27 Correct 204 ms 437204 KB Output is correct
28 Correct 284 ms 437244 KB Output is correct
29 Correct 254 ms 458028 KB Output is correct
30 Correct 204 ms 437644 KB Output is correct
31 Correct 221 ms 458292 KB Output is correct
32 Correct 250 ms 458032 KB Output is correct
33 Correct 256 ms 458108 KB Output is correct
34 Correct 225 ms 458632 KB Output is correct
35 Correct 221 ms 458564 KB Output is correct
36 Correct 245 ms 458268 KB Output is correct
37 Correct 245 ms 458104 KB Output is correct
38 Correct 223 ms 457968 KB Output is correct
39 Correct 1172 ms 769900 KB Output is correct
40 Correct 235 ms 462672 KB Output is correct
41 Correct 233 ms 466700 KB Output is correct
42 Correct 292 ms 473040 KB Output is correct
43 Correct 260 ms 479844 KB Output is correct
44 Correct 414 ms 595464 KB Output is correct
45 Correct 450 ms 609128 KB Output is correct
46 Correct 982 ms 792932 KB Output is correct
47 Correct 1018 ms 769928 KB Output is correct
48 Correct 1081 ms 769992 KB Output is correct
49 Correct 638 ms 775548 KB Output is correct
50 Correct 637 ms 775652 KB Output is correct
51 Correct 1020 ms 770768 KB Output is correct
52 Correct 940 ms 770240 KB Output is correct
53 Correct 1161 ms 769944 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 187 ms 423380 KB Output is correct
2 Correct 195 ms 423272 KB Output is correct
3 Correct 195 ms 423360 KB Output is correct
4 Correct 178 ms 423308 KB Output is correct
5 Correct 193 ms 423500 KB Output is correct
6 Correct 186 ms 423364 KB Output is correct
7 Correct 179 ms 423312 KB Output is correct
8 Correct 197 ms 423444 KB Output is correct
9 Correct 181 ms 423612 KB Output is correct
10 Correct 183 ms 423672 KB Output is correct
11 Correct 178 ms 423496 KB Output is correct
12 Correct 179 ms 423476 KB Output is correct
13 Correct 180 ms 423632 KB Output is correct
14 Correct 176 ms 423568 KB Output is correct
15 Correct 182 ms 423500 KB Output is correct
16 Correct 179 ms 423576 KB Output is correct
17 Correct 200 ms 423612 KB Output is correct
18 Correct 203 ms 423376 KB Output is correct
19 Correct 180 ms 423516 KB Output is correct
20 Correct 194 ms 423324 KB Output is correct
21 Correct 190 ms 423380 KB Output is correct
22 Correct 178 ms 423532 KB Output is correct
23 Correct 203 ms 423392 KB Output is correct
24 Correct 184 ms 423388 KB Output is correct
25 Correct 180 ms 423360 KB Output is correct
26 Correct 181 ms 423400 KB Output is correct
27 Correct 177 ms 423408 KB Output is correct
28 Correct 177 ms 423556 KB Output is correct
29 Correct 177 ms 423384 KB Output is correct
30 Correct 176 ms 423612 KB Output is correct
31 Correct 200 ms 423500 KB Output is correct
32 Correct 177 ms 423540 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 192 ms 423280 KB Output is correct
2 Correct 186 ms 423264 KB Output is correct
3 Correct 177 ms 423372 KB Output is correct
4 Correct 177 ms 423300 KB Output is correct
5 Correct 185 ms 423368 KB Output is correct
6 Correct 178 ms 423288 KB Output is correct
7 Correct 180 ms 423628 KB Output is correct
8 Correct 178 ms 423500 KB Output is correct
9 Correct 182 ms 423656 KB Output is correct
10 Correct 175 ms 423500 KB Output is correct
11 Correct 179 ms 423588 KB Output is correct
12 Correct 182 ms 423504 KB Output is correct
13 Correct 184 ms 423308 KB Output is correct
14 Correct 176 ms 423504 KB Output is correct
15 Correct 176 ms 423276 KB Output is correct
16 Correct 181 ms 423512 KB Output is correct
17 Correct 176 ms 423420 KB Output is correct
18 Correct 177 ms 423356 KB Output is correct
19 Correct 183 ms 423500 KB Output is correct
20 Correct 176 ms 423284 KB Output is correct
21 Correct 177 ms 423472 KB Output is correct
22 Correct 201 ms 423620 KB Output is correct
23 Correct 179 ms 423612 KB Output is correct
24 Correct 178 ms 423856 KB Output is correct
25 Correct 193 ms 432100 KB Output is correct
26 Correct 200 ms 436500 KB Output is correct
27 Correct 195 ms 437256 KB Output is correct
28 Correct 210 ms 435364 KB Output is correct
29 Correct 194 ms 435352 KB Output is correct
30 Correct 195 ms 435368 KB Output is correct
31 Correct 199 ms 436968 KB Output is correct
32 Correct 197 ms 437296 KB Output is correct
33 Correct 198 ms 437268 KB Output is correct
34 Correct 224 ms 452120 KB Output is correct
35 Correct 223 ms 458236 KB Output is correct
36 Correct 223 ms 453540 KB Output is correct
37 Correct 220 ms 453276 KB Output is correct
38 Correct 219 ms 453332 KB Output is correct
39 Correct 348 ms 525804 KB Output is correct
40 Correct 590 ms 717240 KB Output is correct
41 Correct 979 ms 792984 KB Output is correct
42 Correct 757 ms 725456 KB Output is correct
43 Correct 654 ms 722936 KB Output is correct
44 Correct 661 ms 722896 KB Output is correct
45 Correct 701 ms 770380 KB Output is correct
46 Correct 732 ms 769604 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 187 ms 423380 KB Output is correct
2 Correct 195 ms 423272 KB Output is correct
3 Correct 195 ms 423360 KB Output is correct
4 Correct 178 ms 423308 KB Output is correct
5 Correct 193 ms 423500 KB Output is correct
6 Correct 186 ms 423364 KB Output is correct
7 Correct 179 ms 423312 KB Output is correct
8 Correct 197 ms 423444 KB Output is correct
9 Correct 181 ms 423612 KB Output is correct
10 Correct 183 ms 423672 KB Output is correct
11 Correct 178 ms 423496 KB Output is correct
12 Correct 179 ms 423476 KB Output is correct
13 Correct 180 ms 423632 KB Output is correct
14 Correct 176 ms 423568 KB Output is correct
15 Correct 182 ms 423500 KB Output is correct
16 Correct 179 ms 423576 KB Output is correct
17 Correct 200 ms 423612 KB Output is correct
18 Correct 203 ms 423376 KB Output is correct
19 Correct 180 ms 423516 KB Output is correct
20 Correct 194 ms 423324 KB Output is correct
21 Correct 190 ms 423380 KB Output is correct
22 Correct 178 ms 423532 KB Output is correct
23 Correct 203 ms 423392 KB Output is correct
24 Correct 184 ms 423388 KB Output is correct
25 Correct 180 ms 423360 KB Output is correct
26 Correct 181 ms 423400 KB Output is correct
27 Correct 177 ms 423408 KB Output is correct
28 Correct 177 ms 423556 KB Output is correct
29 Correct 177 ms 423384 KB Output is correct
30 Correct 176 ms 423612 KB Output is correct
31 Correct 200 ms 423500 KB Output is correct
32 Correct 177 ms 423540 KB Output is correct
33 Correct 202 ms 437196 KB Output is correct
34 Correct 176 ms 423824 KB Output is correct
35 Correct 180 ms 424384 KB Output is correct
36 Correct 192 ms 432148 KB Output is correct
37 Correct 190 ms 434252 KB Output is correct
38 Correct 195 ms 436552 KB Output is correct
39 Correct 197 ms 437256 KB Output is correct
40 Correct 202 ms 437160 KB Output is correct
41 Correct 206 ms 437216 KB Output is correct
42 Correct 218 ms 435468 KB Output is correct
43 Correct 196 ms 435276 KB Output is correct
44 Correct 195 ms 435364 KB Output is correct
45 Correct 194 ms 437468 KB Output is correct
46 Correct 199 ms 437596 KB Output is correct
47 Correct 200 ms 437324 KB Output is correct
48 Correct 201 ms 437196 KB Output is correct
49 Correct 204 ms 437300 KB Output is correct
50 Correct 201 ms 437068 KB Output is correct
51 Correct 197 ms 436976 KB Output is correct
52 Correct 195 ms 437208 KB Output is correct
53 Correct 195 ms 437180 KB Output is correct
54 Correct 198 ms 437180 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 187 ms 423380 KB Output is correct
2 Correct 195 ms 423272 KB Output is correct
3 Correct 195 ms 423360 KB Output is correct
4 Correct 178 ms 423308 KB Output is correct
5 Correct 193 ms 423500 KB Output is correct
6 Correct 186 ms 423364 KB Output is correct
7 Correct 179 ms 423312 KB Output is correct
8 Correct 197 ms 423444 KB Output is correct
9 Correct 181 ms 423612 KB Output is correct
10 Correct 183 ms 423672 KB Output is correct
11 Correct 178 ms 423496 KB Output is correct
12 Correct 179 ms 423476 KB Output is correct
13 Correct 180 ms 423632 KB Output is correct
14 Correct 176 ms 423568 KB Output is correct
15 Correct 182 ms 423500 KB Output is correct
16 Correct 179 ms 423576 KB Output is correct
17 Correct 200 ms 423612 KB Output is correct
18 Correct 203 ms 423376 KB Output is correct
19 Correct 180 ms 423516 KB Output is correct
20 Correct 194 ms 423324 KB Output is correct
21 Correct 190 ms 423380 KB Output is correct
22 Correct 178 ms 423532 KB Output is correct
23 Correct 203 ms 423392 KB Output is correct
24 Correct 184 ms 423388 KB Output is correct
25 Correct 180 ms 423360 KB Output is correct
26 Correct 181 ms 423400 KB Output is correct
27 Correct 177 ms 423408 KB Output is correct
28 Correct 177 ms 423556 KB Output is correct
29 Correct 177 ms 423384 KB Output is correct
30 Correct 176 ms 423612 KB Output is correct
31 Correct 200 ms 423500 KB Output is correct
32 Correct 177 ms 423540 KB Output is correct
33 Correct 202 ms 437196 KB Output is correct
34 Correct 176 ms 423824 KB Output is correct
35 Correct 180 ms 424384 KB Output is correct
36 Correct 192 ms 432148 KB Output is correct
37 Correct 190 ms 434252 KB Output is correct
38 Correct 195 ms 436552 KB Output is correct
39 Correct 197 ms 437256 KB Output is correct
40 Correct 202 ms 437160 KB Output is correct
41 Correct 206 ms 437216 KB Output is correct
42 Correct 218 ms 435468 KB Output is correct
43 Correct 196 ms 435276 KB Output is correct
44 Correct 195 ms 435364 KB Output is correct
45 Correct 194 ms 437468 KB Output is correct
46 Correct 199 ms 437596 KB Output is correct
47 Correct 200 ms 437324 KB Output is correct
48 Correct 201 ms 437196 KB Output is correct
49 Correct 204 ms 437300 KB Output is correct
50 Correct 201 ms 437068 KB Output is correct
51 Correct 197 ms 436976 KB Output is correct
52 Correct 195 ms 437208 KB Output is correct
53 Correct 195 ms 437180 KB Output is correct
54 Correct 198 ms 437180 KB Output is correct
55 Correct 255 ms 458024 KB Output is correct
56 Correct 200 ms 437680 KB Output is correct
57 Correct 221 ms 452200 KB Output is correct
58 Incorrect 246 ms 455008 KB Output isn't correct
59 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 223 ms 423308 KB Output is correct
2 Correct 173 ms 423328 KB Output is correct
3 Correct 181 ms 423500 KB Output is correct
4 Correct 179 ms 423760 KB Output is correct
5 Correct 176 ms 423496 KB Output is correct
6 Correct 175 ms 423564 KB Output is correct
7 Correct 177 ms 423572 KB Output is correct
8 Correct 172 ms 423508 KB Output is correct
9 Correct 173 ms 423288 KB Output is correct
10 Correct 176 ms 423288 KB Output is correct
11 Correct 180 ms 423356 KB Output is correct
12 Correct 193 ms 423260 KB Output is correct
13 Correct 182 ms 423408 KB Output is correct
14 Correct 177 ms 423500 KB Output is correct
15 Correct 174 ms 423276 KB Output is correct
16 Correct 191 ms 423572 KB Output is correct
17 Correct 172 ms 423620 KB Output is correct
18 Correct 174 ms 423692 KB Output is correct
19 Correct 200 ms 437236 KB Output is correct
20 Correct 190 ms 434248 KB Output is correct
21 Correct 193 ms 437196 KB Output is correct
22 Correct 201 ms 437260 KB Output is correct
23 Correct 207 ms 437244 KB Output is correct
24 Correct 194 ms 437456 KB Output is correct
25 Correct 193 ms 437504 KB Output is correct
26 Correct 193 ms 437324 KB Output is correct
27 Correct 204 ms 437204 KB Output is correct
28 Correct 284 ms 437244 KB Output is correct
29 Correct 254 ms 458028 KB Output is correct
30 Correct 204 ms 437644 KB Output is correct
31 Correct 221 ms 458292 KB Output is correct
32 Correct 250 ms 458032 KB Output is correct
33 Correct 256 ms 458108 KB Output is correct
34 Correct 225 ms 458632 KB Output is correct
35 Correct 221 ms 458564 KB Output is correct
36 Correct 245 ms 458268 KB Output is correct
37 Correct 245 ms 458104 KB Output is correct
38 Correct 223 ms 457968 KB Output is correct
39 Correct 1172 ms 769900 KB Output is correct
40 Correct 235 ms 462672 KB Output is correct
41 Correct 233 ms 466700 KB Output is correct
42 Correct 292 ms 473040 KB Output is correct
43 Correct 260 ms 479844 KB Output is correct
44 Correct 414 ms 595464 KB Output is correct
45 Correct 450 ms 609128 KB Output is correct
46 Correct 982 ms 792932 KB Output is correct
47 Correct 1018 ms 769928 KB Output is correct
48 Correct 1081 ms 769992 KB Output is correct
49 Correct 638 ms 775548 KB Output is correct
50 Correct 637 ms 775652 KB Output is correct
51 Correct 1020 ms 770768 KB Output is correct
52 Correct 940 ms 770240 KB Output is correct
53 Correct 1161 ms 769944 KB Output is correct
54 Correct 187 ms 423380 KB Output is correct
55 Correct 195 ms 423272 KB Output is correct
56 Correct 195 ms 423360 KB Output is correct
57 Correct 178 ms 423308 KB Output is correct
58 Correct 193 ms 423500 KB Output is correct
59 Correct 186 ms 423364 KB Output is correct
60 Correct 179 ms 423312 KB Output is correct
61 Correct 197 ms 423444 KB Output is correct
62 Correct 181 ms 423612 KB Output is correct
63 Correct 183 ms 423672 KB Output is correct
64 Correct 178 ms 423496 KB Output is correct
65 Correct 179 ms 423476 KB Output is correct
66 Correct 180 ms 423632 KB Output is correct
67 Correct 176 ms 423568 KB Output is correct
68 Correct 182 ms 423500 KB Output is correct
69 Correct 179 ms 423576 KB Output is correct
70 Correct 200 ms 423612 KB Output is correct
71 Correct 203 ms 423376 KB Output is correct
72 Correct 180 ms 423516 KB Output is correct
73 Correct 194 ms 423324 KB Output is correct
74 Correct 190 ms 423380 KB Output is correct
75 Correct 178 ms 423532 KB Output is correct
76 Correct 203 ms 423392 KB Output is correct
77 Correct 184 ms 423388 KB Output is correct
78 Correct 180 ms 423360 KB Output is correct
79 Correct 181 ms 423400 KB Output is correct
80 Correct 177 ms 423408 KB Output is correct
81 Correct 177 ms 423556 KB Output is correct
82 Correct 177 ms 423384 KB Output is correct
83 Correct 176 ms 423612 KB Output is correct
84 Correct 200 ms 423500 KB Output is correct
85 Correct 177 ms 423540 KB Output is correct
86 Correct 192 ms 423280 KB Output is correct
87 Correct 186 ms 423264 KB Output is correct
88 Correct 177 ms 423372 KB Output is correct
89 Correct 177 ms 423300 KB Output is correct
90 Correct 185 ms 423368 KB Output is correct
91 Correct 178 ms 423288 KB Output is correct
92 Correct 180 ms 423628 KB Output is correct
93 Correct 178 ms 423500 KB Output is correct
94 Correct 182 ms 423656 KB Output is correct
95 Correct 175 ms 423500 KB Output is correct
96 Correct 179 ms 423588 KB Output is correct
97 Correct 182 ms 423504 KB Output is correct
98 Correct 184 ms 423308 KB Output is correct
99 Correct 176 ms 423504 KB Output is correct
100 Correct 176 ms 423276 KB Output is correct
101 Correct 181 ms 423512 KB Output is correct
102 Correct 176 ms 423420 KB Output is correct
103 Correct 177 ms 423356 KB Output is correct
104 Correct 183 ms 423500 KB Output is correct
105 Correct 176 ms 423284 KB Output is correct
106 Correct 177 ms 423472 KB Output is correct
107 Correct 201 ms 423620 KB Output is correct
108 Correct 179 ms 423612 KB Output is correct
109 Correct 178 ms 423856 KB Output is correct
110 Correct 193 ms 432100 KB Output is correct
111 Correct 200 ms 436500 KB Output is correct
112 Correct 195 ms 437256 KB Output is correct
113 Correct 210 ms 435364 KB Output is correct
114 Correct 194 ms 435352 KB Output is correct
115 Correct 195 ms 435368 KB Output is correct
116 Correct 199 ms 436968 KB Output is correct
117 Correct 197 ms 437296 KB Output is correct
118 Correct 198 ms 437268 KB Output is correct
119 Correct 224 ms 452120 KB Output is correct
120 Correct 223 ms 458236 KB Output is correct
121 Correct 223 ms 453540 KB Output is correct
122 Correct 220 ms 453276 KB Output is correct
123 Correct 219 ms 453332 KB Output is correct
124 Correct 348 ms 525804 KB Output is correct
125 Correct 590 ms 717240 KB Output is correct
126 Correct 979 ms 792984 KB Output is correct
127 Correct 757 ms 725456 KB Output is correct
128 Correct 654 ms 722936 KB Output is correct
129 Correct 661 ms 722896 KB Output is correct
130 Correct 701 ms 770380 KB Output is correct
131 Correct 732 ms 769604 KB Output is correct
132 Correct 202 ms 437196 KB Output is correct
133 Correct 176 ms 423824 KB Output is correct
134 Correct 180 ms 424384 KB Output is correct
135 Correct 192 ms 432148 KB Output is correct
136 Correct 190 ms 434252 KB Output is correct
137 Correct 195 ms 436552 KB Output is correct
138 Correct 197 ms 437256 KB Output is correct
139 Correct 202 ms 437160 KB Output is correct
140 Correct 206 ms 437216 KB Output is correct
141 Correct 218 ms 435468 KB Output is correct
142 Correct 196 ms 435276 KB Output is correct
143 Correct 195 ms 435364 KB Output is correct
144 Correct 194 ms 437468 KB Output is correct
145 Correct 199 ms 437596 KB Output is correct
146 Correct 200 ms 437324 KB Output is correct
147 Correct 201 ms 437196 KB Output is correct
148 Correct 204 ms 437300 KB Output is correct
149 Correct 201 ms 437068 KB Output is correct
150 Correct 197 ms 436976 KB Output is correct
151 Correct 195 ms 437208 KB Output is correct
152 Correct 195 ms 437180 KB Output is correct
153 Correct 198 ms 437180 KB Output is correct
154 Correct 255 ms 458024 KB Output is correct
155 Correct 200 ms 437680 KB Output is correct
156 Correct 221 ms 452200 KB Output is correct
157 Incorrect 246 ms 455008 KB Output isn't correct
158 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 223 ms 423308 KB Output is correct
2 Correct 173 ms 423328 KB Output is correct
3 Correct 181 ms 423500 KB Output is correct
4 Correct 179 ms 423760 KB Output is correct
5 Correct 176 ms 423496 KB Output is correct
6 Correct 175 ms 423564 KB Output is correct
7 Correct 177 ms 423572 KB Output is correct
8 Correct 172 ms 423508 KB Output is correct
9 Correct 173 ms 423288 KB Output is correct
10 Correct 176 ms 423288 KB Output is correct
11 Correct 180 ms 423356 KB Output is correct
12 Correct 193 ms 423260 KB Output is correct
13 Correct 182 ms 423408 KB Output is correct
14 Correct 177 ms 423500 KB Output is correct
15 Correct 174 ms 423276 KB Output is correct
16 Correct 191 ms 423572 KB Output is correct
17 Correct 172 ms 423620 KB Output is correct
18 Correct 174 ms 423692 KB Output is correct
19 Correct 200 ms 437236 KB Output is correct
20 Correct 190 ms 434248 KB Output is correct
21 Correct 193 ms 437196 KB Output is correct
22 Correct 201 ms 437260 KB Output is correct
23 Correct 207 ms 437244 KB Output is correct
24 Correct 194 ms 437456 KB Output is correct
25 Correct 193 ms 437504 KB Output is correct
26 Correct 193 ms 437324 KB Output is correct
27 Correct 204 ms 437204 KB Output is correct
28 Correct 284 ms 437244 KB Output is correct
29 Correct 254 ms 458028 KB Output is correct
30 Correct 204 ms 437644 KB Output is correct
31 Correct 221 ms 458292 KB Output is correct
32 Correct 250 ms 458032 KB Output is correct
33 Correct 256 ms 458108 KB Output is correct
34 Correct 225 ms 458632 KB Output is correct
35 Correct 221 ms 458564 KB Output is correct
36 Correct 245 ms 458268 KB Output is correct
37 Correct 245 ms 458104 KB Output is correct
38 Correct 223 ms 457968 KB Output is correct
39 Correct 1172 ms 769900 KB Output is correct
40 Correct 235 ms 462672 KB Output is correct
41 Correct 233 ms 466700 KB Output is correct
42 Correct 292 ms 473040 KB Output is correct
43 Correct 260 ms 479844 KB Output is correct
44 Correct 414 ms 595464 KB Output is correct
45 Correct 450 ms 609128 KB Output is correct
46 Correct 982 ms 792932 KB Output is correct
47 Correct 1018 ms 769928 KB Output is correct
48 Correct 1081 ms 769992 KB Output is correct
49 Correct 638 ms 775548 KB Output is correct
50 Correct 637 ms 775652 KB Output is correct
51 Correct 1020 ms 770768 KB Output is correct
52 Correct 940 ms 770240 KB Output is correct
53 Correct 1161 ms 769944 KB Output is correct
54 Correct 187 ms 423380 KB Output is correct
55 Correct 195 ms 423272 KB Output is correct
56 Correct 195 ms 423360 KB Output is correct
57 Correct 178 ms 423308 KB Output is correct
58 Correct 193 ms 423500 KB Output is correct
59 Correct 186 ms 423364 KB Output is correct
60 Correct 179 ms 423312 KB Output is correct
61 Correct 197 ms 423444 KB Output is correct
62 Correct 181 ms 423612 KB Output is correct
63 Correct 183 ms 423672 KB Output is correct
64 Correct 178 ms 423496 KB Output is correct
65 Correct 179 ms 423476 KB Output is correct
66 Correct 180 ms 423632 KB Output is correct
67 Correct 176 ms 423568 KB Output is correct
68 Correct 182 ms 423500 KB Output is correct
69 Correct 179 ms 423576 KB Output is correct
70 Correct 200 ms 423612 KB Output is correct
71 Correct 203 ms 423376 KB Output is correct
72 Correct 180 ms 423516 KB Output is correct
73 Correct 194 ms 423324 KB Output is correct
74 Correct 190 ms 423380 KB Output is correct
75 Correct 178 ms 423532 KB Output is correct
76 Correct 203 ms 423392 KB Output is correct
77 Correct 184 ms 423388 KB Output is correct
78 Correct 180 ms 423360 KB Output is correct
79 Correct 181 ms 423400 KB Output is correct
80 Correct 177 ms 423408 KB Output is correct
81 Correct 177 ms 423556 KB Output is correct
82 Correct 177 ms 423384 KB Output is correct
83 Correct 176 ms 423612 KB Output is correct
84 Correct 200 ms 423500 KB Output is correct
85 Correct 177 ms 423540 KB Output is correct
86 Correct 192 ms 423280 KB Output is correct
87 Correct 186 ms 423264 KB Output is correct
88 Correct 177 ms 423372 KB Output is correct
89 Correct 177 ms 423300 KB Output is correct
90 Correct 185 ms 423368 KB Output is correct
91 Correct 178 ms 423288 KB Output is correct
92 Correct 180 ms 423628 KB Output is correct
93 Correct 178 ms 423500 KB Output is correct
94 Correct 182 ms 423656 KB Output is correct
95 Correct 175 ms 423500 KB Output is correct
96 Correct 179 ms 423588 KB Output is correct
97 Correct 182 ms 423504 KB Output is correct
98 Correct 184 ms 423308 KB Output is correct
99 Correct 176 ms 423504 KB Output is correct
100 Correct 176 ms 423276 KB Output is correct
101 Correct 181 ms 423512 KB Output is correct
102 Correct 176 ms 423420 KB Output is correct
103 Correct 177 ms 423356 KB Output is correct
104 Correct 183 ms 423500 KB Output is correct
105 Correct 176 ms 423284 KB Output is correct
106 Correct 177 ms 423472 KB Output is correct
107 Correct 201 ms 423620 KB Output is correct
108 Correct 179 ms 423612 KB Output is correct
109 Correct 178 ms 423856 KB Output is correct
110 Correct 193 ms 432100 KB Output is correct
111 Correct 200 ms 436500 KB Output is correct
112 Correct 195 ms 437256 KB Output is correct
113 Correct 210 ms 435364 KB Output is correct
114 Correct 194 ms 435352 KB Output is correct
115 Correct 195 ms 435368 KB Output is correct
116 Correct 199 ms 436968 KB Output is correct
117 Correct 197 ms 437296 KB Output is correct
118 Correct 198 ms 437268 KB Output is correct
119 Correct 224 ms 452120 KB Output is correct
120 Correct 223 ms 458236 KB Output is correct
121 Correct 223 ms 453540 KB Output is correct
122 Correct 220 ms 453276 KB Output is correct
123 Correct 219 ms 453332 KB Output is correct
124 Correct 348 ms 525804 KB Output is correct
125 Correct 590 ms 717240 KB Output is correct
126 Correct 979 ms 792984 KB Output is correct
127 Correct 757 ms 725456 KB Output is correct
128 Correct 654 ms 722936 KB Output is correct
129 Correct 661 ms 722896 KB Output is correct
130 Correct 701 ms 770380 KB Output is correct
131 Correct 732 ms 769604 KB Output is correct
132 Correct 202 ms 437196 KB Output is correct
133 Correct 176 ms 423824 KB Output is correct
134 Correct 180 ms 424384 KB Output is correct
135 Correct 192 ms 432148 KB Output is correct
136 Correct 190 ms 434252 KB Output is correct
137 Correct 195 ms 436552 KB Output is correct
138 Correct 197 ms 437256 KB Output is correct
139 Correct 202 ms 437160 KB Output is correct
140 Correct 206 ms 437216 KB Output is correct
141 Correct 218 ms 435468 KB Output is correct
142 Correct 196 ms 435276 KB Output is correct
143 Correct 195 ms 435364 KB Output is correct
144 Correct 194 ms 437468 KB Output is correct
145 Correct 199 ms 437596 KB Output is correct
146 Correct 200 ms 437324 KB Output is correct
147 Correct 201 ms 437196 KB Output is correct
148 Correct 204 ms 437300 KB Output is correct
149 Correct 201 ms 437068 KB Output is correct
150 Correct 197 ms 436976 KB Output is correct
151 Correct 195 ms 437208 KB Output is correct
152 Correct 195 ms 437180 KB Output is correct
153 Correct 198 ms 437180 KB Output is correct
154 Correct 255 ms 458024 KB Output is correct
155 Correct 200 ms 437680 KB Output is correct
156 Correct 221 ms 452200 KB Output is correct
157 Incorrect 246 ms 455008 KB Output isn't correct
158 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 223 ms 423308 KB Output is correct
2 Correct 173 ms 423328 KB Output is correct
3 Correct 181 ms 423500 KB Output is correct
4 Correct 179 ms 423760 KB Output is correct
5 Correct 176 ms 423496 KB Output is correct
6 Correct 175 ms 423564 KB Output is correct
7 Correct 177 ms 423572 KB Output is correct
8 Correct 172 ms 423508 KB Output is correct
9 Correct 173 ms 423288 KB Output is correct
10 Correct 176 ms 423288 KB Output is correct
11 Correct 180 ms 423356 KB Output is correct
12 Correct 193 ms 423260 KB Output is correct
13 Correct 182 ms 423408 KB Output is correct
14 Correct 177 ms 423500 KB Output is correct
15 Correct 174 ms 423276 KB Output is correct
16 Correct 191 ms 423572 KB Output is correct
17 Correct 172 ms 423620 KB Output is correct
18 Correct 174 ms 423692 KB Output is correct
19 Correct 200 ms 437236 KB Output is correct
20 Correct 190 ms 434248 KB Output is correct
21 Correct 193 ms 437196 KB Output is correct
22 Correct 201 ms 437260 KB Output is correct
23 Correct 207 ms 437244 KB Output is correct
24 Correct 194 ms 437456 KB Output is correct
25 Correct 193 ms 437504 KB Output is correct
26 Correct 193 ms 437324 KB Output is correct
27 Correct 204 ms 437204 KB Output is correct
28 Correct 284 ms 437244 KB Output is correct
29 Correct 254 ms 458028 KB Output is correct
30 Correct 204 ms 437644 KB Output is correct
31 Correct 221 ms 458292 KB Output is correct
32 Correct 250 ms 458032 KB Output is correct
33 Correct 256 ms 458108 KB Output is correct
34 Correct 225 ms 458632 KB Output is correct
35 Correct 221 ms 458564 KB Output is correct
36 Correct 245 ms 458268 KB Output is correct
37 Correct 245 ms 458104 KB Output is correct
38 Correct 223 ms 457968 KB Output is correct
39 Correct 1172 ms 769900 KB Output is correct
40 Correct 235 ms 462672 KB Output is correct
41 Correct 233 ms 466700 KB Output is correct
42 Correct 292 ms 473040 KB Output is correct
43 Correct 260 ms 479844 KB Output is correct
44 Correct 414 ms 595464 KB Output is correct
45 Correct 450 ms 609128 KB Output is correct
46 Correct 982 ms 792932 KB Output is correct
47 Correct 1018 ms 769928 KB Output is correct
48 Correct 1081 ms 769992 KB Output is correct
49 Correct 638 ms 775548 KB Output is correct
50 Correct 637 ms 775652 KB Output is correct
51 Correct 1020 ms 770768 KB Output is correct
52 Correct 940 ms 770240 KB Output is correct
53 Correct 1161 ms 769944 KB Output is correct
54 Correct 187 ms 423380 KB Output is correct
55 Correct 195 ms 423272 KB Output is correct
56 Correct 195 ms 423360 KB Output is correct
57 Correct 178 ms 423308 KB Output is correct
58 Correct 193 ms 423500 KB Output is correct
59 Correct 186 ms 423364 KB Output is correct
60 Correct 179 ms 423312 KB Output is correct
61 Correct 197 ms 423444 KB Output is correct
62 Correct 181 ms 423612 KB Output is correct
63 Correct 183 ms 423672 KB Output is correct
64 Correct 178 ms 423496 KB Output is correct
65 Correct 179 ms 423476 KB Output is correct
66 Correct 180 ms 423632 KB Output is correct
67 Correct 176 ms 423568 KB Output is correct
68 Correct 182 ms 423500 KB Output is correct
69 Correct 179 ms 423576 KB Output is correct
70 Correct 200 ms 423612 KB Output is correct
71 Correct 203 ms 423376 KB Output is correct
72 Correct 180 ms 423516 KB Output is correct
73 Correct 194 ms 423324 KB Output is correct
74 Correct 190 ms 423380 KB Output is correct
75 Correct 178 ms 423532 KB Output is correct
76 Correct 203 ms 423392 KB Output is correct
77 Correct 184 ms 423388 KB Output is correct
78 Correct 180 ms 423360 KB Output is correct
79 Correct 181 ms 423400 KB Output is correct
80 Correct 177 ms 423408 KB Output is correct
81 Correct 177 ms 423556 KB Output is correct
82 Correct 177 ms 423384 KB Output is correct
83 Correct 176 ms 423612 KB Output is correct
84 Correct 200 ms 423500 KB Output is correct
85 Correct 177 ms 423540 KB Output is correct
86 Correct 192 ms 423280 KB Output is correct
87 Correct 186 ms 423264 KB Output is correct
88 Correct 177 ms 423372 KB Output is correct
89 Correct 177 ms 423300 KB Output is correct
90 Correct 185 ms 423368 KB Output is correct
91 Correct 178 ms 423288 KB Output is correct
92 Correct 180 ms 423628 KB Output is correct
93 Correct 178 ms 423500 KB Output is correct
94 Correct 182 ms 423656 KB Output is correct
95 Correct 175 ms 423500 KB Output is correct
96 Correct 179 ms 423588 KB Output is correct
97 Correct 182 ms 423504 KB Output is correct
98 Correct 184 ms 423308 KB Output is correct
99 Correct 176 ms 423504 KB Output is correct
100 Correct 176 ms 423276 KB Output is correct
101 Correct 181 ms 423512 KB Output is correct
102 Correct 176 ms 423420 KB Output is correct
103 Correct 177 ms 423356 KB Output is correct
104 Correct 183 ms 423500 KB Output is correct
105 Correct 176 ms 423284 KB Output is correct
106 Correct 177 ms 423472 KB Output is correct
107 Correct 201 ms 423620 KB Output is correct
108 Correct 179 ms 423612 KB Output is correct
109 Correct 178 ms 423856 KB Output is correct
110 Correct 193 ms 432100 KB Output is correct
111 Correct 200 ms 436500 KB Output is correct
112 Correct 195 ms 437256 KB Output is correct
113 Correct 210 ms 435364 KB Output is correct
114 Correct 194 ms 435352 KB Output is correct
115 Correct 195 ms 435368 KB Output is correct
116 Correct 199 ms 436968 KB Output is correct
117 Correct 197 ms 437296 KB Output is correct
118 Correct 198 ms 437268 KB Output is correct
119 Correct 224 ms 452120 KB Output is correct
120 Correct 223 ms 458236 KB Output is correct
121 Correct 223 ms 453540 KB Output is correct
122 Correct 220 ms 453276 KB Output is correct
123 Correct 219 ms 453332 KB Output is correct
124 Correct 348 ms 525804 KB Output is correct
125 Correct 590 ms 717240 KB Output is correct
126 Correct 979 ms 792984 KB Output is correct
127 Correct 757 ms 725456 KB Output is correct
128 Correct 654 ms 722936 KB Output is correct
129 Correct 661 ms 722896 KB Output is correct
130 Correct 701 ms 770380 KB Output is correct
131 Correct 732 ms 769604 KB Output is correct
132 Correct 202 ms 437196 KB Output is correct
133 Correct 176 ms 423824 KB Output is correct
134 Correct 180 ms 424384 KB Output is correct
135 Correct 192 ms 432148 KB Output is correct
136 Correct 190 ms 434252 KB Output is correct
137 Correct 195 ms 436552 KB Output is correct
138 Correct 197 ms 437256 KB Output is correct
139 Correct 202 ms 437160 KB Output is correct
140 Correct 206 ms 437216 KB Output is correct
141 Correct 218 ms 435468 KB Output is correct
142 Correct 196 ms 435276 KB Output is correct
143 Correct 195 ms 435364 KB Output is correct
144 Correct 194 ms 437468 KB Output is correct
145 Correct 199 ms 437596 KB Output is correct
146 Correct 200 ms 437324 KB Output is correct
147 Correct 201 ms 437196 KB Output is correct
148 Correct 204 ms 437300 KB Output is correct
149 Correct 201 ms 437068 KB Output is correct
150 Correct 197 ms 436976 KB Output is correct
151 Correct 195 ms 437208 KB Output is correct
152 Correct 195 ms 437180 KB Output is correct
153 Correct 198 ms 437180 KB Output is correct
154 Correct 255 ms 458024 KB Output is correct
155 Correct 200 ms 437680 KB Output is correct
156 Correct 221 ms 452200 KB Output is correct
157 Incorrect 246 ms 455008 KB Output isn't correct
158 Halted 0 ms 0 KB -