답안 #771628

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
771628 2023-07-03T07:33:06 Z SamAnd 철인 이종 경기 (APIO18_duathlon) C++17
100 / 100
169 ms 38640 KB
#include <bits/stdc++.h>
using namespace std;
#define m_p make_pair
#define all(x) (x).begin(),(x).end()
#define sz(x) ((int)(x).size())
#define fi first
#define se second
typedef long long ll;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
mt19937 rnf(2106);
const int N = 400005;

int n, m;
vector<vector<int> > adj;

vector<bool> visited;
vector<int> tin, low;
int timer;

vector<pair<int, int> > s;
vector<vector<pair<int, int> > > v;
void dfs(int v, int p = -1) {
    visited[v] = true;
    tin[v] = low[v] = timer++;
    int children=0;
    for (int to : adj[v]) {
        if (to == p) continue;
        if (visited[to]) {
            low[v] = min(low[v], tin[to]);
            if (tin[to] < tin[v])
                s.push_back(m_p(v, to));
        } else {
            ++children;
            s.push_back(m_p(v, to));
            dfs(to, v);
            low[v] = min(low[v], low[to]);
            if ((low[to] >= tin[v] && p != -1) || (p == -1 && children > 1))
            {
                vector<pair<int, int> > vv;
                while (s.back() != m_p(v, to))
                {
                    vv.push_back(s.back());
                    s.pop_back();
                }
                vv.push_back(s.back());
                s.pop_back();
                ::v.push_back(vv);
            }
        }
    }
}

void find_cutpoints() {
    timer = 0;
    visited.assign(n, false);
    tin.assign(n, -1);
    low.assign(n, -1);
    for (int i = 0; i < n; ++i) {
        if (!visited[i])
        {
            dfs (i);
            if (!s.empty())
            {
                v.push_back(s);
                s.clear();
            }
        }
    }
}

vector<int> g[N];

int q[N];
void dfs1(int x, int p)
{
    if (x < n)
        q[x] = 1;
    for (int i = 0; i < g[x].size(); ++i)
    {
        int h = g[x][i];
        if (h == p)
            continue;
        dfs1(h, x);
        q[x] += q[h];
    }
}

ll ans;
void dfs2(int x, int p, int r)
{
    for (int i = 0; i < g[x].size(); ++i)
    {
        int h = g[x][i];
        if (h == p)
            continue;
        dfs2(h, x, r);
    }

    if (x >= n)
    {
        for (int i = 0; i < g[x].size(); ++i)
        {
            int h = g[x][i];
            int qq;
            if (h == p)
                qq = (q[r] - q[x]);
            else
                qq = q[h];
            ans -= qq * 1LL * (qq - 1) * 1LL * (sz(g[x]) - 1);
        }
    }
}

void solv()
{
    cin >> n >> m;
    adj.assign(n, {});
    for (int i = 0; i < m; ++i)
    {
        int x, y;
        cin >> x >> y;
        --x;
        --y;
        adj[x].push_back(y);
        adj[y].push_back(x);
    }

    find_cutpoints();

    int k = n;
    for (int i = 0; i < sz(v); ++i)
    {
        set<int> s;
        for (int j = 0; j < sz(v[i]); ++j)
        {
            s.insert(v[i][j].fi);
            s.insert(v[i][j].se);
        }
        for (auto it = s.begin(); it != s.end(); ++it)
        {
            g[*it].push_back(k);
            g[k].push_back(*it);
        }
        k++;
    }

    for (int i = 0; i < k; ++i)
    {
        if (!q[i])
        {
            dfs1(i, i);
            ans += (q[i] * 1LL * (q[i] - 1) * 1LL * (q[i] - 2));
            dfs2(i, i, i);
        }
    }

    cout << ans << "\n";
}

int main()
{
    #ifdef SOMETHING
    freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    #endif // SOMETHING
    ios_base::sync_with_stdio(false), cin.tie(0);

    int tt = 1;
    //cin >> tt;
    while (tt--)
    {
        solv();
    }
    return 0;
}

Compilation message

count_triplets.cpp: In function 'void dfs1(int, int)':
count_triplets.cpp:78:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   78 |     for (int i = 0; i < g[x].size(); ++i)
      |                     ~~^~~~~~~~~~~~~
count_triplets.cpp: In function 'void dfs2(int, int, int)':
count_triplets.cpp:91:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   91 |     for (int i = 0; i < g[x].size(); ++i)
      |                     ~~^~~~~~~~~~~~~
count_triplets.cpp:101:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  101 |         for (int i = 0; i < g[x].size(); ++i)
      |                         ~~^~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9684 KB Output is correct
2 Correct 6 ms 9684 KB Output is correct
3 Correct 5 ms 9684 KB Output is correct
4 Correct 5 ms 9684 KB Output is correct
5 Correct 5 ms 9684 KB Output is correct
6 Correct 5 ms 9732 KB Output is correct
7 Correct 5 ms 9684 KB Output is correct
8 Correct 4 ms 9732 KB Output is correct
9 Correct 5 ms 9684 KB Output is correct
10 Correct 7 ms 9812 KB Output is correct
11 Correct 6 ms 9684 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 5 ms 9684 KB Output is correct
14 Correct 5 ms 9684 KB Output is correct
15 Correct 5 ms 9732 KB Output is correct
16 Correct 4 ms 9740 KB Output is correct
17 Correct 5 ms 9716 KB Output is correct
18 Correct 5 ms 9684 KB Output is correct
19 Correct 5 ms 9732 KB Output is correct
20 Correct 5 ms 9732 KB Output is correct
21 Correct 5 ms 9740 KB Output is correct
22 Correct 5 ms 9732 KB Output is correct
23 Correct 4 ms 9684 KB Output is correct
24 Correct 6 ms 9684 KB Output is correct
25 Correct 5 ms 9736 KB Output is correct
26 Correct 4 ms 9712 KB Output is correct
27 Correct 5 ms 9736 KB Output is correct
28 Correct 4 ms 9684 KB Output is correct
29 Correct 5 ms 9744 KB Output is correct
30 Correct 6 ms 9684 KB Output is correct
31 Correct 5 ms 9732 KB Output is correct
32 Correct 5 ms 9684 KB Output is correct
33 Correct 5 ms 9736 KB Output is correct
34 Correct 5 ms 9684 KB Output is correct
35 Correct 4 ms 9676 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9684 KB Output is correct
2 Correct 6 ms 9684 KB Output is correct
3 Correct 5 ms 9684 KB Output is correct
4 Correct 5 ms 9684 KB Output is correct
5 Correct 5 ms 9684 KB Output is correct
6 Correct 5 ms 9732 KB Output is correct
7 Correct 5 ms 9684 KB Output is correct
8 Correct 4 ms 9732 KB Output is correct
9 Correct 5 ms 9684 KB Output is correct
10 Correct 7 ms 9812 KB Output is correct
11 Correct 6 ms 9684 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 5 ms 9684 KB Output is correct
14 Correct 5 ms 9684 KB Output is correct
15 Correct 5 ms 9732 KB Output is correct
16 Correct 4 ms 9740 KB Output is correct
17 Correct 5 ms 9716 KB Output is correct
18 Correct 5 ms 9684 KB Output is correct
19 Correct 5 ms 9732 KB Output is correct
20 Correct 5 ms 9732 KB Output is correct
21 Correct 5 ms 9740 KB Output is correct
22 Correct 5 ms 9732 KB Output is correct
23 Correct 4 ms 9684 KB Output is correct
24 Correct 6 ms 9684 KB Output is correct
25 Correct 5 ms 9736 KB Output is correct
26 Correct 4 ms 9712 KB Output is correct
27 Correct 5 ms 9736 KB Output is correct
28 Correct 4 ms 9684 KB Output is correct
29 Correct 5 ms 9744 KB Output is correct
30 Correct 6 ms 9684 KB Output is correct
31 Correct 5 ms 9732 KB Output is correct
32 Correct 5 ms 9684 KB Output is correct
33 Correct 5 ms 9736 KB Output is correct
34 Correct 5 ms 9684 KB Output is correct
35 Correct 4 ms 9676 KB Output is correct
36 Correct 4 ms 9684 KB Output is correct
37 Correct 5 ms 9740 KB Output is correct
38 Correct 5 ms 9672 KB Output is correct
39 Correct 6 ms 9732 KB Output is correct
40 Correct 5 ms 9732 KB Output is correct
41 Correct 5 ms 9684 KB Output is correct
42 Correct 5 ms 9684 KB Output is correct
43 Correct 5 ms 9684 KB Output is correct
44 Correct 4 ms 9732 KB Output is correct
45 Correct 5 ms 9736 KB Output is correct
46 Correct 4 ms 9736 KB Output is correct
47 Correct 4 ms 9684 KB Output is correct
48 Correct 5 ms 9684 KB Output is correct
49 Correct 5 ms 9684 KB Output is correct
50 Correct 4 ms 9684 KB Output is correct
51 Correct 4 ms 9684 KB Output is correct
52 Correct 5 ms 9736 KB Output is correct
53 Correct 6 ms 9688 KB Output is correct
54 Correct 5 ms 9684 KB Output is correct
55 Correct 5 ms 9736 KB Output is correct
56 Correct 4 ms 9684 KB Output is correct
57 Correct 4 ms 9740 KB Output is correct
58 Correct 4 ms 9684 KB Output is correct
59 Correct 5 ms 9728 KB Output is correct
60 Correct 4 ms 9684 KB Output is correct
61 Correct 5 ms 9684 KB Output is correct
62 Correct 6 ms 9740 KB Output is correct
63 Correct 4 ms 9668 KB Output is correct
64 Correct 5 ms 9684 KB Output is correct
65 Correct 5 ms 9740 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 82 ms 38640 KB Output is correct
2 Correct 80 ms 38640 KB Output is correct
3 Correct 81 ms 32704 KB Output is correct
4 Correct 86 ms 37388 KB Output is correct
5 Correct 71 ms 29040 KB Output is correct
6 Correct 75 ms 32280 KB Output is correct
7 Correct 74 ms 30656 KB Output is correct
8 Correct 74 ms 31616 KB Output is correct
9 Correct 76 ms 28324 KB Output is correct
10 Correct 86 ms 28424 KB Output is correct
11 Correct 52 ms 25120 KB Output is correct
12 Correct 73 ms 24816 KB Output is correct
13 Correct 53 ms 24604 KB Output is correct
14 Correct 68 ms 24200 KB Output is correct
15 Correct 40 ms 22724 KB Output is correct
16 Correct 44 ms 22432 KB Output is correct
17 Correct 9 ms 13336 KB Output is correct
18 Correct 7 ms 13268 KB Output is correct
19 Correct 7 ms 13320 KB Output is correct
20 Correct 8 ms 13320 KB Output is correct
21 Correct 8 ms 13268 KB Output is correct
22 Correct 8 ms 13220 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9920 KB Output is correct
2 Correct 5 ms 9812 KB Output is correct
3 Correct 5 ms 9944 KB Output is correct
4 Correct 6 ms 9996 KB Output is correct
5 Correct 7 ms 9940 KB Output is correct
6 Correct 5 ms 9940 KB Output is correct
7 Correct 7 ms 9988 KB Output is correct
8 Correct 8 ms 9908 KB Output is correct
9 Correct 6 ms 9872 KB Output is correct
10 Correct 6 ms 9864 KB Output is correct
11 Correct 5 ms 9864 KB Output is correct
12 Correct 5 ms 9868 KB Output is correct
13 Correct 5 ms 9940 KB Output is correct
14 Correct 7 ms 9924 KB Output is correct
15 Correct 7 ms 9868 KB Output is correct
16 Correct 5 ms 9856 KB Output is correct
17 Correct 5 ms 9864 KB Output is correct
18 Correct 6 ms 9868 KB Output is correct
19 Correct 8 ms 9920 KB Output is correct
20 Correct 6 ms 9944 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 122 ms 28932 KB Output is correct
2 Correct 92 ms 29924 KB Output is correct
3 Correct 103 ms 29968 KB Output is correct
4 Correct 85 ms 29960 KB Output is correct
5 Correct 97 ms 29928 KB Output is correct
6 Correct 122 ms 38620 KB Output is correct
7 Correct 110 ms 35732 KB Output is correct
8 Correct 87 ms 34232 KB Output is correct
9 Correct 100 ms 32668 KB Output is correct
10 Correct 130 ms 29936 KB Output is correct
11 Correct 119 ms 29956 KB Output is correct
12 Correct 77 ms 29916 KB Output is correct
13 Correct 97 ms 29928 KB Output is correct
14 Correct 87 ms 28728 KB Output is correct
15 Correct 73 ms 27404 KB Output is correct
16 Correct 47 ms 22972 KB Output is correct
17 Correct 62 ms 30496 KB Output is correct
18 Correct 71 ms 30504 KB Output is correct
19 Correct 68 ms 30636 KB Output is correct
20 Correct 67 ms 30476 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 9936 KB Output is correct
2 Correct 5 ms 9868 KB Output is correct
3 Correct 5 ms 9812 KB Output is correct
4 Correct 7 ms 9812 KB Output is correct
5 Correct 7 ms 9892 KB Output is correct
6 Correct 7 ms 9884 KB Output is correct
7 Correct 5 ms 9812 KB Output is correct
8 Correct 6 ms 9872 KB Output is correct
9 Correct 8 ms 9812 KB Output is correct
10 Correct 7 ms 9768 KB Output is correct
11 Correct 8 ms 9868 KB Output is correct
12 Correct 8 ms 9868 KB Output is correct
13 Correct 8 ms 9940 KB Output is correct
14 Correct 7 ms 9952 KB Output is correct
15 Correct 7 ms 9940 KB Output is correct
16 Correct 9 ms 9876 KB Output is correct
17 Correct 6 ms 9812 KB Output is correct
18 Correct 8 ms 9812 KB Output is correct
19 Correct 7 ms 9812 KB Output is correct
20 Correct 5 ms 9812 KB Output is correct
21 Correct 7 ms 9868 KB Output is correct
22 Correct 10 ms 9872 KB Output is correct
23 Correct 6 ms 9812 KB Output is correct
24 Correct 6 ms 9872 KB Output is correct
25 Correct 7 ms 9816 KB Output is correct
26 Correct 5 ms 9684 KB Output is correct
27 Correct 5 ms 9684 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 96 ms 29984 KB Output is correct
2 Correct 95 ms 29852 KB Output is correct
3 Correct 144 ms 28512 KB Output is correct
4 Correct 116 ms 26896 KB Output is correct
5 Correct 126 ms 24792 KB Output is correct
6 Correct 84 ms 23912 KB Output is correct
7 Correct 63 ms 23560 KB Output is correct
8 Correct 61 ms 23048 KB Output is correct
9 Correct 65 ms 22936 KB Output is correct
10 Correct 65 ms 22752 KB Output is correct
11 Correct 83 ms 22496 KB Output is correct
12 Correct 73 ms 22620 KB Output is correct
13 Correct 76 ms 22760 KB Output is correct
14 Correct 62 ms 26140 KB Output is correct
15 Correct 100 ms 34708 KB Output is correct
16 Correct 123 ms 32676 KB Output is correct
17 Correct 103 ms 32856 KB Output is correct
18 Correct 92 ms 30964 KB Output is correct
19 Correct 102 ms 26736 KB Output is correct
20 Correct 105 ms 26752 KB Output is correct
21 Correct 102 ms 26768 KB Output is correct
22 Correct 89 ms 25608 KB Output is correct
23 Correct 72 ms 24444 KB Output is correct
24 Correct 80 ms 28912 KB Output is correct
25 Correct 79 ms 28884 KB Output is correct
26 Correct 93 ms 27800 KB Output is correct
27 Correct 87 ms 27840 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9684 KB Output is correct
2 Correct 6 ms 9684 KB Output is correct
3 Correct 5 ms 9684 KB Output is correct
4 Correct 5 ms 9684 KB Output is correct
5 Correct 5 ms 9684 KB Output is correct
6 Correct 5 ms 9732 KB Output is correct
7 Correct 5 ms 9684 KB Output is correct
8 Correct 4 ms 9732 KB Output is correct
9 Correct 5 ms 9684 KB Output is correct
10 Correct 7 ms 9812 KB Output is correct
11 Correct 6 ms 9684 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 5 ms 9684 KB Output is correct
14 Correct 5 ms 9684 KB Output is correct
15 Correct 5 ms 9732 KB Output is correct
16 Correct 4 ms 9740 KB Output is correct
17 Correct 5 ms 9716 KB Output is correct
18 Correct 5 ms 9684 KB Output is correct
19 Correct 5 ms 9732 KB Output is correct
20 Correct 5 ms 9732 KB Output is correct
21 Correct 5 ms 9740 KB Output is correct
22 Correct 5 ms 9732 KB Output is correct
23 Correct 4 ms 9684 KB Output is correct
24 Correct 6 ms 9684 KB Output is correct
25 Correct 5 ms 9736 KB Output is correct
26 Correct 4 ms 9712 KB Output is correct
27 Correct 5 ms 9736 KB Output is correct
28 Correct 4 ms 9684 KB Output is correct
29 Correct 5 ms 9744 KB Output is correct
30 Correct 6 ms 9684 KB Output is correct
31 Correct 5 ms 9732 KB Output is correct
32 Correct 5 ms 9684 KB Output is correct
33 Correct 5 ms 9736 KB Output is correct
34 Correct 5 ms 9684 KB Output is correct
35 Correct 4 ms 9676 KB Output is correct
36 Correct 4 ms 9684 KB Output is correct
37 Correct 5 ms 9740 KB Output is correct
38 Correct 5 ms 9672 KB Output is correct
39 Correct 6 ms 9732 KB Output is correct
40 Correct 5 ms 9732 KB Output is correct
41 Correct 5 ms 9684 KB Output is correct
42 Correct 5 ms 9684 KB Output is correct
43 Correct 5 ms 9684 KB Output is correct
44 Correct 4 ms 9732 KB Output is correct
45 Correct 5 ms 9736 KB Output is correct
46 Correct 4 ms 9736 KB Output is correct
47 Correct 4 ms 9684 KB Output is correct
48 Correct 5 ms 9684 KB Output is correct
49 Correct 5 ms 9684 KB Output is correct
50 Correct 4 ms 9684 KB Output is correct
51 Correct 4 ms 9684 KB Output is correct
52 Correct 5 ms 9736 KB Output is correct
53 Correct 6 ms 9688 KB Output is correct
54 Correct 5 ms 9684 KB Output is correct
55 Correct 5 ms 9736 KB Output is correct
56 Correct 4 ms 9684 KB Output is correct
57 Correct 4 ms 9740 KB Output is correct
58 Correct 4 ms 9684 KB Output is correct
59 Correct 5 ms 9728 KB Output is correct
60 Correct 4 ms 9684 KB Output is correct
61 Correct 5 ms 9684 KB Output is correct
62 Correct 6 ms 9740 KB Output is correct
63 Correct 4 ms 9668 KB Output is correct
64 Correct 5 ms 9684 KB Output is correct
65 Correct 5 ms 9740 KB Output is correct
66 Correct 4 ms 9736 KB Output is correct
67 Correct 6 ms 9812 KB Output is correct
68 Correct 5 ms 9864 KB Output is correct
69 Correct 6 ms 9984 KB Output is correct
70 Correct 6 ms 9940 KB Output is correct
71 Correct 5 ms 9812 KB Output is correct
72 Correct 5 ms 9868 KB Output is correct
73 Correct 7 ms 9812 KB Output is correct
74 Correct 5 ms 9812 KB Output is correct
75 Correct 6 ms 9812 KB Output is correct
76 Correct 5 ms 9732 KB Output is correct
77 Correct 6 ms 9912 KB Output is correct
78 Correct 5 ms 9812 KB Output is correct
79 Correct 6 ms 9812 KB Output is correct
80 Correct 6 ms 9812 KB Output is correct
81 Correct 7 ms 9812 KB Output is correct
82 Correct 5 ms 9940 KB Output is correct
83 Correct 6 ms 9940 KB Output is correct
84 Correct 7 ms 9876 KB Output is correct
85 Correct 6 ms 9872 KB Output is correct
86 Correct 5 ms 9812 KB Output is correct
87 Correct 5 ms 9864 KB Output is correct
88 Correct 5 ms 9812 KB Output is correct
89 Correct 6 ms 9812 KB Output is correct
90 Correct 7 ms 9812 KB Output is correct
91 Correct 5 ms 9812 KB Output is correct
92 Correct 5 ms 9812 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9684 KB Output is correct
2 Correct 6 ms 9684 KB Output is correct
3 Correct 5 ms 9684 KB Output is correct
4 Correct 5 ms 9684 KB Output is correct
5 Correct 5 ms 9684 KB Output is correct
6 Correct 5 ms 9732 KB Output is correct
7 Correct 5 ms 9684 KB Output is correct
8 Correct 4 ms 9732 KB Output is correct
9 Correct 5 ms 9684 KB Output is correct
10 Correct 7 ms 9812 KB Output is correct
11 Correct 6 ms 9684 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 5 ms 9684 KB Output is correct
14 Correct 5 ms 9684 KB Output is correct
15 Correct 5 ms 9732 KB Output is correct
16 Correct 4 ms 9740 KB Output is correct
17 Correct 5 ms 9716 KB Output is correct
18 Correct 5 ms 9684 KB Output is correct
19 Correct 5 ms 9732 KB Output is correct
20 Correct 5 ms 9732 KB Output is correct
21 Correct 5 ms 9740 KB Output is correct
22 Correct 5 ms 9732 KB Output is correct
23 Correct 4 ms 9684 KB Output is correct
24 Correct 6 ms 9684 KB Output is correct
25 Correct 5 ms 9736 KB Output is correct
26 Correct 4 ms 9712 KB Output is correct
27 Correct 5 ms 9736 KB Output is correct
28 Correct 4 ms 9684 KB Output is correct
29 Correct 5 ms 9744 KB Output is correct
30 Correct 6 ms 9684 KB Output is correct
31 Correct 5 ms 9732 KB Output is correct
32 Correct 5 ms 9684 KB Output is correct
33 Correct 5 ms 9736 KB Output is correct
34 Correct 5 ms 9684 KB Output is correct
35 Correct 4 ms 9676 KB Output is correct
36 Correct 4 ms 9684 KB Output is correct
37 Correct 5 ms 9740 KB Output is correct
38 Correct 5 ms 9672 KB Output is correct
39 Correct 6 ms 9732 KB Output is correct
40 Correct 5 ms 9732 KB Output is correct
41 Correct 5 ms 9684 KB Output is correct
42 Correct 5 ms 9684 KB Output is correct
43 Correct 5 ms 9684 KB Output is correct
44 Correct 4 ms 9732 KB Output is correct
45 Correct 5 ms 9736 KB Output is correct
46 Correct 4 ms 9736 KB Output is correct
47 Correct 4 ms 9684 KB Output is correct
48 Correct 5 ms 9684 KB Output is correct
49 Correct 5 ms 9684 KB Output is correct
50 Correct 4 ms 9684 KB Output is correct
51 Correct 4 ms 9684 KB Output is correct
52 Correct 5 ms 9736 KB Output is correct
53 Correct 6 ms 9688 KB Output is correct
54 Correct 5 ms 9684 KB Output is correct
55 Correct 5 ms 9736 KB Output is correct
56 Correct 4 ms 9684 KB Output is correct
57 Correct 4 ms 9740 KB Output is correct
58 Correct 4 ms 9684 KB Output is correct
59 Correct 5 ms 9728 KB Output is correct
60 Correct 4 ms 9684 KB Output is correct
61 Correct 5 ms 9684 KB Output is correct
62 Correct 6 ms 9740 KB Output is correct
63 Correct 4 ms 9668 KB Output is correct
64 Correct 5 ms 9684 KB Output is correct
65 Correct 5 ms 9740 KB Output is correct
66 Correct 82 ms 38640 KB Output is correct
67 Correct 80 ms 38640 KB Output is correct
68 Correct 81 ms 32704 KB Output is correct
69 Correct 86 ms 37388 KB Output is correct
70 Correct 71 ms 29040 KB Output is correct
71 Correct 75 ms 32280 KB Output is correct
72 Correct 74 ms 30656 KB Output is correct
73 Correct 74 ms 31616 KB Output is correct
74 Correct 76 ms 28324 KB Output is correct
75 Correct 86 ms 28424 KB Output is correct
76 Correct 52 ms 25120 KB Output is correct
77 Correct 73 ms 24816 KB Output is correct
78 Correct 53 ms 24604 KB Output is correct
79 Correct 68 ms 24200 KB Output is correct
80 Correct 40 ms 22724 KB Output is correct
81 Correct 44 ms 22432 KB Output is correct
82 Correct 9 ms 13336 KB Output is correct
83 Correct 7 ms 13268 KB Output is correct
84 Correct 7 ms 13320 KB Output is correct
85 Correct 8 ms 13320 KB Output is correct
86 Correct 8 ms 13268 KB Output is correct
87 Correct 8 ms 13220 KB Output is correct
88 Correct 5 ms 9920 KB Output is correct
89 Correct 5 ms 9812 KB Output is correct
90 Correct 5 ms 9944 KB Output is correct
91 Correct 6 ms 9996 KB Output is correct
92 Correct 7 ms 9940 KB Output is correct
93 Correct 5 ms 9940 KB Output is correct
94 Correct 7 ms 9988 KB Output is correct
95 Correct 8 ms 9908 KB Output is correct
96 Correct 6 ms 9872 KB Output is correct
97 Correct 6 ms 9864 KB Output is correct
98 Correct 5 ms 9864 KB Output is correct
99 Correct 5 ms 9868 KB Output is correct
100 Correct 5 ms 9940 KB Output is correct
101 Correct 7 ms 9924 KB Output is correct
102 Correct 7 ms 9868 KB Output is correct
103 Correct 5 ms 9856 KB Output is correct
104 Correct 5 ms 9864 KB Output is correct
105 Correct 6 ms 9868 KB Output is correct
106 Correct 8 ms 9920 KB Output is correct
107 Correct 6 ms 9944 KB Output is correct
108 Correct 122 ms 28932 KB Output is correct
109 Correct 92 ms 29924 KB Output is correct
110 Correct 103 ms 29968 KB Output is correct
111 Correct 85 ms 29960 KB Output is correct
112 Correct 97 ms 29928 KB Output is correct
113 Correct 122 ms 38620 KB Output is correct
114 Correct 110 ms 35732 KB Output is correct
115 Correct 87 ms 34232 KB Output is correct
116 Correct 100 ms 32668 KB Output is correct
117 Correct 130 ms 29936 KB Output is correct
118 Correct 119 ms 29956 KB Output is correct
119 Correct 77 ms 29916 KB Output is correct
120 Correct 97 ms 29928 KB Output is correct
121 Correct 87 ms 28728 KB Output is correct
122 Correct 73 ms 27404 KB Output is correct
123 Correct 47 ms 22972 KB Output is correct
124 Correct 62 ms 30496 KB Output is correct
125 Correct 71 ms 30504 KB Output is correct
126 Correct 68 ms 30636 KB Output is correct
127 Correct 67 ms 30476 KB Output is correct
128 Correct 7 ms 9936 KB Output is correct
129 Correct 5 ms 9868 KB Output is correct
130 Correct 5 ms 9812 KB Output is correct
131 Correct 7 ms 9812 KB Output is correct
132 Correct 7 ms 9892 KB Output is correct
133 Correct 7 ms 9884 KB Output is correct
134 Correct 5 ms 9812 KB Output is correct
135 Correct 6 ms 9872 KB Output is correct
136 Correct 8 ms 9812 KB Output is correct
137 Correct 7 ms 9768 KB Output is correct
138 Correct 8 ms 9868 KB Output is correct
139 Correct 8 ms 9868 KB Output is correct
140 Correct 8 ms 9940 KB Output is correct
141 Correct 7 ms 9952 KB Output is correct
142 Correct 7 ms 9940 KB Output is correct
143 Correct 9 ms 9876 KB Output is correct
144 Correct 6 ms 9812 KB Output is correct
145 Correct 8 ms 9812 KB Output is correct
146 Correct 7 ms 9812 KB Output is correct
147 Correct 5 ms 9812 KB Output is correct
148 Correct 7 ms 9868 KB Output is correct
149 Correct 10 ms 9872 KB Output is correct
150 Correct 6 ms 9812 KB Output is correct
151 Correct 6 ms 9872 KB Output is correct
152 Correct 7 ms 9816 KB Output is correct
153 Correct 5 ms 9684 KB Output is correct
154 Correct 5 ms 9684 KB Output is correct
155 Correct 96 ms 29984 KB Output is correct
156 Correct 95 ms 29852 KB Output is correct
157 Correct 144 ms 28512 KB Output is correct
158 Correct 116 ms 26896 KB Output is correct
159 Correct 126 ms 24792 KB Output is correct
160 Correct 84 ms 23912 KB Output is correct
161 Correct 63 ms 23560 KB Output is correct
162 Correct 61 ms 23048 KB Output is correct
163 Correct 65 ms 22936 KB Output is correct
164 Correct 65 ms 22752 KB Output is correct
165 Correct 83 ms 22496 KB Output is correct
166 Correct 73 ms 22620 KB Output is correct
167 Correct 76 ms 22760 KB Output is correct
168 Correct 62 ms 26140 KB Output is correct
169 Correct 100 ms 34708 KB Output is correct
170 Correct 123 ms 32676 KB Output is correct
171 Correct 103 ms 32856 KB Output is correct
172 Correct 92 ms 30964 KB Output is correct
173 Correct 102 ms 26736 KB Output is correct
174 Correct 105 ms 26752 KB Output is correct
175 Correct 102 ms 26768 KB Output is correct
176 Correct 89 ms 25608 KB Output is correct
177 Correct 72 ms 24444 KB Output is correct
178 Correct 80 ms 28912 KB Output is correct
179 Correct 79 ms 28884 KB Output is correct
180 Correct 93 ms 27800 KB Output is correct
181 Correct 87 ms 27840 KB Output is correct
182 Correct 4 ms 9736 KB Output is correct
183 Correct 6 ms 9812 KB Output is correct
184 Correct 5 ms 9864 KB Output is correct
185 Correct 6 ms 9984 KB Output is correct
186 Correct 6 ms 9940 KB Output is correct
187 Correct 5 ms 9812 KB Output is correct
188 Correct 5 ms 9868 KB Output is correct
189 Correct 7 ms 9812 KB Output is correct
190 Correct 5 ms 9812 KB Output is correct
191 Correct 6 ms 9812 KB Output is correct
192 Correct 5 ms 9732 KB Output is correct
193 Correct 6 ms 9912 KB Output is correct
194 Correct 5 ms 9812 KB Output is correct
195 Correct 6 ms 9812 KB Output is correct
196 Correct 6 ms 9812 KB Output is correct
197 Correct 7 ms 9812 KB Output is correct
198 Correct 5 ms 9940 KB Output is correct
199 Correct 6 ms 9940 KB Output is correct
200 Correct 7 ms 9876 KB Output is correct
201 Correct 6 ms 9872 KB Output is correct
202 Correct 5 ms 9812 KB Output is correct
203 Correct 5 ms 9864 KB Output is correct
204 Correct 5 ms 9812 KB Output is correct
205 Correct 6 ms 9812 KB Output is correct
206 Correct 7 ms 9812 KB Output is correct
207 Correct 5 ms 9812 KB Output is correct
208 Correct 5 ms 9812 KB Output is correct
209 Correct 9 ms 13268 KB Output is correct
210 Correct 58 ms 22332 KB Output is correct
211 Correct 119 ms 29748 KB Output is correct
212 Correct 169 ms 34848 KB Output is correct
213 Correct 139 ms 38320 KB Output is correct
214 Correct 67 ms 24704 KB Output is correct
215 Correct 53 ms 24152 KB Output is correct
216 Correct 80 ms 27576 KB Output is correct
217 Correct 73 ms 25472 KB Output is correct
218 Correct 60 ms 23112 KB Output is correct
219 Correct 66 ms 22580 KB Output is correct
220 Correct 76 ms 22464 KB Output is correct
221 Correct 58 ms 22524 KB Output is correct
222 Correct 62 ms 24412 KB Output is correct
223 Correct 114 ms 28944 KB Output is correct
224 Correct 87 ms 27768 KB Output is correct
225 Correct 77 ms 24912 KB Output is correct
226 Correct 70 ms 24864 KB Output is correct
227 Correct 95 ms 24840 KB Output is correct
228 Correct 88 ms 24256 KB Output is correct
229 Correct 56 ms 23648 KB Output is correct
230 Correct 87 ms 25640 KB Output is correct
231 Correct 118 ms 25628 KB Output is correct