Submission #104268

# Submission time Handle Problem Language Result Execution time Memory
104268 2019-04-04T15:33:38 Z zubec Duathlon (APIO18_duathlon) C++14
100 / 100
361 ms 28324 KB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;

const int N = 200100;

int n, m;

vector <int> g[N];

ll sz[N];

bool used[N];

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

vector <int> stck;

vector <vector <int> > cmp;

void findCutpoints(int v, int p){
    tin[v] = fup[v] = ++tim;
    stck.push_back(v);
    used[v] = 1;
    int sons = 0;
    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;

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]*(sz[v]-1)*((ll)cmp[to-n-1].size()-1); else
                ans -= (m-sz[to])*(m-sz[to]-1)*((ll)cmp[to-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);
    //freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);

    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();
            }
        }
    }
    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++){
            g[cmp[i][j]].push_back(n+i+1);
            g[n+i+1].push_back(cmp[i][j]);
        }
    }
    memset(used, 0, sizeof(used));
    for (int i = 1; i <= n; i++){
        if (!used[i]){
            dfs1(i, 0);
            ans += sz[i]*(sz[i]-1)*(sz[i]-2);
            dfs2(i, 0, sz[i]);
        }
    }

    cout << ans;

}

/**

5 6
1 2
2 3
3 1
2 4
4 5
2 5

4 4
1 2
2 3
3 4
4 2

*/

Compilation message

count_triplets.cpp: In function 'void findCutpoints(int, int)':
count_triplets.cpp:27:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = 0; i < g[v].size(); i++){
                     ~~^~~~~~~~~~~~~
count_triplets.cpp:26:9: warning: unused variable 'sons' [-Wunused-variable]
     int sons = 0;
         ^~~~
count_triplets.cpp: In function 'void dfs1(int, int)':
count_triplets.cpp:54: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:64:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int i = 0; i < g[v].size(); i++){
                         ~~^~~~~~~~~~~~~
count_triplets.cpp:71: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:101:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = 0; i < cmp.size(); i++){
                     ~~^~~~~~~~~~~~
count_triplets.cpp:102:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int j = 0; j < cmp[i].size(); j++){
                         ~~^~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 7 ms 5248 KB Output is correct
2 Correct 7 ms 5248 KB Output is correct
3 Correct 7 ms 5248 KB Output is correct
4 Correct 6 ms 5248 KB Output is correct
5 Correct 8 ms 5248 KB Output is correct
6 Correct 7 ms 5248 KB Output is correct
7 Correct 6 ms 5248 KB Output is correct
8 Correct 8 ms 5248 KB Output is correct
9 Correct 8 ms 5248 KB Output is correct
10 Correct 8 ms 5248 KB Output is correct
11 Correct 6 ms 5248 KB Output is correct
12 Correct 7 ms 5248 KB Output is correct
13 Correct 8 ms 5376 KB Output is correct
14 Correct 6 ms 5248 KB Output is correct
15 Correct 7 ms 5248 KB Output is correct
16 Correct 7 ms 5248 KB Output is correct
17 Correct 7 ms 5248 KB Output is correct
18 Correct 5 ms 5248 KB Output is correct
19 Correct 8 ms 5248 KB Output is correct
20 Correct 7 ms 5248 KB Output is correct
21 Correct 8 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 8 ms 5248 KB Output is correct
25 Correct 7 ms 5248 KB Output is correct
26 Correct 7 ms 5248 KB Output is correct
27 Correct 6 ms 5248 KB Output is correct
28 Correct 7 ms 5248 KB Output is correct
29 Correct 8 ms 5248 KB Output is correct
30 Correct 7 ms 5248 KB Output is correct
31 Correct 7 ms 5248 KB Output is correct
32 Correct 8 ms 5248 KB Output is correct
33 Correct 9 ms 5248 KB Output is correct
34 Correct 7 ms 5248 KB Output is correct
35 Correct 6 ms 5248 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 7 ms 5248 KB Output is correct
2 Correct 7 ms 5248 KB Output is correct
3 Correct 7 ms 5248 KB Output is correct
4 Correct 6 ms 5248 KB Output is correct
5 Correct 8 ms 5248 KB Output is correct
6 Correct 7 ms 5248 KB Output is correct
7 Correct 6 ms 5248 KB Output is correct
8 Correct 8 ms 5248 KB Output is correct
9 Correct 8 ms 5248 KB Output is correct
10 Correct 8 ms 5248 KB Output is correct
11 Correct 6 ms 5248 KB Output is correct
12 Correct 7 ms 5248 KB Output is correct
13 Correct 8 ms 5376 KB Output is correct
14 Correct 6 ms 5248 KB Output is correct
15 Correct 7 ms 5248 KB Output is correct
16 Correct 7 ms 5248 KB Output is correct
17 Correct 7 ms 5248 KB Output is correct
18 Correct 5 ms 5248 KB Output is correct
19 Correct 8 ms 5248 KB Output is correct
20 Correct 7 ms 5248 KB Output is correct
21 Correct 8 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 8 ms 5248 KB Output is correct
25 Correct 7 ms 5248 KB Output is correct
26 Correct 7 ms 5248 KB Output is correct
27 Correct 6 ms 5248 KB Output is correct
28 Correct 7 ms 5248 KB Output is correct
29 Correct 8 ms 5248 KB Output is correct
30 Correct 7 ms 5248 KB Output is correct
31 Correct 7 ms 5248 KB Output is correct
32 Correct 8 ms 5248 KB Output is correct
33 Correct 9 ms 5248 KB Output is correct
34 Correct 7 ms 5248 KB Output is correct
35 Correct 6 ms 5248 KB Output is correct
36 Correct 7 ms 5248 KB Output is correct
37 Correct 7 ms 5276 KB Output is correct
38 Correct 7 ms 5248 KB Output is correct
39 Correct 6 ms 5248 KB Output is correct
40 Correct 7 ms 5248 KB Output is correct
41 Correct 7 ms 5248 KB Output is correct
42 Correct 8 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 8 ms 5248 KB Output is correct
47 Correct 7 ms 5248 KB Output is correct
48 Correct 7 ms 5248 KB Output is correct
49 Correct 9 ms 5248 KB Output is correct
50 Correct 8 ms 5248 KB Output is correct
51 Correct 8 ms 5248 KB Output is correct
52 Correct 8 ms 5248 KB Output is correct
53 Correct 8 ms 5248 KB Output is correct
54 Correct 7 ms 5248 KB Output is correct
55 Correct 7 ms 5248 KB Output is correct
56 Correct 8 ms 5248 KB Output is correct
57 Correct 9 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 18 ms 5248 KB Output is correct
61 Correct 7 ms 5248 KB Output is correct
62 Correct 7 ms 5248 KB Output is correct
63 Correct 7 ms 5248 KB Output is correct
64 Correct 8 ms 5248 KB Output is correct
65 Correct 8 ms 5248 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 153 ms 20704 KB Output is correct
2 Correct 153 ms 20692 KB Output is correct
3 Correct 212 ms 21676 KB Output is correct
4 Correct 206 ms 22184 KB Output is correct
5 Correct 197 ms 19296 KB Output is correct
6 Correct 213 ms 22312 KB Output is correct
7 Correct 225 ms 20396 KB Output is correct
8 Correct 254 ms 21080 KB Output is correct
9 Correct 222 ms 18860 KB Output is correct
10 Correct 200 ms 18600 KB Output is correct
11 Correct 190 ms 18052 KB Output is correct
12 Correct 182 ms 18084 KB Output is correct
13 Correct 172 ms 18592 KB Output is correct
14 Correct 163 ms 18404 KB Output is correct
15 Correct 150 ms 19216 KB Output is correct
16 Correct 159 ms 18980 KB Output is correct
17 Correct 44 ms 19300 KB Output is correct
18 Correct 55 ms 19364 KB Output is correct
19 Correct 62 ms 19360 KB Output is correct
20 Correct 44 ms 19360 KB Output is correct
21 Correct 48 ms 19444 KB Output is correct
22 Correct 38 ms 19372 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 8 ms 5376 KB Output is correct
2 Correct 8 ms 5376 KB Output is correct
3 Correct 7 ms 5376 KB Output is correct
4 Correct 6 ms 5504 KB Output is correct
5 Correct 7 ms 5476 KB Output is correct
6 Correct 7 ms 5376 KB Output is correct
7 Correct 8 ms 5504 KB Output is correct
8 Correct 7 ms 5504 KB Output is correct
9 Correct 10 ms 5504 KB Output is correct
10 Correct 9 ms 5476 KB Output is correct
11 Correct 11 ms 5376 KB Output is correct
12 Correct 9 ms 5376 KB Output is correct
13 Correct 8 ms 5348 KB Output is correct
14 Correct 7 ms 5376 KB Output is correct
15 Correct 7 ms 5412 KB Output is correct
16 Correct 7 ms 5368 KB Output is correct
17 Correct 7 ms 5336 KB Output is correct
18 Correct 8 ms 5468 KB Output is correct
19 Correct 8 ms 5504 KB Output is correct
20 Correct 8 ms 5376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 223 ms 19664 KB Output is correct
2 Correct 237 ms 19676 KB Output is correct
3 Correct 224 ms 19632 KB Output is correct
4 Correct 224 ms 19784 KB Output is correct
5 Correct 206 ms 19592 KB Output is correct
6 Correct 361 ms 28324 KB Output is correct
7 Correct 303 ms 25392 KB Output is correct
8 Correct 275 ms 23848 KB Output is correct
9 Correct 289 ms 22692 KB Output is correct
10 Correct 248 ms 19748 KB Output is correct
11 Correct 221 ms 20644 KB Output is correct
12 Correct 278 ms 20808 KB Output is correct
13 Correct 271 ms 20640 KB Output is correct
14 Correct 236 ms 20572 KB Output is correct
15 Correct 191 ms 20332 KB Output is correct
16 Correct 142 ms 19984 KB Output is correct
17 Correct 211 ms 21092 KB Output is correct
18 Correct 175 ms 21008 KB Output is correct
19 Correct 251 ms 21064 KB Output is correct
20 Correct 207 ms 21032 KB Output is correct
# Verdict Execution time Memory 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 9 ms 5376 KB Output is correct
5 Correct 9 ms 5376 KB Output is correct
6 Correct 7 ms 5376 KB Output is correct
7 Correct 9 ms 5376 KB Output is correct
8 Correct 9 ms 5376 KB Output is correct
9 Correct 9 ms 5376 KB Output is correct
10 Correct 9 ms 5376 KB Output is correct
11 Correct 8 ms 5376 KB Output is correct
12 Correct 9 ms 5504 KB Output is correct
13 Correct 8 ms 5376 KB Output is correct
14 Correct 9 ms 5376 KB Output is correct
15 Correct 9 ms 5376 KB Output is correct
16 Correct 8 ms 5376 KB Output is correct
17 Correct 9 ms 5376 KB Output is correct
18 Correct 8 ms 5376 KB Output is correct
19 Correct 9 ms 5376 KB Output is correct
20 Correct 9 ms 5376 KB Output is correct
21 Correct 9 ms 5376 KB Output is correct
22 Correct 10 ms 5376 KB Output is correct
23 Correct 10 ms 5376 KB Output is correct
24 Correct 8 ms 5376 KB Output is correct
25 Correct 8 ms 5376 KB Output is correct
26 Correct 7 ms 5376 KB Output is correct
27 Correct 8 ms 5376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 237 ms 19588 KB Output is correct
2 Correct 229 ms 19616 KB Output is correct
3 Correct 231 ms 18084 KB Output is correct
4 Correct 225 ms 16012 KB Output is correct
5 Correct 198 ms 14124 KB Output is correct
6 Correct 196 ms 13100 KB Output is correct
7 Correct 163 ms 12716 KB Output is correct
8 Correct 140 ms 12212 KB Output is correct
9 Correct 120 ms 12080 KB Output is correct
10 Correct 125 ms 12024 KB Output is correct
11 Correct 134 ms 11696 KB Output is correct
12 Correct 137 ms 11544 KB Output is correct
13 Correct 140 ms 11640 KB Output is correct
14 Correct 153 ms 14068 KB Output is correct
15 Correct 287 ms 24224 KB Output is correct
16 Correct 246 ms 22016 KB Output is correct
17 Correct 249 ms 21924 KB Output is correct
18 Correct 240 ms 20260 KB Output is correct
19 Correct 200 ms 16044 KB Output is correct
20 Correct 192 ms 17320 KB Output is correct
21 Correct 219 ms 17320 KB Output is correct
22 Correct 195 ms 17200 KB Output is correct
23 Correct 161 ms 17012 KB Output is correct
24 Correct 208 ms 19504 KB Output is correct
25 Correct 218 ms 19496 KB Output is correct
26 Correct 206 ms 18212 KB Output is correct
27 Correct 247 ms 18264 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 7 ms 5248 KB Output is correct
2 Correct 7 ms 5248 KB Output is correct
3 Correct 7 ms 5248 KB Output is correct
4 Correct 6 ms 5248 KB Output is correct
5 Correct 8 ms 5248 KB Output is correct
6 Correct 7 ms 5248 KB Output is correct
7 Correct 6 ms 5248 KB Output is correct
8 Correct 8 ms 5248 KB Output is correct
9 Correct 8 ms 5248 KB Output is correct
10 Correct 8 ms 5248 KB Output is correct
11 Correct 6 ms 5248 KB Output is correct
12 Correct 7 ms 5248 KB Output is correct
13 Correct 8 ms 5376 KB Output is correct
14 Correct 6 ms 5248 KB Output is correct
15 Correct 7 ms 5248 KB Output is correct
16 Correct 7 ms 5248 KB Output is correct
17 Correct 7 ms 5248 KB Output is correct
18 Correct 5 ms 5248 KB Output is correct
19 Correct 8 ms 5248 KB Output is correct
20 Correct 7 ms 5248 KB Output is correct
21 Correct 8 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 8 ms 5248 KB Output is correct
25 Correct 7 ms 5248 KB Output is correct
26 Correct 7 ms 5248 KB Output is correct
27 Correct 6 ms 5248 KB Output is correct
28 Correct 7 ms 5248 KB Output is correct
29 Correct 8 ms 5248 KB Output is correct
30 Correct 7 ms 5248 KB Output is correct
31 Correct 7 ms 5248 KB Output is correct
32 Correct 8 ms 5248 KB Output is correct
33 Correct 9 ms 5248 KB Output is correct
34 Correct 7 ms 5248 KB Output is correct
35 Correct 6 ms 5248 KB Output is correct
36 Correct 7 ms 5248 KB Output is correct
37 Correct 7 ms 5276 KB Output is correct
38 Correct 7 ms 5248 KB Output is correct
39 Correct 6 ms 5248 KB Output is correct
40 Correct 7 ms 5248 KB Output is correct
41 Correct 7 ms 5248 KB Output is correct
42 Correct 8 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 8 ms 5248 KB Output is correct
47 Correct 7 ms 5248 KB Output is correct
48 Correct 7 ms 5248 KB Output is correct
49 Correct 9 ms 5248 KB Output is correct
50 Correct 8 ms 5248 KB Output is correct
51 Correct 8 ms 5248 KB Output is correct
52 Correct 8 ms 5248 KB Output is correct
53 Correct 8 ms 5248 KB Output is correct
54 Correct 7 ms 5248 KB Output is correct
55 Correct 7 ms 5248 KB Output is correct
56 Correct 8 ms 5248 KB Output is correct
57 Correct 9 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 18 ms 5248 KB Output is correct
61 Correct 7 ms 5248 KB Output is correct
62 Correct 7 ms 5248 KB Output is correct
63 Correct 7 ms 5248 KB Output is correct
64 Correct 8 ms 5248 KB Output is correct
65 Correct 8 ms 5248 KB Output is correct
66 Correct 8 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 8 ms 5376 KB Output is correct
70 Correct 9 ms 5376 KB Output is correct
71 Correct 9 ms 5376 KB Output is correct
72 Correct 8 ms 5376 KB Output is correct
73 Correct 8 ms 5376 KB Output is correct
74 Correct 7 ms 5376 KB Output is correct
75 Correct 9 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 8 ms 5376 KB Output is correct
79 Correct 8 ms 5376 KB Output is correct
80 Correct 7 ms 5376 KB Output is correct
81 Correct 7 ms 5376 KB Output is correct
82 Correct 8 ms 5376 KB Output is correct
83 Correct 7 ms 5376 KB Output is correct
84 Correct 3 ms 5504 KB Output is correct
85 Correct 8 ms 5376 KB Output is correct
86 Correct 7 ms 5376 KB Output is correct
87 Correct 8 ms 5376 KB Output is correct
88 Correct 7 ms 5376 KB Output is correct
89 Correct 7 ms 5376 KB Output is correct
90 Correct 10 ms 5376 KB Output is correct
91 Correct 8 ms 5376 KB Output is correct
92 Correct 7 ms 5376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 7 ms 5248 KB Output is correct
2 Correct 7 ms 5248 KB Output is correct
3 Correct 7 ms 5248 KB Output is correct
4 Correct 6 ms 5248 KB Output is correct
5 Correct 8 ms 5248 KB Output is correct
6 Correct 7 ms 5248 KB Output is correct
7 Correct 6 ms 5248 KB Output is correct
8 Correct 8 ms 5248 KB Output is correct
9 Correct 8 ms 5248 KB Output is correct
10 Correct 8 ms 5248 KB Output is correct
11 Correct 6 ms 5248 KB Output is correct
12 Correct 7 ms 5248 KB Output is correct
13 Correct 8 ms 5376 KB Output is correct
14 Correct 6 ms 5248 KB Output is correct
15 Correct 7 ms 5248 KB Output is correct
16 Correct 7 ms 5248 KB Output is correct
17 Correct 7 ms 5248 KB Output is correct
18 Correct 5 ms 5248 KB Output is correct
19 Correct 8 ms 5248 KB Output is correct
20 Correct 7 ms 5248 KB Output is correct
21 Correct 8 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 8 ms 5248 KB Output is correct
25 Correct 7 ms 5248 KB Output is correct
26 Correct 7 ms 5248 KB Output is correct
27 Correct 6 ms 5248 KB Output is correct
28 Correct 7 ms 5248 KB Output is correct
29 Correct 8 ms 5248 KB Output is correct
30 Correct 7 ms 5248 KB Output is correct
31 Correct 7 ms 5248 KB Output is correct
32 Correct 8 ms 5248 KB Output is correct
33 Correct 9 ms 5248 KB Output is correct
34 Correct 7 ms 5248 KB Output is correct
35 Correct 6 ms 5248 KB Output is correct
36 Correct 7 ms 5248 KB Output is correct
37 Correct 7 ms 5276 KB Output is correct
38 Correct 7 ms 5248 KB Output is correct
39 Correct 6 ms 5248 KB Output is correct
40 Correct 7 ms 5248 KB Output is correct
41 Correct 7 ms 5248 KB Output is correct
42 Correct 8 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 8 ms 5248 KB Output is correct
47 Correct 7 ms 5248 KB Output is correct
48 Correct 7 ms 5248 KB Output is correct
49 Correct 9 ms 5248 KB Output is correct
50 Correct 8 ms 5248 KB Output is correct
51 Correct 8 ms 5248 KB Output is correct
52 Correct 8 ms 5248 KB Output is correct
53 Correct 8 ms 5248 KB Output is correct
54 Correct 7 ms 5248 KB Output is correct
55 Correct 7 ms 5248 KB Output is correct
56 Correct 8 ms 5248 KB Output is correct
57 Correct 9 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 18 ms 5248 KB Output is correct
61 Correct 7 ms 5248 KB Output is correct
62 Correct 7 ms 5248 KB Output is correct
63 Correct 7 ms 5248 KB Output is correct
64 Correct 8 ms 5248 KB Output is correct
65 Correct 8 ms 5248 KB Output is correct
66 Correct 153 ms 20704 KB Output is correct
67 Correct 153 ms 20692 KB Output is correct
68 Correct 212 ms 21676 KB Output is correct
69 Correct 206 ms 22184 KB Output is correct
70 Correct 197 ms 19296 KB Output is correct
71 Correct 213 ms 22312 KB Output is correct
72 Correct 225 ms 20396 KB Output is correct
73 Correct 254 ms 21080 KB Output is correct
74 Correct 222 ms 18860 KB Output is correct
75 Correct 200 ms 18600 KB Output is correct
76 Correct 190 ms 18052 KB Output is correct
77 Correct 182 ms 18084 KB Output is correct
78 Correct 172 ms 18592 KB Output is correct
79 Correct 163 ms 18404 KB Output is correct
80 Correct 150 ms 19216 KB Output is correct
81 Correct 159 ms 18980 KB Output is correct
82 Correct 44 ms 19300 KB Output is correct
83 Correct 55 ms 19364 KB Output is correct
84 Correct 62 ms 19360 KB Output is correct
85 Correct 44 ms 19360 KB Output is correct
86 Correct 48 ms 19444 KB Output is correct
87 Correct 38 ms 19372 KB Output is correct
88 Correct 8 ms 5376 KB Output is correct
89 Correct 8 ms 5376 KB Output is correct
90 Correct 7 ms 5376 KB Output is correct
91 Correct 6 ms 5504 KB Output is correct
92 Correct 7 ms 5476 KB Output is correct
93 Correct 7 ms 5376 KB Output is correct
94 Correct 8 ms 5504 KB Output is correct
95 Correct 7 ms 5504 KB Output is correct
96 Correct 10 ms 5504 KB Output is correct
97 Correct 9 ms 5476 KB Output is correct
98 Correct 11 ms 5376 KB Output is correct
99 Correct 9 ms 5376 KB Output is correct
100 Correct 8 ms 5348 KB Output is correct
101 Correct 7 ms 5376 KB Output is correct
102 Correct 7 ms 5412 KB Output is correct
103 Correct 7 ms 5368 KB Output is correct
104 Correct 7 ms 5336 KB Output is correct
105 Correct 8 ms 5468 KB Output is correct
106 Correct 8 ms 5504 KB Output is correct
107 Correct 8 ms 5376 KB Output is correct
108 Correct 223 ms 19664 KB Output is correct
109 Correct 237 ms 19676 KB Output is correct
110 Correct 224 ms 19632 KB Output is correct
111 Correct 224 ms 19784 KB Output is correct
112 Correct 206 ms 19592 KB Output is correct
113 Correct 361 ms 28324 KB Output is correct
114 Correct 303 ms 25392 KB Output is correct
115 Correct 275 ms 23848 KB Output is correct
116 Correct 289 ms 22692 KB Output is correct
117 Correct 248 ms 19748 KB Output is correct
118 Correct 221 ms 20644 KB Output is correct
119 Correct 278 ms 20808 KB Output is correct
120 Correct 271 ms 20640 KB Output is correct
121 Correct 236 ms 20572 KB Output is correct
122 Correct 191 ms 20332 KB Output is correct
123 Correct 142 ms 19984 KB Output is correct
124 Correct 211 ms 21092 KB Output is correct
125 Correct 175 ms 21008 KB Output is correct
126 Correct 251 ms 21064 KB Output is correct
127 Correct 207 ms 21032 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 9 ms 5376 KB Output is correct
132 Correct 9 ms 5376 KB Output is correct
133 Correct 7 ms 5376 KB Output is correct
134 Correct 9 ms 5376 KB Output is correct
135 Correct 9 ms 5376 KB Output is correct
136 Correct 9 ms 5376 KB Output is correct
137 Correct 9 ms 5376 KB Output is correct
138 Correct 8 ms 5376 KB Output is correct
139 Correct 9 ms 5504 KB Output is correct
140 Correct 8 ms 5376 KB Output is correct
141 Correct 9 ms 5376 KB Output is correct
142 Correct 9 ms 5376 KB Output is correct
143 Correct 8 ms 5376 KB Output is correct
144 Correct 9 ms 5376 KB Output is correct
145 Correct 8 ms 5376 KB Output is correct
146 Correct 9 ms 5376 KB Output is correct
147 Correct 9 ms 5376 KB Output is correct
148 Correct 9 ms 5376 KB Output is correct
149 Correct 10 ms 5376 KB Output is correct
150 Correct 10 ms 5376 KB Output is correct
151 Correct 8 ms 5376 KB Output is correct
152 Correct 8 ms 5376 KB Output is correct
153 Correct 7 ms 5376 KB Output is correct
154 Correct 8 ms 5376 KB Output is correct
155 Correct 237 ms 19588 KB Output is correct
156 Correct 229 ms 19616 KB Output is correct
157 Correct 231 ms 18084 KB Output is correct
158 Correct 225 ms 16012 KB Output is correct
159 Correct 198 ms 14124 KB Output is correct
160 Correct 196 ms 13100 KB Output is correct
161 Correct 163 ms 12716 KB Output is correct
162 Correct 140 ms 12212 KB Output is correct
163 Correct 120 ms 12080 KB Output is correct
164 Correct 125 ms 12024 KB Output is correct
165 Correct 134 ms 11696 KB Output is correct
166 Correct 137 ms 11544 KB Output is correct
167 Correct 140 ms 11640 KB Output is correct
168 Correct 153 ms 14068 KB Output is correct
169 Correct 287 ms 24224 KB Output is correct
170 Correct 246 ms 22016 KB Output is correct
171 Correct 249 ms 21924 KB Output is correct
172 Correct 240 ms 20260 KB Output is correct
173 Correct 200 ms 16044 KB Output is correct
174 Correct 192 ms 17320 KB Output is correct
175 Correct 219 ms 17320 KB Output is correct
176 Correct 195 ms 17200 KB Output is correct
177 Correct 161 ms 17012 KB Output is correct
178 Correct 208 ms 19504 KB Output is correct
179 Correct 218 ms 19496 KB Output is correct
180 Correct 206 ms 18212 KB Output is correct
181 Correct 247 ms 18264 KB Output is correct
182 Correct 8 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 8 ms 5376 KB Output is correct
186 Correct 9 ms 5376 KB Output is correct
187 Correct 9 ms 5376 KB Output is correct
188 Correct 8 ms 5376 KB Output is correct
189 Correct 8 ms 5376 KB Output is correct
190 Correct 7 ms 5376 KB Output is correct
191 Correct 9 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 8 ms 5376 KB Output is correct
195 Correct 8 ms 5376 KB Output is correct
196 Correct 7 ms 5376 KB Output is correct
197 Correct 7 ms 5376 KB Output is correct
198 Correct 8 ms 5376 KB Output is correct
199 Correct 7 ms 5376 KB Output is correct
200 Correct 3 ms 5504 KB Output is correct
201 Correct 8 ms 5376 KB Output is correct
202 Correct 7 ms 5376 KB Output is correct
203 Correct 8 ms 5376 KB Output is correct
204 Correct 7 ms 5376 KB Output is correct
205 Correct 7 ms 5376 KB Output is correct
206 Correct 10 ms 5376 KB Output is correct
207 Correct 8 ms 5376 KB Output is correct
208 Correct 7 ms 5376 KB Output is correct
209 Correct 42 ms 19360 KB Output is correct
210 Correct 137 ms 19976 KB Output is correct
211 Correct 165 ms 19316 KB Output is correct
212 Correct 176 ms 19812 KB Output is correct
213 Correct 223 ms 21620 KB Output is correct
214 Correct 89 ms 17452 KB Output is correct
215 Correct 94 ms 16428 KB Output is correct
216 Correct 214 ms 18196 KB Output is correct
217 Correct 165 ms 15916 KB Output is correct
218 Correct 147 ms 13468 KB Output is correct
219 Correct 140 ms 12920 KB Output is correct
220 Correct 113 ms 12896 KB Output is correct
221 Correct 107 ms 12560 KB Output is correct
222 Correct 139 ms 13828 KB Output is correct
223 Correct 212 ms 18348 KB Output is correct
224 Correct 225 ms 17476 KB Output is correct
225 Correct 202 ms 15332 KB Output is correct
226 Correct 214 ms 15560 KB Output is correct
227 Correct 197 ms 15348 KB Output is correct
228 Correct 150 ms 15632 KB Output is correct
229 Correct 169 ms 16052 KB Output is correct
230 Correct 192 ms 15788 KB Output is correct
231 Correct 216 ms 15784 KB Output is correct