Submission #51614

# Submission time Handle Problem Language Result Execution time Memory
51614 2018-06-19T08:14:49 Z Alexa2001 Duathlon (APIO18_duathlon) C++17
100 / 100
405 ms 45528 KB
#include <bits/stdc++.h>

using namespace std;

const int Nmax = 4e5 + 5;
typedef long long ll;

int n, m, x, y, i, Ids, total;
int w[Nmax], level[Nmax], low[Nmax];

stack<int> st;
ll ans, tp[Nmax];
bool used[Nmax];

vector< vector<int> > bico;
vector<int> v[Nmax], edge[Nmax];


void dfs(int node, int dad = 0)
{
    low[node] = level[node] = level[dad] + 1;
    st.push(node);

    for(auto it : v[node])
    {
        if(it == dad) continue;

        if(level[it])
        {
            low[node] = min(low[node], level[it]);
            continue;
        }

        dfs(it, node);
        low[node] = min(low[node], low[it]);

        if(low[it] >= level[node])
        {
            bico.push_back(vector<int> ());
            int x;
            do
            {
                x = st.top();
                st.pop();
                bico.back().push_back(x);

            } while(x != it);

            bico.back().push_back(node);
        }
    }
}

ll sel3(int x) { return (ll) x * (x-1) * (x-2); }
ll sel2(int x) { return (ll) x * (x-1); }

void add_edge(int x, int y)
{
    edge[x].push_back(y);
    edge[y].push_back(x);
}

void dfss(int node, int dad = 0)
{
    used[node] = 1;
    w[node] = (node <= n);
    for(auto it : edge[node])
        if(it != dad)
        {
            dfss(it, node);
            w[node] += w[it];
            if(node > n) tp[node] += sel2(w[it]);
        }
}

void solve(int node, int dad = 0)
{
    for(auto it : edge[node])
        if(it != dad) solve(it, node);

    if(node > n) return;

    for(auto it : edge[node])
        if(it != dad) ans -= tp[it];
            else ans -= tp[it] - sel2(w[node]) + sel2(total - w[it]);
}

int main()
{
  //  freopen("input", "r", stdin);
  //  freopen("output", "w", stdout);

    cin >> n >> m;
    for(i=1; i<=m; ++i)
    {
        cin >> x >> y;
        v[x].push_back(y);
        v[y].push_back(x);
    }

    for(i=1; i<=n; ++i)
        if(!level[i])
            dfs(i);

    for(i=0; i<bico.size(); ++i)
        for(auto node : bico[i])
            add_edge(node, n+i+1);

    for(i=1; i<=n; ++i)
        if(!used[i])
        {
            dfss(i);
            total = w[i];
            ans += sel3(total);
            solve(i);
        }

    cout << ans << '\n';
    return 0;
}

Compilation message

count_triplets.cpp: In function 'int main()':
count_triplets.cpp:105:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(i=0; i<bico.size(); ++i)
              ~^~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 19 ms 19192 KB Output is correct
2 Correct 19 ms 19308 KB Output is correct
3 Correct 18 ms 19308 KB Output is correct
4 Correct 18 ms 19308 KB Output is correct
5 Correct 18 ms 19308 KB Output is correct
6 Correct 17 ms 19308 KB Output is correct
7 Correct 18 ms 19308 KB Output is correct
8 Correct 22 ms 19352 KB Output is correct
9 Correct 18 ms 19352 KB Output is correct
10 Correct 17 ms 19384 KB Output is correct
11 Correct 17 ms 19384 KB Output is correct
12 Correct 17 ms 19384 KB Output is correct
13 Correct 17 ms 19384 KB Output is correct
14 Correct 18 ms 19384 KB Output is correct
15 Correct 17 ms 19384 KB Output is correct
16 Correct 20 ms 19384 KB Output is correct
17 Correct 17 ms 19384 KB Output is correct
18 Correct 17 ms 19384 KB Output is correct
19 Correct 18 ms 19384 KB Output is correct
20 Correct 16 ms 19400 KB Output is correct
21 Correct 17 ms 19400 KB Output is correct
22 Correct 17 ms 19400 KB Output is correct
23 Correct 18 ms 19400 KB Output is correct
24 Correct 17 ms 19408 KB Output is correct
25 Correct 21 ms 19532 KB Output is correct
26 Correct 19 ms 19532 KB Output is correct
27 Correct 19 ms 19532 KB Output is correct
28 Correct 18 ms 19532 KB Output is correct
29 Correct 18 ms 19532 KB Output is correct
30 Correct 17 ms 19532 KB Output is correct
31 Correct 17 ms 19532 KB Output is correct
32 Correct 19 ms 19532 KB Output is correct
33 Correct 17 ms 19532 KB Output is correct
34 Correct 18 ms 19532 KB Output is correct
35 Correct 17 ms 19532 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 19 ms 19192 KB Output is correct
2 Correct 19 ms 19308 KB Output is correct
3 Correct 18 ms 19308 KB Output is correct
4 Correct 18 ms 19308 KB Output is correct
5 Correct 18 ms 19308 KB Output is correct
6 Correct 17 ms 19308 KB Output is correct
7 Correct 18 ms 19308 KB Output is correct
8 Correct 22 ms 19352 KB Output is correct
9 Correct 18 ms 19352 KB Output is correct
10 Correct 17 ms 19384 KB Output is correct
11 Correct 17 ms 19384 KB Output is correct
12 Correct 17 ms 19384 KB Output is correct
13 Correct 17 ms 19384 KB Output is correct
14 Correct 18 ms 19384 KB Output is correct
15 Correct 17 ms 19384 KB Output is correct
16 Correct 20 ms 19384 KB Output is correct
17 Correct 17 ms 19384 KB Output is correct
18 Correct 17 ms 19384 KB Output is correct
19 Correct 18 ms 19384 KB Output is correct
20 Correct 16 ms 19400 KB Output is correct
21 Correct 17 ms 19400 KB Output is correct
22 Correct 17 ms 19400 KB Output is correct
23 Correct 18 ms 19400 KB Output is correct
24 Correct 17 ms 19408 KB Output is correct
25 Correct 21 ms 19532 KB Output is correct
26 Correct 19 ms 19532 KB Output is correct
27 Correct 19 ms 19532 KB Output is correct
28 Correct 18 ms 19532 KB Output is correct
29 Correct 18 ms 19532 KB Output is correct
30 Correct 17 ms 19532 KB Output is correct
31 Correct 17 ms 19532 KB Output is correct
32 Correct 19 ms 19532 KB Output is correct
33 Correct 17 ms 19532 KB Output is correct
34 Correct 18 ms 19532 KB Output is correct
35 Correct 17 ms 19532 KB Output is correct
36 Correct 17 ms 19532 KB Output is correct
37 Correct 18 ms 19532 KB Output is correct
38 Correct 20 ms 19532 KB Output is correct
39 Correct 21 ms 19532 KB Output is correct
40 Correct 24 ms 19532 KB Output is correct
41 Correct 19 ms 19532 KB Output is correct
42 Correct 20 ms 19532 KB Output is correct
43 Correct 22 ms 19532 KB Output is correct
44 Correct 17 ms 19532 KB Output is correct
45 Correct 17 ms 19532 KB Output is correct
46 Correct 17 ms 19532 KB Output is correct
47 Correct 17 ms 19532 KB Output is correct
48 Correct 17 ms 19532 KB Output is correct
49 Correct 17 ms 19532 KB Output is correct
50 Correct 17 ms 19532 KB Output is correct
51 Correct 19 ms 19532 KB Output is correct
52 Correct 18 ms 19532 KB Output is correct
53 Correct 16 ms 19532 KB Output is correct
54 Correct 17 ms 19580 KB Output is correct
55 Correct 17 ms 19580 KB Output is correct
56 Correct 22 ms 19580 KB Output is correct
57 Correct 22 ms 19580 KB Output is correct
58 Correct 22 ms 19580 KB Output is correct
59 Correct 22 ms 19580 KB Output is correct
60 Correct 17 ms 19580 KB Output is correct
61 Correct 20 ms 19580 KB Output is correct
62 Correct 20 ms 19580 KB Output is correct
63 Correct 17 ms 19580 KB Output is correct
64 Correct 20 ms 19580 KB Output is correct
65 Correct 17 ms 19580 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 225 ms 37188 KB Output is correct
2 Correct 183 ms 37188 KB Output is correct
3 Correct 208 ms 38776 KB Output is correct
4 Correct 202 ms 38776 KB Output is correct
5 Correct 198 ms 38776 KB Output is correct
6 Correct 246 ms 38776 KB Output is correct
7 Correct 217 ms 38776 KB Output is correct
8 Correct 233 ms 38776 KB Output is correct
9 Correct 242 ms 38776 KB Output is correct
10 Correct 250 ms 38776 KB Output is correct
11 Correct 200 ms 38776 KB Output is correct
12 Correct 200 ms 38776 KB Output is correct
13 Correct 184 ms 38776 KB Output is correct
14 Correct 201 ms 38776 KB Output is correct
15 Correct 154 ms 38776 KB Output is correct
16 Correct 168 ms 38776 KB Output is correct
17 Correct 31 ms 38776 KB Output is correct
18 Correct 29 ms 38776 KB Output is correct
19 Correct 24 ms 38776 KB Output is correct
20 Correct 23 ms 38776 KB Output is correct
21 Correct 25 ms 38776 KB Output is correct
22 Correct 23 ms 38776 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 19 ms 38776 KB Output is correct
2 Correct 21 ms 38776 KB Output is correct
3 Correct 21 ms 38776 KB Output is correct
4 Correct 21 ms 38776 KB Output is correct
5 Correct 20 ms 38776 KB Output is correct
6 Correct 23 ms 38776 KB Output is correct
7 Correct 23 ms 38776 KB Output is correct
8 Correct 21 ms 38776 KB Output is correct
9 Correct 19 ms 38776 KB Output is correct
10 Correct 20 ms 38776 KB Output is correct
11 Correct 20 ms 38776 KB Output is correct
12 Correct 22 ms 38776 KB Output is correct
13 Correct 21 ms 38776 KB Output is correct
14 Correct 21 ms 38776 KB Output is correct
15 Correct 20 ms 38776 KB Output is correct
16 Correct 20 ms 38776 KB Output is correct
17 Correct 19 ms 38776 KB Output is correct
18 Correct 21 ms 38776 KB Output is correct
19 Correct 19 ms 38776 KB Output is correct
20 Correct 26 ms 38776 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 289 ms 38776 KB Output is correct
2 Correct 293 ms 38776 KB Output is correct
3 Correct 308 ms 38776 KB Output is correct
4 Correct 275 ms 38776 KB Output is correct
5 Correct 304 ms 38776 KB Output is correct
6 Correct 305 ms 45528 KB Output is correct
7 Correct 327 ms 45528 KB Output is correct
8 Correct 317 ms 45528 KB Output is correct
9 Correct 310 ms 45528 KB Output is correct
10 Correct 254 ms 45528 KB Output is correct
11 Correct 266 ms 45528 KB Output is correct
12 Correct 278 ms 45528 KB Output is correct
13 Correct 315 ms 45528 KB Output is correct
14 Correct 250 ms 45528 KB Output is correct
15 Correct 233 ms 45528 KB Output is correct
16 Correct 177 ms 45528 KB Output is correct
17 Correct 307 ms 45528 KB Output is correct
18 Correct 222 ms 45528 KB Output is correct
19 Correct 246 ms 45528 KB Output is correct
20 Correct 230 ms 45528 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 20 ms 45528 KB Output is correct
2 Correct 19 ms 45528 KB Output is correct
3 Correct 21 ms 45528 KB Output is correct
4 Correct 19 ms 45528 KB Output is correct
5 Correct 23 ms 45528 KB Output is correct
6 Correct 19 ms 45528 KB Output is correct
7 Correct 19 ms 45528 KB Output is correct
8 Correct 18 ms 45528 KB Output is correct
9 Correct 20 ms 45528 KB Output is correct
10 Correct 19 ms 45528 KB Output is correct
11 Correct 18 ms 45528 KB Output is correct
12 Correct 18 ms 45528 KB Output is correct
13 Correct 20 ms 45528 KB Output is correct
14 Correct 19 ms 45528 KB Output is correct
15 Correct 18 ms 45528 KB Output is correct
16 Correct 19 ms 45528 KB Output is correct
17 Correct 22 ms 45528 KB Output is correct
18 Correct 19 ms 45528 KB Output is correct
19 Correct 19 ms 45528 KB Output is correct
20 Correct 19 ms 45528 KB Output is correct
21 Correct 19 ms 45528 KB Output is correct
22 Correct 19 ms 45528 KB Output is correct
23 Correct 20 ms 45528 KB Output is correct
24 Correct 19 ms 45528 KB Output is correct
25 Correct 20 ms 45528 KB Output is correct
26 Correct 17 ms 45528 KB Output is correct
27 Correct 18 ms 45528 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 258 ms 45528 KB Output is correct
2 Correct 286 ms 45528 KB Output is correct
3 Correct 308 ms 45528 KB Output is correct
4 Correct 274 ms 45528 KB Output is correct
5 Correct 270 ms 45528 KB Output is correct
6 Correct 216 ms 45528 KB Output is correct
7 Correct 262 ms 45528 KB Output is correct
8 Correct 265 ms 45528 KB Output is correct
9 Correct 196 ms 45528 KB Output is correct
10 Correct 195 ms 45528 KB Output is correct
11 Correct 193 ms 45528 KB Output is correct
12 Correct 179 ms 45528 KB Output is correct
13 Correct 223 ms 45528 KB Output is correct
14 Correct 234 ms 45528 KB Output is correct
15 Correct 283 ms 45528 KB Output is correct
16 Correct 328 ms 45528 KB Output is correct
17 Correct 267 ms 45528 KB Output is correct
18 Correct 263 ms 45528 KB Output is correct
19 Correct 263 ms 45528 KB Output is correct
20 Correct 292 ms 45528 KB Output is correct
21 Correct 284 ms 45528 KB Output is correct
22 Correct 227 ms 45528 KB Output is correct
23 Correct 259 ms 45528 KB Output is correct
24 Correct 261 ms 45528 KB Output is correct
25 Correct 274 ms 45528 KB Output is correct
26 Correct 405 ms 45528 KB Output is correct
27 Correct 276 ms 45528 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 19 ms 19192 KB Output is correct
2 Correct 19 ms 19308 KB Output is correct
3 Correct 18 ms 19308 KB Output is correct
4 Correct 18 ms 19308 KB Output is correct
5 Correct 18 ms 19308 KB Output is correct
6 Correct 17 ms 19308 KB Output is correct
7 Correct 18 ms 19308 KB Output is correct
8 Correct 22 ms 19352 KB Output is correct
9 Correct 18 ms 19352 KB Output is correct
10 Correct 17 ms 19384 KB Output is correct
11 Correct 17 ms 19384 KB Output is correct
12 Correct 17 ms 19384 KB Output is correct
13 Correct 17 ms 19384 KB Output is correct
14 Correct 18 ms 19384 KB Output is correct
15 Correct 17 ms 19384 KB Output is correct
16 Correct 20 ms 19384 KB Output is correct
17 Correct 17 ms 19384 KB Output is correct
18 Correct 17 ms 19384 KB Output is correct
19 Correct 18 ms 19384 KB Output is correct
20 Correct 16 ms 19400 KB Output is correct
21 Correct 17 ms 19400 KB Output is correct
22 Correct 17 ms 19400 KB Output is correct
23 Correct 18 ms 19400 KB Output is correct
24 Correct 17 ms 19408 KB Output is correct
25 Correct 21 ms 19532 KB Output is correct
26 Correct 19 ms 19532 KB Output is correct
27 Correct 19 ms 19532 KB Output is correct
28 Correct 18 ms 19532 KB Output is correct
29 Correct 18 ms 19532 KB Output is correct
30 Correct 17 ms 19532 KB Output is correct
31 Correct 17 ms 19532 KB Output is correct
32 Correct 19 ms 19532 KB Output is correct
33 Correct 17 ms 19532 KB Output is correct
34 Correct 18 ms 19532 KB Output is correct
35 Correct 17 ms 19532 KB Output is correct
36 Correct 17 ms 19532 KB Output is correct
37 Correct 18 ms 19532 KB Output is correct
38 Correct 20 ms 19532 KB Output is correct
39 Correct 21 ms 19532 KB Output is correct
40 Correct 24 ms 19532 KB Output is correct
41 Correct 19 ms 19532 KB Output is correct
42 Correct 20 ms 19532 KB Output is correct
43 Correct 22 ms 19532 KB Output is correct
44 Correct 17 ms 19532 KB Output is correct
45 Correct 17 ms 19532 KB Output is correct
46 Correct 17 ms 19532 KB Output is correct
47 Correct 17 ms 19532 KB Output is correct
48 Correct 17 ms 19532 KB Output is correct
49 Correct 17 ms 19532 KB Output is correct
50 Correct 17 ms 19532 KB Output is correct
51 Correct 19 ms 19532 KB Output is correct
52 Correct 18 ms 19532 KB Output is correct
53 Correct 16 ms 19532 KB Output is correct
54 Correct 17 ms 19580 KB Output is correct
55 Correct 17 ms 19580 KB Output is correct
56 Correct 22 ms 19580 KB Output is correct
57 Correct 22 ms 19580 KB Output is correct
58 Correct 22 ms 19580 KB Output is correct
59 Correct 22 ms 19580 KB Output is correct
60 Correct 17 ms 19580 KB Output is correct
61 Correct 20 ms 19580 KB Output is correct
62 Correct 20 ms 19580 KB Output is correct
63 Correct 17 ms 19580 KB Output is correct
64 Correct 20 ms 19580 KB Output is correct
65 Correct 17 ms 19580 KB Output is correct
66 Correct 20 ms 45528 KB Output is correct
67 Correct 18 ms 45528 KB Output is correct
68 Correct 19 ms 45528 KB Output is correct
69 Correct 18 ms 45528 KB Output is correct
70 Correct 23 ms 45528 KB Output is correct
71 Correct 18 ms 45528 KB Output is correct
72 Correct 19 ms 45528 KB Output is correct
73 Correct 18 ms 45528 KB Output is correct
74 Correct 18 ms 45528 KB Output is correct
75 Correct 20 ms 45528 KB Output is correct
76 Correct 18 ms 45528 KB Output is correct
77 Correct 19 ms 45528 KB Output is correct
78 Correct 19 ms 45528 KB Output is correct
79 Correct 24 ms 45528 KB Output is correct
80 Correct 19 ms 45528 KB Output is correct
81 Correct 19 ms 45528 KB Output is correct
82 Correct 19 ms 45528 KB Output is correct
83 Correct 21 ms 45528 KB Output is correct
84 Correct 21 ms 45528 KB Output is correct
85 Correct 18 ms 45528 KB Output is correct
86 Correct 19 ms 45528 KB Output is correct
87 Correct 19 ms 45528 KB Output is correct
88 Correct 19 ms 45528 KB Output is correct
89 Correct 19 ms 45528 KB Output is correct
90 Correct 18 ms 45528 KB Output is correct
91 Correct 19 ms 45528 KB Output is correct
92 Correct 19 ms 45528 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 19 ms 19192 KB Output is correct
2 Correct 19 ms 19308 KB Output is correct
3 Correct 18 ms 19308 KB Output is correct
4 Correct 18 ms 19308 KB Output is correct
5 Correct 18 ms 19308 KB Output is correct
6 Correct 17 ms 19308 KB Output is correct
7 Correct 18 ms 19308 KB Output is correct
8 Correct 22 ms 19352 KB Output is correct
9 Correct 18 ms 19352 KB Output is correct
10 Correct 17 ms 19384 KB Output is correct
11 Correct 17 ms 19384 KB Output is correct
12 Correct 17 ms 19384 KB Output is correct
13 Correct 17 ms 19384 KB Output is correct
14 Correct 18 ms 19384 KB Output is correct
15 Correct 17 ms 19384 KB Output is correct
16 Correct 20 ms 19384 KB Output is correct
17 Correct 17 ms 19384 KB Output is correct
18 Correct 17 ms 19384 KB Output is correct
19 Correct 18 ms 19384 KB Output is correct
20 Correct 16 ms 19400 KB Output is correct
21 Correct 17 ms 19400 KB Output is correct
22 Correct 17 ms 19400 KB Output is correct
23 Correct 18 ms 19400 KB Output is correct
24 Correct 17 ms 19408 KB Output is correct
25 Correct 21 ms 19532 KB Output is correct
26 Correct 19 ms 19532 KB Output is correct
27 Correct 19 ms 19532 KB Output is correct
28 Correct 18 ms 19532 KB Output is correct
29 Correct 18 ms 19532 KB Output is correct
30 Correct 17 ms 19532 KB Output is correct
31 Correct 17 ms 19532 KB Output is correct
32 Correct 19 ms 19532 KB Output is correct
33 Correct 17 ms 19532 KB Output is correct
34 Correct 18 ms 19532 KB Output is correct
35 Correct 17 ms 19532 KB Output is correct
36 Correct 17 ms 19532 KB Output is correct
37 Correct 18 ms 19532 KB Output is correct
38 Correct 20 ms 19532 KB Output is correct
39 Correct 21 ms 19532 KB Output is correct
40 Correct 24 ms 19532 KB Output is correct
41 Correct 19 ms 19532 KB Output is correct
42 Correct 20 ms 19532 KB Output is correct
43 Correct 22 ms 19532 KB Output is correct
44 Correct 17 ms 19532 KB Output is correct
45 Correct 17 ms 19532 KB Output is correct
46 Correct 17 ms 19532 KB Output is correct
47 Correct 17 ms 19532 KB Output is correct
48 Correct 17 ms 19532 KB Output is correct
49 Correct 17 ms 19532 KB Output is correct
50 Correct 17 ms 19532 KB Output is correct
51 Correct 19 ms 19532 KB Output is correct
52 Correct 18 ms 19532 KB Output is correct
53 Correct 16 ms 19532 KB Output is correct
54 Correct 17 ms 19580 KB Output is correct
55 Correct 17 ms 19580 KB Output is correct
56 Correct 22 ms 19580 KB Output is correct
57 Correct 22 ms 19580 KB Output is correct
58 Correct 22 ms 19580 KB Output is correct
59 Correct 22 ms 19580 KB Output is correct
60 Correct 17 ms 19580 KB Output is correct
61 Correct 20 ms 19580 KB Output is correct
62 Correct 20 ms 19580 KB Output is correct
63 Correct 17 ms 19580 KB Output is correct
64 Correct 20 ms 19580 KB Output is correct
65 Correct 17 ms 19580 KB Output is correct
66 Correct 225 ms 37188 KB Output is correct
67 Correct 183 ms 37188 KB Output is correct
68 Correct 208 ms 38776 KB Output is correct
69 Correct 202 ms 38776 KB Output is correct
70 Correct 198 ms 38776 KB Output is correct
71 Correct 246 ms 38776 KB Output is correct
72 Correct 217 ms 38776 KB Output is correct
73 Correct 233 ms 38776 KB Output is correct
74 Correct 242 ms 38776 KB Output is correct
75 Correct 250 ms 38776 KB Output is correct
76 Correct 200 ms 38776 KB Output is correct
77 Correct 200 ms 38776 KB Output is correct
78 Correct 184 ms 38776 KB Output is correct
79 Correct 201 ms 38776 KB Output is correct
80 Correct 154 ms 38776 KB Output is correct
81 Correct 168 ms 38776 KB Output is correct
82 Correct 31 ms 38776 KB Output is correct
83 Correct 29 ms 38776 KB Output is correct
84 Correct 24 ms 38776 KB Output is correct
85 Correct 23 ms 38776 KB Output is correct
86 Correct 25 ms 38776 KB Output is correct
87 Correct 23 ms 38776 KB Output is correct
88 Correct 19 ms 38776 KB Output is correct
89 Correct 21 ms 38776 KB Output is correct
90 Correct 21 ms 38776 KB Output is correct
91 Correct 21 ms 38776 KB Output is correct
92 Correct 20 ms 38776 KB Output is correct
93 Correct 23 ms 38776 KB Output is correct
94 Correct 23 ms 38776 KB Output is correct
95 Correct 21 ms 38776 KB Output is correct
96 Correct 19 ms 38776 KB Output is correct
97 Correct 20 ms 38776 KB Output is correct
98 Correct 20 ms 38776 KB Output is correct
99 Correct 22 ms 38776 KB Output is correct
100 Correct 21 ms 38776 KB Output is correct
101 Correct 21 ms 38776 KB Output is correct
102 Correct 20 ms 38776 KB Output is correct
103 Correct 20 ms 38776 KB Output is correct
104 Correct 19 ms 38776 KB Output is correct
105 Correct 21 ms 38776 KB Output is correct
106 Correct 19 ms 38776 KB Output is correct
107 Correct 26 ms 38776 KB Output is correct
108 Correct 289 ms 38776 KB Output is correct
109 Correct 293 ms 38776 KB Output is correct
110 Correct 308 ms 38776 KB Output is correct
111 Correct 275 ms 38776 KB Output is correct
112 Correct 304 ms 38776 KB Output is correct
113 Correct 305 ms 45528 KB Output is correct
114 Correct 327 ms 45528 KB Output is correct
115 Correct 317 ms 45528 KB Output is correct
116 Correct 310 ms 45528 KB Output is correct
117 Correct 254 ms 45528 KB Output is correct
118 Correct 266 ms 45528 KB Output is correct
119 Correct 278 ms 45528 KB Output is correct
120 Correct 315 ms 45528 KB Output is correct
121 Correct 250 ms 45528 KB Output is correct
122 Correct 233 ms 45528 KB Output is correct
123 Correct 177 ms 45528 KB Output is correct
124 Correct 307 ms 45528 KB Output is correct
125 Correct 222 ms 45528 KB Output is correct
126 Correct 246 ms 45528 KB Output is correct
127 Correct 230 ms 45528 KB Output is correct
128 Correct 20 ms 45528 KB Output is correct
129 Correct 19 ms 45528 KB Output is correct
130 Correct 21 ms 45528 KB Output is correct
131 Correct 19 ms 45528 KB Output is correct
132 Correct 23 ms 45528 KB Output is correct
133 Correct 19 ms 45528 KB Output is correct
134 Correct 19 ms 45528 KB Output is correct
135 Correct 18 ms 45528 KB Output is correct
136 Correct 20 ms 45528 KB Output is correct
137 Correct 19 ms 45528 KB Output is correct
138 Correct 18 ms 45528 KB Output is correct
139 Correct 18 ms 45528 KB Output is correct
140 Correct 20 ms 45528 KB Output is correct
141 Correct 19 ms 45528 KB Output is correct
142 Correct 18 ms 45528 KB Output is correct
143 Correct 19 ms 45528 KB Output is correct
144 Correct 22 ms 45528 KB Output is correct
145 Correct 19 ms 45528 KB Output is correct
146 Correct 19 ms 45528 KB Output is correct
147 Correct 19 ms 45528 KB Output is correct
148 Correct 19 ms 45528 KB Output is correct
149 Correct 19 ms 45528 KB Output is correct
150 Correct 20 ms 45528 KB Output is correct
151 Correct 19 ms 45528 KB Output is correct
152 Correct 20 ms 45528 KB Output is correct
153 Correct 17 ms 45528 KB Output is correct
154 Correct 18 ms 45528 KB Output is correct
155 Correct 258 ms 45528 KB Output is correct
156 Correct 286 ms 45528 KB Output is correct
157 Correct 308 ms 45528 KB Output is correct
158 Correct 274 ms 45528 KB Output is correct
159 Correct 270 ms 45528 KB Output is correct
160 Correct 216 ms 45528 KB Output is correct
161 Correct 262 ms 45528 KB Output is correct
162 Correct 265 ms 45528 KB Output is correct
163 Correct 196 ms 45528 KB Output is correct
164 Correct 195 ms 45528 KB Output is correct
165 Correct 193 ms 45528 KB Output is correct
166 Correct 179 ms 45528 KB Output is correct
167 Correct 223 ms 45528 KB Output is correct
168 Correct 234 ms 45528 KB Output is correct
169 Correct 283 ms 45528 KB Output is correct
170 Correct 328 ms 45528 KB Output is correct
171 Correct 267 ms 45528 KB Output is correct
172 Correct 263 ms 45528 KB Output is correct
173 Correct 263 ms 45528 KB Output is correct
174 Correct 292 ms 45528 KB Output is correct
175 Correct 284 ms 45528 KB Output is correct
176 Correct 227 ms 45528 KB Output is correct
177 Correct 259 ms 45528 KB Output is correct
178 Correct 261 ms 45528 KB Output is correct
179 Correct 274 ms 45528 KB Output is correct
180 Correct 405 ms 45528 KB Output is correct
181 Correct 276 ms 45528 KB Output is correct
182 Correct 20 ms 45528 KB Output is correct
183 Correct 18 ms 45528 KB Output is correct
184 Correct 19 ms 45528 KB Output is correct
185 Correct 18 ms 45528 KB Output is correct
186 Correct 23 ms 45528 KB Output is correct
187 Correct 18 ms 45528 KB Output is correct
188 Correct 19 ms 45528 KB Output is correct
189 Correct 18 ms 45528 KB Output is correct
190 Correct 18 ms 45528 KB Output is correct
191 Correct 20 ms 45528 KB Output is correct
192 Correct 18 ms 45528 KB Output is correct
193 Correct 19 ms 45528 KB Output is correct
194 Correct 19 ms 45528 KB Output is correct
195 Correct 24 ms 45528 KB Output is correct
196 Correct 19 ms 45528 KB Output is correct
197 Correct 19 ms 45528 KB Output is correct
198 Correct 19 ms 45528 KB Output is correct
199 Correct 21 ms 45528 KB Output is correct
200 Correct 21 ms 45528 KB Output is correct
201 Correct 18 ms 45528 KB Output is correct
202 Correct 19 ms 45528 KB Output is correct
203 Correct 19 ms 45528 KB Output is correct
204 Correct 19 ms 45528 KB Output is correct
205 Correct 19 ms 45528 KB Output is correct
206 Correct 18 ms 45528 KB Output is correct
207 Correct 19 ms 45528 KB Output is correct
208 Correct 19 ms 45528 KB Output is correct
209 Correct 20 ms 45528 KB Output is correct
210 Correct 143 ms 45528 KB Output is correct
211 Correct 202 ms 45528 KB Output is correct
212 Correct 248 ms 45528 KB Output is correct
213 Correct 305 ms 45528 KB Output is correct
214 Correct 152 ms 45528 KB Output is correct
215 Correct 160 ms 45528 KB Output is correct
216 Correct 297 ms 45528 KB Output is correct
217 Correct 274 ms 45528 KB Output is correct
218 Correct 214 ms 45528 KB Output is correct
219 Correct 193 ms 45528 KB Output is correct
220 Correct 198 ms 45528 KB Output is correct
221 Correct 176 ms 45528 KB Output is correct
222 Correct 194 ms 45528 KB Output is correct
223 Correct 315 ms 45528 KB Output is correct
224 Correct 285 ms 45528 KB Output is correct
225 Correct 226 ms 45528 KB Output is correct
226 Correct 234 ms 45528 KB Output is correct
227 Correct 261 ms 45528 KB Output is correct
228 Correct 219 ms 45528 KB Output is correct
229 Correct 206 ms 45528 KB Output is correct
230 Correct 299 ms 45528 KB Output is correct
231 Correct 246 ms 45528 KB Output is correct