Submission #356496

# Submission time Handle Problem Language Result Execution time Memory
356496 2021-01-23T12:19:12 Z valerikk Duathlon (APIO18_duathlon) C++11
100 / 100
291 ms 33772 KB
#include <bits/stdc++.h>

using namespace std;

const int N = 2e5 + 7;

int n, m;
vector<int> g[N], g_[N];
int dep[N], low[N];
bool vis[N];
int cnt;
int sub[N];
long long ans = 0;

void prepare_dfs(int u, int par = -1) {
    vis[u] = true;
    low[u] = dep[u];
    for (int v : g[u]) {
        if (v == par)
            continue;
        if (!vis[v]) {
            dep[v] = dep[u] + 1;
            prepare_dfs(v, u);
            low[u] = min(low[u], low[v]);
        } else {
            low[u] = min(low[u], dep[v]);
        }
    }
}

void add_edge(int u, int v, int c) {
    g_[u].push_back(c);
    g_[c].push_back(u);
    g_[v].push_back(c);
    g_[c].push_back(v);
}

void dfs(int u, int c = -1, int par = -1) {
    vis[u] = true;
    for (int v : g[u]) {
        if (v == par)
            continue;
        if (!vis[v]) {
            int c_ = c;
            if (dep[u] <= low[v])
                c_ = ++cnt;
            add_edge(u, v, c_);
            dfs(v, c_, u);
        } else {
            if (dep[u] > dep[v])
                add_edge(u, v, c);
        }
    }
}

int get_subtree(int u, int par = -1) {
    vis[u] = true;
    sub[u] = u <= n;
    for (int v : g[u]) {
        if (v != par)
            sub[u] += get_subtree(v, u);
    }
    return sub[u];
}

void count_bad(int u, int total, int par = -1) {
    vis[u] = true;
    for (int v : g[u]) {
        if (v != par)
            count_bad(v, total, u);
    }
    if (u > n) {
        int a = g[u].size();
        for (int v : g[u]) {
            int b = v == par ? total - sub[u] : sub[v];
            ans -= (long long)(a - 1) * b * (b - 1);
        }
    }
}

int main() {
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
#endif
    ios::sync_with_stdio(false);
    cin.tie(0);
    cin >> n >> m;
    while (m--) {
        int u, v;
        cin >> u >> v;
        g[u].push_back(v);
        g[v].push_back(u);
    }
    for (int i = 1; i <= n; ++i)
        vis[i] = false;
    for (int i = 1; i <= n; ++i) {
        if (!vis[i])
            prepare_dfs(i);
    }
    for (int i = 1; i <= n; ++i)
        vis[i] = false;
    cnt = n;
    for (int i = 1; i <= n; ++i) {
        if (!vis[i])
            dfs(i);
    }
    for (int i = 1; i <= cnt; ++i)
        g[i] = g_[i];
    for (int i = 1; i <= cnt; ++i) {
        sort(g[i].begin(), g[i].end());
        g[i].erase(unique(g[i].begin(), g[i].end()), g[i].end());
    }
    for (int i = 1; i <= cnt; ++i) {
        if (!vis[i]) {
            int total = get_subtree(i);
            ans += (long long)total * (total - 1) * (total - 2);
            count_bad(i, total);
        }
    }
    cout << ans << endl;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 7 ms 9708 KB Output is correct
2 Correct 10 ms 9708 KB Output is correct
3 Correct 7 ms 9708 KB Output is correct
4 Correct 7 ms 9708 KB Output is correct
5 Correct 7 ms 9708 KB Output is correct
6 Correct 7 ms 9708 KB Output is correct
7 Correct 7 ms 9708 KB Output is correct
8 Correct 7 ms 9708 KB Output is correct
9 Correct 7 ms 9708 KB Output is correct
10 Correct 8 ms 9708 KB Output is correct
11 Correct 7 ms 9708 KB Output is correct
12 Correct 7 ms 9708 KB Output is correct
13 Correct 7 ms 9708 KB Output is correct
14 Correct 7 ms 9708 KB Output is correct
15 Correct 7 ms 9708 KB Output is correct
16 Correct 7 ms 9708 KB Output is correct
17 Correct 7 ms 9708 KB Output is correct
18 Correct 7 ms 9708 KB Output is correct
19 Correct 7 ms 9708 KB Output is correct
20 Correct 7 ms 9708 KB Output is correct
21 Correct 7 ms 9708 KB Output is correct
22 Correct 7 ms 9708 KB Output is correct
23 Correct 7 ms 9708 KB Output is correct
24 Correct 8 ms 9708 KB Output is correct
25 Correct 7 ms 9708 KB Output is correct
26 Correct 7 ms 9708 KB Output is correct
27 Correct 7 ms 9708 KB Output is correct
28 Correct 8 ms 9708 KB Output is correct
29 Correct 8 ms 9708 KB Output is correct
30 Correct 7 ms 9708 KB Output is correct
31 Correct 7 ms 9708 KB Output is correct
32 Correct 7 ms 9708 KB Output is correct
33 Correct 8 ms 9708 KB Output is correct
34 Correct 7 ms 9836 KB Output is correct
35 Correct 8 ms 9712 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 7 ms 9708 KB Output is correct
2 Correct 10 ms 9708 KB Output is correct
3 Correct 7 ms 9708 KB Output is correct
4 Correct 7 ms 9708 KB Output is correct
5 Correct 7 ms 9708 KB Output is correct
6 Correct 7 ms 9708 KB Output is correct
7 Correct 7 ms 9708 KB Output is correct
8 Correct 7 ms 9708 KB Output is correct
9 Correct 7 ms 9708 KB Output is correct
10 Correct 8 ms 9708 KB Output is correct
11 Correct 7 ms 9708 KB Output is correct
12 Correct 7 ms 9708 KB Output is correct
13 Correct 7 ms 9708 KB Output is correct
14 Correct 7 ms 9708 KB Output is correct
15 Correct 7 ms 9708 KB Output is correct
16 Correct 7 ms 9708 KB Output is correct
17 Correct 7 ms 9708 KB Output is correct
18 Correct 7 ms 9708 KB Output is correct
19 Correct 7 ms 9708 KB Output is correct
20 Correct 7 ms 9708 KB Output is correct
21 Correct 7 ms 9708 KB Output is correct
22 Correct 7 ms 9708 KB Output is correct
23 Correct 7 ms 9708 KB Output is correct
24 Correct 8 ms 9708 KB Output is correct
25 Correct 7 ms 9708 KB Output is correct
26 Correct 7 ms 9708 KB Output is correct
27 Correct 7 ms 9708 KB Output is correct
28 Correct 8 ms 9708 KB Output is correct
29 Correct 8 ms 9708 KB Output is correct
30 Correct 7 ms 9708 KB Output is correct
31 Correct 7 ms 9708 KB Output is correct
32 Correct 7 ms 9708 KB Output is correct
33 Correct 8 ms 9708 KB Output is correct
34 Correct 7 ms 9836 KB Output is correct
35 Correct 8 ms 9712 KB Output is correct
36 Correct 8 ms 9776 KB Output is correct
37 Correct 8 ms 9708 KB Output is correct
38 Correct 7 ms 9836 KB Output is correct
39 Correct 8 ms 9708 KB Output is correct
40 Correct 7 ms 9708 KB Output is correct
41 Correct 7 ms 9708 KB Output is correct
42 Correct 8 ms 9708 KB Output is correct
43 Correct 8 ms 9708 KB Output is correct
44 Correct 8 ms 9708 KB Output is correct
45 Correct 216 ms 9964 KB Output is correct
46 Correct 7 ms 9708 KB Output is correct
47 Correct 8 ms 9836 KB Output is correct
48 Correct 7 ms 9708 KB Output is correct
49 Correct 7 ms 9708 KB Output is correct
50 Correct 8 ms 9708 KB Output is correct
51 Correct 7 ms 9708 KB Output is correct
52 Correct 7 ms 9708 KB Output is correct
53 Correct 7 ms 9728 KB Output is correct
54 Correct 8 ms 9708 KB Output is correct
55 Correct 7 ms 9708 KB Output is correct
56 Correct 7 ms 9708 KB Output is correct
57 Correct 8 ms 9708 KB Output is correct
58 Correct 7 ms 9708 KB Output is correct
59 Correct 8 ms 9708 KB Output is correct
60 Correct 7 ms 9708 KB Output is correct
61 Correct 7 ms 9708 KB Output is correct
62 Correct 7 ms 9708 KB Output is correct
63 Correct 7 ms 9708 KB Output is correct
64 Correct 7 ms 9708 KB Output is correct
65 Correct 7 ms 9708 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 172 ms 28000 KB Output is correct
2 Correct 179 ms 27940 KB Output is correct
3 Correct 231 ms 29156 KB Output is correct
4 Correct 186 ms 27200 KB Output is correct
5 Correct 201 ms 26212 KB Output is correct
6 Correct 191 ms 28132 KB Output is correct
7 Correct 185 ms 26216 KB Output is correct
8 Correct 203 ms 26660 KB Output is correct
9 Correct 208 ms 24820 KB Output is correct
10 Correct 181 ms 24896 KB Output is correct
11 Correct 147 ms 21996 KB Output is correct
12 Correct 147 ms 21740 KB Output is correct
13 Correct 125 ms 21484 KB Output is correct
14 Correct 127 ms 21228 KB Output is correct
15 Correct 108 ms 19724 KB Output is correct
16 Correct 101 ms 19440 KB Output is correct
17 Correct 11 ms 10988 KB Output is correct
18 Correct 10 ms 10988 KB Output is correct
19 Correct 10 ms 10860 KB Output is correct
20 Correct 11 ms 10844 KB Output is correct
21 Correct 11 ms 10792 KB Output is correct
22 Correct 10 ms 10860 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 8 ms 9964 KB Output is correct
2 Correct 8 ms 9964 KB Output is correct
3 Correct 8 ms 9964 KB Output is correct
4 Correct 8 ms 9984 KB Output is correct
5 Correct 8 ms 9964 KB Output is correct
6 Correct 8 ms 9964 KB Output is correct
7 Correct 8 ms 9964 KB Output is correct
8 Correct 7 ms 9964 KB Output is correct
9 Correct 8 ms 9964 KB Output is correct
10 Correct 8 ms 9964 KB Output is correct
11 Correct 8 ms 9964 KB Output is correct
12 Correct 8 ms 9964 KB Output is correct
13 Correct 8 ms 9984 KB Output is correct
14 Correct 8 ms 9836 KB Output is correct
15 Correct 8 ms 9836 KB Output is correct
16 Correct 8 ms 9836 KB Output is correct
17 Correct 8 ms 9928 KB Output is correct
18 Correct 8 ms 9964 KB Output is correct
19 Correct 8 ms 9964 KB Output is correct
20 Correct 8 ms 9964 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 199 ms 25580 KB Output is correct
2 Correct 179 ms 25452 KB Output is correct
3 Correct 197 ms 25560 KB Output is correct
4 Correct 210 ms 25600 KB Output is correct
5 Correct 185 ms 25548 KB Output is correct
6 Correct 218 ms 33772 KB Output is correct
7 Correct 216 ms 31052 KB Output is correct
8 Correct 210 ms 29548 KB Output is correct
9 Correct 197 ms 28080 KB Output is correct
10 Correct 188 ms 25480 KB Output is correct
11 Correct 181 ms 25584 KB Output is correct
12 Correct 187 ms 25456 KB Output is correct
13 Correct 179 ms 25472 KB Output is correct
14 Correct 159 ms 24508 KB Output is correct
15 Correct 127 ms 23532 KB Output is correct
16 Correct 90 ms 19692 KB Output is correct
17 Correct 130 ms 26084 KB Output is correct
18 Correct 124 ms 26084 KB Output is correct
19 Correct 121 ms 26080 KB Output is correct
20 Correct 142 ms 26092 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 8 ms 9964 KB Output is correct
2 Correct 7 ms 9964 KB Output is correct
3 Correct 7 ms 9836 KB Output is correct
4 Correct 8 ms 9836 KB Output is correct
5 Correct 8 ms 9836 KB Output is correct
6 Correct 8 ms 9836 KB Output is correct
7 Correct 9 ms 9836 KB Output is correct
8 Correct 8 ms 9836 KB Output is correct
9 Correct 8 ms 9836 KB Output is correct
10 Correct 9 ms 9836 KB Output is correct
11 Correct 8 ms 9836 KB Output is correct
12 Correct 36 ms 9936 KB Output is correct
13 Correct 13 ms 10112 KB Output is correct
14 Correct 14 ms 9928 KB Output is correct
15 Correct 8 ms 9964 KB Output is correct
16 Correct 8 ms 9836 KB Output is correct
17 Correct 8 ms 9836 KB Output is correct
18 Correct 8 ms 9836 KB Output is correct
19 Correct 8 ms 9836 KB Output is correct
20 Correct 8 ms 9836 KB Output is correct
21 Correct 9 ms 9964 KB Output is correct
22 Correct 8 ms 9964 KB Output is correct
23 Correct 8 ms 9836 KB Output is correct
24 Correct 8 ms 9836 KB Output is correct
25 Correct 7 ms 9836 KB Output is correct
26 Correct 7 ms 9836 KB Output is correct
27 Correct 7 ms 9740 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 182 ms 25452 KB Output is correct
2 Correct 181 ms 25452 KB Output is correct
3 Correct 195 ms 24684 KB Output is correct
4 Correct 197 ms 23660 KB Output is correct
5 Correct 190 ms 22380 KB Output is correct
6 Correct 262 ms 21712 KB Output is correct
7 Correct 266 ms 21520 KB Output is correct
8 Correct 263 ms 21132 KB Output is correct
9 Correct 240 ms 20976 KB Output is correct
10 Correct 164 ms 20972 KB Output is correct
11 Correct 164 ms 20716 KB Output is correct
12 Correct 146 ms 20716 KB Output is correct
13 Correct 160 ms 20716 KB Output is correct
14 Correct 177 ms 22528 KB Output is correct
15 Correct 223 ms 30492 KB Output is correct
16 Correct 246 ms 28592 KB Output is correct
17 Correct 211 ms 29036 KB Output is correct
18 Correct 201 ms 27372 KB Output is correct
19 Correct 203 ms 23660 KB Output is correct
20 Correct 197 ms 23660 KB Output is correct
21 Correct 181 ms 23660 KB Output is correct
22 Correct 189 ms 22764 KB Output is correct
23 Correct 146 ms 21856 KB Output is correct
24 Correct 189 ms 25012 KB Output is correct
25 Correct 184 ms 25160 KB Output is correct
26 Correct 174 ms 24296 KB Output is correct
27 Correct 199 ms 24420 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 7 ms 9708 KB Output is correct
2 Correct 10 ms 9708 KB Output is correct
3 Correct 7 ms 9708 KB Output is correct
4 Correct 7 ms 9708 KB Output is correct
5 Correct 7 ms 9708 KB Output is correct
6 Correct 7 ms 9708 KB Output is correct
7 Correct 7 ms 9708 KB Output is correct
8 Correct 7 ms 9708 KB Output is correct
9 Correct 7 ms 9708 KB Output is correct
10 Correct 8 ms 9708 KB Output is correct
11 Correct 7 ms 9708 KB Output is correct
12 Correct 7 ms 9708 KB Output is correct
13 Correct 7 ms 9708 KB Output is correct
14 Correct 7 ms 9708 KB Output is correct
15 Correct 7 ms 9708 KB Output is correct
16 Correct 7 ms 9708 KB Output is correct
17 Correct 7 ms 9708 KB Output is correct
18 Correct 7 ms 9708 KB Output is correct
19 Correct 7 ms 9708 KB Output is correct
20 Correct 7 ms 9708 KB Output is correct
21 Correct 7 ms 9708 KB Output is correct
22 Correct 7 ms 9708 KB Output is correct
23 Correct 7 ms 9708 KB Output is correct
24 Correct 8 ms 9708 KB Output is correct
25 Correct 7 ms 9708 KB Output is correct
26 Correct 7 ms 9708 KB Output is correct
27 Correct 7 ms 9708 KB Output is correct
28 Correct 8 ms 9708 KB Output is correct
29 Correct 8 ms 9708 KB Output is correct
30 Correct 7 ms 9708 KB Output is correct
31 Correct 7 ms 9708 KB Output is correct
32 Correct 7 ms 9708 KB Output is correct
33 Correct 8 ms 9708 KB Output is correct
34 Correct 7 ms 9836 KB Output is correct
35 Correct 8 ms 9712 KB Output is correct
36 Correct 8 ms 9776 KB Output is correct
37 Correct 8 ms 9708 KB Output is correct
38 Correct 7 ms 9836 KB Output is correct
39 Correct 8 ms 9708 KB Output is correct
40 Correct 7 ms 9708 KB Output is correct
41 Correct 7 ms 9708 KB Output is correct
42 Correct 8 ms 9708 KB Output is correct
43 Correct 8 ms 9708 KB Output is correct
44 Correct 8 ms 9708 KB Output is correct
45 Correct 216 ms 9964 KB Output is correct
46 Correct 7 ms 9708 KB Output is correct
47 Correct 8 ms 9836 KB Output is correct
48 Correct 7 ms 9708 KB Output is correct
49 Correct 7 ms 9708 KB Output is correct
50 Correct 8 ms 9708 KB Output is correct
51 Correct 7 ms 9708 KB Output is correct
52 Correct 7 ms 9708 KB Output is correct
53 Correct 7 ms 9728 KB Output is correct
54 Correct 8 ms 9708 KB Output is correct
55 Correct 7 ms 9708 KB Output is correct
56 Correct 7 ms 9708 KB Output is correct
57 Correct 8 ms 9708 KB Output is correct
58 Correct 7 ms 9708 KB Output is correct
59 Correct 8 ms 9708 KB Output is correct
60 Correct 7 ms 9708 KB Output is correct
61 Correct 7 ms 9708 KB Output is correct
62 Correct 7 ms 9708 KB Output is correct
63 Correct 7 ms 9708 KB Output is correct
64 Correct 7 ms 9708 KB Output is correct
65 Correct 7 ms 9708 KB Output is correct
66 Correct 7 ms 9708 KB Output is correct
67 Correct 8 ms 9836 KB Output is correct
68 Correct 8 ms 9856 KB Output is correct
69 Correct 8 ms 9964 KB Output is correct
70 Correct 8 ms 9964 KB Output is correct
71 Correct 8 ms 9836 KB Output is correct
72 Correct 7 ms 9836 KB Output is correct
73 Correct 8 ms 9856 KB Output is correct
74 Correct 8 ms 9856 KB Output is correct
75 Correct 8 ms 9856 KB Output is correct
76 Correct 7 ms 9724 KB Output is correct
77 Correct 11 ms 9836 KB Output is correct
78 Correct 8 ms 9856 KB Output is correct
79 Correct 8 ms 9836 KB Output is correct
80 Correct 10 ms 9836 KB Output is correct
81 Correct 10 ms 9836 KB Output is correct
82 Correct 8 ms 9964 KB Output is correct
83 Correct 8 ms 9964 KB Output is correct
84 Correct 8 ms 9836 KB Output is correct
85 Correct 8 ms 9836 KB Output is correct
86 Correct 8 ms 9836 KB Output is correct
87 Correct 8 ms 9836 KB Output is correct
88 Correct 8 ms 9836 KB Output is correct
89 Correct 8 ms 9836 KB Output is correct
90 Correct 8 ms 9836 KB Output is correct
91 Correct 8 ms 9836 KB Output is correct
92 Correct 8 ms 9836 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 7 ms 9708 KB Output is correct
2 Correct 10 ms 9708 KB Output is correct
3 Correct 7 ms 9708 KB Output is correct
4 Correct 7 ms 9708 KB Output is correct
5 Correct 7 ms 9708 KB Output is correct
6 Correct 7 ms 9708 KB Output is correct
7 Correct 7 ms 9708 KB Output is correct
8 Correct 7 ms 9708 KB Output is correct
9 Correct 7 ms 9708 KB Output is correct
10 Correct 8 ms 9708 KB Output is correct
11 Correct 7 ms 9708 KB Output is correct
12 Correct 7 ms 9708 KB Output is correct
13 Correct 7 ms 9708 KB Output is correct
14 Correct 7 ms 9708 KB Output is correct
15 Correct 7 ms 9708 KB Output is correct
16 Correct 7 ms 9708 KB Output is correct
17 Correct 7 ms 9708 KB Output is correct
18 Correct 7 ms 9708 KB Output is correct
19 Correct 7 ms 9708 KB Output is correct
20 Correct 7 ms 9708 KB Output is correct
21 Correct 7 ms 9708 KB Output is correct
22 Correct 7 ms 9708 KB Output is correct
23 Correct 7 ms 9708 KB Output is correct
24 Correct 8 ms 9708 KB Output is correct
25 Correct 7 ms 9708 KB Output is correct
26 Correct 7 ms 9708 KB Output is correct
27 Correct 7 ms 9708 KB Output is correct
28 Correct 8 ms 9708 KB Output is correct
29 Correct 8 ms 9708 KB Output is correct
30 Correct 7 ms 9708 KB Output is correct
31 Correct 7 ms 9708 KB Output is correct
32 Correct 7 ms 9708 KB Output is correct
33 Correct 8 ms 9708 KB Output is correct
34 Correct 7 ms 9836 KB Output is correct
35 Correct 8 ms 9712 KB Output is correct
36 Correct 8 ms 9776 KB Output is correct
37 Correct 8 ms 9708 KB Output is correct
38 Correct 7 ms 9836 KB Output is correct
39 Correct 8 ms 9708 KB Output is correct
40 Correct 7 ms 9708 KB Output is correct
41 Correct 7 ms 9708 KB Output is correct
42 Correct 8 ms 9708 KB Output is correct
43 Correct 8 ms 9708 KB Output is correct
44 Correct 8 ms 9708 KB Output is correct
45 Correct 216 ms 9964 KB Output is correct
46 Correct 7 ms 9708 KB Output is correct
47 Correct 8 ms 9836 KB Output is correct
48 Correct 7 ms 9708 KB Output is correct
49 Correct 7 ms 9708 KB Output is correct
50 Correct 8 ms 9708 KB Output is correct
51 Correct 7 ms 9708 KB Output is correct
52 Correct 7 ms 9708 KB Output is correct
53 Correct 7 ms 9728 KB Output is correct
54 Correct 8 ms 9708 KB Output is correct
55 Correct 7 ms 9708 KB Output is correct
56 Correct 7 ms 9708 KB Output is correct
57 Correct 8 ms 9708 KB Output is correct
58 Correct 7 ms 9708 KB Output is correct
59 Correct 8 ms 9708 KB Output is correct
60 Correct 7 ms 9708 KB Output is correct
61 Correct 7 ms 9708 KB Output is correct
62 Correct 7 ms 9708 KB Output is correct
63 Correct 7 ms 9708 KB Output is correct
64 Correct 7 ms 9708 KB Output is correct
65 Correct 7 ms 9708 KB Output is correct
66 Correct 172 ms 28000 KB Output is correct
67 Correct 179 ms 27940 KB Output is correct
68 Correct 231 ms 29156 KB Output is correct
69 Correct 186 ms 27200 KB Output is correct
70 Correct 201 ms 26212 KB Output is correct
71 Correct 191 ms 28132 KB Output is correct
72 Correct 185 ms 26216 KB Output is correct
73 Correct 203 ms 26660 KB Output is correct
74 Correct 208 ms 24820 KB Output is correct
75 Correct 181 ms 24896 KB Output is correct
76 Correct 147 ms 21996 KB Output is correct
77 Correct 147 ms 21740 KB Output is correct
78 Correct 125 ms 21484 KB Output is correct
79 Correct 127 ms 21228 KB Output is correct
80 Correct 108 ms 19724 KB Output is correct
81 Correct 101 ms 19440 KB Output is correct
82 Correct 11 ms 10988 KB Output is correct
83 Correct 10 ms 10988 KB Output is correct
84 Correct 10 ms 10860 KB Output is correct
85 Correct 11 ms 10844 KB Output is correct
86 Correct 11 ms 10792 KB Output is correct
87 Correct 10 ms 10860 KB Output is correct
88 Correct 8 ms 9964 KB Output is correct
89 Correct 8 ms 9964 KB Output is correct
90 Correct 8 ms 9964 KB Output is correct
91 Correct 8 ms 9984 KB Output is correct
92 Correct 8 ms 9964 KB Output is correct
93 Correct 8 ms 9964 KB Output is correct
94 Correct 8 ms 9964 KB Output is correct
95 Correct 7 ms 9964 KB Output is correct
96 Correct 8 ms 9964 KB Output is correct
97 Correct 8 ms 9964 KB Output is correct
98 Correct 8 ms 9964 KB Output is correct
99 Correct 8 ms 9964 KB Output is correct
100 Correct 8 ms 9984 KB Output is correct
101 Correct 8 ms 9836 KB Output is correct
102 Correct 8 ms 9836 KB Output is correct
103 Correct 8 ms 9836 KB Output is correct
104 Correct 8 ms 9928 KB Output is correct
105 Correct 8 ms 9964 KB Output is correct
106 Correct 8 ms 9964 KB Output is correct
107 Correct 8 ms 9964 KB Output is correct
108 Correct 199 ms 25580 KB Output is correct
109 Correct 179 ms 25452 KB Output is correct
110 Correct 197 ms 25560 KB Output is correct
111 Correct 210 ms 25600 KB Output is correct
112 Correct 185 ms 25548 KB Output is correct
113 Correct 218 ms 33772 KB Output is correct
114 Correct 216 ms 31052 KB Output is correct
115 Correct 210 ms 29548 KB Output is correct
116 Correct 197 ms 28080 KB Output is correct
117 Correct 188 ms 25480 KB Output is correct
118 Correct 181 ms 25584 KB Output is correct
119 Correct 187 ms 25456 KB Output is correct
120 Correct 179 ms 25472 KB Output is correct
121 Correct 159 ms 24508 KB Output is correct
122 Correct 127 ms 23532 KB Output is correct
123 Correct 90 ms 19692 KB Output is correct
124 Correct 130 ms 26084 KB Output is correct
125 Correct 124 ms 26084 KB Output is correct
126 Correct 121 ms 26080 KB Output is correct
127 Correct 142 ms 26092 KB Output is correct
128 Correct 8 ms 9964 KB Output is correct
129 Correct 7 ms 9964 KB Output is correct
130 Correct 7 ms 9836 KB Output is correct
131 Correct 8 ms 9836 KB Output is correct
132 Correct 8 ms 9836 KB Output is correct
133 Correct 8 ms 9836 KB Output is correct
134 Correct 9 ms 9836 KB Output is correct
135 Correct 8 ms 9836 KB Output is correct
136 Correct 8 ms 9836 KB Output is correct
137 Correct 9 ms 9836 KB Output is correct
138 Correct 8 ms 9836 KB Output is correct
139 Correct 36 ms 9936 KB Output is correct
140 Correct 13 ms 10112 KB Output is correct
141 Correct 14 ms 9928 KB Output is correct
142 Correct 8 ms 9964 KB Output is correct
143 Correct 8 ms 9836 KB Output is correct
144 Correct 8 ms 9836 KB Output is correct
145 Correct 8 ms 9836 KB Output is correct
146 Correct 8 ms 9836 KB Output is correct
147 Correct 8 ms 9836 KB Output is correct
148 Correct 9 ms 9964 KB Output is correct
149 Correct 8 ms 9964 KB Output is correct
150 Correct 8 ms 9836 KB Output is correct
151 Correct 8 ms 9836 KB Output is correct
152 Correct 7 ms 9836 KB Output is correct
153 Correct 7 ms 9836 KB Output is correct
154 Correct 7 ms 9740 KB Output is correct
155 Correct 182 ms 25452 KB Output is correct
156 Correct 181 ms 25452 KB Output is correct
157 Correct 195 ms 24684 KB Output is correct
158 Correct 197 ms 23660 KB Output is correct
159 Correct 190 ms 22380 KB Output is correct
160 Correct 262 ms 21712 KB Output is correct
161 Correct 266 ms 21520 KB Output is correct
162 Correct 263 ms 21132 KB Output is correct
163 Correct 240 ms 20976 KB Output is correct
164 Correct 164 ms 20972 KB Output is correct
165 Correct 164 ms 20716 KB Output is correct
166 Correct 146 ms 20716 KB Output is correct
167 Correct 160 ms 20716 KB Output is correct
168 Correct 177 ms 22528 KB Output is correct
169 Correct 223 ms 30492 KB Output is correct
170 Correct 246 ms 28592 KB Output is correct
171 Correct 211 ms 29036 KB Output is correct
172 Correct 201 ms 27372 KB Output is correct
173 Correct 203 ms 23660 KB Output is correct
174 Correct 197 ms 23660 KB Output is correct
175 Correct 181 ms 23660 KB Output is correct
176 Correct 189 ms 22764 KB Output is correct
177 Correct 146 ms 21856 KB Output is correct
178 Correct 189 ms 25012 KB Output is correct
179 Correct 184 ms 25160 KB Output is correct
180 Correct 174 ms 24296 KB Output is correct
181 Correct 199 ms 24420 KB Output is correct
182 Correct 7 ms 9708 KB Output is correct
183 Correct 8 ms 9836 KB Output is correct
184 Correct 8 ms 9856 KB Output is correct
185 Correct 8 ms 9964 KB Output is correct
186 Correct 8 ms 9964 KB Output is correct
187 Correct 8 ms 9836 KB Output is correct
188 Correct 7 ms 9836 KB Output is correct
189 Correct 8 ms 9856 KB Output is correct
190 Correct 8 ms 9856 KB Output is correct
191 Correct 8 ms 9856 KB Output is correct
192 Correct 7 ms 9724 KB Output is correct
193 Correct 11 ms 9836 KB Output is correct
194 Correct 8 ms 9856 KB Output is correct
195 Correct 8 ms 9836 KB Output is correct
196 Correct 10 ms 9836 KB Output is correct
197 Correct 10 ms 9836 KB Output is correct
198 Correct 8 ms 9964 KB Output is correct
199 Correct 8 ms 9964 KB Output is correct
200 Correct 8 ms 9836 KB Output is correct
201 Correct 8 ms 9836 KB Output is correct
202 Correct 8 ms 9836 KB Output is correct
203 Correct 8 ms 9836 KB Output is correct
204 Correct 8 ms 9836 KB Output is correct
205 Correct 8 ms 9836 KB Output is correct
206 Correct 8 ms 9836 KB Output is correct
207 Correct 8 ms 9836 KB Output is correct
208 Correct 8 ms 9836 KB Output is correct
209 Correct 11 ms 10220 KB Output is correct
210 Correct 91 ms 19004 KB Output is correct
211 Correct 176 ms 23524 KB Output is correct
212 Correct 240 ms 26460 KB Output is correct
213 Correct 291 ms 29276 KB Output is correct
214 Correct 91 ms 22380 KB Output is correct
215 Correct 81 ms 22252 KB Output is correct
216 Correct 205 ms 24556 KB Output is correct
217 Correct 201 ms 23160 KB Output is correct
218 Correct 159 ms 21296 KB Output is correct
219 Correct 174 ms 20844 KB Output is correct
220 Correct 159 ms 20716 KB Output is correct
221 Correct 181 ms 20684 KB Output is correct
222 Correct 163 ms 21484 KB Output is correct
223 Correct 231 ms 25420 KB Output is correct
224 Correct 227 ms 24760 KB Output is correct
225 Correct 211 ms 22764 KB Output is correct
226 Correct 214 ms 22792 KB Output is correct
227 Correct 194 ms 22736 KB Output is correct
228 Correct 151 ms 21996 KB Output is correct
229 Correct 160 ms 21484 KB Output is correct
230 Correct 173 ms 23404 KB Output is correct
231 Correct 185 ms 23380 KB Output is correct