답안 #272679

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
272679 2020-08-18T13:27:05 Z evpipis 철인 이종 경기 (APIO18_duathlon) C++11
57 / 100
310 ms 39456 KB
#include <bits/stdc++.h>
using namespace std;

#define fi first
#define se second
#define pb push_back
#define mp make_pair
typedef pair<int, int> ii;
typedef long long ll;

const int len = 2e5+5;

int num[len], low[len], art[len], sz[len], vis[len], par[len], subtree[len];
int cnt_dfs, cnt_com, n, m;
ii edge[len];
vector<int> com[len], nex[len], stck;
vector<ii> adj[len];

// this dfs works fine because the graph is simple
// (no multiple edges or self loops)
void dfs(int u, int root = 0){
    num[u] = low[u] = ++cnt_dfs;

    int children = 0;
    for (auto v: adj[u]){
        if (!vis[v.se] && !num[v.fi]){
            children++;
            vis[v.se] = 1, stck.pb(v.se);
            dfs(v.fi);
            low[u] = min(low[u], low[v.fi]);

            if (low[v.fi] >= num[u]){
                cnt_com++;
                art[u] = 1;

                while (true){
                    int e = stck.back();
                    stck.pop_back();

                    com[cnt_com].pb(e);

                    if (e == v.se)
                        break;
                }
            }
        }
        else if (!vis[v.se] && num[v.fi]){
            vis[v.se] = 1, stck.pb(v.se);
            low[u] = min(low[u], num[v.fi]);
        }
    }

    if (root)
        art[u] = (children > 1);

    //printf("finished dfs: u = %d, art = %d, num = %d, low = %d\n", u, art[u], num[u], low[u]);
}

void decompose(){
    set<ii> mys;
    for (int i = 1; i <= n; i++)
        vis[i] = 0;

    for (int i = 1; i <= cnt_com; i++){
        /*
        printf("component $%d:", i);
        for (auto e: com[i])
            printf(" (%d, %d)", edge[e].fi, edge[e].se);
        printf("\n");
        */

        for (auto e: com[i]){
            int a = edge[e].fi, b = edge[e].se;
            if (!vis[a] && !art[a])
                vis[a] = 1, sz[i+n]++;
            if (!art[b] && !vis[b])
                vis[b] = 1, sz[i+n]++;

            if (art[a] && !mys.count(mp(a, i+n))){
                mys.insert(mp(a, i+n));
                nex[a].pb(i+n);
                nex[i+n].pb(a);
            }
            if (art[b] && !mys.count(mp(b, i+n))){
                mys.insert(mp(b, i+n));
                nex[b].pb(i+n);
                nex[i+n].pb(b);
            }
        }

        //printf("sz = %d\n", sz[i+n]);
    }
}

void fix(int u){
    /*
    printf("u = %d\n", u);
    if (art[u])
        printf("i am articulation point\n");
    else
        printf("i am a 2-vertext cc\n");
    */

    subtree[u] = 1;
    if (!art[u])
        subtree[u] = sz[u];
    for (auto v: nex[u]){
        if (v == par[u]) continue;

        par[v] = u;
        fix(v);
        subtree[u] += subtree[v];
    }

    //printf("ins fix: u = %d, subtree = %d\n", u, subtree[u]);
}

ll solve(int u, int all){
    //printf("u = %d, all = %d\n", u, all);
    ll ans = 0;

    for (auto v: nex[u])
        if (v != par[u])
            ans += solve(v, all);

    ll sum = 0;
    for (auto v: nex[u]){
        int sub = subtree[v];
        if (v == par[u])
            sub = all-subtree[u];

        //printf("%d -> %d, sub = %d\n", u, v, sub);
        sum += sub;
    }

    //printf("u = %d, sum = %lld\n", u, sum);

    if (art[u]){
        for (auto v: nex[u]){
            int sub = subtree[v];
            if (v == par[u])
                sub = all-subtree[u];

            // two different subtrees
            ans += sub*1LL*(sum-sub);

            // same subtree - not all cases
            ans += sz[v]*1LL*(sz[v]-1);
            ans += 2*sz[v]*1LL*(sub-sz[v]);
        }
    }
    else{
        int mul = 0;
        for (auto v: nex[u]){
            int sub = subtree[v];
            if (v == par[u])
                sub = all-subtree[u];

            mul += sub*1LL*(sum-sub);
        }

        for (auto v: nex[u]){
            int sub = subtree[v];
            if (v == par[u])
                sub = all-subtree[u];

            // two different subtrees
            ans += sz[u]*1LL*sub*1LL*(sum-sub);

            // center is adjacent art
            ans += mul - 2*sub*1LL*(sum-sub);
        }

        // 1 from my cc and one from a subtree
        ans += 2*sz[u]*1LL*(sz[u]-1)*1LL*sum;

        // 2 from my cc
        ans += sz[u]*1LL*(sz[u]-1)*1LL*(sz[u]-2);
    }

    return ans;
}

int main(){
    scanf("%d %d", &n, &m);
    for (int i = 0; i < m; i++){
        int a, b;
        scanf("%d %d", &a, &b);
        adj[a].pb(mp(b, i));
        adj[b].pb(mp(a, i));
        edge[i] = mp(a, b);
    }

    for (int i = 1; i <= n; i++)
        if (!num[i])
            dfs(i, 1);
    //printf("after dfs\n");

    decompose();
    //printf("after decompose\n");

    //printf("cnt_com = %d\n", cnt_com);

    ll ans = 0;
    for (int i = 1; i <= n+cnt_com; i++)
        if ((art[i] || i >= n+1) && !par[i])
            fix(i), ans += solve(i, subtree[i]);
    //printf("after solve\n");

    printf("%lld\n", ans);
    return 0;
}
/*
4 3
1 2
2 3
3 4

4 4
1 2
2 3
3 4
4 2
*/

Compilation message

count_triplets.cpp: In function 'int main()':
count_triplets.cpp:185:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  185 |     scanf("%d %d", &n, &m);
      |     ~~~~~^~~~~~~~~~~~~~~~~
count_triplets.cpp:188:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  188 |         scanf("%d %d", &a, &b);
      |         ~~~~~^~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 14464 KB Output is correct
2 Correct 10 ms 14464 KB Output is correct
3 Correct 10 ms 14592 KB Output is correct
4 Correct 10 ms 14464 KB Output is correct
5 Correct 10 ms 14464 KB Output is correct
6 Correct 10 ms 14464 KB Output is correct
7 Correct 10 ms 14464 KB Output is correct
8 Correct 10 ms 14464 KB Output is correct
9 Correct 10 ms 14464 KB Output is correct
10 Correct 10 ms 14464 KB Output is correct
11 Correct 10 ms 14464 KB Output is correct
12 Correct 12 ms 14464 KB Output is correct
13 Correct 12 ms 14464 KB Output is correct
14 Correct 11 ms 14464 KB Output is correct
15 Correct 11 ms 14464 KB Output is correct
16 Correct 10 ms 14464 KB Output is correct
17 Correct 10 ms 14464 KB Output is correct
18 Correct 11 ms 14464 KB Output is correct
19 Correct 10 ms 14464 KB Output is correct
20 Correct 10 ms 14464 KB Output is correct
21 Correct 11 ms 14464 KB Output is correct
22 Correct 10 ms 14464 KB Output is correct
23 Correct 10 ms 14464 KB Output is correct
24 Correct 10 ms 14464 KB Output is correct
25 Correct 10 ms 14464 KB Output is correct
26 Correct 10 ms 14464 KB Output is correct
27 Correct 10 ms 14464 KB Output is correct
28 Correct 10 ms 14464 KB Output is correct
29 Correct 10 ms 14464 KB Output is correct
30 Correct 11 ms 14464 KB Output is correct
31 Correct 10 ms 14464 KB Output is correct
32 Correct 10 ms 14464 KB Output is correct
33 Correct 10 ms 14464 KB Output is correct
34 Correct 10 ms 14464 KB Output is correct
35 Correct 10 ms 14464 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 14464 KB Output is correct
2 Correct 10 ms 14464 KB Output is correct
3 Correct 10 ms 14592 KB Output is correct
4 Correct 10 ms 14464 KB Output is correct
5 Correct 10 ms 14464 KB Output is correct
6 Correct 10 ms 14464 KB Output is correct
7 Correct 10 ms 14464 KB Output is correct
8 Correct 10 ms 14464 KB Output is correct
9 Correct 10 ms 14464 KB Output is correct
10 Correct 10 ms 14464 KB Output is correct
11 Correct 10 ms 14464 KB Output is correct
12 Correct 12 ms 14464 KB Output is correct
13 Correct 12 ms 14464 KB Output is correct
14 Correct 11 ms 14464 KB Output is correct
15 Correct 11 ms 14464 KB Output is correct
16 Correct 10 ms 14464 KB Output is correct
17 Correct 10 ms 14464 KB Output is correct
18 Correct 11 ms 14464 KB Output is correct
19 Correct 10 ms 14464 KB Output is correct
20 Correct 10 ms 14464 KB Output is correct
21 Correct 11 ms 14464 KB Output is correct
22 Correct 10 ms 14464 KB Output is correct
23 Correct 10 ms 14464 KB Output is correct
24 Correct 10 ms 14464 KB Output is correct
25 Correct 10 ms 14464 KB Output is correct
26 Correct 10 ms 14464 KB Output is correct
27 Correct 10 ms 14464 KB Output is correct
28 Correct 10 ms 14464 KB Output is correct
29 Correct 10 ms 14464 KB Output is correct
30 Correct 11 ms 14464 KB Output is correct
31 Correct 10 ms 14464 KB Output is correct
32 Correct 10 ms 14464 KB Output is correct
33 Correct 10 ms 14464 KB Output is correct
34 Correct 10 ms 14464 KB Output is correct
35 Correct 10 ms 14464 KB Output is correct
36 Correct 10 ms 14464 KB Output is correct
37 Correct 10 ms 14464 KB Output is correct
38 Correct 10 ms 14464 KB Output is correct
39 Correct 10 ms 14464 KB Output is correct
40 Correct 10 ms 14464 KB Output is correct
41 Correct 10 ms 14464 KB Output is correct
42 Correct 10 ms 14464 KB Output is correct
43 Correct 10 ms 14464 KB Output is correct
44 Correct 10 ms 14464 KB Output is correct
45 Correct 10 ms 14464 KB Output is correct
46 Correct 10 ms 14464 KB Output is correct
47 Correct 10 ms 14464 KB Output is correct
48 Correct 11 ms 14592 KB Output is correct
49 Correct 10 ms 14464 KB Output is correct
50 Correct 11 ms 14464 KB Output is correct
51 Correct 11 ms 14468 KB Output is correct
52 Correct 10 ms 14464 KB Output is correct
53 Correct 11 ms 14464 KB Output is correct
54 Correct 10 ms 14464 KB Output is correct
55 Correct 11 ms 14464 KB Output is correct
56 Correct 10 ms 14464 KB Output is correct
57 Correct 12 ms 14464 KB Output is correct
58 Correct 11 ms 14440 KB Output is correct
59 Correct 11 ms 14464 KB Output is correct
60 Correct 10 ms 14464 KB Output is correct
61 Correct 10 ms 14464 KB Output is correct
62 Correct 11 ms 14464 KB Output is correct
63 Correct 10 ms 14464 KB Output is correct
64 Correct 10 ms 14464 KB Output is correct
65 Correct 11 ms 14464 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 100 ms 29044 KB Output is correct
2 Correct 96 ms 29300 KB Output is correct
3 Correct 209 ms 39456 KB Output is correct
4 Correct 134 ms 32880 KB Output is correct
5 Correct 179 ms 33360 KB Output is correct
6 Correct 255 ms 38900 KB Output is correct
7 Correct 245 ms 37112 KB Output is correct
8 Correct 245 ms 37660 KB Output is correct
9 Correct 257 ms 35496 KB Output is correct
10 Correct 255 ms 34236 KB Output is correct
11 Correct 142 ms 27728 KB Output is correct
12 Correct 158 ms 28008 KB Output is correct
13 Correct 123 ms 26488 KB Output is correct
14 Correct 128 ms 26616 KB Output is correct
15 Correct 104 ms 23956 KB Output is correct
16 Correct 82 ms 23928 KB Output is correct
17 Correct 15 ms 16000 KB Output is correct
18 Correct 12 ms 16000 KB Output is correct
19 Correct 12 ms 16000 KB Output is correct
20 Correct 15 ms 16000 KB Output is correct
21 Correct 12 ms 16000 KB Output is correct
22 Correct 13 ms 16000 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 13 ms 14720 KB Output is correct
2 Correct 16 ms 14720 KB Output is correct
3 Correct 12 ms 14720 KB Output is correct
4 Correct 13 ms 14848 KB Output is correct
5 Correct 14 ms 14848 KB Output is correct
6 Correct 13 ms 14720 KB Output is correct
7 Correct 14 ms 14848 KB Output is correct
8 Correct 14 ms 14720 KB Output is correct
9 Correct 16 ms 14720 KB Output is correct
10 Correct 13 ms 14720 KB Output is correct
11 Correct 13 ms 14720 KB Output is correct
12 Correct 13 ms 14720 KB Output is correct
13 Correct 13 ms 14720 KB Output is correct
14 Correct 12 ms 14720 KB Output is correct
15 Correct 13 ms 14592 KB Output is correct
16 Correct 13 ms 14592 KB Output is correct
17 Correct 13 ms 14592 KB Output is correct
18 Correct 13 ms 14584 KB Output is correct
19 Correct 11 ms 14720 KB Output is correct
20 Correct 14 ms 14720 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 307 ms 38008 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 14700 KB Output is correct
2 Correct 12 ms 14720 KB Output is correct
3 Correct 13 ms 14720 KB Output is correct
4 Correct 12 ms 14592 KB Output is correct
5 Correct 12 ms 14592 KB Output is correct
6 Correct 12 ms 14592 KB Output is correct
7 Correct 22 ms 14592 KB Output is correct
8 Correct 14 ms 14592 KB Output is correct
9 Correct 11 ms 14592 KB Output is correct
10 Correct 11 ms 14592 KB Output is correct
11 Correct 11 ms 14592 KB Output is correct
12 Correct 12 ms 14720 KB Output is correct
13 Correct 12 ms 14720 KB Output is correct
14 Correct 13 ms 14720 KB Output is correct
15 Correct 14 ms 14752 KB Output is correct
16 Correct 11 ms 14612 KB Output is correct
17 Correct 12 ms 14592 KB Output is correct
18 Correct 14 ms 14592 KB Output is correct
19 Correct 12 ms 14592 KB Output is correct
20 Correct 14 ms 14592 KB Output is correct
21 Correct 14 ms 14592 KB Output is correct
22 Correct 14 ms 14720 KB Output is correct
23 Correct 14 ms 14592 KB Output is correct
24 Correct 12 ms 14592 KB Output is correct
25 Correct 11 ms 14464 KB Output is correct
26 Correct 11 ms 14464 KB Output is correct
27 Correct 11 ms 14464 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 310 ms 38080 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 14464 KB Output is correct
2 Correct 10 ms 14464 KB Output is correct
3 Correct 10 ms 14592 KB Output is correct
4 Correct 10 ms 14464 KB Output is correct
5 Correct 10 ms 14464 KB Output is correct
6 Correct 10 ms 14464 KB Output is correct
7 Correct 10 ms 14464 KB Output is correct
8 Correct 10 ms 14464 KB Output is correct
9 Correct 10 ms 14464 KB Output is correct
10 Correct 10 ms 14464 KB Output is correct
11 Correct 10 ms 14464 KB Output is correct
12 Correct 12 ms 14464 KB Output is correct
13 Correct 12 ms 14464 KB Output is correct
14 Correct 11 ms 14464 KB Output is correct
15 Correct 11 ms 14464 KB Output is correct
16 Correct 10 ms 14464 KB Output is correct
17 Correct 10 ms 14464 KB Output is correct
18 Correct 11 ms 14464 KB Output is correct
19 Correct 10 ms 14464 KB Output is correct
20 Correct 10 ms 14464 KB Output is correct
21 Correct 11 ms 14464 KB Output is correct
22 Correct 10 ms 14464 KB Output is correct
23 Correct 10 ms 14464 KB Output is correct
24 Correct 10 ms 14464 KB Output is correct
25 Correct 10 ms 14464 KB Output is correct
26 Correct 10 ms 14464 KB Output is correct
27 Correct 10 ms 14464 KB Output is correct
28 Correct 10 ms 14464 KB Output is correct
29 Correct 10 ms 14464 KB Output is correct
30 Correct 11 ms 14464 KB Output is correct
31 Correct 10 ms 14464 KB Output is correct
32 Correct 10 ms 14464 KB Output is correct
33 Correct 10 ms 14464 KB Output is correct
34 Correct 10 ms 14464 KB Output is correct
35 Correct 10 ms 14464 KB Output is correct
36 Correct 10 ms 14464 KB Output is correct
37 Correct 10 ms 14464 KB Output is correct
38 Correct 10 ms 14464 KB Output is correct
39 Correct 10 ms 14464 KB Output is correct
40 Correct 10 ms 14464 KB Output is correct
41 Correct 10 ms 14464 KB Output is correct
42 Correct 10 ms 14464 KB Output is correct
43 Correct 10 ms 14464 KB Output is correct
44 Correct 10 ms 14464 KB Output is correct
45 Correct 10 ms 14464 KB Output is correct
46 Correct 10 ms 14464 KB Output is correct
47 Correct 10 ms 14464 KB Output is correct
48 Correct 11 ms 14592 KB Output is correct
49 Correct 10 ms 14464 KB Output is correct
50 Correct 11 ms 14464 KB Output is correct
51 Correct 11 ms 14468 KB Output is correct
52 Correct 10 ms 14464 KB Output is correct
53 Correct 11 ms 14464 KB Output is correct
54 Correct 10 ms 14464 KB Output is correct
55 Correct 11 ms 14464 KB Output is correct
56 Correct 10 ms 14464 KB Output is correct
57 Correct 12 ms 14464 KB Output is correct
58 Correct 11 ms 14440 KB Output is correct
59 Correct 11 ms 14464 KB Output is correct
60 Correct 10 ms 14464 KB Output is correct
61 Correct 10 ms 14464 KB Output is correct
62 Correct 11 ms 14464 KB Output is correct
63 Correct 10 ms 14464 KB Output is correct
64 Correct 10 ms 14464 KB Output is correct
65 Correct 11 ms 14464 KB Output is correct
66 Correct 11 ms 14464 KB Output is correct
67 Correct 13 ms 14592 KB Output is correct
68 Correct 12 ms 14592 KB Output is correct
69 Correct 12 ms 14592 KB Output is correct
70 Correct 14 ms 14592 KB Output is correct
71 Correct 13 ms 14592 KB Output is correct
72 Correct 12 ms 14592 KB Output is correct
73 Correct 12 ms 14592 KB Output is correct
74 Correct 11 ms 14592 KB Output is correct
75 Correct 11 ms 14592 KB Output is correct
76 Correct 10 ms 14464 KB Output is correct
77 Correct 11 ms 14656 KB Output is correct
78 Correct 11 ms 14592 KB Output is correct
79 Correct 11 ms 14592 KB Output is correct
80 Correct 11 ms 14528 KB Output is correct
81 Correct 11 ms 14512 KB Output is correct
82 Correct 11 ms 14540 KB Output is correct
83 Correct 11 ms 14592 KB Output is correct
84 Correct 11 ms 14592 KB Output is correct
85 Correct 11 ms 14592 KB Output is correct
86 Correct 11 ms 14592 KB Output is correct
87 Correct 12 ms 14720 KB Output is correct
88 Correct 11 ms 14592 KB Output is correct
89 Correct 13 ms 14592 KB Output is correct
90 Correct 12 ms 14592 KB Output is correct
91 Correct 11 ms 14592 KB Output is correct
92 Correct 12 ms 14592 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 14464 KB Output is correct
2 Correct 10 ms 14464 KB Output is correct
3 Correct 10 ms 14592 KB Output is correct
4 Correct 10 ms 14464 KB Output is correct
5 Correct 10 ms 14464 KB Output is correct
6 Correct 10 ms 14464 KB Output is correct
7 Correct 10 ms 14464 KB Output is correct
8 Correct 10 ms 14464 KB Output is correct
9 Correct 10 ms 14464 KB Output is correct
10 Correct 10 ms 14464 KB Output is correct
11 Correct 10 ms 14464 KB Output is correct
12 Correct 12 ms 14464 KB Output is correct
13 Correct 12 ms 14464 KB Output is correct
14 Correct 11 ms 14464 KB Output is correct
15 Correct 11 ms 14464 KB Output is correct
16 Correct 10 ms 14464 KB Output is correct
17 Correct 10 ms 14464 KB Output is correct
18 Correct 11 ms 14464 KB Output is correct
19 Correct 10 ms 14464 KB Output is correct
20 Correct 10 ms 14464 KB Output is correct
21 Correct 11 ms 14464 KB Output is correct
22 Correct 10 ms 14464 KB Output is correct
23 Correct 10 ms 14464 KB Output is correct
24 Correct 10 ms 14464 KB Output is correct
25 Correct 10 ms 14464 KB Output is correct
26 Correct 10 ms 14464 KB Output is correct
27 Correct 10 ms 14464 KB Output is correct
28 Correct 10 ms 14464 KB Output is correct
29 Correct 10 ms 14464 KB Output is correct
30 Correct 11 ms 14464 KB Output is correct
31 Correct 10 ms 14464 KB Output is correct
32 Correct 10 ms 14464 KB Output is correct
33 Correct 10 ms 14464 KB Output is correct
34 Correct 10 ms 14464 KB Output is correct
35 Correct 10 ms 14464 KB Output is correct
36 Correct 10 ms 14464 KB Output is correct
37 Correct 10 ms 14464 KB Output is correct
38 Correct 10 ms 14464 KB Output is correct
39 Correct 10 ms 14464 KB Output is correct
40 Correct 10 ms 14464 KB Output is correct
41 Correct 10 ms 14464 KB Output is correct
42 Correct 10 ms 14464 KB Output is correct
43 Correct 10 ms 14464 KB Output is correct
44 Correct 10 ms 14464 KB Output is correct
45 Correct 10 ms 14464 KB Output is correct
46 Correct 10 ms 14464 KB Output is correct
47 Correct 10 ms 14464 KB Output is correct
48 Correct 11 ms 14592 KB Output is correct
49 Correct 10 ms 14464 KB Output is correct
50 Correct 11 ms 14464 KB Output is correct
51 Correct 11 ms 14468 KB Output is correct
52 Correct 10 ms 14464 KB Output is correct
53 Correct 11 ms 14464 KB Output is correct
54 Correct 10 ms 14464 KB Output is correct
55 Correct 11 ms 14464 KB Output is correct
56 Correct 10 ms 14464 KB Output is correct
57 Correct 12 ms 14464 KB Output is correct
58 Correct 11 ms 14440 KB Output is correct
59 Correct 11 ms 14464 KB Output is correct
60 Correct 10 ms 14464 KB Output is correct
61 Correct 10 ms 14464 KB Output is correct
62 Correct 11 ms 14464 KB Output is correct
63 Correct 10 ms 14464 KB Output is correct
64 Correct 10 ms 14464 KB Output is correct
65 Correct 11 ms 14464 KB Output is correct
66 Correct 100 ms 29044 KB Output is correct
67 Correct 96 ms 29300 KB Output is correct
68 Correct 209 ms 39456 KB Output is correct
69 Correct 134 ms 32880 KB Output is correct
70 Correct 179 ms 33360 KB Output is correct
71 Correct 255 ms 38900 KB Output is correct
72 Correct 245 ms 37112 KB Output is correct
73 Correct 245 ms 37660 KB Output is correct
74 Correct 257 ms 35496 KB Output is correct
75 Correct 255 ms 34236 KB Output is correct
76 Correct 142 ms 27728 KB Output is correct
77 Correct 158 ms 28008 KB Output is correct
78 Correct 123 ms 26488 KB Output is correct
79 Correct 128 ms 26616 KB Output is correct
80 Correct 104 ms 23956 KB Output is correct
81 Correct 82 ms 23928 KB Output is correct
82 Correct 15 ms 16000 KB Output is correct
83 Correct 12 ms 16000 KB Output is correct
84 Correct 12 ms 16000 KB Output is correct
85 Correct 15 ms 16000 KB Output is correct
86 Correct 12 ms 16000 KB Output is correct
87 Correct 13 ms 16000 KB Output is correct
88 Correct 13 ms 14720 KB Output is correct
89 Correct 16 ms 14720 KB Output is correct
90 Correct 12 ms 14720 KB Output is correct
91 Correct 13 ms 14848 KB Output is correct
92 Correct 14 ms 14848 KB Output is correct
93 Correct 13 ms 14720 KB Output is correct
94 Correct 14 ms 14848 KB Output is correct
95 Correct 14 ms 14720 KB Output is correct
96 Correct 16 ms 14720 KB Output is correct
97 Correct 13 ms 14720 KB Output is correct
98 Correct 13 ms 14720 KB Output is correct
99 Correct 13 ms 14720 KB Output is correct
100 Correct 13 ms 14720 KB Output is correct
101 Correct 12 ms 14720 KB Output is correct
102 Correct 13 ms 14592 KB Output is correct
103 Correct 13 ms 14592 KB Output is correct
104 Correct 13 ms 14592 KB Output is correct
105 Correct 13 ms 14584 KB Output is correct
106 Correct 11 ms 14720 KB Output is correct
107 Correct 14 ms 14720 KB Output is correct
108 Incorrect 307 ms 38008 KB Output isn't correct
109 Halted 0 ms 0 KB -