답안 #108447

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
108447 2019-04-29T16:14:17 Z PeppaPig 철인 이종 경기 (APIO18_duathlon) C++14
100 / 100
930 ms 31056 KB
#include <bits/stdc++.h>

#define long long long
#define pii pair<int, int>
#define x first
#define y second

using namespace std;

const int N = 3e5+5;

int n, m;
int pre[N], low[N], ap[N], id[N];
vector<vector<int> > g(N), bcc;
vector<int> sz;

void tarjan(int u, int p) {
    static int idx = 0;
    static stack<int> S;
    pre[u] = low[u] = ++idx, S.emplace(u);
    int cnt = 0;
    for(int v : g[u]) if(v != p) {
        if(!pre[v]) {
            ++cnt;
            tarjan(v, u);
            low[u] = min(low[u], low[v]);
            if((!p && cnt > 1) || (p && low[v] >= pre[u])) ap[u] = 1;
            if(low[v] >= pre[u]) {
                bcc.emplace_back(vector<int>(1, u));
                while(bcc.back().back() != v) {
                    bcc.back().emplace_back(S.top());
                    S.pop();
                } 
            }
        } else low[u] = min(low[u], pre[v]);
    }
}

bitset<N> idart;

void gen_bct() {
    g.clear();
    g.emplace_back(vector<int>());
    sz.emplace_back(0);
    for(int i = 1; i <= n; i++) if(ap[i]) {
        idart[id[i] = g.size()] = true;
        g.emplace_back(vector<int>());
        sz.emplace_back(1);
    }
    for(vector<int> &cc : bcc) {
        g.emplace_back(vector<int>());
        sz.emplace_back(cc.size());
        for(int v : cc) {
            if(ap[v]) g[id[v]].emplace_back(g.size()-1), g[g.size()-1].emplace_back(id[v]);
            else id[v] = g.size()-1;
        }
    }
}

bitset<N> chk;
int siz[N];
long ans, sum_sz, sum_sz2;

int getsz(int u, int p) { siz[u] = 1; for(int v : g[u]) if(v != p && !chk[v]) siz[u] += getsz(v, u); return siz[u]; }

int find_cen(int u, int p, int all, pii &ret) {
    int mx = all - siz[u];
    for(int v : g[u]) if(v != p && !chk[v])
        mx = max(mx, find_cen(v, u, all, ret));
    ret = min(ret, pii(mx, u));
    return siz[u];
}

int noap_sz(int u) { return idart[u] ? 1 : sz[u] - g[u].size(); } //Non-overlap Size
int noad_sz(int u) { return sz[u] - 2 * (int)!idart[u]; } //Size with no 2 adjacent APs

void dfs(int u, int p, long all, bool fill) {
    if(!fill) ans += 1ll * noap_sz(u) * (sum_sz2 + sum_sz * (all - idart[u])); //Start * (Change another subtree + Change this subtree)
    else {
        sum_sz += noap_sz(u); //Finish
        sum_sz2 += 1ll * (all - idart[u]) * noap_sz(u); //Change and Finish
    }
    for(int v : g[u]) if(v != p && !chk[v]) dfs(v, u, all + noad_sz(v), fill);
}

void proc(int u) {
    getsz(u, u);
    pii ret(siz[u] + 1, -1);
    find_cen(u, u, siz[u], ret);
    chk[u = ret.y] = true;
    
    if(sz[u] > 2) ans += 1ll * (sz[u] - 2ll) * (noap_sz(u) * (noap_sz(u)-1ll) / 2ll);
    sum_sz = noap_sz(u);
    sum_sz2 = idart[u] ? 0 : 1ll * noad_sz(u) * noap_sz(u);
    for(int v : g[u]) if(!chk[v]) {
        dfs(v, u, noad_sz(v), 0);
        dfs(v, u, noad_sz(u) + noad_sz(v), 1);
    }
    for(int v : g[u]) if(!chk[v]) proc(v);
}

int main() {
    scanf("%d %d", &n, &m);
    for(int i = 1, a, b; i <= m; i++) {
        scanf("%d %d", &a, &b);
        g[a].emplace_back(b), g[b].emplace_back(a);
    }
    for(int i = 1; i <= n; i++) if(!pre[i]) tarjan(i, 0);
    gen_bct();

    for(int i = 1; i < (int)g.size(); i++) if(!chk[i]) proc(i);
    printf("%lld\n", 2ll * ans);

    return 0;
}

Compilation message

count_triplets.cpp: In function 'int main()':
count_triplets.cpp:103:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d %d", &n, &m);
     ~~~~~^~~~~~~~~~~~~~~~~
count_triplets.cpp:105:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d %d", &a, &b);
         ~~~~~^~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 7424 KB Output is correct
2 Correct 9 ms 7424 KB Output is correct
3 Correct 9 ms 7424 KB Output is correct
4 Correct 10 ms 7424 KB Output is correct
5 Correct 9 ms 7552 KB Output is correct
6 Correct 8 ms 7424 KB Output is correct
7 Correct 10 ms 7424 KB Output is correct
8 Correct 10 ms 7424 KB Output is correct
9 Correct 9 ms 7424 KB Output is correct
10 Correct 9 ms 7424 KB Output is correct
11 Correct 9 ms 7424 KB Output is correct
12 Correct 10 ms 7424 KB Output is correct
13 Correct 9 ms 7424 KB Output is correct
14 Correct 8 ms 7296 KB Output is correct
15 Correct 9 ms 7424 KB Output is correct
16 Correct 10 ms 7424 KB Output is correct
17 Correct 9 ms 7424 KB Output is correct
18 Correct 8 ms 7424 KB Output is correct
19 Correct 9 ms 7424 KB Output is correct
20 Correct 9 ms 7424 KB Output is correct
21 Correct 8 ms 7424 KB Output is correct
22 Correct 8 ms 7424 KB Output is correct
23 Correct 10 ms 7424 KB Output is correct
24 Correct 10 ms 7424 KB Output is correct
25 Correct 10 ms 7424 KB Output is correct
26 Correct 10 ms 7424 KB Output is correct
27 Correct 7 ms 7296 KB Output is correct
28 Correct 8 ms 7424 KB Output is correct
29 Correct 8 ms 7424 KB Output is correct
30 Correct 13 ms 7424 KB Output is correct
31 Correct 9 ms 7424 KB Output is correct
32 Correct 9 ms 7424 KB Output is correct
33 Correct 7 ms 7424 KB Output is correct
34 Correct 9 ms 7424 KB Output is correct
35 Correct 12 ms 7424 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 7424 KB Output is correct
2 Correct 9 ms 7424 KB Output is correct
3 Correct 9 ms 7424 KB Output is correct
4 Correct 10 ms 7424 KB Output is correct
5 Correct 9 ms 7552 KB Output is correct
6 Correct 8 ms 7424 KB Output is correct
7 Correct 10 ms 7424 KB Output is correct
8 Correct 10 ms 7424 KB Output is correct
9 Correct 9 ms 7424 KB Output is correct
10 Correct 9 ms 7424 KB Output is correct
11 Correct 9 ms 7424 KB Output is correct
12 Correct 10 ms 7424 KB Output is correct
13 Correct 9 ms 7424 KB Output is correct
14 Correct 8 ms 7296 KB Output is correct
15 Correct 9 ms 7424 KB Output is correct
16 Correct 10 ms 7424 KB Output is correct
17 Correct 9 ms 7424 KB Output is correct
18 Correct 8 ms 7424 KB Output is correct
19 Correct 9 ms 7424 KB Output is correct
20 Correct 9 ms 7424 KB Output is correct
21 Correct 8 ms 7424 KB Output is correct
22 Correct 8 ms 7424 KB Output is correct
23 Correct 10 ms 7424 KB Output is correct
24 Correct 10 ms 7424 KB Output is correct
25 Correct 10 ms 7424 KB Output is correct
26 Correct 10 ms 7424 KB Output is correct
27 Correct 7 ms 7296 KB Output is correct
28 Correct 8 ms 7424 KB Output is correct
29 Correct 8 ms 7424 KB Output is correct
30 Correct 13 ms 7424 KB Output is correct
31 Correct 9 ms 7424 KB Output is correct
32 Correct 9 ms 7424 KB Output is correct
33 Correct 7 ms 7424 KB Output is correct
34 Correct 9 ms 7424 KB Output is correct
35 Correct 12 ms 7424 KB Output is correct
36 Correct 10 ms 7396 KB Output is correct
37 Correct 9 ms 7424 KB Output is correct
38 Correct 8 ms 7424 KB Output is correct
39 Correct 11 ms 7424 KB Output is correct
40 Correct 10 ms 7424 KB Output is correct
41 Correct 9 ms 7424 KB Output is correct
42 Correct 9 ms 7424 KB Output is correct
43 Correct 8 ms 7424 KB Output is correct
44 Correct 8 ms 7424 KB Output is correct
45 Correct 7 ms 7424 KB Output is correct
46 Correct 8 ms 7424 KB Output is correct
47 Correct 9 ms 7424 KB Output is correct
48 Correct 9 ms 7424 KB Output is correct
49 Correct 8 ms 7424 KB Output is correct
50 Correct 8 ms 7424 KB Output is correct
51 Correct 7 ms 7424 KB Output is correct
52 Correct 8 ms 7424 KB Output is correct
53 Correct 8 ms 7424 KB Output is correct
54 Correct 8 ms 7552 KB Output is correct
55 Correct 8 ms 7424 KB Output is correct
56 Correct 9 ms 7396 KB Output is correct
57 Correct 8 ms 7424 KB Output is correct
58 Correct 7 ms 7424 KB Output is correct
59 Correct 8 ms 7424 KB Output is correct
60 Correct 8 ms 7424 KB Output is correct
61 Correct 8 ms 7424 KB Output is correct
62 Correct 9 ms 7424 KB Output is correct
63 Correct 9 ms 7424 KB Output is correct
64 Correct 10 ms 7424 KB Output is correct
65 Correct 8 ms 7424 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 129 ms 23528 KB Output is correct
2 Correct 125 ms 24748 KB Output is correct
3 Correct 417 ms 23860 KB Output is correct
4 Correct 209 ms 24240 KB Output is correct
5 Correct 295 ms 19964 KB Output is correct
6 Correct 342 ms 23184 KB Output is correct
7 Correct 379 ms 21528 KB Output is correct
8 Correct 413 ms 21932 KB Output is correct
9 Correct 384 ms 20128 KB Output is correct
10 Correct 366 ms 19500 KB Output is correct
11 Correct 140 ms 16324 KB Output is correct
12 Correct 124 ms 16172 KB Output is correct
13 Correct 129 ms 15968 KB Output is correct
14 Correct 142 ms 15860 KB Output is correct
15 Correct 115 ms 15036 KB Output is correct
16 Correct 93 ms 14636 KB Output is correct
17 Correct 12 ms 8932 KB Output is correct
18 Correct 13 ms 8960 KB Output is correct
19 Correct 12 ms 8960 KB Output is correct
20 Correct 13 ms 8960 KB Output is correct
21 Correct 11 ms 8960 KB Output is correct
22 Correct 12 ms 8960 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 7552 KB Output is correct
2 Correct 11 ms 7552 KB Output is correct
3 Correct 9 ms 7552 KB Output is correct
4 Correct 11 ms 7680 KB Output is correct
5 Correct 15 ms 7680 KB Output is correct
6 Correct 11 ms 7680 KB Output is correct
7 Correct 14 ms 7680 KB Output is correct
8 Correct 9 ms 7552 KB Output is correct
9 Correct 12 ms 7552 KB Output is correct
10 Correct 11 ms 7552 KB Output is correct
11 Correct 10 ms 7552 KB Output is correct
12 Correct 10 ms 7552 KB Output is correct
13 Correct 10 ms 7552 KB Output is correct
14 Correct 9 ms 7552 KB Output is correct
15 Correct 9 ms 7552 KB Output is correct
16 Correct 9 ms 7552 KB Output is correct
17 Correct 9 ms 7552 KB Output is correct
18 Correct 11 ms 7552 KB Output is correct
19 Correct 10 ms 7552 KB Output is correct
20 Correct 12 ms 7552 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 516 ms 20584 KB Output is correct
2 Correct 438 ms 20592 KB Output is correct
3 Correct 488 ms 20648 KB Output is correct
4 Correct 403 ms 20656 KB Output is correct
5 Correct 344 ms 20484 KB Output is correct
6 Correct 810 ms 31056 KB Output is correct
7 Correct 810 ms 27120 KB Output is correct
8 Correct 747 ms 26696 KB Output is correct
9 Correct 691 ms 24744 KB Output is correct
10 Correct 406 ms 20492 KB Output is correct
11 Correct 350 ms 20520 KB Output is correct
12 Correct 361 ms 20516 KB Output is correct
13 Correct 299 ms 20644 KB Output is correct
14 Correct 213 ms 19808 KB Output is correct
15 Correct 183 ms 18216 KB Output is correct
16 Correct 108 ms 14872 KB Output is correct
17 Correct 129 ms 19052 KB Output is correct
18 Correct 138 ms 18580 KB Output is correct
19 Correct 160 ms 18648 KB Output is correct
20 Correct 125 ms 18604 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 7552 KB Output is correct
2 Correct 11 ms 7552 KB Output is correct
3 Correct 9 ms 7552 KB Output is correct
4 Correct 9 ms 7552 KB Output is correct
5 Correct 11 ms 7552 KB Output is correct
6 Correct 9 ms 7424 KB Output is correct
7 Correct 9 ms 7424 KB Output is correct
8 Correct 9 ms 7552 KB Output is correct
9 Correct 11 ms 7552 KB Output is correct
10 Correct 8 ms 7424 KB Output is correct
11 Correct 11 ms 7552 KB Output is correct
12 Correct 11 ms 7552 KB Output is correct
13 Correct 10 ms 7552 KB Output is correct
14 Correct 9 ms 7552 KB Output is correct
15 Correct 10 ms 7552 KB Output is correct
16 Correct 9 ms 7552 KB Output is correct
17 Correct 10 ms 7552 KB Output is correct
18 Correct 37 ms 7552 KB Output is correct
19 Correct 11 ms 7552 KB Output is correct
20 Correct 11 ms 7424 KB Output is correct
21 Correct 12 ms 7552 KB Output is correct
22 Correct 10 ms 7552 KB Output is correct
23 Correct 9 ms 7680 KB Output is correct
24 Correct 10 ms 7552 KB Output is correct
25 Correct 11 ms 7424 KB Output is correct
26 Correct 8 ms 7424 KB Output is correct
27 Correct 7 ms 7424 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 338 ms 20648 KB Output is correct
2 Correct 468 ms 20900 KB Output is correct
3 Correct 458 ms 19116 KB Output is correct
4 Correct 364 ms 16740 KB Output is correct
5 Correct 253 ms 14720 KB Output is correct
6 Correct 231 ms 13964 KB Output is correct
7 Correct 179 ms 13616 KB Output is correct
8 Correct 176 ms 13360 KB Output is correct
9 Correct 147 ms 13236 KB Output is correct
10 Correct 146 ms 13100 KB Output is correct
11 Correct 132 ms 13008 KB Output is correct
12 Correct 91 ms 13008 KB Output is correct
13 Correct 99 ms 13244 KB Output is correct
14 Correct 93 ms 15460 KB Output is correct
15 Correct 727 ms 25792 KB Output is correct
16 Correct 930 ms 23460 KB Output is correct
17 Correct 626 ms 24104 KB Output is correct
18 Correct 621 ms 21224 KB Output is correct
19 Correct 347 ms 16692 KB Output is correct
20 Correct 336 ms 16556 KB Output is correct
21 Correct 260 ms 16556 KB Output is correct
22 Correct 206 ms 15456 KB Output is correct
23 Correct 149 ms 14636 KB Output is correct
24 Correct 275 ms 18500 KB Output is correct
25 Correct 246 ms 18544 KB Output is correct
26 Correct 218 ms 17192 KB Output is correct
27 Correct 234 ms 17064 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 7424 KB Output is correct
2 Correct 9 ms 7424 KB Output is correct
3 Correct 9 ms 7424 KB Output is correct
4 Correct 10 ms 7424 KB Output is correct
5 Correct 9 ms 7552 KB Output is correct
6 Correct 8 ms 7424 KB Output is correct
7 Correct 10 ms 7424 KB Output is correct
8 Correct 10 ms 7424 KB Output is correct
9 Correct 9 ms 7424 KB Output is correct
10 Correct 9 ms 7424 KB Output is correct
11 Correct 9 ms 7424 KB Output is correct
12 Correct 10 ms 7424 KB Output is correct
13 Correct 9 ms 7424 KB Output is correct
14 Correct 8 ms 7296 KB Output is correct
15 Correct 9 ms 7424 KB Output is correct
16 Correct 10 ms 7424 KB Output is correct
17 Correct 9 ms 7424 KB Output is correct
18 Correct 8 ms 7424 KB Output is correct
19 Correct 9 ms 7424 KB Output is correct
20 Correct 9 ms 7424 KB Output is correct
21 Correct 8 ms 7424 KB Output is correct
22 Correct 8 ms 7424 KB Output is correct
23 Correct 10 ms 7424 KB Output is correct
24 Correct 10 ms 7424 KB Output is correct
25 Correct 10 ms 7424 KB Output is correct
26 Correct 10 ms 7424 KB Output is correct
27 Correct 7 ms 7296 KB Output is correct
28 Correct 8 ms 7424 KB Output is correct
29 Correct 8 ms 7424 KB Output is correct
30 Correct 13 ms 7424 KB Output is correct
31 Correct 9 ms 7424 KB Output is correct
32 Correct 9 ms 7424 KB Output is correct
33 Correct 7 ms 7424 KB Output is correct
34 Correct 9 ms 7424 KB Output is correct
35 Correct 12 ms 7424 KB Output is correct
36 Correct 10 ms 7396 KB Output is correct
37 Correct 9 ms 7424 KB Output is correct
38 Correct 8 ms 7424 KB Output is correct
39 Correct 11 ms 7424 KB Output is correct
40 Correct 10 ms 7424 KB Output is correct
41 Correct 9 ms 7424 KB Output is correct
42 Correct 9 ms 7424 KB Output is correct
43 Correct 8 ms 7424 KB Output is correct
44 Correct 8 ms 7424 KB Output is correct
45 Correct 7 ms 7424 KB Output is correct
46 Correct 8 ms 7424 KB Output is correct
47 Correct 9 ms 7424 KB Output is correct
48 Correct 9 ms 7424 KB Output is correct
49 Correct 8 ms 7424 KB Output is correct
50 Correct 8 ms 7424 KB Output is correct
51 Correct 7 ms 7424 KB Output is correct
52 Correct 8 ms 7424 KB Output is correct
53 Correct 8 ms 7424 KB Output is correct
54 Correct 8 ms 7552 KB Output is correct
55 Correct 8 ms 7424 KB Output is correct
56 Correct 9 ms 7396 KB Output is correct
57 Correct 8 ms 7424 KB Output is correct
58 Correct 7 ms 7424 KB Output is correct
59 Correct 8 ms 7424 KB Output is correct
60 Correct 8 ms 7424 KB Output is correct
61 Correct 8 ms 7424 KB Output is correct
62 Correct 9 ms 7424 KB Output is correct
63 Correct 9 ms 7424 KB Output is correct
64 Correct 10 ms 7424 KB Output is correct
65 Correct 8 ms 7424 KB Output is correct
66 Correct 8 ms 7424 KB Output is correct
67 Correct 10 ms 7552 KB Output is correct
68 Correct 10 ms 7552 KB Output is correct
69 Correct 11 ms 7552 KB Output is correct
70 Correct 9 ms 7552 KB Output is correct
71 Correct 10 ms 7424 KB Output is correct
72 Correct 11 ms 7424 KB Output is correct
73 Correct 8 ms 7552 KB Output is correct
74 Correct 9 ms 7424 KB Output is correct
75 Correct 9 ms 7424 KB Output is correct
76 Correct 9 ms 7424 KB Output is correct
77 Correct 11 ms 7552 KB Output is correct
78 Correct 10 ms 7552 KB Output is correct
79 Correct 10 ms 7552 KB Output is correct
80 Correct 10 ms 7552 KB Output is correct
81 Correct 10 ms 7552 KB Output is correct
82 Correct 11 ms 7552 KB Output is correct
83 Correct 11 ms 7552 KB Output is correct
84 Correct 11 ms 7552 KB Output is correct
85 Correct 14 ms 7680 KB Output is correct
86 Correct 11 ms 7424 KB Output is correct
87 Correct 11 ms 7552 KB Output is correct
88 Correct 9 ms 7424 KB Output is correct
89 Correct 9 ms 7424 KB Output is correct
90 Correct 10 ms 7552 KB Output is correct
91 Correct 9 ms 7552 KB Output is correct
92 Correct 9 ms 7552 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 7424 KB Output is correct
2 Correct 9 ms 7424 KB Output is correct
3 Correct 9 ms 7424 KB Output is correct
4 Correct 10 ms 7424 KB Output is correct
5 Correct 9 ms 7552 KB Output is correct
6 Correct 8 ms 7424 KB Output is correct
7 Correct 10 ms 7424 KB Output is correct
8 Correct 10 ms 7424 KB Output is correct
9 Correct 9 ms 7424 KB Output is correct
10 Correct 9 ms 7424 KB Output is correct
11 Correct 9 ms 7424 KB Output is correct
12 Correct 10 ms 7424 KB Output is correct
13 Correct 9 ms 7424 KB Output is correct
14 Correct 8 ms 7296 KB Output is correct
15 Correct 9 ms 7424 KB Output is correct
16 Correct 10 ms 7424 KB Output is correct
17 Correct 9 ms 7424 KB Output is correct
18 Correct 8 ms 7424 KB Output is correct
19 Correct 9 ms 7424 KB Output is correct
20 Correct 9 ms 7424 KB Output is correct
21 Correct 8 ms 7424 KB Output is correct
22 Correct 8 ms 7424 KB Output is correct
23 Correct 10 ms 7424 KB Output is correct
24 Correct 10 ms 7424 KB Output is correct
25 Correct 10 ms 7424 KB Output is correct
26 Correct 10 ms 7424 KB Output is correct
27 Correct 7 ms 7296 KB Output is correct
28 Correct 8 ms 7424 KB Output is correct
29 Correct 8 ms 7424 KB Output is correct
30 Correct 13 ms 7424 KB Output is correct
31 Correct 9 ms 7424 KB Output is correct
32 Correct 9 ms 7424 KB Output is correct
33 Correct 7 ms 7424 KB Output is correct
34 Correct 9 ms 7424 KB Output is correct
35 Correct 12 ms 7424 KB Output is correct
36 Correct 10 ms 7396 KB Output is correct
37 Correct 9 ms 7424 KB Output is correct
38 Correct 8 ms 7424 KB Output is correct
39 Correct 11 ms 7424 KB Output is correct
40 Correct 10 ms 7424 KB Output is correct
41 Correct 9 ms 7424 KB Output is correct
42 Correct 9 ms 7424 KB Output is correct
43 Correct 8 ms 7424 KB Output is correct
44 Correct 8 ms 7424 KB Output is correct
45 Correct 7 ms 7424 KB Output is correct
46 Correct 8 ms 7424 KB Output is correct
47 Correct 9 ms 7424 KB Output is correct
48 Correct 9 ms 7424 KB Output is correct
49 Correct 8 ms 7424 KB Output is correct
50 Correct 8 ms 7424 KB Output is correct
51 Correct 7 ms 7424 KB Output is correct
52 Correct 8 ms 7424 KB Output is correct
53 Correct 8 ms 7424 KB Output is correct
54 Correct 8 ms 7552 KB Output is correct
55 Correct 8 ms 7424 KB Output is correct
56 Correct 9 ms 7396 KB Output is correct
57 Correct 8 ms 7424 KB Output is correct
58 Correct 7 ms 7424 KB Output is correct
59 Correct 8 ms 7424 KB Output is correct
60 Correct 8 ms 7424 KB Output is correct
61 Correct 8 ms 7424 KB Output is correct
62 Correct 9 ms 7424 KB Output is correct
63 Correct 9 ms 7424 KB Output is correct
64 Correct 10 ms 7424 KB Output is correct
65 Correct 8 ms 7424 KB Output is correct
66 Correct 129 ms 23528 KB Output is correct
67 Correct 125 ms 24748 KB Output is correct
68 Correct 417 ms 23860 KB Output is correct
69 Correct 209 ms 24240 KB Output is correct
70 Correct 295 ms 19964 KB Output is correct
71 Correct 342 ms 23184 KB Output is correct
72 Correct 379 ms 21528 KB Output is correct
73 Correct 413 ms 21932 KB Output is correct
74 Correct 384 ms 20128 KB Output is correct
75 Correct 366 ms 19500 KB Output is correct
76 Correct 140 ms 16324 KB Output is correct
77 Correct 124 ms 16172 KB Output is correct
78 Correct 129 ms 15968 KB Output is correct
79 Correct 142 ms 15860 KB Output is correct
80 Correct 115 ms 15036 KB Output is correct
81 Correct 93 ms 14636 KB Output is correct
82 Correct 12 ms 8932 KB Output is correct
83 Correct 13 ms 8960 KB Output is correct
84 Correct 12 ms 8960 KB Output is correct
85 Correct 13 ms 8960 KB Output is correct
86 Correct 11 ms 8960 KB Output is correct
87 Correct 12 ms 8960 KB Output is correct
88 Correct 11 ms 7552 KB Output is correct
89 Correct 11 ms 7552 KB Output is correct
90 Correct 9 ms 7552 KB Output is correct
91 Correct 11 ms 7680 KB Output is correct
92 Correct 15 ms 7680 KB Output is correct
93 Correct 11 ms 7680 KB Output is correct
94 Correct 14 ms 7680 KB Output is correct
95 Correct 9 ms 7552 KB Output is correct
96 Correct 12 ms 7552 KB Output is correct
97 Correct 11 ms 7552 KB Output is correct
98 Correct 10 ms 7552 KB Output is correct
99 Correct 10 ms 7552 KB Output is correct
100 Correct 10 ms 7552 KB Output is correct
101 Correct 9 ms 7552 KB Output is correct
102 Correct 9 ms 7552 KB Output is correct
103 Correct 9 ms 7552 KB Output is correct
104 Correct 9 ms 7552 KB Output is correct
105 Correct 11 ms 7552 KB Output is correct
106 Correct 10 ms 7552 KB Output is correct
107 Correct 12 ms 7552 KB Output is correct
108 Correct 516 ms 20584 KB Output is correct
109 Correct 438 ms 20592 KB Output is correct
110 Correct 488 ms 20648 KB Output is correct
111 Correct 403 ms 20656 KB Output is correct
112 Correct 344 ms 20484 KB Output is correct
113 Correct 810 ms 31056 KB Output is correct
114 Correct 810 ms 27120 KB Output is correct
115 Correct 747 ms 26696 KB Output is correct
116 Correct 691 ms 24744 KB Output is correct
117 Correct 406 ms 20492 KB Output is correct
118 Correct 350 ms 20520 KB Output is correct
119 Correct 361 ms 20516 KB Output is correct
120 Correct 299 ms 20644 KB Output is correct
121 Correct 213 ms 19808 KB Output is correct
122 Correct 183 ms 18216 KB Output is correct
123 Correct 108 ms 14872 KB Output is correct
124 Correct 129 ms 19052 KB Output is correct
125 Correct 138 ms 18580 KB Output is correct
126 Correct 160 ms 18648 KB Output is correct
127 Correct 125 ms 18604 KB Output is correct
128 Correct 10 ms 7552 KB Output is correct
129 Correct 11 ms 7552 KB Output is correct
130 Correct 9 ms 7552 KB Output is correct
131 Correct 9 ms 7552 KB Output is correct
132 Correct 11 ms 7552 KB Output is correct
133 Correct 9 ms 7424 KB Output is correct
134 Correct 9 ms 7424 KB Output is correct
135 Correct 9 ms 7552 KB Output is correct
136 Correct 11 ms 7552 KB Output is correct
137 Correct 8 ms 7424 KB Output is correct
138 Correct 11 ms 7552 KB Output is correct
139 Correct 11 ms 7552 KB Output is correct
140 Correct 10 ms 7552 KB Output is correct
141 Correct 9 ms 7552 KB Output is correct
142 Correct 10 ms 7552 KB Output is correct
143 Correct 9 ms 7552 KB Output is correct
144 Correct 10 ms 7552 KB Output is correct
145 Correct 37 ms 7552 KB Output is correct
146 Correct 11 ms 7552 KB Output is correct
147 Correct 11 ms 7424 KB Output is correct
148 Correct 12 ms 7552 KB Output is correct
149 Correct 10 ms 7552 KB Output is correct
150 Correct 9 ms 7680 KB Output is correct
151 Correct 10 ms 7552 KB Output is correct
152 Correct 11 ms 7424 KB Output is correct
153 Correct 8 ms 7424 KB Output is correct
154 Correct 7 ms 7424 KB Output is correct
155 Correct 338 ms 20648 KB Output is correct
156 Correct 468 ms 20900 KB Output is correct
157 Correct 458 ms 19116 KB Output is correct
158 Correct 364 ms 16740 KB Output is correct
159 Correct 253 ms 14720 KB Output is correct
160 Correct 231 ms 13964 KB Output is correct
161 Correct 179 ms 13616 KB Output is correct
162 Correct 176 ms 13360 KB Output is correct
163 Correct 147 ms 13236 KB Output is correct
164 Correct 146 ms 13100 KB Output is correct
165 Correct 132 ms 13008 KB Output is correct
166 Correct 91 ms 13008 KB Output is correct
167 Correct 99 ms 13244 KB Output is correct
168 Correct 93 ms 15460 KB Output is correct
169 Correct 727 ms 25792 KB Output is correct
170 Correct 930 ms 23460 KB Output is correct
171 Correct 626 ms 24104 KB Output is correct
172 Correct 621 ms 21224 KB Output is correct
173 Correct 347 ms 16692 KB Output is correct
174 Correct 336 ms 16556 KB Output is correct
175 Correct 260 ms 16556 KB Output is correct
176 Correct 206 ms 15456 KB Output is correct
177 Correct 149 ms 14636 KB Output is correct
178 Correct 275 ms 18500 KB Output is correct
179 Correct 246 ms 18544 KB Output is correct
180 Correct 218 ms 17192 KB Output is correct
181 Correct 234 ms 17064 KB Output is correct
182 Correct 8 ms 7424 KB Output is correct
183 Correct 10 ms 7552 KB Output is correct
184 Correct 10 ms 7552 KB Output is correct
185 Correct 11 ms 7552 KB Output is correct
186 Correct 9 ms 7552 KB Output is correct
187 Correct 10 ms 7424 KB Output is correct
188 Correct 11 ms 7424 KB Output is correct
189 Correct 8 ms 7552 KB Output is correct
190 Correct 9 ms 7424 KB Output is correct
191 Correct 9 ms 7424 KB Output is correct
192 Correct 9 ms 7424 KB Output is correct
193 Correct 11 ms 7552 KB Output is correct
194 Correct 10 ms 7552 KB Output is correct
195 Correct 10 ms 7552 KB Output is correct
196 Correct 10 ms 7552 KB Output is correct
197 Correct 10 ms 7552 KB Output is correct
198 Correct 11 ms 7552 KB Output is correct
199 Correct 11 ms 7552 KB Output is correct
200 Correct 11 ms 7552 KB Output is correct
201 Correct 14 ms 7680 KB Output is correct
202 Correct 11 ms 7424 KB Output is correct
203 Correct 11 ms 7552 KB Output is correct
204 Correct 9 ms 7424 KB Output is correct
205 Correct 9 ms 7424 KB Output is correct
206 Correct 10 ms 7552 KB Output is correct
207 Correct 9 ms 7552 KB Output is correct
208 Correct 9 ms 7552 KB Output is correct
209 Correct 12 ms 8576 KB Output is correct
210 Correct 150 ms 15336 KB Output is correct
211 Correct 209 ms 18700 KB Output is correct
212 Correct 214 ms 21616 KB Output is correct
213 Correct 182 ms 23140 KB Output is correct
214 Correct 73 ms 16044 KB Output is correct
215 Correct 80 ms 15664 KB Output is correct
216 Correct 281 ms 18860 KB Output is correct
217 Correct 202 ms 16812 KB Output is correct
218 Correct 134 ms 14772 KB Output is correct
219 Correct 124 ms 14328 KB Output is correct
220 Correct 118 ms 14168 KB Output is correct
221 Correct 113 ms 14100 KB Output is correct
222 Correct 124 ms 15348 KB Output is correct
223 Correct 315 ms 19796 KB Output is correct
224 Correct 361 ms 19116 KB Output is correct
225 Correct 222 ms 16304 KB Output is correct
226 Correct 226 ms 16452 KB Output is correct
227 Correct 225 ms 16304 KB Output is correct
228 Correct 170 ms 15636 KB Output is correct
229 Correct 159 ms 15180 KB Output is correct
230 Correct 161 ms 16112 KB Output is correct
231 Correct 179 ms 16336 KB Output is correct