답안 #115868

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
115868 2019-06-09T11:56:41 Z zubec 철인 이종 경기 (APIO18_duathlon) C++14
100 / 100
262 ms 27424 KB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;

const int N = 200100;

vector <int> g[N];

vector <int> stck;

vector <vector <int> > cmp;

int tin[N], fup[N], tim, n;

bool used[N];

void findCutpoints(int v, int p){
    used[v] = 1;
    tin[v] = fup[v] = ++tim;
    stck.push_back(v);
    for (int i = 0; i < g[v].size(); i++){
        int to = g[v][i];
        if (to == p)
            continue;
        if (!used[to]){
            findCutpoints(to, v);
            fup[v] = min(fup[v], fup[to]);
            if (tin[v] <= fup[to]){
                cmp.push_back({v});
                while(cmp.back().back() != to){
                    cmp.back().push_back(stck.back());
                    stck.pop_back();
                }
            }
        } else {
            fup[v] = min(fup[v], tin[to]);
        }
    }
}

ll ans = 0;

int sz[N];

void dfs1(int v, int p){
    sz[v] = v <= n;
    used[v] = 1;
    for (int i = 0; i < g[v].size(); i++){
        int to = g[v][i];
        if (to == p)
            continue;
        dfs1(to, v);
        sz[v] += sz[to];
    }
}

void dfs2(int v, int p, ll m){
    if (v <= n){
        for (int i = 0; i < g[v].size(); i++){
            int to = g[v][i];
            if (to == p)
                ans -= (sz[v])*1ll*(sz[v]-1)*((ll)cmp[to-n-1].size()-1); else
                ans -= (m-sz[to])*1ll*(m-sz[to]-1)*((ll)cmp[to-n-1].size()-1);
        }
    } else {
        /*for (int i = 0; i < g[v].size(); i++){
            int to = g[v][i];
            if (to == p)
                ans -= sz[v]*1ll*(sz[v]-1)*((ll)cmp[v-n-1].size()-1); else
                ans -= (m-sz[to])*1ll*(m-sz[to]-1)*((ll)cmp[v-n-1].size()-1);
        }*/
    }
    for (int i = 0; i < g[v].size(); i++){
        int to = g[v][i];
        if (to == p)
            continue;
        dfs2(to, v, m);
    }
}

int main(){
    ios_base::sync_with_stdio(0);cin.tie(0);
    int m;
    cin >> n >> m;

    for (int i = 1; i <= m; i++){
        int u, v;
        cin >> u >> v;
        g[u].push_back(v);
        g[v].push_back(u);
    }
    for (int i = 1; i <= n; i++){
        if (!used[i]){
            findCutpoints(i, 0);
            if (!stck.empty()){
                cmp.push_back(stck);
                stck.clear();
            }
        }
    }
    memset(used, 0, sizeof(used));
    for (int i = 1; i <= n; i++)
        g[i].clear();
    for (int i = 0; i < cmp.size(); i++){
        for (int j = 0; j < cmp[i].size(); j++){
            int v = cmp[i][j];
            g[v].push_back(n+i+1);
            g[n+i+1].push_back(v);
        }
    }
    for (int i = 1; i <= n; i++){
        if (!used[i]){
            dfs1(i, 0);
            ans += (sz[i])*1ll*(sz[i]-1)*(sz[i]-2);
            dfs2(i, 0, sz[i]);
        }
    }

    cout << ans;

}

Compilation message

count_triplets.cpp: In function 'void findCutpoints(int, int)':
count_triplets.cpp:22:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = 0; i < g[v].size(); i++){
                     ~~^~~~~~~~~~~~~
count_triplets.cpp: In function 'void dfs1(int, int)':
count_triplets.cpp:49:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = 0; i < g[v].size(); i++){
                     ~~^~~~~~~~~~~~~
count_triplets.cpp: In function 'void dfs2(int, int, ll)':
count_triplets.cpp:60:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int i = 0; i < g[v].size(); i++){
                         ~~^~~~~~~~~~~~~
count_triplets.cpp:74:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = 0; i < g[v].size(); i++){
                     ~~^~~~~~~~~~~~~
count_triplets.cpp: In function 'int main()':
count_triplets.cpp:105:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = 0; i < cmp.size(); i++){
                     ~~^~~~~~~~~~~~
count_triplets.cpp:106:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int j = 0; j < cmp[i].size(); j++){
                         ~~^~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 5248 KB Output is correct
2 Correct 6 ms 5248 KB Output is correct
3 Correct 6 ms 5248 KB Output is correct
4 Correct 6 ms 5248 KB Output is correct
5 Correct 6 ms 5248 KB Output is correct
6 Correct 6 ms 5248 KB Output is correct
7 Correct 6 ms 5248 KB Output is correct
8 Correct 6 ms 5248 KB Output is correct
9 Correct 6 ms 5248 KB Output is correct
10 Correct 6 ms 5248 KB Output is correct
11 Correct 6 ms 5248 KB Output is correct
12 Correct 6 ms 5248 KB Output is correct
13 Correct 6 ms 5248 KB Output is correct
14 Correct 6 ms 5248 KB Output is correct
15 Correct 6 ms 5248 KB Output is correct
16 Correct 6 ms 5248 KB Output is correct
17 Correct 6 ms 5248 KB Output is correct
18 Correct 6 ms 5248 KB Output is correct
19 Correct 6 ms 5248 KB Output is correct
20 Correct 6 ms 5248 KB Output is correct
21 Correct 6 ms 5248 KB Output is correct
22 Correct 7 ms 5248 KB Output is correct
23 Correct 6 ms 5248 KB Output is correct
24 Correct 6 ms 5248 KB Output is correct
25 Correct 7 ms 5248 KB Output is correct
26 Correct 6 ms 5248 KB Output is correct
27 Correct 6 ms 5248 KB Output is correct
28 Correct 6 ms 5248 KB Output is correct
29 Correct 7 ms 5248 KB Output is correct
30 Correct 6 ms 5248 KB Output is correct
31 Correct 6 ms 5248 KB Output is correct
32 Correct 6 ms 5248 KB Output is correct
33 Correct 6 ms 5248 KB Output is correct
34 Correct 6 ms 5248 KB Output is correct
35 Correct 6 ms 5248 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 5248 KB Output is correct
2 Correct 6 ms 5248 KB Output is correct
3 Correct 6 ms 5248 KB Output is correct
4 Correct 6 ms 5248 KB Output is correct
5 Correct 6 ms 5248 KB Output is correct
6 Correct 6 ms 5248 KB Output is correct
7 Correct 6 ms 5248 KB Output is correct
8 Correct 6 ms 5248 KB Output is correct
9 Correct 6 ms 5248 KB Output is correct
10 Correct 6 ms 5248 KB Output is correct
11 Correct 6 ms 5248 KB Output is correct
12 Correct 6 ms 5248 KB Output is correct
13 Correct 6 ms 5248 KB Output is correct
14 Correct 6 ms 5248 KB Output is correct
15 Correct 6 ms 5248 KB Output is correct
16 Correct 6 ms 5248 KB Output is correct
17 Correct 6 ms 5248 KB Output is correct
18 Correct 6 ms 5248 KB Output is correct
19 Correct 6 ms 5248 KB Output is correct
20 Correct 6 ms 5248 KB Output is correct
21 Correct 6 ms 5248 KB Output is correct
22 Correct 7 ms 5248 KB Output is correct
23 Correct 6 ms 5248 KB Output is correct
24 Correct 6 ms 5248 KB Output is correct
25 Correct 7 ms 5248 KB Output is correct
26 Correct 6 ms 5248 KB Output is correct
27 Correct 6 ms 5248 KB Output is correct
28 Correct 6 ms 5248 KB Output is correct
29 Correct 7 ms 5248 KB Output is correct
30 Correct 6 ms 5248 KB Output is correct
31 Correct 6 ms 5248 KB Output is correct
32 Correct 6 ms 5248 KB Output is correct
33 Correct 6 ms 5248 KB Output is correct
34 Correct 6 ms 5248 KB Output is correct
35 Correct 6 ms 5248 KB Output is correct
36 Correct 6 ms 5248 KB Output is correct
37 Correct 6 ms 5248 KB Output is correct
38 Correct 6 ms 5248 KB Output is correct
39 Correct 6 ms 5248 KB Output is correct
40 Correct 6 ms 5248 KB Output is correct
41 Correct 6 ms 5248 KB Output is correct
42 Correct 6 ms 5248 KB Output is correct
43 Correct 6 ms 5248 KB Output is correct
44 Correct 6 ms 5248 KB Output is correct
45 Correct 7 ms 5248 KB Output is correct
46 Correct 6 ms 5248 KB Output is correct
47 Correct 6 ms 5248 KB Output is correct
48 Correct 6 ms 5248 KB Output is correct
49 Correct 6 ms 5248 KB Output is correct
50 Correct 6 ms 5248 KB Output is correct
51 Correct 6 ms 5248 KB Output is correct
52 Correct 6 ms 5248 KB Output is correct
53 Correct 6 ms 5248 KB Output is correct
54 Correct 6 ms 5248 KB Output is correct
55 Correct 6 ms 5248 KB Output is correct
56 Correct 7 ms 5248 KB Output is correct
57 Correct 7 ms 5248 KB Output is correct
58 Correct 6 ms 5248 KB Output is correct
59 Correct 7 ms 5248 KB Output is correct
60 Correct 6 ms 5248 KB Output is correct
61 Correct 7 ms 5248 KB Output is correct
62 Correct 6 ms 5248 KB Output is correct
63 Correct 6 ms 5248 KB Output is correct
64 Correct 6 ms 5248 KB Output is correct
65 Correct 6 ms 5248 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 108 ms 20400 KB Output is correct
2 Correct 103 ms 21612 KB Output is correct
3 Correct 180 ms 22480 KB Output is correct
4 Correct 120 ms 21552 KB Output is correct
5 Correct 121 ms 18728 KB Output is correct
6 Correct 160 ms 21544 KB Output is correct
7 Correct 168 ms 19800 KB Output is correct
8 Correct 166 ms 20408 KB Output is correct
9 Correct 136 ms 18304 KB Output is correct
10 Correct 120 ms 17936 KB Output is correct
11 Correct 133 ms 17524 KB Output is correct
12 Correct 125 ms 17516 KB Output is correct
13 Correct 152 ms 17952 KB Output is correct
14 Correct 117 ms 17828 KB Output is correct
15 Correct 101 ms 18464 KB Output is correct
16 Correct 108 ms 18340 KB Output is correct
17 Correct 35 ms 18596 KB Output is correct
18 Correct 37 ms 18604 KB Output is correct
19 Correct 32 ms 18600 KB Output is correct
20 Correct 36 ms 18600 KB Output is correct
21 Correct 36 ms 18600 KB Output is correct
22 Correct 35 ms 18596 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 5376 KB Output is correct
2 Correct 6 ms 5356 KB Output is correct
3 Correct 7 ms 5376 KB Output is correct
4 Correct 7 ms 5504 KB Output is correct
5 Correct 7 ms 5504 KB Output is correct
6 Correct 8 ms 5504 KB Output is correct
7 Correct 7 ms 5504 KB Output is correct
8 Correct 7 ms 5504 KB Output is correct
9 Correct 7 ms 5504 KB Output is correct
10 Correct 7 ms 5376 KB Output is correct
11 Correct 7 ms 5364 KB Output is correct
12 Correct 7 ms 5376 KB Output is correct
13 Correct 7 ms 5376 KB Output is correct
14 Correct 7 ms 5376 KB Output is correct
15 Correct 8 ms 5376 KB Output is correct
16 Correct 7 ms 5376 KB Output is correct
17 Correct 7 ms 5356 KB Output is correct
18 Correct 8 ms 5376 KB Output is correct
19 Correct 7 ms 5504 KB Output is correct
20 Correct 7 ms 5376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 174 ms 18796 KB Output is correct
2 Correct 207 ms 18724 KB Output is correct
3 Correct 192 ms 18724 KB Output is correct
4 Correct 176 ms 18764 KB Output is correct
5 Correct 195 ms 18732 KB Output is correct
6 Correct 262 ms 27424 KB Output is correct
7 Correct 233 ms 24708 KB Output is correct
8 Correct 250 ms 23072 KB Output is correct
9 Correct 214 ms 21664 KB Output is correct
10 Correct 181 ms 18720 KB Output is correct
11 Correct 176 ms 18888 KB Output is correct
12 Correct 191 ms 18828 KB Output is correct
13 Correct 169 ms 18892 KB Output is correct
14 Correct 140 ms 18712 KB Output is correct
15 Correct 150 ms 18788 KB Output is correct
16 Correct 110 ms 18688 KB Output is correct
17 Correct 128 ms 19036 KB Output is correct
18 Correct 146 ms 19104 KB Output is correct
19 Correct 133 ms 19096 KB Output is correct
20 Correct 147 ms 19084 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 5376 KB Output is correct
2 Correct 7 ms 5376 KB Output is correct
3 Correct 7 ms 5376 KB Output is correct
4 Correct 6 ms 5376 KB Output is correct
5 Correct 6 ms 5376 KB Output is correct
6 Correct 7 ms 5376 KB Output is correct
7 Correct 6 ms 5376 KB Output is correct
8 Correct 7 ms 5376 KB Output is correct
9 Correct 6 ms 5376 KB Output is correct
10 Correct 7 ms 5376 KB Output is correct
11 Correct 6 ms 5376 KB Output is correct
12 Correct 7 ms 5520 KB Output is correct
13 Correct 6 ms 5504 KB Output is correct
14 Correct 7 ms 5504 KB Output is correct
15 Correct 6 ms 5476 KB Output is correct
16 Correct 7 ms 5376 KB Output is correct
17 Correct 6 ms 5376 KB Output is correct
18 Correct 6 ms 5376 KB Output is correct
19 Correct 7 ms 5376 KB Output is correct
20 Correct 6 ms 5376 KB Output is correct
21 Correct 7 ms 5376 KB Output is correct
22 Correct 6 ms 5420 KB Output is correct
23 Correct 6 ms 5504 KB Output is correct
24 Correct 8 ms 5376 KB Output is correct
25 Correct 7 ms 5376 KB Output is correct
26 Correct 6 ms 5376 KB Output is correct
27 Correct 6 ms 5376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 206 ms 18852 KB Output is correct
2 Correct 197 ms 18824 KB Output is correct
3 Correct 198 ms 17268 KB Output is correct
4 Correct 175 ms 16808 KB Output is correct
5 Correct 128 ms 14632 KB Output is correct
6 Correct 120 ms 13776 KB Output is correct
7 Correct 111 ms 13524 KB Output is correct
8 Correct 89 ms 12876 KB Output is correct
9 Correct 90 ms 12724 KB Output is correct
10 Correct 94 ms 12664 KB Output is correct
11 Correct 79 ms 12408 KB Output is correct
12 Correct 76 ms 12280 KB Output is correct
13 Correct 71 ms 12280 KB Output is correct
14 Correct 85 ms 14580 KB Output is correct
15 Correct 198 ms 24612 KB Output is correct
16 Correct 186 ms 22564 KB Output is correct
17 Correct 182 ms 22564 KB Output is correct
18 Correct 188 ms 20912 KB Output is correct
19 Correct 164 ms 16808 KB Output is correct
20 Correct 162 ms 16744 KB Output is correct
21 Correct 151 ms 16692 KB Output is correct
22 Correct 148 ms 16552 KB Output is correct
23 Correct 152 ms 16432 KB Output is correct
24 Correct 179 ms 18796 KB Output is correct
25 Correct 191 ms 18856 KB Output is correct
26 Correct 165 ms 17572 KB Output is correct
27 Correct 192 ms 17572 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 5248 KB Output is correct
2 Correct 6 ms 5248 KB Output is correct
3 Correct 6 ms 5248 KB Output is correct
4 Correct 6 ms 5248 KB Output is correct
5 Correct 6 ms 5248 KB Output is correct
6 Correct 6 ms 5248 KB Output is correct
7 Correct 6 ms 5248 KB Output is correct
8 Correct 6 ms 5248 KB Output is correct
9 Correct 6 ms 5248 KB Output is correct
10 Correct 6 ms 5248 KB Output is correct
11 Correct 6 ms 5248 KB Output is correct
12 Correct 6 ms 5248 KB Output is correct
13 Correct 6 ms 5248 KB Output is correct
14 Correct 6 ms 5248 KB Output is correct
15 Correct 6 ms 5248 KB Output is correct
16 Correct 6 ms 5248 KB Output is correct
17 Correct 6 ms 5248 KB Output is correct
18 Correct 6 ms 5248 KB Output is correct
19 Correct 6 ms 5248 KB Output is correct
20 Correct 6 ms 5248 KB Output is correct
21 Correct 6 ms 5248 KB Output is correct
22 Correct 7 ms 5248 KB Output is correct
23 Correct 6 ms 5248 KB Output is correct
24 Correct 6 ms 5248 KB Output is correct
25 Correct 7 ms 5248 KB Output is correct
26 Correct 6 ms 5248 KB Output is correct
27 Correct 6 ms 5248 KB Output is correct
28 Correct 6 ms 5248 KB Output is correct
29 Correct 7 ms 5248 KB Output is correct
30 Correct 6 ms 5248 KB Output is correct
31 Correct 6 ms 5248 KB Output is correct
32 Correct 6 ms 5248 KB Output is correct
33 Correct 6 ms 5248 KB Output is correct
34 Correct 6 ms 5248 KB Output is correct
35 Correct 6 ms 5248 KB Output is correct
36 Correct 6 ms 5248 KB Output is correct
37 Correct 6 ms 5248 KB Output is correct
38 Correct 6 ms 5248 KB Output is correct
39 Correct 6 ms 5248 KB Output is correct
40 Correct 6 ms 5248 KB Output is correct
41 Correct 6 ms 5248 KB Output is correct
42 Correct 6 ms 5248 KB Output is correct
43 Correct 6 ms 5248 KB Output is correct
44 Correct 6 ms 5248 KB Output is correct
45 Correct 7 ms 5248 KB Output is correct
46 Correct 6 ms 5248 KB Output is correct
47 Correct 6 ms 5248 KB Output is correct
48 Correct 6 ms 5248 KB Output is correct
49 Correct 6 ms 5248 KB Output is correct
50 Correct 6 ms 5248 KB Output is correct
51 Correct 6 ms 5248 KB Output is correct
52 Correct 6 ms 5248 KB Output is correct
53 Correct 6 ms 5248 KB Output is correct
54 Correct 6 ms 5248 KB Output is correct
55 Correct 6 ms 5248 KB Output is correct
56 Correct 7 ms 5248 KB Output is correct
57 Correct 7 ms 5248 KB Output is correct
58 Correct 6 ms 5248 KB Output is correct
59 Correct 7 ms 5248 KB Output is correct
60 Correct 6 ms 5248 KB Output is correct
61 Correct 7 ms 5248 KB Output is correct
62 Correct 6 ms 5248 KB Output is correct
63 Correct 6 ms 5248 KB Output is correct
64 Correct 6 ms 5248 KB Output is correct
65 Correct 6 ms 5248 KB Output is correct
66 Correct 7 ms 5376 KB Output is correct
67 Correct 7 ms 5376 KB Output is correct
68 Correct 8 ms 5376 KB Output is correct
69 Correct 7 ms 5376 KB Output is correct
70 Correct 8 ms 5376 KB Output is correct
71 Correct 8 ms 5376 KB Output is correct
72 Correct 7 ms 5376 KB Output is correct
73 Correct 7 ms 5376 KB Output is correct
74 Correct 7 ms 5376 KB Output is correct
75 Correct 7 ms 5376 KB Output is correct
76 Correct 7 ms 5248 KB Output is correct
77 Correct 7 ms 5376 KB Output is correct
78 Correct 7 ms 5352 KB Output is correct
79 Correct 6 ms 5376 KB Output is correct
80 Correct 6 ms 5248 KB Output is correct
81 Correct 6 ms 5376 KB Output is correct
82 Correct 7 ms 5376 KB Output is correct
83 Correct 7 ms 5376 KB Output is correct
84 Correct 7 ms 5376 KB Output is correct
85 Correct 6 ms 5376 KB Output is correct
86 Correct 7 ms 5376 KB Output is correct
87 Correct 7 ms 5420 KB Output is correct
88 Correct 7 ms 5376 KB Output is correct
89 Correct 7 ms 5376 KB Output is correct
90 Correct 6 ms 5376 KB Output is correct
91 Correct 7 ms 5376 KB Output is correct
92 Correct 7 ms 5376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 5248 KB Output is correct
2 Correct 6 ms 5248 KB Output is correct
3 Correct 6 ms 5248 KB Output is correct
4 Correct 6 ms 5248 KB Output is correct
5 Correct 6 ms 5248 KB Output is correct
6 Correct 6 ms 5248 KB Output is correct
7 Correct 6 ms 5248 KB Output is correct
8 Correct 6 ms 5248 KB Output is correct
9 Correct 6 ms 5248 KB Output is correct
10 Correct 6 ms 5248 KB Output is correct
11 Correct 6 ms 5248 KB Output is correct
12 Correct 6 ms 5248 KB Output is correct
13 Correct 6 ms 5248 KB Output is correct
14 Correct 6 ms 5248 KB Output is correct
15 Correct 6 ms 5248 KB Output is correct
16 Correct 6 ms 5248 KB Output is correct
17 Correct 6 ms 5248 KB Output is correct
18 Correct 6 ms 5248 KB Output is correct
19 Correct 6 ms 5248 KB Output is correct
20 Correct 6 ms 5248 KB Output is correct
21 Correct 6 ms 5248 KB Output is correct
22 Correct 7 ms 5248 KB Output is correct
23 Correct 6 ms 5248 KB Output is correct
24 Correct 6 ms 5248 KB Output is correct
25 Correct 7 ms 5248 KB Output is correct
26 Correct 6 ms 5248 KB Output is correct
27 Correct 6 ms 5248 KB Output is correct
28 Correct 6 ms 5248 KB Output is correct
29 Correct 7 ms 5248 KB Output is correct
30 Correct 6 ms 5248 KB Output is correct
31 Correct 6 ms 5248 KB Output is correct
32 Correct 6 ms 5248 KB Output is correct
33 Correct 6 ms 5248 KB Output is correct
34 Correct 6 ms 5248 KB Output is correct
35 Correct 6 ms 5248 KB Output is correct
36 Correct 6 ms 5248 KB Output is correct
37 Correct 6 ms 5248 KB Output is correct
38 Correct 6 ms 5248 KB Output is correct
39 Correct 6 ms 5248 KB Output is correct
40 Correct 6 ms 5248 KB Output is correct
41 Correct 6 ms 5248 KB Output is correct
42 Correct 6 ms 5248 KB Output is correct
43 Correct 6 ms 5248 KB Output is correct
44 Correct 6 ms 5248 KB Output is correct
45 Correct 7 ms 5248 KB Output is correct
46 Correct 6 ms 5248 KB Output is correct
47 Correct 6 ms 5248 KB Output is correct
48 Correct 6 ms 5248 KB Output is correct
49 Correct 6 ms 5248 KB Output is correct
50 Correct 6 ms 5248 KB Output is correct
51 Correct 6 ms 5248 KB Output is correct
52 Correct 6 ms 5248 KB Output is correct
53 Correct 6 ms 5248 KB Output is correct
54 Correct 6 ms 5248 KB Output is correct
55 Correct 6 ms 5248 KB Output is correct
56 Correct 7 ms 5248 KB Output is correct
57 Correct 7 ms 5248 KB Output is correct
58 Correct 6 ms 5248 KB Output is correct
59 Correct 7 ms 5248 KB Output is correct
60 Correct 6 ms 5248 KB Output is correct
61 Correct 7 ms 5248 KB Output is correct
62 Correct 6 ms 5248 KB Output is correct
63 Correct 6 ms 5248 KB Output is correct
64 Correct 6 ms 5248 KB Output is correct
65 Correct 6 ms 5248 KB Output is correct
66 Correct 108 ms 20400 KB Output is correct
67 Correct 103 ms 21612 KB Output is correct
68 Correct 180 ms 22480 KB Output is correct
69 Correct 120 ms 21552 KB Output is correct
70 Correct 121 ms 18728 KB Output is correct
71 Correct 160 ms 21544 KB Output is correct
72 Correct 168 ms 19800 KB Output is correct
73 Correct 166 ms 20408 KB Output is correct
74 Correct 136 ms 18304 KB Output is correct
75 Correct 120 ms 17936 KB Output is correct
76 Correct 133 ms 17524 KB Output is correct
77 Correct 125 ms 17516 KB Output is correct
78 Correct 152 ms 17952 KB Output is correct
79 Correct 117 ms 17828 KB Output is correct
80 Correct 101 ms 18464 KB Output is correct
81 Correct 108 ms 18340 KB Output is correct
82 Correct 35 ms 18596 KB Output is correct
83 Correct 37 ms 18604 KB Output is correct
84 Correct 32 ms 18600 KB Output is correct
85 Correct 36 ms 18600 KB Output is correct
86 Correct 36 ms 18600 KB Output is correct
87 Correct 35 ms 18596 KB Output is correct
88 Correct 7 ms 5376 KB Output is correct
89 Correct 6 ms 5356 KB Output is correct
90 Correct 7 ms 5376 KB Output is correct
91 Correct 7 ms 5504 KB Output is correct
92 Correct 7 ms 5504 KB Output is correct
93 Correct 8 ms 5504 KB Output is correct
94 Correct 7 ms 5504 KB Output is correct
95 Correct 7 ms 5504 KB Output is correct
96 Correct 7 ms 5504 KB Output is correct
97 Correct 7 ms 5376 KB Output is correct
98 Correct 7 ms 5364 KB Output is correct
99 Correct 7 ms 5376 KB Output is correct
100 Correct 7 ms 5376 KB Output is correct
101 Correct 7 ms 5376 KB Output is correct
102 Correct 8 ms 5376 KB Output is correct
103 Correct 7 ms 5376 KB Output is correct
104 Correct 7 ms 5356 KB Output is correct
105 Correct 8 ms 5376 KB Output is correct
106 Correct 7 ms 5504 KB Output is correct
107 Correct 7 ms 5376 KB Output is correct
108 Correct 174 ms 18796 KB Output is correct
109 Correct 207 ms 18724 KB Output is correct
110 Correct 192 ms 18724 KB Output is correct
111 Correct 176 ms 18764 KB Output is correct
112 Correct 195 ms 18732 KB Output is correct
113 Correct 262 ms 27424 KB Output is correct
114 Correct 233 ms 24708 KB Output is correct
115 Correct 250 ms 23072 KB Output is correct
116 Correct 214 ms 21664 KB Output is correct
117 Correct 181 ms 18720 KB Output is correct
118 Correct 176 ms 18888 KB Output is correct
119 Correct 191 ms 18828 KB Output is correct
120 Correct 169 ms 18892 KB Output is correct
121 Correct 140 ms 18712 KB Output is correct
122 Correct 150 ms 18788 KB Output is correct
123 Correct 110 ms 18688 KB Output is correct
124 Correct 128 ms 19036 KB Output is correct
125 Correct 146 ms 19104 KB Output is correct
126 Correct 133 ms 19096 KB Output is correct
127 Correct 147 ms 19084 KB Output is correct
128 Correct 7 ms 5376 KB Output is correct
129 Correct 7 ms 5376 KB Output is correct
130 Correct 7 ms 5376 KB Output is correct
131 Correct 6 ms 5376 KB Output is correct
132 Correct 6 ms 5376 KB Output is correct
133 Correct 7 ms 5376 KB Output is correct
134 Correct 6 ms 5376 KB Output is correct
135 Correct 7 ms 5376 KB Output is correct
136 Correct 6 ms 5376 KB Output is correct
137 Correct 7 ms 5376 KB Output is correct
138 Correct 6 ms 5376 KB Output is correct
139 Correct 7 ms 5520 KB Output is correct
140 Correct 6 ms 5504 KB Output is correct
141 Correct 7 ms 5504 KB Output is correct
142 Correct 6 ms 5476 KB Output is correct
143 Correct 7 ms 5376 KB Output is correct
144 Correct 6 ms 5376 KB Output is correct
145 Correct 6 ms 5376 KB Output is correct
146 Correct 7 ms 5376 KB Output is correct
147 Correct 6 ms 5376 KB Output is correct
148 Correct 7 ms 5376 KB Output is correct
149 Correct 6 ms 5420 KB Output is correct
150 Correct 6 ms 5504 KB Output is correct
151 Correct 8 ms 5376 KB Output is correct
152 Correct 7 ms 5376 KB Output is correct
153 Correct 6 ms 5376 KB Output is correct
154 Correct 6 ms 5376 KB Output is correct
155 Correct 206 ms 18852 KB Output is correct
156 Correct 197 ms 18824 KB Output is correct
157 Correct 198 ms 17268 KB Output is correct
158 Correct 175 ms 16808 KB Output is correct
159 Correct 128 ms 14632 KB Output is correct
160 Correct 120 ms 13776 KB Output is correct
161 Correct 111 ms 13524 KB Output is correct
162 Correct 89 ms 12876 KB Output is correct
163 Correct 90 ms 12724 KB Output is correct
164 Correct 94 ms 12664 KB Output is correct
165 Correct 79 ms 12408 KB Output is correct
166 Correct 76 ms 12280 KB Output is correct
167 Correct 71 ms 12280 KB Output is correct
168 Correct 85 ms 14580 KB Output is correct
169 Correct 198 ms 24612 KB Output is correct
170 Correct 186 ms 22564 KB Output is correct
171 Correct 182 ms 22564 KB Output is correct
172 Correct 188 ms 20912 KB Output is correct
173 Correct 164 ms 16808 KB Output is correct
174 Correct 162 ms 16744 KB Output is correct
175 Correct 151 ms 16692 KB Output is correct
176 Correct 148 ms 16552 KB Output is correct
177 Correct 152 ms 16432 KB Output is correct
178 Correct 179 ms 18796 KB Output is correct
179 Correct 191 ms 18856 KB Output is correct
180 Correct 165 ms 17572 KB Output is correct
181 Correct 192 ms 17572 KB Output is correct
182 Correct 7 ms 5376 KB Output is correct
183 Correct 7 ms 5376 KB Output is correct
184 Correct 8 ms 5376 KB Output is correct
185 Correct 7 ms 5376 KB Output is correct
186 Correct 8 ms 5376 KB Output is correct
187 Correct 8 ms 5376 KB Output is correct
188 Correct 7 ms 5376 KB Output is correct
189 Correct 7 ms 5376 KB Output is correct
190 Correct 7 ms 5376 KB Output is correct
191 Correct 7 ms 5376 KB Output is correct
192 Correct 7 ms 5248 KB Output is correct
193 Correct 7 ms 5376 KB Output is correct
194 Correct 7 ms 5352 KB Output is correct
195 Correct 6 ms 5376 KB Output is correct
196 Correct 6 ms 5248 KB Output is correct
197 Correct 6 ms 5376 KB Output is correct
198 Correct 7 ms 5376 KB Output is correct
199 Correct 7 ms 5376 KB Output is correct
200 Correct 7 ms 5376 KB Output is correct
201 Correct 6 ms 5376 KB Output is correct
202 Correct 7 ms 5376 KB Output is correct
203 Correct 7 ms 5420 KB Output is correct
204 Correct 7 ms 5376 KB Output is correct
205 Correct 7 ms 5376 KB Output is correct
206 Correct 6 ms 5376 KB Output is correct
207 Correct 7 ms 5376 KB Output is correct
208 Correct 7 ms 5376 KB Output is correct
209 Correct 32 ms 18596 KB Output is correct
210 Correct 106 ms 19208 KB Output is correct
211 Correct 120 ms 18680 KB Output is correct
212 Correct 154 ms 19368 KB Output is correct
213 Correct 159 ms 20960 KB Output is correct
214 Correct 64 ms 16840 KB Output is correct
215 Correct 64 ms 15788 KB Output is correct
216 Correct 165 ms 17540 KB Output is correct
217 Correct 148 ms 15396 KB Output is correct
218 Correct 105 ms 13004 KB Output is correct
219 Correct 98 ms 12536 KB Output is correct
220 Correct 90 ms 12400 KB Output is correct
221 Correct 91 ms 12328 KB Output is correct
222 Correct 109 ms 13456 KB Output is correct
223 Correct 189 ms 17836 KB Output is correct
224 Correct 149 ms 16968 KB Output is correct
225 Correct 130 ms 14872 KB Output is correct
226 Correct 136 ms 14764 KB Output is correct
227 Correct 144 ms 14816 KB Output is correct
228 Correct 139 ms 15016 KB Output is correct
229 Correct 130 ms 15536 KB Output is correct
230 Correct 133 ms 15276 KB Output is correct
231 Correct 153 ms 15272 KB Output is correct