답안 #932857

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
932857 2024-02-24T10:17:00 Z Pring Maze (JOI23_ho_t3) C++17
67 / 100
2000 ms 1697156 KB
#include <bits/stdc++.h>
using namespace std;

#ifdef MIKU
#define debug(x...) cout << "[" << #x << "] : ", dout(x)
void dout() { cout << endl; }
template <typename T, typename ...U>
void dout(T t, U ...u) { cout << t << (sizeof...(u) ? ", " : ""); dout(u...); }
#else
#define debug(...) 39
#endif

// #define int long long
#define fs first
#define sc second
#define mp make_pair
#define FOR(i, j, k) for (int i = j, Z = k; i < Z; i++)
typedef pair<int, int> pii;

const int MXN = 6000005, LAYER = 8;
const pii D[4] = {mp(1, 0), mp(-1, 0), mp(0, 1), mp(0, -1)};
int R, C, N;
pii sr, to;
vector<string> s;
int K;
vector<int> edge[MXN * LAYER];
int dis[MXN * LAYER];

inline int cvt(pii p) {
    return p.fs * C + p.sc;
}

inline pii cvt(int x) {
    return mp(x / C, x % C);
}

inline pii operator+(pii a, pii b) {
    return mp(a.fs + b.fs, a.sc + b.sc);
}

inline bool OUT(pii p) {
    if (!(0 <= p.fs && p.fs < R)) return true;
    if (!(0 <= p.sc && p.sc < C)) return true;
    return false;
}

namespace EDGE {
    inline int cvt3(int l, int x, int y) {
        return l * R * C + x * C + y;
    }

    inline void PUSH_EDGE(int sr, int to, int val) {
        // debug(sr, to, val);
        edge[sr].push_back(val ? ~to : to);
    }

    void E0() {
        FOR(i, 0, R * C) {
            pii p = cvt(i);
            if (s[p.fs][p.sc] == '#') continue;
            FOR(d, 0, 4) {
                pii nxt = p + D[d];
                if (OUT(nxt)) continue;
                if (s[nxt.fs][nxt.sc] == '#') continue;
                PUSH_EDGE(cvt3(0, p.fs, p.sc), cvt3(0, nxt.fs, nxt.sc), 0);
            }
        }
    }

    void E0_1() {
        FOR(i, 0, R * C) {
            pii p = cvt(i);
            FOR(d, 0, 4) {
                pii nxt = p + D[d];
                if (OUT(nxt)) continue;
                PUSH_EDGE(cvt3(0, p.fs, p.sc), cvt3(1, nxt.fs, nxt.sc), 1);
            }
        }
    }

    void E23_4() {
        FOR(j, 0, C) {
            for (int l_bnd = 0, r_bnd; l_bnd < R; l_bnd += K) {
                r_bnd = min(R, l_bnd + K);
                FOR(i, l_bnd, r_bnd) {
                    PUSH_EDGE(cvt3(2, i, j), cvt3(4, i, j), 0);
                    PUSH_EDGE(cvt3(3, i, j), cvt3(4, i, j), 0);
                }
                FOR(i, l_bnd, r_bnd - 1) PUSH_EDGE(cvt3(2, i, j), cvt3(2, i + 1, j), 0);
                FOR(i, l_bnd + 1, r_bnd) PUSH_EDGE(cvt3(3, i, j), cvt3(3, i - 1, j), 0);
            }
        }
    }

    void E1_23() {
        auto ADD_EDGE = [&](int y, int l, int r, int sr) -> void {
            if (r - l == K) {
                PUSH_EDGE(sr, cvt3(2, l, y), 0);
                PUSH_EDGE(sr, cvt3(3, r - 1, y), 0);
                return;
            }
            if (r == R) {
                PUSH_EDGE(sr, cvt3(2, l, y), 0);
                int m = (l ? (l - 1) / K * K + K : 0);
                if (m < R) PUSH_EDGE(sr, cvt3(2, m, y), 0);
                return;
            }
            PUSH_EDGE(sr, cvt3(3, r - 1, y), 0);
        };
        FOR(j, 0, C) {
            FOR(i, 0, R) {
                int l_bnd = max(0, i - (N - 1)), r_bnd = min(R, i + N);
                ADD_EDGE(j, l_bnd, r_bnd, cvt3(1, i, j));
            }
        }
    }

    void E56_7() {
        FOR(i, 0, R) {
            for (int l_bnd = 0, r_bnd; l_bnd < C; l_bnd += K) {
                r_bnd = min(C, l_bnd + K);
                FOR(j, l_bnd, r_bnd) {
                    PUSH_EDGE(cvt3(5, i, j), cvt3(7, i, j), 0);
                    PUSH_EDGE(cvt3(6, i, j), cvt3(7, i, j), 0);
                }
                FOR(j, l_bnd, r_bnd - 1) PUSH_EDGE(cvt3(5, i, j), cvt3(5, i, j + 1), 0);
                FOR(j, l_bnd + 1, r_bnd) PUSH_EDGE(cvt3(6, i, j), cvt3(6, i, j - 1), 0);
            }
        }
    }

    void E4_56() {
        auto ADD_EDGE = [&](int x, int l, int r, int sr) -> void {
            if (r - l == K) {
                PUSH_EDGE(sr, cvt3(5, x, l), 0);
                PUSH_EDGE(sr, cvt3(6, x, r - 1), 0);
                return;
            }
            if (r == C) {
                PUSH_EDGE(sr, cvt3(5, x, l), 0);
                int m = (l ? (l - 1) / K * K + K : 0);
                if (m < C) PUSH_EDGE(sr, cvt3(5, x, m), 0);
                return;
            }
            PUSH_EDGE(sr, cvt3(6, x, r - 1), 0);
        };
        FOR(i, 0, R) {
            FOR(j, 0, C) {
                int l_bnd = max(0, j - (N - 1)), r_bnd = min(C, j + N);
                ADD_EDGE(i, l_bnd, r_bnd, cvt3(4, i, j));
            }
        }
    }

    void E7_0() {
        FOR(i, 0, R * C) {
            pii p = cvt(i);
            PUSH_EDGE(cvt3(7, p.fs, p.sc), cvt3(0, p.fs, p.sc), 0);
            FOR(d, 0, 4) {
                pii nxt = p + D[d];
                if (OUT(nxt) || s[nxt.fs][nxt.sc] == '#') continue;
                PUSH_EDGE(cvt3(7, p.fs, p.sc), cvt3(0, nxt.fs, nxt.sc), 0);
            }
        }
    }

    void BUILD() {
        E0();
        E0_1();
        E23_4();
        E1_23();
        E56_7();
        E4_56();
        E7_0();
    }
}

namespace BFS {
    // deque<pii> dq;
    vector<pii> v0, v1;
    void GO(int sr, int to) {
        fill(dis, dis + R * C * LAYER, -1);
        v0.push_back(mp(0, sr));
        while (v0.size()) {
            for (int i = 0; i < v0.size(); i++) {
                pii now = v0[i];
                if (dis[now.sc] != -1) continue;
                int len = now.fs, id = now.sc;
                dis[id] = len;
                if (id == to) return;
                for (auto &i : edge[id]) {
                    int tg = (i < 0 ? ~i : i);
                    if (dis[tg] != -1) continue;
                    if (i < 0) v1.push_back(mp(len + 1, tg));
                    else v0.push_back(mp(len, tg));
                }
            }
            swap(v0, v1);
            v1.clear();
        }
    }
}

void miku() {
    cin >> R >> C >> N >> sr.fs >> sr.sc >> to.fs >> to.sc;
    sr.fs--, sr.sc--, to.fs--, to.sc--;
    K = N * 2 - 1;
    s.resize(R);
    FOR(i, 0, R) cin >> s[i];
    EDGE::BUILD();
    BFS::GO(cvt(sr), cvt(to));
    cout << dis[cvt(to)] << '\n';
}

int32_t main() {
    cin.tie(0) -> sync_with_stdio(false);
    cin.exceptions(iostream::failbit);
    miku();
    return 0;
}

Compilation message

Main.cpp: In function 'void BFS::GO(int, int)':
Main.cpp:185:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  185 |             for (int i = 0; i < v0.size(); i++) {
      |                             ~~^~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 523 ms 1128532 KB Output is correct
2 Correct 430 ms 1128372 KB Output is correct
3 Correct 431 ms 1129044 KB Output is correct
4 Correct 428 ms 1128788 KB Output is correct
5 Correct 420 ms 1128788 KB Output is correct
6 Correct 418 ms 1128908 KB Output is correct
7 Correct 422 ms 1129148 KB Output is correct
8 Correct 418 ms 1128788 KB Output is correct
9 Correct 422 ms 1128528 KB Output is correct
10 Correct 417 ms 1128792 KB Output is correct
11 Correct 418 ms 1128532 KB Output is correct
12 Correct 417 ms 1129044 KB Output is correct
13 Correct 413 ms 1128644 KB Output is correct
14 Correct 416 ms 1128788 KB Output is correct
15 Correct 420 ms 1128532 KB Output is correct
16 Correct 422 ms 1128856 KB Output is correct
17 Correct 415 ms 1128788 KB Output is correct
18 Correct 417 ms 1129044 KB Output is correct
19 Correct 477 ms 1145680 KB Output is correct
20 Correct 439 ms 1141584 KB Output is correct
21 Correct 465 ms 1150064 KB Output is correct
22 Correct 461 ms 1146452 KB Output is correct
23 Correct 469 ms 1145676 KB Output is correct
24 Correct 449 ms 1145768 KB Output is correct
25 Correct 444 ms 1145428 KB Output is correct
26 Correct 481 ms 1146196 KB Output is correct
27 Correct 451 ms 1146076 KB Output is correct
28 Correct 453 ms 1145952 KB Output is correct
29 Correct 562 ms 1171468 KB Output is correct
30 Correct 451 ms 1145936 KB Output is correct
31 Correct 525 ms 1187320 KB Output is correct
32 Correct 578 ms 1172792 KB Output is correct
33 Correct 526 ms 1171284 KB Output is correct
34 Correct 505 ms 1171304 KB Output is correct
35 Correct 486 ms 1171164 KB Output is correct
36 Correct 525 ms 1176268 KB Output is correct
37 Correct 540 ms 1173800 KB Output is correct
38 Correct 489 ms 1171540 KB Output is correct
39 Correct 1976 ms 1556664 KB Output is correct
40 Correct 538 ms 1178192 KB Output is correct
41 Correct 519 ms 1181000 KB Output is correct
42 Correct 589 ms 1189996 KB Output is correct
43 Correct 588 ms 1197392 KB Output is correct
44 Correct 1014 ms 1348432 KB Output is correct
45 Correct 868 ms 1356868 KB Output is correct
46 Correct 1610 ms 1624256 KB Output is correct
47 Correct 1989 ms 1564656 KB Output is correct
48 Correct 1759 ms 1554620 KB Output is correct
49 Correct 1210 ms 1554424 KB Output is correct
50 Correct 1126 ms 1554304 KB Output is correct
51 Correct 1919 ms 1581204 KB Output is correct
52 Correct 1793 ms 1568016 KB Output is correct
53 Correct 1712 ms 1555916 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 423 ms 1128652 KB Output is correct
2 Correct 417 ms 1128532 KB Output is correct
3 Correct 430 ms 1128720 KB Output is correct
4 Correct 452 ms 1128440 KB Output is correct
5 Correct 414 ms 1128912 KB Output is correct
6 Correct 441 ms 1128784 KB Output is correct
7 Correct 467 ms 1128636 KB Output is correct
8 Correct 419 ms 1128532 KB Output is correct
9 Correct 421 ms 1128984 KB Output is correct
10 Correct 420 ms 1129040 KB Output is correct
11 Correct 416 ms 1128796 KB Output is correct
12 Correct 418 ms 1128788 KB Output is correct
13 Correct 420 ms 1128968 KB Output is correct
14 Correct 417 ms 1128968 KB Output is correct
15 Correct 429 ms 1129044 KB Output is correct
16 Correct 419 ms 1128788 KB Output is correct
17 Correct 422 ms 1128904 KB Output is correct
18 Correct 423 ms 1128516 KB Output is correct
19 Correct 418 ms 1128908 KB Output is correct
20 Correct 418 ms 1128532 KB Output is correct
21 Correct 418 ms 1128616 KB Output is correct
22 Correct 426 ms 1129040 KB Output is correct
23 Correct 416 ms 1128528 KB Output is correct
24 Correct 428 ms 1128664 KB Output is correct
25 Correct 415 ms 1128436 KB Output is correct
26 Correct 419 ms 1128640 KB Output is correct
27 Correct 440 ms 1128448 KB Output is correct
28 Correct 421 ms 1128788 KB Output is correct
29 Correct 420 ms 1128712 KB Output is correct
30 Correct 421 ms 1129152 KB Output is correct
31 Correct 444 ms 1128788 KB Output is correct
32 Correct 418 ms 1128880 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 455 ms 1128784 KB Output is correct
2 Correct 417 ms 1128416 KB Output is correct
3 Correct 418 ms 1128528 KB Output is correct
4 Correct 446 ms 1128608 KB Output is correct
5 Correct 510 ms 1128532 KB Output is correct
6 Correct 451 ms 1128488 KB Output is correct
7 Correct 469 ms 1128944 KB Output is correct
8 Correct 416 ms 1128996 KB Output is correct
9 Correct 458 ms 1129048 KB Output is correct
10 Correct 429 ms 1128788 KB Output is correct
11 Correct 425 ms 1128812 KB Output is correct
12 Correct 478 ms 1128676 KB Output is correct
13 Correct 442 ms 1128940 KB Output is correct
14 Correct 431 ms 1128672 KB Output is correct
15 Correct 474 ms 1128532 KB Output is correct
16 Correct 418 ms 1128716 KB Output is correct
17 Correct 515 ms 1128672 KB Output is correct
18 Correct 440 ms 1128488 KB Output is correct
19 Correct 453 ms 1128640 KB Output is correct
20 Correct 511 ms 1128648 KB Output is correct
21 Correct 478 ms 1129152 KB Output is correct
22 Correct 457 ms 1128912 KB Output is correct
23 Correct 435 ms 1128916 KB Output is correct
24 Correct 472 ms 1129260 KB Output is correct
25 Correct 503 ms 1139936 KB Output is correct
26 Correct 504 ms 1146700 KB Output is correct
27 Correct 565 ms 1150212 KB Output is correct
28 Correct 515 ms 1149808 KB Output is correct
29 Correct 546 ms 1146196 KB Output is correct
30 Correct 559 ms 1148904 KB Output is correct
31 Correct 517 ms 1147068 KB Output is correct
32 Correct 557 ms 1146220 KB Output is correct
33 Correct 513 ms 1146172 KB Output is correct
34 Correct 578 ms 1170828 KB Output is correct
35 Correct 655 ms 1187440 KB Output is correct
36 Correct 673 ms 1182292 KB Output is correct
37 Correct 636 ms 1178316 KB Output is correct
38 Correct 629 ms 1178344 KB Output is correct
39 Correct 763 ms 1271836 KB Output is correct
40 Correct 1545 ms 1560780 KB Output is correct
41 Correct 1634 ms 1624232 KB Output is correct
42 Correct 1789 ms 1697156 KB Output is correct
43 Correct 1821 ms 1588220 KB Output is correct
44 Correct 1723 ms 1644812 KB Output is correct
45 Correct 1776 ms 1620652 KB Output is correct
46 Correct 1699 ms 1620668 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 423 ms 1128652 KB Output is correct
2 Correct 417 ms 1128532 KB Output is correct
3 Correct 430 ms 1128720 KB Output is correct
4 Correct 452 ms 1128440 KB Output is correct
5 Correct 414 ms 1128912 KB Output is correct
6 Correct 441 ms 1128784 KB Output is correct
7 Correct 467 ms 1128636 KB Output is correct
8 Correct 419 ms 1128532 KB Output is correct
9 Correct 421 ms 1128984 KB Output is correct
10 Correct 420 ms 1129040 KB Output is correct
11 Correct 416 ms 1128796 KB Output is correct
12 Correct 418 ms 1128788 KB Output is correct
13 Correct 420 ms 1128968 KB Output is correct
14 Correct 417 ms 1128968 KB Output is correct
15 Correct 429 ms 1129044 KB Output is correct
16 Correct 419 ms 1128788 KB Output is correct
17 Correct 422 ms 1128904 KB Output is correct
18 Correct 423 ms 1128516 KB Output is correct
19 Correct 418 ms 1128908 KB Output is correct
20 Correct 418 ms 1128532 KB Output is correct
21 Correct 418 ms 1128616 KB Output is correct
22 Correct 426 ms 1129040 KB Output is correct
23 Correct 416 ms 1128528 KB Output is correct
24 Correct 428 ms 1128664 KB Output is correct
25 Correct 415 ms 1128436 KB Output is correct
26 Correct 419 ms 1128640 KB Output is correct
27 Correct 440 ms 1128448 KB Output is correct
28 Correct 421 ms 1128788 KB Output is correct
29 Correct 420 ms 1128712 KB Output is correct
30 Correct 421 ms 1129152 KB Output is correct
31 Correct 444 ms 1128788 KB Output is correct
32 Correct 418 ms 1128880 KB Output is correct
33 Correct 461 ms 1145684 KB Output is correct
34 Correct 429 ms 1129040 KB Output is correct
35 Correct 424 ms 1129660 KB Output is correct
36 Correct 470 ms 1139624 KB Output is correct
37 Correct 445 ms 1141844 KB Output is correct
38 Correct 454 ms 1146552 KB Output is correct
39 Correct 467 ms 1150084 KB Output is correct
40 Correct 461 ms 1146316 KB Output is correct
41 Correct 466 ms 1145624 KB Output is correct
42 Correct 470 ms 1149996 KB Output is correct
43 Correct 457 ms 1146520 KB Output is correct
44 Correct 465 ms 1148600 KB Output is correct
45 Correct 451 ms 1145824 KB Output is correct
46 Correct 452 ms 1145528 KB Output is correct
47 Correct 465 ms 1145996 KB Output is correct
48 Correct 467 ms 1146240 KB Output is correct
49 Correct 464 ms 1146540 KB Output is correct
50 Correct 463 ms 1146488 KB Output is correct
51 Correct 460 ms 1146872 KB Output is correct
52 Correct 480 ms 1146304 KB Output is correct
53 Correct 452 ms 1145908 KB Output is correct
54 Correct 455 ms 1146028 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 423 ms 1128652 KB Output is correct
2 Correct 417 ms 1128532 KB Output is correct
3 Correct 430 ms 1128720 KB Output is correct
4 Correct 452 ms 1128440 KB Output is correct
5 Correct 414 ms 1128912 KB Output is correct
6 Correct 441 ms 1128784 KB Output is correct
7 Correct 467 ms 1128636 KB Output is correct
8 Correct 419 ms 1128532 KB Output is correct
9 Correct 421 ms 1128984 KB Output is correct
10 Correct 420 ms 1129040 KB Output is correct
11 Correct 416 ms 1128796 KB Output is correct
12 Correct 418 ms 1128788 KB Output is correct
13 Correct 420 ms 1128968 KB Output is correct
14 Correct 417 ms 1128968 KB Output is correct
15 Correct 429 ms 1129044 KB Output is correct
16 Correct 419 ms 1128788 KB Output is correct
17 Correct 422 ms 1128904 KB Output is correct
18 Correct 423 ms 1128516 KB Output is correct
19 Correct 418 ms 1128908 KB Output is correct
20 Correct 418 ms 1128532 KB Output is correct
21 Correct 418 ms 1128616 KB Output is correct
22 Correct 426 ms 1129040 KB Output is correct
23 Correct 416 ms 1128528 KB Output is correct
24 Correct 428 ms 1128664 KB Output is correct
25 Correct 415 ms 1128436 KB Output is correct
26 Correct 419 ms 1128640 KB Output is correct
27 Correct 440 ms 1128448 KB Output is correct
28 Correct 421 ms 1128788 KB Output is correct
29 Correct 420 ms 1128712 KB Output is correct
30 Correct 421 ms 1129152 KB Output is correct
31 Correct 444 ms 1128788 KB Output is correct
32 Correct 418 ms 1128880 KB Output is correct
33 Correct 461 ms 1145684 KB Output is correct
34 Correct 429 ms 1129040 KB Output is correct
35 Correct 424 ms 1129660 KB Output is correct
36 Correct 470 ms 1139624 KB Output is correct
37 Correct 445 ms 1141844 KB Output is correct
38 Correct 454 ms 1146552 KB Output is correct
39 Correct 467 ms 1150084 KB Output is correct
40 Correct 461 ms 1146316 KB Output is correct
41 Correct 466 ms 1145624 KB Output is correct
42 Correct 470 ms 1149996 KB Output is correct
43 Correct 457 ms 1146520 KB Output is correct
44 Correct 465 ms 1148600 KB Output is correct
45 Correct 451 ms 1145824 KB Output is correct
46 Correct 452 ms 1145528 KB Output is correct
47 Correct 465 ms 1145996 KB Output is correct
48 Correct 467 ms 1146240 KB Output is correct
49 Correct 464 ms 1146540 KB Output is correct
50 Correct 463 ms 1146488 KB Output is correct
51 Correct 460 ms 1146872 KB Output is correct
52 Correct 480 ms 1146304 KB Output is correct
53 Correct 452 ms 1145908 KB Output is correct
54 Correct 455 ms 1146028 KB Output is correct
55 Correct 537 ms 1171284 KB Output is correct
56 Correct 456 ms 1146168 KB Output is correct
57 Correct 507 ms 1170584 KB Output is correct
58 Correct 540 ms 1167952 KB Output is correct
59 Correct 534 ms 1187460 KB Output is correct
60 Correct 564 ms 1173032 KB Output is correct
61 Correct 534 ms 1171284 KB Output is correct
62 Correct 533 ms 1182312 KB Output is correct
63 Correct 561 ms 1178076 KB Output is correct
64 Correct 540 ms 1178508 KB Output is correct
65 Correct 533 ms 1171404 KB Output is correct
66 Correct 503 ms 1171388 KB Output is correct
67 Correct 549 ms 1171692 KB Output is correct
68 Correct 545 ms 1172308 KB Output is correct
69 Correct 540 ms 1172828 KB Output is correct
70 Correct 592 ms 1173848 KB Output is correct
71 Correct 554 ms 1176160 KB Output is correct
72 Correct 534 ms 1176308 KB Output is correct
73 Correct 680 ms 1173876 KB Output is correct
74 Correct 521 ms 1171500 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 523 ms 1128532 KB Output is correct
2 Correct 430 ms 1128372 KB Output is correct
3 Correct 431 ms 1129044 KB Output is correct
4 Correct 428 ms 1128788 KB Output is correct
5 Correct 420 ms 1128788 KB Output is correct
6 Correct 418 ms 1128908 KB Output is correct
7 Correct 422 ms 1129148 KB Output is correct
8 Correct 418 ms 1128788 KB Output is correct
9 Correct 422 ms 1128528 KB Output is correct
10 Correct 417 ms 1128792 KB Output is correct
11 Correct 418 ms 1128532 KB Output is correct
12 Correct 417 ms 1129044 KB Output is correct
13 Correct 413 ms 1128644 KB Output is correct
14 Correct 416 ms 1128788 KB Output is correct
15 Correct 420 ms 1128532 KB Output is correct
16 Correct 422 ms 1128856 KB Output is correct
17 Correct 415 ms 1128788 KB Output is correct
18 Correct 417 ms 1129044 KB Output is correct
19 Correct 477 ms 1145680 KB Output is correct
20 Correct 439 ms 1141584 KB Output is correct
21 Correct 465 ms 1150064 KB Output is correct
22 Correct 461 ms 1146452 KB Output is correct
23 Correct 469 ms 1145676 KB Output is correct
24 Correct 449 ms 1145768 KB Output is correct
25 Correct 444 ms 1145428 KB Output is correct
26 Correct 481 ms 1146196 KB Output is correct
27 Correct 451 ms 1146076 KB Output is correct
28 Correct 453 ms 1145952 KB Output is correct
29 Correct 562 ms 1171468 KB Output is correct
30 Correct 451 ms 1145936 KB Output is correct
31 Correct 525 ms 1187320 KB Output is correct
32 Correct 578 ms 1172792 KB Output is correct
33 Correct 526 ms 1171284 KB Output is correct
34 Correct 505 ms 1171304 KB Output is correct
35 Correct 486 ms 1171164 KB Output is correct
36 Correct 525 ms 1176268 KB Output is correct
37 Correct 540 ms 1173800 KB Output is correct
38 Correct 489 ms 1171540 KB Output is correct
39 Correct 1976 ms 1556664 KB Output is correct
40 Correct 538 ms 1178192 KB Output is correct
41 Correct 519 ms 1181000 KB Output is correct
42 Correct 589 ms 1189996 KB Output is correct
43 Correct 588 ms 1197392 KB Output is correct
44 Correct 1014 ms 1348432 KB Output is correct
45 Correct 868 ms 1356868 KB Output is correct
46 Correct 1610 ms 1624256 KB Output is correct
47 Correct 1989 ms 1564656 KB Output is correct
48 Correct 1759 ms 1554620 KB Output is correct
49 Correct 1210 ms 1554424 KB Output is correct
50 Correct 1126 ms 1554304 KB Output is correct
51 Correct 1919 ms 1581204 KB Output is correct
52 Correct 1793 ms 1568016 KB Output is correct
53 Correct 1712 ms 1555916 KB Output is correct
54 Correct 423 ms 1128652 KB Output is correct
55 Correct 417 ms 1128532 KB Output is correct
56 Correct 430 ms 1128720 KB Output is correct
57 Correct 452 ms 1128440 KB Output is correct
58 Correct 414 ms 1128912 KB Output is correct
59 Correct 441 ms 1128784 KB Output is correct
60 Correct 467 ms 1128636 KB Output is correct
61 Correct 419 ms 1128532 KB Output is correct
62 Correct 421 ms 1128984 KB Output is correct
63 Correct 420 ms 1129040 KB Output is correct
64 Correct 416 ms 1128796 KB Output is correct
65 Correct 418 ms 1128788 KB Output is correct
66 Correct 420 ms 1128968 KB Output is correct
67 Correct 417 ms 1128968 KB Output is correct
68 Correct 429 ms 1129044 KB Output is correct
69 Correct 419 ms 1128788 KB Output is correct
70 Correct 422 ms 1128904 KB Output is correct
71 Correct 423 ms 1128516 KB Output is correct
72 Correct 418 ms 1128908 KB Output is correct
73 Correct 418 ms 1128532 KB Output is correct
74 Correct 418 ms 1128616 KB Output is correct
75 Correct 426 ms 1129040 KB Output is correct
76 Correct 416 ms 1128528 KB Output is correct
77 Correct 428 ms 1128664 KB Output is correct
78 Correct 415 ms 1128436 KB Output is correct
79 Correct 419 ms 1128640 KB Output is correct
80 Correct 440 ms 1128448 KB Output is correct
81 Correct 421 ms 1128788 KB Output is correct
82 Correct 420 ms 1128712 KB Output is correct
83 Correct 421 ms 1129152 KB Output is correct
84 Correct 444 ms 1128788 KB Output is correct
85 Correct 418 ms 1128880 KB Output is correct
86 Correct 455 ms 1128784 KB Output is correct
87 Correct 417 ms 1128416 KB Output is correct
88 Correct 418 ms 1128528 KB Output is correct
89 Correct 446 ms 1128608 KB Output is correct
90 Correct 510 ms 1128532 KB Output is correct
91 Correct 451 ms 1128488 KB Output is correct
92 Correct 469 ms 1128944 KB Output is correct
93 Correct 416 ms 1128996 KB Output is correct
94 Correct 458 ms 1129048 KB Output is correct
95 Correct 429 ms 1128788 KB Output is correct
96 Correct 425 ms 1128812 KB Output is correct
97 Correct 478 ms 1128676 KB Output is correct
98 Correct 442 ms 1128940 KB Output is correct
99 Correct 431 ms 1128672 KB Output is correct
100 Correct 474 ms 1128532 KB Output is correct
101 Correct 418 ms 1128716 KB Output is correct
102 Correct 515 ms 1128672 KB Output is correct
103 Correct 440 ms 1128488 KB Output is correct
104 Correct 453 ms 1128640 KB Output is correct
105 Correct 511 ms 1128648 KB Output is correct
106 Correct 478 ms 1129152 KB Output is correct
107 Correct 457 ms 1128912 KB Output is correct
108 Correct 435 ms 1128916 KB Output is correct
109 Correct 472 ms 1129260 KB Output is correct
110 Correct 503 ms 1139936 KB Output is correct
111 Correct 504 ms 1146700 KB Output is correct
112 Correct 565 ms 1150212 KB Output is correct
113 Correct 515 ms 1149808 KB Output is correct
114 Correct 546 ms 1146196 KB Output is correct
115 Correct 559 ms 1148904 KB Output is correct
116 Correct 517 ms 1147068 KB Output is correct
117 Correct 557 ms 1146220 KB Output is correct
118 Correct 513 ms 1146172 KB Output is correct
119 Correct 578 ms 1170828 KB Output is correct
120 Correct 655 ms 1187440 KB Output is correct
121 Correct 673 ms 1182292 KB Output is correct
122 Correct 636 ms 1178316 KB Output is correct
123 Correct 629 ms 1178344 KB Output is correct
124 Correct 763 ms 1271836 KB Output is correct
125 Correct 1545 ms 1560780 KB Output is correct
126 Correct 1634 ms 1624232 KB Output is correct
127 Correct 1789 ms 1697156 KB Output is correct
128 Correct 1821 ms 1588220 KB Output is correct
129 Correct 1723 ms 1644812 KB Output is correct
130 Correct 1776 ms 1620652 KB Output is correct
131 Correct 1699 ms 1620668 KB Output is correct
132 Correct 461 ms 1145684 KB Output is correct
133 Correct 429 ms 1129040 KB Output is correct
134 Correct 424 ms 1129660 KB Output is correct
135 Correct 470 ms 1139624 KB Output is correct
136 Correct 445 ms 1141844 KB Output is correct
137 Correct 454 ms 1146552 KB Output is correct
138 Correct 467 ms 1150084 KB Output is correct
139 Correct 461 ms 1146316 KB Output is correct
140 Correct 466 ms 1145624 KB Output is correct
141 Correct 470 ms 1149996 KB Output is correct
142 Correct 457 ms 1146520 KB Output is correct
143 Correct 465 ms 1148600 KB Output is correct
144 Correct 451 ms 1145824 KB Output is correct
145 Correct 452 ms 1145528 KB Output is correct
146 Correct 465 ms 1145996 KB Output is correct
147 Correct 467 ms 1146240 KB Output is correct
148 Correct 464 ms 1146540 KB Output is correct
149 Correct 463 ms 1146488 KB Output is correct
150 Correct 460 ms 1146872 KB Output is correct
151 Correct 480 ms 1146304 KB Output is correct
152 Correct 452 ms 1145908 KB Output is correct
153 Correct 455 ms 1146028 KB Output is correct
154 Correct 537 ms 1171284 KB Output is correct
155 Correct 456 ms 1146168 KB Output is correct
156 Correct 507 ms 1170584 KB Output is correct
157 Correct 540 ms 1167952 KB Output is correct
158 Correct 534 ms 1187460 KB Output is correct
159 Correct 564 ms 1173032 KB Output is correct
160 Correct 534 ms 1171284 KB Output is correct
161 Correct 533 ms 1182312 KB Output is correct
162 Correct 561 ms 1178076 KB Output is correct
163 Correct 540 ms 1178508 KB Output is correct
164 Correct 533 ms 1171404 KB Output is correct
165 Correct 503 ms 1171388 KB Output is correct
166 Correct 549 ms 1171692 KB Output is correct
167 Correct 545 ms 1172308 KB Output is correct
168 Correct 540 ms 1172828 KB Output is correct
169 Correct 592 ms 1173848 KB Output is correct
170 Correct 554 ms 1176160 KB Output is correct
171 Correct 534 ms 1176308 KB Output is correct
172 Correct 680 ms 1173876 KB Output is correct
173 Correct 521 ms 1171500 KB Output is correct
174 Correct 598 ms 1186268 KB Output is correct
175 Correct 802 ms 1225780 KB Output is correct
176 Correct 951 ms 1345888 KB Output is correct
177 Correct 1460 ms 1416284 KB Output is correct
178 Correct 1519 ms 1509196 KB Output is correct
179 Correct 1749 ms 1564104 KB Output is correct
180 Correct 1908 ms 1566648 KB Output is correct
181 Execution timed out 2004 ms 1571396 KB Time limit exceeded
182 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 523 ms 1128532 KB Output is correct
2 Correct 430 ms 1128372 KB Output is correct
3 Correct 431 ms 1129044 KB Output is correct
4 Correct 428 ms 1128788 KB Output is correct
5 Correct 420 ms 1128788 KB Output is correct
6 Correct 418 ms 1128908 KB Output is correct
7 Correct 422 ms 1129148 KB Output is correct
8 Correct 418 ms 1128788 KB Output is correct
9 Correct 422 ms 1128528 KB Output is correct
10 Correct 417 ms 1128792 KB Output is correct
11 Correct 418 ms 1128532 KB Output is correct
12 Correct 417 ms 1129044 KB Output is correct
13 Correct 413 ms 1128644 KB Output is correct
14 Correct 416 ms 1128788 KB Output is correct
15 Correct 420 ms 1128532 KB Output is correct
16 Correct 422 ms 1128856 KB Output is correct
17 Correct 415 ms 1128788 KB Output is correct
18 Correct 417 ms 1129044 KB Output is correct
19 Correct 477 ms 1145680 KB Output is correct
20 Correct 439 ms 1141584 KB Output is correct
21 Correct 465 ms 1150064 KB Output is correct
22 Correct 461 ms 1146452 KB Output is correct
23 Correct 469 ms 1145676 KB Output is correct
24 Correct 449 ms 1145768 KB Output is correct
25 Correct 444 ms 1145428 KB Output is correct
26 Correct 481 ms 1146196 KB Output is correct
27 Correct 451 ms 1146076 KB Output is correct
28 Correct 453 ms 1145952 KB Output is correct
29 Correct 562 ms 1171468 KB Output is correct
30 Correct 451 ms 1145936 KB Output is correct
31 Correct 525 ms 1187320 KB Output is correct
32 Correct 578 ms 1172792 KB Output is correct
33 Correct 526 ms 1171284 KB Output is correct
34 Correct 505 ms 1171304 KB Output is correct
35 Correct 486 ms 1171164 KB Output is correct
36 Correct 525 ms 1176268 KB Output is correct
37 Correct 540 ms 1173800 KB Output is correct
38 Correct 489 ms 1171540 KB Output is correct
39 Correct 1976 ms 1556664 KB Output is correct
40 Correct 538 ms 1178192 KB Output is correct
41 Correct 519 ms 1181000 KB Output is correct
42 Correct 589 ms 1189996 KB Output is correct
43 Correct 588 ms 1197392 KB Output is correct
44 Correct 1014 ms 1348432 KB Output is correct
45 Correct 868 ms 1356868 KB Output is correct
46 Correct 1610 ms 1624256 KB Output is correct
47 Correct 1989 ms 1564656 KB Output is correct
48 Correct 1759 ms 1554620 KB Output is correct
49 Correct 1210 ms 1554424 KB Output is correct
50 Correct 1126 ms 1554304 KB Output is correct
51 Correct 1919 ms 1581204 KB Output is correct
52 Correct 1793 ms 1568016 KB Output is correct
53 Correct 1712 ms 1555916 KB Output is correct
54 Correct 423 ms 1128652 KB Output is correct
55 Correct 417 ms 1128532 KB Output is correct
56 Correct 430 ms 1128720 KB Output is correct
57 Correct 452 ms 1128440 KB Output is correct
58 Correct 414 ms 1128912 KB Output is correct
59 Correct 441 ms 1128784 KB Output is correct
60 Correct 467 ms 1128636 KB Output is correct
61 Correct 419 ms 1128532 KB Output is correct
62 Correct 421 ms 1128984 KB Output is correct
63 Correct 420 ms 1129040 KB Output is correct
64 Correct 416 ms 1128796 KB Output is correct
65 Correct 418 ms 1128788 KB Output is correct
66 Correct 420 ms 1128968 KB Output is correct
67 Correct 417 ms 1128968 KB Output is correct
68 Correct 429 ms 1129044 KB Output is correct
69 Correct 419 ms 1128788 KB Output is correct
70 Correct 422 ms 1128904 KB Output is correct
71 Correct 423 ms 1128516 KB Output is correct
72 Correct 418 ms 1128908 KB Output is correct
73 Correct 418 ms 1128532 KB Output is correct
74 Correct 418 ms 1128616 KB Output is correct
75 Correct 426 ms 1129040 KB Output is correct
76 Correct 416 ms 1128528 KB Output is correct
77 Correct 428 ms 1128664 KB Output is correct
78 Correct 415 ms 1128436 KB Output is correct
79 Correct 419 ms 1128640 KB Output is correct
80 Correct 440 ms 1128448 KB Output is correct
81 Correct 421 ms 1128788 KB Output is correct
82 Correct 420 ms 1128712 KB Output is correct
83 Correct 421 ms 1129152 KB Output is correct
84 Correct 444 ms 1128788 KB Output is correct
85 Correct 418 ms 1128880 KB Output is correct
86 Correct 455 ms 1128784 KB Output is correct
87 Correct 417 ms 1128416 KB Output is correct
88 Correct 418 ms 1128528 KB Output is correct
89 Correct 446 ms 1128608 KB Output is correct
90 Correct 510 ms 1128532 KB Output is correct
91 Correct 451 ms 1128488 KB Output is correct
92 Correct 469 ms 1128944 KB Output is correct
93 Correct 416 ms 1128996 KB Output is correct
94 Correct 458 ms 1129048 KB Output is correct
95 Correct 429 ms 1128788 KB Output is correct
96 Correct 425 ms 1128812 KB Output is correct
97 Correct 478 ms 1128676 KB Output is correct
98 Correct 442 ms 1128940 KB Output is correct
99 Correct 431 ms 1128672 KB Output is correct
100 Correct 474 ms 1128532 KB Output is correct
101 Correct 418 ms 1128716 KB Output is correct
102 Correct 515 ms 1128672 KB Output is correct
103 Correct 440 ms 1128488 KB Output is correct
104 Correct 453 ms 1128640 KB Output is correct
105 Correct 511 ms 1128648 KB Output is correct
106 Correct 478 ms 1129152 KB Output is correct
107 Correct 457 ms 1128912 KB Output is correct
108 Correct 435 ms 1128916 KB Output is correct
109 Correct 472 ms 1129260 KB Output is correct
110 Correct 503 ms 1139936 KB Output is correct
111 Correct 504 ms 1146700 KB Output is correct
112 Correct 565 ms 1150212 KB Output is correct
113 Correct 515 ms 1149808 KB Output is correct
114 Correct 546 ms 1146196 KB Output is correct
115 Correct 559 ms 1148904 KB Output is correct
116 Correct 517 ms 1147068 KB Output is correct
117 Correct 557 ms 1146220 KB Output is correct
118 Correct 513 ms 1146172 KB Output is correct
119 Correct 578 ms 1170828 KB Output is correct
120 Correct 655 ms 1187440 KB Output is correct
121 Correct 673 ms 1182292 KB Output is correct
122 Correct 636 ms 1178316 KB Output is correct
123 Correct 629 ms 1178344 KB Output is correct
124 Correct 763 ms 1271836 KB Output is correct
125 Correct 1545 ms 1560780 KB Output is correct
126 Correct 1634 ms 1624232 KB Output is correct
127 Correct 1789 ms 1697156 KB Output is correct
128 Correct 1821 ms 1588220 KB Output is correct
129 Correct 1723 ms 1644812 KB Output is correct
130 Correct 1776 ms 1620652 KB Output is correct
131 Correct 1699 ms 1620668 KB Output is correct
132 Correct 461 ms 1145684 KB Output is correct
133 Correct 429 ms 1129040 KB Output is correct
134 Correct 424 ms 1129660 KB Output is correct
135 Correct 470 ms 1139624 KB Output is correct
136 Correct 445 ms 1141844 KB Output is correct
137 Correct 454 ms 1146552 KB Output is correct
138 Correct 467 ms 1150084 KB Output is correct
139 Correct 461 ms 1146316 KB Output is correct
140 Correct 466 ms 1145624 KB Output is correct
141 Correct 470 ms 1149996 KB Output is correct
142 Correct 457 ms 1146520 KB Output is correct
143 Correct 465 ms 1148600 KB Output is correct
144 Correct 451 ms 1145824 KB Output is correct
145 Correct 452 ms 1145528 KB Output is correct
146 Correct 465 ms 1145996 KB Output is correct
147 Correct 467 ms 1146240 KB Output is correct
148 Correct 464 ms 1146540 KB Output is correct
149 Correct 463 ms 1146488 KB Output is correct
150 Correct 460 ms 1146872 KB Output is correct
151 Correct 480 ms 1146304 KB Output is correct
152 Correct 452 ms 1145908 KB Output is correct
153 Correct 455 ms 1146028 KB Output is correct
154 Correct 537 ms 1171284 KB Output is correct
155 Correct 456 ms 1146168 KB Output is correct
156 Correct 507 ms 1170584 KB Output is correct
157 Correct 540 ms 1167952 KB Output is correct
158 Correct 534 ms 1187460 KB Output is correct
159 Correct 564 ms 1173032 KB Output is correct
160 Correct 534 ms 1171284 KB Output is correct
161 Correct 533 ms 1182312 KB Output is correct
162 Correct 561 ms 1178076 KB Output is correct
163 Correct 540 ms 1178508 KB Output is correct
164 Correct 533 ms 1171404 KB Output is correct
165 Correct 503 ms 1171388 KB Output is correct
166 Correct 549 ms 1171692 KB Output is correct
167 Correct 545 ms 1172308 KB Output is correct
168 Correct 540 ms 1172828 KB Output is correct
169 Correct 592 ms 1173848 KB Output is correct
170 Correct 554 ms 1176160 KB Output is correct
171 Correct 534 ms 1176308 KB Output is correct
172 Correct 680 ms 1173876 KB Output is correct
173 Correct 521 ms 1171500 KB Output is correct
174 Correct 598 ms 1186268 KB Output is correct
175 Correct 802 ms 1225780 KB Output is correct
176 Correct 951 ms 1345888 KB Output is correct
177 Correct 1460 ms 1416284 KB Output is correct
178 Correct 1519 ms 1509196 KB Output is correct
179 Correct 1749 ms 1564104 KB Output is correct
180 Correct 1908 ms 1566648 KB Output is correct
181 Execution timed out 2004 ms 1571396 KB Time limit exceeded
182 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 523 ms 1128532 KB Output is correct
2 Correct 430 ms 1128372 KB Output is correct
3 Correct 431 ms 1129044 KB Output is correct
4 Correct 428 ms 1128788 KB Output is correct
5 Correct 420 ms 1128788 KB Output is correct
6 Correct 418 ms 1128908 KB Output is correct
7 Correct 422 ms 1129148 KB Output is correct
8 Correct 418 ms 1128788 KB Output is correct
9 Correct 422 ms 1128528 KB Output is correct
10 Correct 417 ms 1128792 KB Output is correct
11 Correct 418 ms 1128532 KB Output is correct
12 Correct 417 ms 1129044 KB Output is correct
13 Correct 413 ms 1128644 KB Output is correct
14 Correct 416 ms 1128788 KB Output is correct
15 Correct 420 ms 1128532 KB Output is correct
16 Correct 422 ms 1128856 KB Output is correct
17 Correct 415 ms 1128788 KB Output is correct
18 Correct 417 ms 1129044 KB Output is correct
19 Correct 477 ms 1145680 KB Output is correct
20 Correct 439 ms 1141584 KB Output is correct
21 Correct 465 ms 1150064 KB Output is correct
22 Correct 461 ms 1146452 KB Output is correct
23 Correct 469 ms 1145676 KB Output is correct
24 Correct 449 ms 1145768 KB Output is correct
25 Correct 444 ms 1145428 KB Output is correct
26 Correct 481 ms 1146196 KB Output is correct
27 Correct 451 ms 1146076 KB Output is correct
28 Correct 453 ms 1145952 KB Output is correct
29 Correct 562 ms 1171468 KB Output is correct
30 Correct 451 ms 1145936 KB Output is correct
31 Correct 525 ms 1187320 KB Output is correct
32 Correct 578 ms 1172792 KB Output is correct
33 Correct 526 ms 1171284 KB Output is correct
34 Correct 505 ms 1171304 KB Output is correct
35 Correct 486 ms 1171164 KB Output is correct
36 Correct 525 ms 1176268 KB Output is correct
37 Correct 540 ms 1173800 KB Output is correct
38 Correct 489 ms 1171540 KB Output is correct
39 Correct 1976 ms 1556664 KB Output is correct
40 Correct 538 ms 1178192 KB Output is correct
41 Correct 519 ms 1181000 KB Output is correct
42 Correct 589 ms 1189996 KB Output is correct
43 Correct 588 ms 1197392 KB Output is correct
44 Correct 1014 ms 1348432 KB Output is correct
45 Correct 868 ms 1356868 KB Output is correct
46 Correct 1610 ms 1624256 KB Output is correct
47 Correct 1989 ms 1564656 KB Output is correct
48 Correct 1759 ms 1554620 KB Output is correct
49 Correct 1210 ms 1554424 KB Output is correct
50 Correct 1126 ms 1554304 KB Output is correct
51 Correct 1919 ms 1581204 KB Output is correct
52 Correct 1793 ms 1568016 KB Output is correct
53 Correct 1712 ms 1555916 KB Output is correct
54 Correct 423 ms 1128652 KB Output is correct
55 Correct 417 ms 1128532 KB Output is correct
56 Correct 430 ms 1128720 KB Output is correct
57 Correct 452 ms 1128440 KB Output is correct
58 Correct 414 ms 1128912 KB Output is correct
59 Correct 441 ms 1128784 KB Output is correct
60 Correct 467 ms 1128636 KB Output is correct
61 Correct 419 ms 1128532 KB Output is correct
62 Correct 421 ms 1128984 KB Output is correct
63 Correct 420 ms 1129040 KB Output is correct
64 Correct 416 ms 1128796 KB Output is correct
65 Correct 418 ms 1128788 KB Output is correct
66 Correct 420 ms 1128968 KB Output is correct
67 Correct 417 ms 1128968 KB Output is correct
68 Correct 429 ms 1129044 KB Output is correct
69 Correct 419 ms 1128788 KB Output is correct
70 Correct 422 ms 1128904 KB Output is correct
71 Correct 423 ms 1128516 KB Output is correct
72 Correct 418 ms 1128908 KB Output is correct
73 Correct 418 ms 1128532 KB Output is correct
74 Correct 418 ms 1128616 KB Output is correct
75 Correct 426 ms 1129040 KB Output is correct
76 Correct 416 ms 1128528 KB Output is correct
77 Correct 428 ms 1128664 KB Output is correct
78 Correct 415 ms 1128436 KB Output is correct
79 Correct 419 ms 1128640 KB Output is correct
80 Correct 440 ms 1128448 KB Output is correct
81 Correct 421 ms 1128788 KB Output is correct
82 Correct 420 ms 1128712 KB Output is correct
83 Correct 421 ms 1129152 KB Output is correct
84 Correct 444 ms 1128788 KB Output is correct
85 Correct 418 ms 1128880 KB Output is correct
86 Correct 455 ms 1128784 KB Output is correct
87 Correct 417 ms 1128416 KB Output is correct
88 Correct 418 ms 1128528 KB Output is correct
89 Correct 446 ms 1128608 KB Output is correct
90 Correct 510 ms 1128532 KB Output is correct
91 Correct 451 ms 1128488 KB Output is correct
92 Correct 469 ms 1128944 KB Output is correct
93 Correct 416 ms 1128996 KB Output is correct
94 Correct 458 ms 1129048 KB Output is correct
95 Correct 429 ms 1128788 KB Output is correct
96 Correct 425 ms 1128812 KB Output is correct
97 Correct 478 ms 1128676 KB Output is correct
98 Correct 442 ms 1128940 KB Output is correct
99 Correct 431 ms 1128672 KB Output is correct
100 Correct 474 ms 1128532 KB Output is correct
101 Correct 418 ms 1128716 KB Output is correct
102 Correct 515 ms 1128672 KB Output is correct
103 Correct 440 ms 1128488 KB Output is correct
104 Correct 453 ms 1128640 KB Output is correct
105 Correct 511 ms 1128648 KB Output is correct
106 Correct 478 ms 1129152 KB Output is correct
107 Correct 457 ms 1128912 KB Output is correct
108 Correct 435 ms 1128916 KB Output is correct
109 Correct 472 ms 1129260 KB Output is correct
110 Correct 503 ms 1139936 KB Output is correct
111 Correct 504 ms 1146700 KB Output is correct
112 Correct 565 ms 1150212 KB Output is correct
113 Correct 515 ms 1149808 KB Output is correct
114 Correct 546 ms 1146196 KB Output is correct
115 Correct 559 ms 1148904 KB Output is correct
116 Correct 517 ms 1147068 KB Output is correct
117 Correct 557 ms 1146220 KB Output is correct
118 Correct 513 ms 1146172 KB Output is correct
119 Correct 578 ms 1170828 KB Output is correct
120 Correct 655 ms 1187440 KB Output is correct
121 Correct 673 ms 1182292 KB Output is correct
122 Correct 636 ms 1178316 KB Output is correct
123 Correct 629 ms 1178344 KB Output is correct
124 Correct 763 ms 1271836 KB Output is correct
125 Correct 1545 ms 1560780 KB Output is correct
126 Correct 1634 ms 1624232 KB Output is correct
127 Correct 1789 ms 1697156 KB Output is correct
128 Correct 1821 ms 1588220 KB Output is correct
129 Correct 1723 ms 1644812 KB Output is correct
130 Correct 1776 ms 1620652 KB Output is correct
131 Correct 1699 ms 1620668 KB Output is correct
132 Correct 461 ms 1145684 KB Output is correct
133 Correct 429 ms 1129040 KB Output is correct
134 Correct 424 ms 1129660 KB Output is correct
135 Correct 470 ms 1139624 KB Output is correct
136 Correct 445 ms 1141844 KB Output is correct
137 Correct 454 ms 1146552 KB Output is correct
138 Correct 467 ms 1150084 KB Output is correct
139 Correct 461 ms 1146316 KB Output is correct
140 Correct 466 ms 1145624 KB Output is correct
141 Correct 470 ms 1149996 KB Output is correct
142 Correct 457 ms 1146520 KB Output is correct
143 Correct 465 ms 1148600 KB Output is correct
144 Correct 451 ms 1145824 KB Output is correct
145 Correct 452 ms 1145528 KB Output is correct
146 Correct 465 ms 1145996 KB Output is correct
147 Correct 467 ms 1146240 KB Output is correct
148 Correct 464 ms 1146540 KB Output is correct
149 Correct 463 ms 1146488 KB Output is correct
150 Correct 460 ms 1146872 KB Output is correct
151 Correct 480 ms 1146304 KB Output is correct
152 Correct 452 ms 1145908 KB Output is correct
153 Correct 455 ms 1146028 KB Output is correct
154 Correct 537 ms 1171284 KB Output is correct
155 Correct 456 ms 1146168 KB Output is correct
156 Correct 507 ms 1170584 KB Output is correct
157 Correct 540 ms 1167952 KB Output is correct
158 Correct 534 ms 1187460 KB Output is correct
159 Correct 564 ms 1173032 KB Output is correct
160 Correct 534 ms 1171284 KB Output is correct
161 Correct 533 ms 1182312 KB Output is correct
162 Correct 561 ms 1178076 KB Output is correct
163 Correct 540 ms 1178508 KB Output is correct
164 Correct 533 ms 1171404 KB Output is correct
165 Correct 503 ms 1171388 KB Output is correct
166 Correct 549 ms 1171692 KB Output is correct
167 Correct 545 ms 1172308 KB Output is correct
168 Correct 540 ms 1172828 KB Output is correct
169 Correct 592 ms 1173848 KB Output is correct
170 Correct 554 ms 1176160 KB Output is correct
171 Correct 534 ms 1176308 KB Output is correct
172 Correct 680 ms 1173876 KB Output is correct
173 Correct 521 ms 1171500 KB Output is correct
174 Correct 598 ms 1186268 KB Output is correct
175 Correct 802 ms 1225780 KB Output is correct
176 Correct 951 ms 1345888 KB Output is correct
177 Correct 1460 ms 1416284 KB Output is correct
178 Correct 1519 ms 1509196 KB Output is correct
179 Correct 1749 ms 1564104 KB Output is correct
180 Correct 1908 ms 1566648 KB Output is correct
181 Execution timed out 2004 ms 1571396 KB Time limit exceeded
182 Halted 0 ms 0 KB -