답안 #1058021

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1058021 2024-08-14T08:00:46 Z 정민찬(#11077) Telephone Plans (CCO24_day2problem3) C++17
25 / 25
1246 ms 136532 KB
#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef pair<ll,ll> pll;

set<ll> adj[500010];
ll sz[2000010];
ll id[2000010];

void dfs(ll x, ll p, ll nw) {
    id[x] = nw;
    for (auto &y : adj[x]) {
        if (y == p) continue;
        dfs(y, x, nw);
    }
}

ll getSize(ll x, ll p) {
    ll ret = 1;
    for (auto &y : adj[x]) {
        if (y == p) continue;
        ret += getSize(y, x);
    }
    return ret;
}

ll add[1500010];

int main() {
    ios_base :: sync_with_stdio(false); cin.tie(NULL);
    ll E;
    cin >> E;
    ll N, Q;
    cin >> N >> Q;
    for (ll i=1; i<=N; i++) {
        id[i] = i;
        sz[i] = 1;
    }
    ll pv = N;
    ll prv = 0;
    ll cur = 0;
    for (ll q=1; q<=Q; q++) {
        if (q != 1) add[q-1] = add[q-2];
        ll cmd;
        cin >> cmd;
        if (cmd == 1) {
            ll x, y;
            cin >> x >> y;
            if (E) {
                x ^= prv;
                y ^= prv;
            }
            if (sz[id[x]] < sz[id[y]]) swap(x, y);
            cur -= sz[id[x]] * (sz[id[x]]-1) / 2;
            cur -= sz[id[y]] * (sz[id[y]]-1) / 2;
            sz[id[x]] += sz[id[y]];
            cur += sz[id[x]] * (sz[id[x]]-1) / 2;
            dfs(y, -1, id[x]);
            adj[x].insert(y);
            adj[y].insert(x);
        }
        else if (cmd == 2) {
            ll x, y;
            cin >> x >> y;
            if (E) {
                x ^= prv;
                y ^= prv;
            }
            adj[x].erase(y);
            adj[y].erase(x);
            ll cnt = 1;
            vector<array<ll,3>> stx, sty;
            stx.push_back({x, -1, -1});
            sty.push_back({y, -1, -1});
            while (true) {
                while (!stx.empty()) {
                    ll vtx = stx.back()[0];
                    ll par = stx.back()[1];
                    ll lo = stx.back()[2];
                    stx.pop_back();
                    auto it = adj[vtx].upper_bound(lo);
                    if (it == adj[vtx].end()) continue;
                    if (*it == par)
                        it = adj[vtx].upper_bound(par);
                    if (it == adj[vtx].end()) continue;
                    stx.push_back({vtx, par, *it});
                    stx.push_back({*it, vtx, -1});
                    break;
                }
                while (!sty.empty()) {
                    ll vtx = sty.back()[0];
                    ll par = sty.back()[1];
                    ll lo = sty.back()[2];
                    sty.pop_back();
                    auto it = adj[vtx].upper_bound(lo);
                    if (it == adj[vtx].end()) continue;
                    if (*it == par)
                        it = adj[vtx].upper_bound(par);
                    if (it == adj[vtx].end()) continue;
                    sty.push_back({vtx, par, *it});
                    sty.push_back({*it, vtx, -1});
                    break;
                }
                if (stx.empty() || sty.empty()) break;
                cnt ++;
            }
            if (stx.empty()) {
                swap(x, y);
            }
            ll szx = sz[id[x]] - cnt;
            ll szy = cnt;
            dfs(y, -1, ++pv);
            sz[id[x]] = szx;
            sz[id[y]] = szy;
            add[q-1] += szx * szy;
            cur -= szx * szy;
        }
        else {
            ll t;
            cin >> t;
            if (E) {
                t ^= prv;
            }
            ll ans = cur;
            if (q-t == 0) ans += add[q-1];
            else ans += add[q-1] - add[q-t-1];
            cout << ans << '\n';
            prv = ans;
        }
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 29788 KB Output is correct
2 Correct 4 ms 29892 KB Output is correct
3 Correct 4 ms 29788 KB Output is correct
4 Correct 3 ms 29788 KB Output is correct
5 Correct 4 ms 29892 KB Output is correct
6 Correct 4 ms 29784 KB Output is correct
7 Correct 3 ms 29788 KB Output is correct
8 Correct 4 ms 29788 KB Output is correct
9 Correct 4 ms 29788 KB Output is correct
10 Correct 5 ms 29788 KB Output is correct
11 Correct 5 ms 29788 KB Output is correct
12 Correct 4 ms 29788 KB Output is correct
13 Correct 4 ms 29660 KB Output is correct
14 Correct 4 ms 29888 KB Output is correct
15 Correct 4 ms 29788 KB Output is correct
16 Correct 3 ms 29788 KB Output is correct
17 Correct 3 ms 29788 KB Output is correct
18 Correct 3 ms 29788 KB Output is correct
19 Correct 3 ms 29788 KB Output is correct
20 Correct 3 ms 29788 KB Output is correct
21 Correct 3 ms 29788 KB Output is correct
22 Correct 4 ms 29788 KB Output is correct
23 Correct 4 ms 29784 KB Output is correct
24 Correct 3 ms 29788 KB Output is correct
25 Correct 3 ms 29788 KB Output is correct
26 Correct 3 ms 29788 KB Output is correct
27 Correct 4 ms 29788 KB Output is correct
28 Correct 4 ms 29788 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 29784 KB Output is correct
2 Correct 5 ms 29788 KB Output is correct
3 Correct 5 ms 29784 KB Output is correct
4 Correct 3 ms 29652 KB Output is correct
5 Correct 3 ms 29644 KB Output is correct
6 Correct 4 ms 29788 KB Output is correct
7 Correct 4 ms 30040 KB Output is correct
8 Correct 5 ms 29788 KB Output is correct
9 Correct 3 ms 29648 KB Output is correct
10 Correct 4 ms 29788 KB Output is correct
11 Correct 4 ms 29788 KB Output is correct
12 Correct 3 ms 29788 KB Output is correct
13 Correct 4 ms 30040 KB Output is correct
14 Correct 4 ms 29788 KB Output is correct
15 Correct 3 ms 29788 KB Output is correct
16 Correct 3 ms 29788 KB Output is correct
17 Correct 4 ms 29788 KB Output is correct
18 Correct 4 ms 29788 KB Output is correct
19 Correct 3 ms 29788 KB Output is correct
20 Correct 3 ms 29788 KB Output is correct
21 Correct 3 ms 29788 KB Output is correct
22 Correct 4 ms 29788 KB Output is correct
23 Correct 4 ms 29788 KB Output is correct
24 Correct 3 ms 29892 KB Output is correct
25 Correct 4 ms 29880 KB Output is correct
26 Correct 4 ms 29788 KB Output is correct
27 Correct 4 ms 29788 KB Output is correct
28 Correct 3 ms 29788 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 29788 KB Output is correct
2 Correct 4 ms 29892 KB Output is correct
3 Correct 4 ms 29788 KB Output is correct
4 Correct 3 ms 29788 KB Output is correct
5 Correct 4 ms 29892 KB Output is correct
6 Correct 4 ms 29784 KB Output is correct
7 Correct 3 ms 29788 KB Output is correct
8 Correct 4 ms 29788 KB Output is correct
9 Correct 4 ms 29788 KB Output is correct
10 Correct 5 ms 29788 KB Output is correct
11 Correct 5 ms 29788 KB Output is correct
12 Correct 4 ms 29788 KB Output is correct
13 Correct 4 ms 29660 KB Output is correct
14 Correct 4 ms 29888 KB Output is correct
15 Correct 4 ms 29788 KB Output is correct
16 Correct 3 ms 29788 KB Output is correct
17 Correct 3 ms 29788 KB Output is correct
18 Correct 3 ms 29788 KB Output is correct
19 Correct 3 ms 29788 KB Output is correct
20 Correct 3 ms 29788 KB Output is correct
21 Correct 3 ms 29788 KB Output is correct
22 Correct 4 ms 29788 KB Output is correct
23 Correct 4 ms 29784 KB Output is correct
24 Correct 3 ms 29788 KB Output is correct
25 Correct 3 ms 29788 KB Output is correct
26 Correct 3 ms 29788 KB Output is correct
27 Correct 4 ms 29788 KB Output is correct
28 Correct 4 ms 29788 KB Output is correct
29 Correct 4 ms 30044 KB Output is correct
30 Correct 5 ms 30044 KB Output is correct
31 Correct 5 ms 29908 KB Output is correct
32 Correct 6 ms 30040 KB Output is correct
33 Correct 5 ms 30128 KB Output is correct
34 Correct 5 ms 29916 KB Output is correct
35 Correct 6 ms 30136 KB Output is correct
36 Correct 6 ms 29960 KB Output is correct
37 Correct 6 ms 30044 KB Output is correct
38 Correct 4 ms 30044 KB Output is correct
39 Correct 5 ms 30044 KB Output is correct
40 Correct 5 ms 29908 KB Output is correct
41 Correct 5 ms 30044 KB Output is correct
42 Correct 5 ms 29900 KB Output is correct
43 Correct 7 ms 30044 KB Output is correct
44 Correct 4 ms 30044 KB Output is correct
45 Correct 5 ms 29904 KB Output is correct
46 Correct 6 ms 30040 KB Output is correct
47 Correct 6 ms 30044 KB Output is correct
48 Correct 5 ms 30012 KB Output is correct
49 Correct 5 ms 30044 KB Output is correct
50 Correct 4 ms 29788 KB Output is correct
51 Correct 4 ms 29892 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 29784 KB Output is correct
2 Correct 5 ms 29788 KB Output is correct
3 Correct 5 ms 29784 KB Output is correct
4 Correct 3 ms 29652 KB Output is correct
5 Correct 3 ms 29644 KB Output is correct
6 Correct 4 ms 29788 KB Output is correct
7 Correct 4 ms 30040 KB Output is correct
8 Correct 5 ms 29788 KB Output is correct
9 Correct 3 ms 29648 KB Output is correct
10 Correct 4 ms 29788 KB Output is correct
11 Correct 4 ms 29788 KB Output is correct
12 Correct 3 ms 29788 KB Output is correct
13 Correct 4 ms 30040 KB Output is correct
14 Correct 4 ms 29788 KB Output is correct
15 Correct 3 ms 29788 KB Output is correct
16 Correct 3 ms 29788 KB Output is correct
17 Correct 4 ms 29788 KB Output is correct
18 Correct 4 ms 29788 KB Output is correct
19 Correct 3 ms 29788 KB Output is correct
20 Correct 3 ms 29788 KB Output is correct
21 Correct 3 ms 29788 KB Output is correct
22 Correct 4 ms 29788 KB Output is correct
23 Correct 4 ms 29788 KB Output is correct
24 Correct 3 ms 29892 KB Output is correct
25 Correct 4 ms 29880 KB Output is correct
26 Correct 4 ms 29788 KB Output is correct
27 Correct 4 ms 29788 KB Output is correct
28 Correct 3 ms 29788 KB Output is correct
29 Correct 4 ms 30044 KB Output is correct
30 Correct 4 ms 30044 KB Output is correct
31 Correct 4 ms 30044 KB Output is correct
32 Correct 4 ms 30048 KB Output is correct
33 Correct 7 ms 30052 KB Output is correct
34 Correct 5 ms 30052 KB Output is correct
35 Correct 6 ms 30044 KB Output is correct
36 Correct 5 ms 30044 KB Output is correct
37 Correct 5 ms 30044 KB Output is correct
38 Correct 5 ms 30044 KB Output is correct
39 Correct 5 ms 30044 KB Output is correct
40 Correct 5 ms 30044 KB Output is correct
41 Correct 5 ms 30044 KB Output is correct
42 Correct 5 ms 30044 KB Output is correct
43 Correct 5 ms 30040 KB Output is correct
44 Correct 5 ms 30044 KB Output is correct
45 Correct 5 ms 29920 KB Output is correct
46 Correct 4 ms 30044 KB Output is correct
47 Correct 5 ms 30044 KB Output is correct
48 Correct 4 ms 30044 KB Output is correct
49 Correct 4 ms 29912 KB Output is correct
50 Correct 4 ms 29788 KB Output is correct
51 Correct 5 ms 30044 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 29788 KB Output is correct
2 Correct 4 ms 29892 KB Output is correct
3 Correct 4 ms 29788 KB Output is correct
4 Correct 3 ms 29788 KB Output is correct
5 Correct 4 ms 29892 KB Output is correct
6 Correct 4 ms 29784 KB Output is correct
7 Correct 3 ms 29788 KB Output is correct
8 Correct 4 ms 29788 KB Output is correct
9 Correct 4 ms 29788 KB Output is correct
10 Correct 5 ms 29788 KB Output is correct
11 Correct 5 ms 29788 KB Output is correct
12 Correct 4 ms 29788 KB Output is correct
13 Correct 4 ms 29660 KB Output is correct
14 Correct 4 ms 29888 KB Output is correct
15 Correct 4 ms 29788 KB Output is correct
16 Correct 3 ms 29788 KB Output is correct
17 Correct 3 ms 29788 KB Output is correct
18 Correct 3 ms 29788 KB Output is correct
19 Correct 3 ms 29788 KB Output is correct
20 Correct 3 ms 29788 KB Output is correct
21 Correct 3 ms 29788 KB Output is correct
22 Correct 4 ms 29788 KB Output is correct
23 Correct 4 ms 29784 KB Output is correct
24 Correct 3 ms 29788 KB Output is correct
25 Correct 3 ms 29788 KB Output is correct
26 Correct 3 ms 29788 KB Output is correct
27 Correct 4 ms 29788 KB Output is correct
28 Correct 4 ms 29788 KB Output is correct
29 Correct 4 ms 30044 KB Output is correct
30 Correct 5 ms 30044 KB Output is correct
31 Correct 5 ms 29908 KB Output is correct
32 Correct 6 ms 30040 KB Output is correct
33 Correct 5 ms 30128 KB Output is correct
34 Correct 5 ms 29916 KB Output is correct
35 Correct 6 ms 30136 KB Output is correct
36 Correct 6 ms 29960 KB Output is correct
37 Correct 6 ms 30044 KB Output is correct
38 Correct 4 ms 30044 KB Output is correct
39 Correct 5 ms 30044 KB Output is correct
40 Correct 5 ms 29908 KB Output is correct
41 Correct 5 ms 30044 KB Output is correct
42 Correct 5 ms 29900 KB Output is correct
43 Correct 7 ms 30044 KB Output is correct
44 Correct 4 ms 30044 KB Output is correct
45 Correct 5 ms 29904 KB Output is correct
46 Correct 6 ms 30040 KB Output is correct
47 Correct 6 ms 30044 KB Output is correct
48 Correct 5 ms 30012 KB Output is correct
49 Correct 5 ms 30044 KB Output is correct
50 Correct 4 ms 29788 KB Output is correct
51 Correct 4 ms 29892 KB Output is correct
52 Correct 60 ms 48468 KB Output is correct
53 Correct 62 ms 48468 KB Output is correct
54 Correct 67 ms 44712 KB Output is correct
55 Correct 61 ms 48464 KB Output is correct
56 Correct 107 ms 48720 KB Output is correct
57 Correct 70 ms 44624 KB Output is correct
58 Correct 80 ms 48712 KB Output is correct
59 Correct 98 ms 48464 KB Output is correct
60 Correct 74 ms 44624 KB Output is correct
61 Correct 93 ms 48636 KB Output is correct
62 Correct 124 ms 48468 KB Output is correct
63 Correct 91 ms 45140 KB Output is correct
64 Correct 74 ms 48468 KB Output is correct
65 Correct 88 ms 48488 KB Output is correct
66 Correct 93 ms 44932 KB Output is correct
67 Correct 67 ms 48484 KB Output is correct
68 Correct 120 ms 48404 KB Output is correct
69 Correct 65 ms 48476 KB Output is correct
70 Correct 129 ms 48468 KB Output is correct
71 Correct 71 ms 44628 KB Output is correct
72 Correct 69 ms 44624 KB Output is correct
73 Correct 42 ms 38224 KB Output is correct
74 Correct 36 ms 36576 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 29784 KB Output is correct
2 Correct 5 ms 29788 KB Output is correct
3 Correct 5 ms 29784 KB Output is correct
4 Correct 3 ms 29652 KB Output is correct
5 Correct 3 ms 29644 KB Output is correct
6 Correct 4 ms 29788 KB Output is correct
7 Correct 4 ms 30040 KB Output is correct
8 Correct 5 ms 29788 KB Output is correct
9 Correct 3 ms 29648 KB Output is correct
10 Correct 4 ms 29788 KB Output is correct
11 Correct 4 ms 29788 KB Output is correct
12 Correct 3 ms 29788 KB Output is correct
13 Correct 4 ms 30040 KB Output is correct
14 Correct 4 ms 29788 KB Output is correct
15 Correct 3 ms 29788 KB Output is correct
16 Correct 3 ms 29788 KB Output is correct
17 Correct 4 ms 29788 KB Output is correct
18 Correct 4 ms 29788 KB Output is correct
19 Correct 3 ms 29788 KB Output is correct
20 Correct 3 ms 29788 KB Output is correct
21 Correct 3 ms 29788 KB Output is correct
22 Correct 4 ms 29788 KB Output is correct
23 Correct 4 ms 29788 KB Output is correct
24 Correct 3 ms 29892 KB Output is correct
25 Correct 4 ms 29880 KB Output is correct
26 Correct 4 ms 29788 KB Output is correct
27 Correct 4 ms 29788 KB Output is correct
28 Correct 3 ms 29788 KB Output is correct
29 Correct 4 ms 30044 KB Output is correct
30 Correct 4 ms 30044 KB Output is correct
31 Correct 4 ms 30044 KB Output is correct
32 Correct 4 ms 30048 KB Output is correct
33 Correct 7 ms 30052 KB Output is correct
34 Correct 5 ms 30052 KB Output is correct
35 Correct 6 ms 30044 KB Output is correct
36 Correct 5 ms 30044 KB Output is correct
37 Correct 5 ms 30044 KB Output is correct
38 Correct 5 ms 30044 KB Output is correct
39 Correct 5 ms 30044 KB Output is correct
40 Correct 5 ms 30044 KB Output is correct
41 Correct 5 ms 30044 KB Output is correct
42 Correct 5 ms 30044 KB Output is correct
43 Correct 5 ms 30040 KB Output is correct
44 Correct 5 ms 30044 KB Output is correct
45 Correct 5 ms 29920 KB Output is correct
46 Correct 4 ms 30044 KB Output is correct
47 Correct 5 ms 30044 KB Output is correct
48 Correct 4 ms 30044 KB Output is correct
49 Correct 4 ms 29912 KB Output is correct
50 Correct 4 ms 29788 KB Output is correct
51 Correct 5 ms 30044 KB Output is correct
52 Correct 67 ms 48468 KB Output is correct
53 Correct 70 ms 48692 KB Output is correct
54 Correct 69 ms 44628 KB Output is correct
55 Correct 73 ms 48516 KB Output is correct
56 Correct 127 ms 48412 KB Output is correct
57 Correct 84 ms 44628 KB Output is correct
58 Correct 70 ms 48468 KB Output is correct
59 Correct 110 ms 48604 KB Output is correct
60 Correct 82 ms 44836 KB Output is correct
61 Correct 109 ms 48464 KB Output is correct
62 Correct 105 ms 48464 KB Output is correct
63 Correct 101 ms 45140 KB Output is correct
64 Correct 78 ms 48660 KB Output is correct
65 Correct 89 ms 48460 KB Output is correct
66 Correct 106 ms 45136 KB Output is correct
67 Correct 69 ms 48464 KB Output is correct
68 Correct 112 ms 48608 KB Output is correct
69 Correct 79 ms 48464 KB Output is correct
70 Correct 120 ms 48576 KB Output is correct
71 Correct 72 ms 44624 KB Output is correct
72 Correct 80 ms 44640 KB Output is correct
73 Correct 39 ms 38228 KB Output is correct
74 Correct 37 ms 36688 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 29784 KB Output is correct
2 Correct 5 ms 29788 KB Output is correct
3 Correct 5 ms 29784 KB Output is correct
4 Correct 3 ms 29652 KB Output is correct
5 Correct 3 ms 29644 KB Output is correct
6 Correct 4 ms 29788 KB Output is correct
7 Correct 4 ms 30040 KB Output is correct
8 Correct 5 ms 29788 KB Output is correct
9 Correct 3 ms 29648 KB Output is correct
10 Correct 4 ms 29788 KB Output is correct
11 Correct 4 ms 29788 KB Output is correct
12 Correct 3 ms 29788 KB Output is correct
13 Correct 4 ms 30040 KB Output is correct
14 Correct 4 ms 29788 KB Output is correct
15 Correct 3 ms 29788 KB Output is correct
16 Correct 3 ms 29788 KB Output is correct
17 Correct 4 ms 29788 KB Output is correct
18 Correct 4 ms 29788 KB Output is correct
19 Correct 3 ms 29788 KB Output is correct
20 Correct 3 ms 29788 KB Output is correct
21 Correct 3 ms 29788 KB Output is correct
22 Correct 4 ms 29788 KB Output is correct
23 Correct 4 ms 29788 KB Output is correct
24 Correct 3 ms 29892 KB Output is correct
25 Correct 4 ms 29880 KB Output is correct
26 Correct 4 ms 29788 KB Output is correct
27 Correct 4 ms 29788 KB Output is correct
28 Correct 3 ms 29788 KB Output is correct
29 Correct 4 ms 30044 KB Output is correct
30 Correct 4 ms 30044 KB Output is correct
31 Correct 4 ms 30044 KB Output is correct
32 Correct 4 ms 30048 KB Output is correct
33 Correct 7 ms 30052 KB Output is correct
34 Correct 5 ms 30052 KB Output is correct
35 Correct 6 ms 30044 KB Output is correct
36 Correct 5 ms 30044 KB Output is correct
37 Correct 5 ms 30044 KB Output is correct
38 Correct 5 ms 30044 KB Output is correct
39 Correct 5 ms 30044 KB Output is correct
40 Correct 5 ms 30044 KB Output is correct
41 Correct 5 ms 30044 KB Output is correct
42 Correct 5 ms 30044 KB Output is correct
43 Correct 5 ms 30040 KB Output is correct
44 Correct 5 ms 30044 KB Output is correct
45 Correct 5 ms 29920 KB Output is correct
46 Correct 4 ms 30044 KB Output is correct
47 Correct 5 ms 30044 KB Output is correct
48 Correct 4 ms 30044 KB Output is correct
49 Correct 4 ms 29912 KB Output is correct
50 Correct 4 ms 29788 KB Output is correct
51 Correct 5 ms 30044 KB Output is correct
52 Correct 67 ms 48468 KB Output is correct
53 Correct 70 ms 48692 KB Output is correct
54 Correct 69 ms 44628 KB Output is correct
55 Correct 73 ms 48516 KB Output is correct
56 Correct 127 ms 48412 KB Output is correct
57 Correct 84 ms 44628 KB Output is correct
58 Correct 70 ms 48468 KB Output is correct
59 Correct 110 ms 48604 KB Output is correct
60 Correct 82 ms 44836 KB Output is correct
61 Correct 109 ms 48464 KB Output is correct
62 Correct 105 ms 48464 KB Output is correct
63 Correct 101 ms 45140 KB Output is correct
64 Correct 78 ms 48660 KB Output is correct
65 Correct 89 ms 48460 KB Output is correct
66 Correct 106 ms 45136 KB Output is correct
67 Correct 69 ms 48464 KB Output is correct
68 Correct 112 ms 48608 KB Output is correct
69 Correct 79 ms 48464 KB Output is correct
70 Correct 120 ms 48576 KB Output is correct
71 Correct 72 ms 44624 KB Output is correct
72 Correct 80 ms 44640 KB Output is correct
73 Correct 39 ms 38228 KB Output is correct
74 Correct 37 ms 36688 KB Output is correct
75 Correct 423 ms 120212 KB Output is correct
76 Correct 432 ms 132752 KB Output is correct
77 Correct 560 ms 104088 KB Output is correct
78 Correct 461 ms 135744 KB Output is correct
79 Correct 997 ms 129360 KB Output is correct
80 Correct 632 ms 105912 KB Output is correct
81 Correct 466 ms 136444 KB Output is correct
82 Correct 900 ms 133168 KB Output is correct
83 Correct 648 ms 106324 KB Output is correct
84 Correct 429 ms 134736 KB Output is correct
85 Correct 775 ms 134748 KB Output is correct
86 Correct 694 ms 108784 KB Output is correct
87 Correct 819 ms 134804 KB Output is correct
88 Correct 903 ms 132944 KB Output is correct
89 Correct 883 ms 113292 KB Output is correct
90 Correct 580 ms 136236 KB Output is correct
91 Correct 608 ms 136532 KB Output is correct
92 Correct 908 ms 117696 KB Output is correct
93 Correct 425 ms 132844 KB Output is correct
94 Correct 1068 ms 133460 KB Output is correct
95 Correct 557 ms 133104 KB Output is correct
96 Correct 1246 ms 135940 KB Output is correct
97 Correct 642 ms 106916 KB Output is correct
98 Correct 633 ms 106832 KB Output is correct
99 Correct 191 ms 75008 KB Output is correct
100 Correct 174 ms 63600 KB Output is correct
101 Correct 4 ms 29788 KB Output is correct