Submission #49633

# Submission time Handle Problem Language Result Execution time Memory
49633 2018-06-01T11:56:35 Z SpaimaCarpatilor Duathlon (APIO18_duathlon) C++17
100 / 100
287 ms 29480 KB
#include<bits/stdc++.h>

using namespace std;

int nodes, N, M, lev[100009], dp[100009], vol[200009], papa[200009], compSize[200009];
long long sumProd[200009];
stack < pair < int, int > > stk;
vector < int > v[100009], h[200009];

void addComp (pair < int, int > whenToStop)
{
    pair < int, int > curr;
    vector < int > currComp;
    do {
        curr = stk.top ();
        stk.pop ();
        currComp.push_back (curr.first);
        currComp.push_back (curr.second);
    }while (curr != whenToStop);
    sort (currComp.begin (), currComp.end ());
    currComp.erase (unique (currComp.begin (), currComp.end ()), currComp.end ());
/*    for (auto it : currComp)
        printf ("%d ", it);
    printf ("\n");*/
    nodes ++;
    for (auto it : currComp)
        h[it].push_back (nodes),
        h[nodes].push_back (it);
}

void dfs (int nod, int tata)
{
    dp[nod] = lev[nod];
    for (auto it : v[nod])
        if (lev[it] == 0)
        {
            lev[it] = lev[nod] + 1;
            stk.push ({it, nod});
            dfs (it, nod);
            if (dp[it] < dp[nod])
                dp[nod] = dp[it];
            if (dp[it] >= lev[nod])
                addComp ({it, nod});
        }
    for (auto it : v[nod])
        if (it != tata)
        {
            if (lev[it] < dp[nod])
                dp[nod] = lev[it];
        }
}

vector < int > currComp;
void init (int nod, int tata)
{
    currComp.push_back (nod);
    vol[nod] = (nod <= N), papa[nod] = tata;
    int sum = 0;
    for (auto it : h[nod])
        if (it != tata)
            init (it, nod), vol[nod] += vol[it],
            sumProd[nod] += 1LL * sum * vol[it],
            sum += vol[it];
}

namespace treeSubtask {
    int vol[100009];
    void dfs (int nod, int tata)
    {
        vol[nod] = 1;
        for (auto it : v[nod])
            if (it != tata)
                dfs (it, nod), vol[nod] += vol[it];
    }
    long long solveTree ()
    {
        dfs (1, -1);
        long long ans = 0;
        for (int x=1; x<=N; x++)
        {
            int sum = 0;
            for (auto it : v[x])
            {
                int currSize = 0;
                if (vol[it] > vol[x]) currSize = N - vol[x];
                else currSize = vol[it];
                ans += 1LL * sum * currSize;
                sum += currSize;
            }
        }
        return ans * 2LL;
    }
};

void buildBiconnectedTree ()
{
    nodes = N;
    for (int i=1; i<=N; i++)
        if (lev[i] == 0)
            lev[i] = 1, dfs (i, -1);
}

void read ()
{
    scanf ("%d %d", &N, &M);
    while (M --)
    {
        int x, y;
        scanf ("%d %d", &x, &y);
        v[x].push_back (y);
        v[y].push_back (x);
    }
}

void precalc ()
{
    for (int i=1; i<=N; i++)
        if (vol[i] == 0)
        {
            currComp.clear (), init (i, -1);
            for (auto nod : currComp)
                sumProd[nod] += 1LL * (vol[nod] - (nod <= N)) * (vol[i] - vol[nod]),
                sumProd[nod] <<= 1LL, compSize[nod] = vol[i];
        }
}

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

read ();
buildBiconnectedTree ();
precalc ();
long long ans = 0;
for (int x=1; x<=N; x++)
{
    long long before = ans;
    ans += sumProd[x];
    for (auto comp : h[x])
    {
        ans += sumProd[comp];
        if (papa[comp] == x)
            ans -= 2LL * (compSize[x] - vol[comp]) * vol[comp];
        else
            ans -= 2LL * (compSize[x] - vol[x]) * vol[x];
    }
}
printf ("%lld\n", ans);
return 0;
}

Compilation message

count_triplets.cpp: In function 'int main()':
count_triplets.cpp:138:15: warning: unused variable 'before' [-Wunused-variable]
     long long before = ans;
               ^~~~~~
count_triplets.cpp: In function 'void read()':
count_triplets.cpp:105:11: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf ("%d %d", &N, &M);
     ~~~~~~^~~~~~~~~~~~~~~~~
count_triplets.cpp:109:15: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf ("%d %d", &x, &y);
         ~~~~~~^~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 10 ms 7416 KB Output is correct
2 Correct 10 ms 7528 KB Output is correct
3 Correct 7 ms 7584 KB Output is correct
4 Correct 7 ms 7584 KB Output is correct
5 Correct 7 ms 7584 KB Output is correct
6 Correct 7 ms 7584 KB Output is correct
7 Correct 7 ms 7592 KB Output is correct
8 Correct 7 ms 7592 KB Output is correct
9 Correct 7 ms 7592 KB Output is correct
10 Correct 7 ms 7592 KB Output is correct
11 Correct 7 ms 7608 KB Output is correct
12 Correct 7 ms 7608 KB Output is correct
13 Correct 8 ms 7656 KB Output is correct
14 Correct 7 ms 7656 KB Output is correct
15 Correct 8 ms 7656 KB Output is correct
16 Correct 8 ms 7656 KB Output is correct
17 Correct 8 ms 7656 KB Output is correct
18 Correct 8 ms 7656 KB Output is correct
19 Correct 8 ms 7656 KB Output is correct
20 Correct 9 ms 7656 KB Output is correct
21 Correct 8 ms 7656 KB Output is correct
22 Correct 8 ms 7656 KB Output is correct
23 Correct 9 ms 7656 KB Output is correct
24 Correct 10 ms 7656 KB Output is correct
25 Correct 10 ms 7656 KB Output is correct
26 Correct 9 ms 7656 KB Output is correct
27 Correct 8 ms 7656 KB Output is correct
28 Correct 8 ms 7676 KB Output is correct
29 Correct 9 ms 7780 KB Output is correct
30 Correct 8 ms 7780 KB Output is correct
31 Correct 8 ms 7780 KB Output is correct
32 Correct 7 ms 7788 KB Output is correct
33 Correct 8 ms 7788 KB Output is correct
34 Correct 8 ms 7788 KB Output is correct
35 Correct 7 ms 7788 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 10 ms 7416 KB Output is correct
2 Correct 10 ms 7528 KB Output is correct
3 Correct 7 ms 7584 KB Output is correct
4 Correct 7 ms 7584 KB Output is correct
5 Correct 7 ms 7584 KB Output is correct
6 Correct 7 ms 7584 KB Output is correct
7 Correct 7 ms 7592 KB Output is correct
8 Correct 7 ms 7592 KB Output is correct
9 Correct 7 ms 7592 KB Output is correct
10 Correct 7 ms 7592 KB Output is correct
11 Correct 7 ms 7608 KB Output is correct
12 Correct 7 ms 7608 KB Output is correct
13 Correct 8 ms 7656 KB Output is correct
14 Correct 7 ms 7656 KB Output is correct
15 Correct 8 ms 7656 KB Output is correct
16 Correct 8 ms 7656 KB Output is correct
17 Correct 8 ms 7656 KB Output is correct
18 Correct 8 ms 7656 KB Output is correct
19 Correct 8 ms 7656 KB Output is correct
20 Correct 9 ms 7656 KB Output is correct
21 Correct 8 ms 7656 KB Output is correct
22 Correct 8 ms 7656 KB Output is correct
23 Correct 9 ms 7656 KB Output is correct
24 Correct 10 ms 7656 KB Output is correct
25 Correct 10 ms 7656 KB Output is correct
26 Correct 9 ms 7656 KB Output is correct
27 Correct 8 ms 7656 KB Output is correct
28 Correct 8 ms 7676 KB Output is correct
29 Correct 9 ms 7780 KB Output is correct
30 Correct 8 ms 7780 KB Output is correct
31 Correct 8 ms 7780 KB Output is correct
32 Correct 7 ms 7788 KB Output is correct
33 Correct 8 ms 7788 KB Output is correct
34 Correct 8 ms 7788 KB Output is correct
35 Correct 7 ms 7788 KB Output is correct
36 Correct 11 ms 7788 KB Output is correct
37 Correct 9 ms 7788 KB Output is correct
38 Correct 9 ms 7788 KB Output is correct
39 Correct 9 ms 7788 KB Output is correct
40 Correct 8 ms 7788 KB Output is correct
41 Correct 9 ms 7788 KB Output is correct
42 Correct 8 ms 7788 KB Output is correct
43 Correct 8 ms 7788 KB Output is correct
44 Correct 8 ms 7788 KB Output is correct
45 Correct 10 ms 7788 KB Output is correct
46 Correct 8 ms 7788 KB Output is correct
47 Correct 10 ms 7788 KB Output is correct
48 Correct 8 ms 7788 KB Output is correct
49 Correct 9 ms 7788 KB Output is correct
50 Correct 9 ms 7788 KB Output is correct
51 Correct 9 ms 7788 KB Output is correct
52 Correct 10 ms 7788 KB Output is correct
53 Correct 10 ms 7788 KB Output is correct
54 Correct 9 ms 7788 KB Output is correct
55 Correct 8 ms 7804 KB Output is correct
56 Correct 9 ms 7804 KB Output is correct
57 Correct 9 ms 7804 KB Output is correct
58 Correct 8 ms 7804 KB Output is correct
59 Correct 10 ms 7804 KB Output is correct
60 Correct 8 ms 7804 KB Output is correct
61 Correct 8 ms 7804 KB Output is correct
62 Correct 7 ms 7804 KB Output is correct
63 Correct 7 ms 7804 KB Output is correct
64 Correct 7 ms 7804 KB Output is correct
65 Correct 8 ms 7804 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 107 ms 28868 KB Output is correct
2 Correct 144 ms 28920 KB Output is correct
3 Correct 201 ms 28920 KB Output is correct
4 Correct 187 ms 28920 KB Output is correct
5 Correct 182 ms 28920 KB Output is correct
6 Correct 195 ms 28920 KB Output is correct
7 Correct 186 ms 28920 KB Output is correct
8 Correct 178 ms 28920 KB Output is correct
9 Correct 167 ms 28920 KB Output is correct
10 Correct 183 ms 28920 KB Output is correct
11 Correct 157 ms 28920 KB Output is correct
12 Correct 171 ms 28920 KB Output is correct
13 Correct 169 ms 28920 KB Output is correct
14 Correct 140 ms 28920 KB Output is correct
15 Correct 118 ms 28920 KB Output is correct
16 Correct 105 ms 28920 KB Output is correct
17 Correct 13 ms 28920 KB Output is correct
18 Correct 14 ms 28920 KB Output is correct
19 Correct 13 ms 28920 KB Output is correct
20 Correct 16 ms 28920 KB Output is correct
21 Correct 13 ms 28920 KB Output is correct
22 Correct 17 ms 28920 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 9 ms 28920 KB Output is correct
2 Correct 10 ms 28920 KB Output is correct
3 Correct 10 ms 28920 KB Output is correct
4 Correct 9 ms 28920 KB Output is correct
5 Correct 9 ms 28920 KB Output is correct
6 Correct 9 ms 28920 KB Output is correct
7 Correct 9 ms 28920 KB Output is correct
8 Correct 8 ms 28920 KB Output is correct
9 Correct 8 ms 28920 KB Output is correct
10 Correct 8 ms 28920 KB Output is correct
11 Correct 10 ms 28920 KB Output is correct
12 Correct 11 ms 28920 KB Output is correct
13 Correct 9 ms 28920 KB Output is correct
14 Correct 9 ms 28920 KB Output is correct
15 Correct 9 ms 28920 KB Output is correct
16 Correct 9 ms 28920 KB Output is correct
17 Correct 8 ms 28920 KB Output is correct
18 Correct 8 ms 28920 KB Output is correct
19 Correct 8 ms 28920 KB Output is correct
20 Correct 8 ms 28920 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 149 ms 28920 KB Output is correct
2 Correct 164 ms 28920 KB Output is correct
3 Correct 204 ms 28920 KB Output is correct
4 Correct 216 ms 28920 KB Output is correct
5 Correct 213 ms 28920 KB Output is correct
6 Correct 238 ms 29480 KB Output is correct
7 Correct 248 ms 29480 KB Output is correct
8 Correct 247 ms 29480 KB Output is correct
9 Correct 223 ms 29480 KB Output is correct
10 Correct 202 ms 29480 KB Output is correct
11 Correct 212 ms 29480 KB Output is correct
12 Correct 199 ms 29480 KB Output is correct
13 Correct 206 ms 29480 KB Output is correct
14 Correct 186 ms 29480 KB Output is correct
15 Correct 188 ms 29480 KB Output is correct
16 Correct 110 ms 29480 KB Output is correct
17 Correct 165 ms 29480 KB Output is correct
18 Correct 155 ms 29480 KB Output is correct
19 Correct 214 ms 29480 KB Output is correct
20 Correct 194 ms 29480 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 11 ms 29480 KB Output is correct
2 Correct 10 ms 29480 KB Output is correct
3 Correct 9 ms 29480 KB Output is correct
4 Correct 10 ms 29480 KB Output is correct
5 Correct 9 ms 29480 KB Output is correct
6 Correct 9 ms 29480 KB Output is correct
7 Correct 11 ms 29480 KB Output is correct
8 Correct 10 ms 29480 KB Output is correct
9 Correct 9 ms 29480 KB Output is correct
10 Correct 11 ms 29480 KB Output is correct
11 Correct 11 ms 29480 KB Output is correct
12 Correct 11 ms 29480 KB Output is correct
13 Correct 11 ms 29480 KB Output is correct
14 Correct 9 ms 29480 KB Output is correct
15 Correct 9 ms 29480 KB Output is correct
16 Correct 9 ms 29480 KB Output is correct
17 Correct 12 ms 29480 KB Output is correct
18 Correct 9 ms 29480 KB Output is correct
19 Correct 9 ms 29480 KB Output is correct
20 Correct 11 ms 29480 KB Output is correct
21 Correct 12 ms 29480 KB Output is correct
22 Correct 12 ms 29480 KB Output is correct
23 Correct 9 ms 29480 KB Output is correct
24 Correct 9 ms 29480 KB Output is correct
25 Correct 9 ms 29480 KB Output is correct
26 Correct 9 ms 29480 KB Output is correct
27 Correct 8 ms 29480 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 249 ms 29480 KB Output is correct
2 Correct 210 ms 29480 KB Output is correct
3 Correct 212 ms 29480 KB Output is correct
4 Correct 287 ms 29480 KB Output is correct
5 Correct 192 ms 29480 KB Output is correct
6 Correct 224 ms 29480 KB Output is correct
7 Correct 162 ms 29480 KB Output is correct
8 Correct 181 ms 29480 KB Output is correct
9 Correct 155 ms 29480 KB Output is correct
10 Correct 166 ms 29480 KB Output is correct
11 Correct 179 ms 29480 KB Output is correct
12 Correct 214 ms 29480 KB Output is correct
13 Correct 126 ms 29480 KB Output is correct
14 Correct 140 ms 29480 KB Output is correct
15 Correct 208 ms 29480 KB Output is correct
16 Correct 178 ms 29480 KB Output is correct
17 Correct 184 ms 29480 KB Output is correct
18 Correct 209 ms 29480 KB Output is correct
19 Correct 220 ms 29480 KB Output is correct
20 Correct 218 ms 29480 KB Output is correct
21 Correct 247 ms 29480 KB Output is correct
22 Correct 207 ms 29480 KB Output is correct
23 Correct 228 ms 29480 KB Output is correct
24 Correct 178 ms 29480 KB Output is correct
25 Correct 241 ms 29480 KB Output is correct
26 Correct 252 ms 29480 KB Output is correct
27 Correct 202 ms 29480 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 10 ms 7416 KB Output is correct
2 Correct 10 ms 7528 KB Output is correct
3 Correct 7 ms 7584 KB Output is correct
4 Correct 7 ms 7584 KB Output is correct
5 Correct 7 ms 7584 KB Output is correct
6 Correct 7 ms 7584 KB Output is correct
7 Correct 7 ms 7592 KB Output is correct
8 Correct 7 ms 7592 KB Output is correct
9 Correct 7 ms 7592 KB Output is correct
10 Correct 7 ms 7592 KB Output is correct
11 Correct 7 ms 7608 KB Output is correct
12 Correct 7 ms 7608 KB Output is correct
13 Correct 8 ms 7656 KB Output is correct
14 Correct 7 ms 7656 KB Output is correct
15 Correct 8 ms 7656 KB Output is correct
16 Correct 8 ms 7656 KB Output is correct
17 Correct 8 ms 7656 KB Output is correct
18 Correct 8 ms 7656 KB Output is correct
19 Correct 8 ms 7656 KB Output is correct
20 Correct 9 ms 7656 KB Output is correct
21 Correct 8 ms 7656 KB Output is correct
22 Correct 8 ms 7656 KB Output is correct
23 Correct 9 ms 7656 KB Output is correct
24 Correct 10 ms 7656 KB Output is correct
25 Correct 10 ms 7656 KB Output is correct
26 Correct 9 ms 7656 KB Output is correct
27 Correct 8 ms 7656 KB Output is correct
28 Correct 8 ms 7676 KB Output is correct
29 Correct 9 ms 7780 KB Output is correct
30 Correct 8 ms 7780 KB Output is correct
31 Correct 8 ms 7780 KB Output is correct
32 Correct 7 ms 7788 KB Output is correct
33 Correct 8 ms 7788 KB Output is correct
34 Correct 8 ms 7788 KB Output is correct
35 Correct 7 ms 7788 KB Output is correct
36 Correct 11 ms 7788 KB Output is correct
37 Correct 9 ms 7788 KB Output is correct
38 Correct 9 ms 7788 KB Output is correct
39 Correct 9 ms 7788 KB Output is correct
40 Correct 8 ms 7788 KB Output is correct
41 Correct 9 ms 7788 KB Output is correct
42 Correct 8 ms 7788 KB Output is correct
43 Correct 8 ms 7788 KB Output is correct
44 Correct 8 ms 7788 KB Output is correct
45 Correct 10 ms 7788 KB Output is correct
46 Correct 8 ms 7788 KB Output is correct
47 Correct 10 ms 7788 KB Output is correct
48 Correct 8 ms 7788 KB Output is correct
49 Correct 9 ms 7788 KB Output is correct
50 Correct 9 ms 7788 KB Output is correct
51 Correct 9 ms 7788 KB Output is correct
52 Correct 10 ms 7788 KB Output is correct
53 Correct 10 ms 7788 KB Output is correct
54 Correct 9 ms 7788 KB Output is correct
55 Correct 8 ms 7804 KB Output is correct
56 Correct 9 ms 7804 KB Output is correct
57 Correct 9 ms 7804 KB Output is correct
58 Correct 8 ms 7804 KB Output is correct
59 Correct 10 ms 7804 KB Output is correct
60 Correct 8 ms 7804 KB Output is correct
61 Correct 8 ms 7804 KB Output is correct
62 Correct 7 ms 7804 KB Output is correct
63 Correct 7 ms 7804 KB Output is correct
64 Correct 7 ms 7804 KB Output is correct
65 Correct 8 ms 7804 KB Output is correct
66 Correct 7 ms 29480 KB Output is correct
67 Correct 9 ms 29480 KB Output is correct
68 Correct 9 ms 29480 KB Output is correct
69 Correct 13 ms 29480 KB Output is correct
70 Correct 11 ms 29480 KB Output is correct
71 Correct 11 ms 29480 KB Output is correct
72 Correct 9 ms 29480 KB Output is correct
73 Correct 8 ms 29480 KB Output is correct
74 Correct 10 ms 29480 KB Output is correct
75 Correct 8 ms 29480 KB Output is correct
76 Correct 8 ms 29480 KB Output is correct
77 Correct 8 ms 29480 KB Output is correct
78 Correct 11 ms 29480 KB Output is correct
79 Correct 10 ms 29480 KB Output is correct
80 Correct 9 ms 29480 KB Output is correct
81 Correct 11 ms 29480 KB Output is correct
82 Correct 9 ms 29480 KB Output is correct
83 Correct 10 ms 29480 KB Output is correct
84 Correct 11 ms 29480 KB Output is correct
85 Correct 9 ms 29480 KB Output is correct
86 Correct 8 ms 29480 KB Output is correct
87 Correct 9 ms 29480 KB Output is correct
88 Correct 9 ms 29480 KB Output is correct
89 Correct 10 ms 29480 KB Output is correct
90 Correct 9 ms 29480 KB Output is correct
91 Correct 9 ms 29480 KB Output is correct
92 Correct 10 ms 29480 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 10 ms 7416 KB Output is correct
2 Correct 10 ms 7528 KB Output is correct
3 Correct 7 ms 7584 KB Output is correct
4 Correct 7 ms 7584 KB Output is correct
5 Correct 7 ms 7584 KB Output is correct
6 Correct 7 ms 7584 KB Output is correct
7 Correct 7 ms 7592 KB Output is correct
8 Correct 7 ms 7592 KB Output is correct
9 Correct 7 ms 7592 KB Output is correct
10 Correct 7 ms 7592 KB Output is correct
11 Correct 7 ms 7608 KB Output is correct
12 Correct 7 ms 7608 KB Output is correct
13 Correct 8 ms 7656 KB Output is correct
14 Correct 7 ms 7656 KB Output is correct
15 Correct 8 ms 7656 KB Output is correct
16 Correct 8 ms 7656 KB Output is correct
17 Correct 8 ms 7656 KB Output is correct
18 Correct 8 ms 7656 KB Output is correct
19 Correct 8 ms 7656 KB Output is correct
20 Correct 9 ms 7656 KB Output is correct
21 Correct 8 ms 7656 KB Output is correct
22 Correct 8 ms 7656 KB Output is correct
23 Correct 9 ms 7656 KB Output is correct
24 Correct 10 ms 7656 KB Output is correct
25 Correct 10 ms 7656 KB Output is correct
26 Correct 9 ms 7656 KB Output is correct
27 Correct 8 ms 7656 KB Output is correct
28 Correct 8 ms 7676 KB Output is correct
29 Correct 9 ms 7780 KB Output is correct
30 Correct 8 ms 7780 KB Output is correct
31 Correct 8 ms 7780 KB Output is correct
32 Correct 7 ms 7788 KB Output is correct
33 Correct 8 ms 7788 KB Output is correct
34 Correct 8 ms 7788 KB Output is correct
35 Correct 7 ms 7788 KB Output is correct
36 Correct 11 ms 7788 KB Output is correct
37 Correct 9 ms 7788 KB Output is correct
38 Correct 9 ms 7788 KB Output is correct
39 Correct 9 ms 7788 KB Output is correct
40 Correct 8 ms 7788 KB Output is correct
41 Correct 9 ms 7788 KB Output is correct
42 Correct 8 ms 7788 KB Output is correct
43 Correct 8 ms 7788 KB Output is correct
44 Correct 8 ms 7788 KB Output is correct
45 Correct 10 ms 7788 KB Output is correct
46 Correct 8 ms 7788 KB Output is correct
47 Correct 10 ms 7788 KB Output is correct
48 Correct 8 ms 7788 KB Output is correct
49 Correct 9 ms 7788 KB Output is correct
50 Correct 9 ms 7788 KB Output is correct
51 Correct 9 ms 7788 KB Output is correct
52 Correct 10 ms 7788 KB Output is correct
53 Correct 10 ms 7788 KB Output is correct
54 Correct 9 ms 7788 KB Output is correct
55 Correct 8 ms 7804 KB Output is correct
56 Correct 9 ms 7804 KB Output is correct
57 Correct 9 ms 7804 KB Output is correct
58 Correct 8 ms 7804 KB Output is correct
59 Correct 10 ms 7804 KB Output is correct
60 Correct 8 ms 7804 KB Output is correct
61 Correct 8 ms 7804 KB Output is correct
62 Correct 7 ms 7804 KB Output is correct
63 Correct 7 ms 7804 KB Output is correct
64 Correct 7 ms 7804 KB Output is correct
65 Correct 8 ms 7804 KB Output is correct
66 Correct 107 ms 28868 KB Output is correct
67 Correct 144 ms 28920 KB Output is correct
68 Correct 201 ms 28920 KB Output is correct
69 Correct 187 ms 28920 KB Output is correct
70 Correct 182 ms 28920 KB Output is correct
71 Correct 195 ms 28920 KB Output is correct
72 Correct 186 ms 28920 KB Output is correct
73 Correct 178 ms 28920 KB Output is correct
74 Correct 167 ms 28920 KB Output is correct
75 Correct 183 ms 28920 KB Output is correct
76 Correct 157 ms 28920 KB Output is correct
77 Correct 171 ms 28920 KB Output is correct
78 Correct 169 ms 28920 KB Output is correct
79 Correct 140 ms 28920 KB Output is correct
80 Correct 118 ms 28920 KB Output is correct
81 Correct 105 ms 28920 KB Output is correct
82 Correct 13 ms 28920 KB Output is correct
83 Correct 14 ms 28920 KB Output is correct
84 Correct 13 ms 28920 KB Output is correct
85 Correct 16 ms 28920 KB Output is correct
86 Correct 13 ms 28920 KB Output is correct
87 Correct 17 ms 28920 KB Output is correct
88 Correct 9 ms 28920 KB Output is correct
89 Correct 10 ms 28920 KB Output is correct
90 Correct 10 ms 28920 KB Output is correct
91 Correct 9 ms 28920 KB Output is correct
92 Correct 9 ms 28920 KB Output is correct
93 Correct 9 ms 28920 KB Output is correct
94 Correct 9 ms 28920 KB Output is correct
95 Correct 8 ms 28920 KB Output is correct
96 Correct 8 ms 28920 KB Output is correct
97 Correct 8 ms 28920 KB Output is correct
98 Correct 10 ms 28920 KB Output is correct
99 Correct 11 ms 28920 KB Output is correct
100 Correct 9 ms 28920 KB Output is correct
101 Correct 9 ms 28920 KB Output is correct
102 Correct 9 ms 28920 KB Output is correct
103 Correct 9 ms 28920 KB Output is correct
104 Correct 8 ms 28920 KB Output is correct
105 Correct 8 ms 28920 KB Output is correct
106 Correct 8 ms 28920 KB Output is correct
107 Correct 8 ms 28920 KB Output is correct
108 Correct 149 ms 28920 KB Output is correct
109 Correct 164 ms 28920 KB Output is correct
110 Correct 204 ms 28920 KB Output is correct
111 Correct 216 ms 28920 KB Output is correct
112 Correct 213 ms 28920 KB Output is correct
113 Correct 238 ms 29480 KB Output is correct
114 Correct 248 ms 29480 KB Output is correct
115 Correct 247 ms 29480 KB Output is correct
116 Correct 223 ms 29480 KB Output is correct
117 Correct 202 ms 29480 KB Output is correct
118 Correct 212 ms 29480 KB Output is correct
119 Correct 199 ms 29480 KB Output is correct
120 Correct 206 ms 29480 KB Output is correct
121 Correct 186 ms 29480 KB Output is correct
122 Correct 188 ms 29480 KB Output is correct
123 Correct 110 ms 29480 KB Output is correct
124 Correct 165 ms 29480 KB Output is correct
125 Correct 155 ms 29480 KB Output is correct
126 Correct 214 ms 29480 KB Output is correct
127 Correct 194 ms 29480 KB Output is correct
128 Correct 11 ms 29480 KB Output is correct
129 Correct 10 ms 29480 KB Output is correct
130 Correct 9 ms 29480 KB Output is correct
131 Correct 10 ms 29480 KB Output is correct
132 Correct 9 ms 29480 KB Output is correct
133 Correct 9 ms 29480 KB Output is correct
134 Correct 11 ms 29480 KB Output is correct
135 Correct 10 ms 29480 KB Output is correct
136 Correct 9 ms 29480 KB Output is correct
137 Correct 11 ms 29480 KB Output is correct
138 Correct 11 ms 29480 KB Output is correct
139 Correct 11 ms 29480 KB Output is correct
140 Correct 11 ms 29480 KB Output is correct
141 Correct 9 ms 29480 KB Output is correct
142 Correct 9 ms 29480 KB Output is correct
143 Correct 9 ms 29480 KB Output is correct
144 Correct 12 ms 29480 KB Output is correct
145 Correct 9 ms 29480 KB Output is correct
146 Correct 9 ms 29480 KB Output is correct
147 Correct 11 ms 29480 KB Output is correct
148 Correct 12 ms 29480 KB Output is correct
149 Correct 12 ms 29480 KB Output is correct
150 Correct 9 ms 29480 KB Output is correct
151 Correct 9 ms 29480 KB Output is correct
152 Correct 9 ms 29480 KB Output is correct
153 Correct 9 ms 29480 KB Output is correct
154 Correct 8 ms 29480 KB Output is correct
155 Correct 249 ms 29480 KB Output is correct
156 Correct 210 ms 29480 KB Output is correct
157 Correct 212 ms 29480 KB Output is correct
158 Correct 287 ms 29480 KB Output is correct
159 Correct 192 ms 29480 KB Output is correct
160 Correct 224 ms 29480 KB Output is correct
161 Correct 162 ms 29480 KB Output is correct
162 Correct 181 ms 29480 KB Output is correct
163 Correct 155 ms 29480 KB Output is correct
164 Correct 166 ms 29480 KB Output is correct
165 Correct 179 ms 29480 KB Output is correct
166 Correct 214 ms 29480 KB Output is correct
167 Correct 126 ms 29480 KB Output is correct
168 Correct 140 ms 29480 KB Output is correct
169 Correct 208 ms 29480 KB Output is correct
170 Correct 178 ms 29480 KB Output is correct
171 Correct 184 ms 29480 KB Output is correct
172 Correct 209 ms 29480 KB Output is correct
173 Correct 220 ms 29480 KB Output is correct
174 Correct 218 ms 29480 KB Output is correct
175 Correct 247 ms 29480 KB Output is correct
176 Correct 207 ms 29480 KB Output is correct
177 Correct 228 ms 29480 KB Output is correct
178 Correct 178 ms 29480 KB Output is correct
179 Correct 241 ms 29480 KB Output is correct
180 Correct 252 ms 29480 KB Output is correct
181 Correct 202 ms 29480 KB Output is correct
182 Correct 7 ms 29480 KB Output is correct
183 Correct 9 ms 29480 KB Output is correct
184 Correct 9 ms 29480 KB Output is correct
185 Correct 13 ms 29480 KB Output is correct
186 Correct 11 ms 29480 KB Output is correct
187 Correct 11 ms 29480 KB Output is correct
188 Correct 9 ms 29480 KB Output is correct
189 Correct 8 ms 29480 KB Output is correct
190 Correct 10 ms 29480 KB Output is correct
191 Correct 8 ms 29480 KB Output is correct
192 Correct 8 ms 29480 KB Output is correct
193 Correct 8 ms 29480 KB Output is correct
194 Correct 11 ms 29480 KB Output is correct
195 Correct 10 ms 29480 KB Output is correct
196 Correct 9 ms 29480 KB Output is correct
197 Correct 11 ms 29480 KB Output is correct
198 Correct 9 ms 29480 KB Output is correct
199 Correct 10 ms 29480 KB Output is correct
200 Correct 11 ms 29480 KB Output is correct
201 Correct 9 ms 29480 KB Output is correct
202 Correct 8 ms 29480 KB Output is correct
203 Correct 9 ms 29480 KB Output is correct
204 Correct 9 ms 29480 KB Output is correct
205 Correct 10 ms 29480 KB Output is correct
206 Correct 9 ms 29480 KB Output is correct
207 Correct 9 ms 29480 KB Output is correct
208 Correct 10 ms 29480 KB Output is correct
209 Correct 14 ms 29480 KB Output is correct
210 Correct 145 ms 29480 KB Output is correct
211 Correct 226 ms 29480 KB Output is correct
212 Correct 237 ms 29480 KB Output is correct
213 Correct 241 ms 29480 KB Output is correct
214 Correct 111 ms 29480 KB Output is correct
215 Correct 92 ms 29480 KB Output is correct
216 Correct 217 ms 29480 KB Output is correct
217 Correct 190 ms 29480 KB Output is correct
218 Correct 183 ms 29480 KB Output is correct
219 Correct 212 ms 29480 KB Output is correct
220 Correct 166 ms 29480 KB Output is correct
221 Correct 223 ms 29480 KB Output is correct
222 Correct 162 ms 29480 KB Output is correct
223 Correct 232 ms 29480 KB Output is correct
224 Correct 226 ms 29480 KB Output is correct
225 Correct 224 ms 29480 KB Output is correct
226 Correct 194 ms 29480 KB Output is correct
227 Correct 245 ms 29480 KB Output is correct
228 Correct 117 ms 29480 KB Output is correct
229 Correct 107 ms 29480 KB Output is correct
230 Correct 130 ms 29480 KB Output is correct
231 Correct 168 ms 29480 KB Output is correct