Submission #967352

# Submission time Handle Problem Language Result Execution time Memory
967352 2024-04-22T02:48:03 Z steveonalex Duathlon (APIO18_duathlon) C++17
100 / 100
132 ms 60772 KB
#include <bits/stdc++.h>
 
using namespace std;
 
typedef long long ll;
typedef unsigned long long ull;
 
#define ALL(v) (v).begin(), (v).end()
#define MASK(i) (1LL << (i))
#define GETBIT(mask, i) (((mask) >> (i)) & 1)
 
// mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
mt19937_64 rng(1);
ll rngesus(ll l, ll r){return ((ull) rng()) % (r - l + 1) + l;}
 
ll max(ll a, ll b){return (a > b) ? a : b;}
ll min(ll a, ll b){return (a < b) ? a : b;}
 
ll LASTBIT(ll mask){return mask & (-mask);}
ll pop_cnt(ll mask){return __builtin_popcountll(mask);}
ll ctz(ll mask){return __builtin_ctzll(mask);}
ll clz(ll mask){return __builtin_clzll(mask);}
ll logOf(ll mask){return 63 - clz(mask);}
 
template <class T1, class T2>
    bool minimize(T1 &a, T2 b){
        if (a > b){a = b; return true;}
        return false;
    }
template <class T1, class T2>
    bool maximize(T1 &a, T2 b){
        if (a < b){a = b; return true;}
        return false;
    }
template <class T>
    void printArr(T& a, string separator = " ", string finish = "\n", ostream& out = cout){
        for(auto i: a) out << i << separator;
        out << finish;
    }
template <class T>
    void remove_dup(vector<T> &a){
        sort(ALL(a));
        a.resize(unique(ALL(a)) - a.begin());
    }

const int N = 1e5 + 69;
int n, m;
vector<int> graph[N], dfs_tree[N];

int num[N], low[N];
bool isJoint[N];
vector<int> st;
int dfs_cnt;
vector<vector<int>> bbc;

void tarjan(int u, int p){
    num[u] = low[u] = ++dfs_cnt;

    vector<int> child;
    for(int v: graph[u]) {
        if (v == p) {p = -1; continue;}
        if (num[v]){
            minimize(low[u], num[v]);
        }
        else{
            child.push_back(v);
            tarjan(v, u);
            minimize(low[u], low[v]);
            if (low[v] >= num[u]){
                isJoint[u] = true;
            }
        }
    }
    if (u == p) isJoint[u] = isJoint[u] && (child.size() >= 2);
    for(int v: child){
        if (isJoint[u] && low[v] >= num[u]) dfs_tree[u].push_back(-v);
        else dfs_tree[u].push_back(v);
    }
}

void get_block(int u){
    st.push_back(u);
    for(int v: dfs_tree[u]){
        get_block(abs(v));
        if (v < 0){
            bbc.push_back({});
            while(bbc.back().empty() || bbc.back().back() != abs(v)){
                bbc.back().push_back(st.back());
                st.pop_back();
            }
            bbc.back().push_back(u);
        }
    }
}

vector<int> bc_tree[2*N];
int joint_cnt = 0;
int pos[2*N];
int sz[2 * N];

int generate_block_cut_tree(){
    dfs_cnt = 0;
    for(int i= 1; i<=n; ++i) if (num[i] == 0){
        tarjan(i, i);
        get_block(i);
        if (st.size()) {
            bbc.push_back(st);
            st.clear();
        }
    }

    int idx = 0;
    for(int i= 1; i<=n; ++i){
        if (!isJoint[i]) continue;
        joint_cnt++;
        pos[i] = ++idx;
        sz[idx] = 1;
    }

    // cerr << "\n";
    for(vector<int> i: bbc){
        // printArr(i);
        ++idx;
        sz[idx] = i.size();
        for(int j: i){
            if (isJoint[j]){
                int u = idx, v = pos[j];
                sz[v]--;
                // cerr << u << " " << v << "\n";
                bc_tree[u].push_back(v);
                bc_tree[v].push_back(u);
            }
        }
    }
    return idx;
}

bool visited[N * 2];
int og[N * 2];
ll ans = 0;

void get_sz(int u, int p){
    visited[u] = 1;
    og[u] = sz[u];
    for(int v: bc_tree[u]) if (v != p){
        get_sz(v, u);
        sz[u] += sz[v];
    }
}

void dfs(int u, int p, int source){
    if (u <= joint_cnt){
        vector<pair<int, int>> child;
        for(int v: bc_tree[u]){
            if (v != p) child.push_back({sz[v] - 1, v});
            else child.push_back({sz[source] - sz[u] - 1, v});
        }
        int sum = 0;
        // cerr << "Ver: " << u << "\n";
        for(pair<int, int> i: child) {
            sum += i.first;
            // cerr << i.first << " " << (og[i.second]-1) << "\n";
        }
        // cerr << "Sum: " << sum << "\n";
        // cerr << "\n";

        for(pair<int, int> i: child){
            ans -= 1LL * (og[i.second] - 1) * (sum - i.first) * (sum - i.first - 1);
            ans -= 2LL * (og[i.second] - 1) * (sum - i.first);
        }
    }

    for(int v: bc_tree[u]) if (v != p){
        dfs(v, u, source);
    }
}

int main(void){
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

    cin >> n >> m;
    // if (m != n - 1) return -1;
    for(int i= 0; i<m; ++i){
        int u, v; cin >> u >> v;
        graph[u].push_back(v);
        graph[v].push_back(u);
    }

    int tree_sz = generate_block_cut_tree();

    for(int i= joint_cnt + 1; i<=tree_sz; ++i) if (!visited[i]){
        get_sz(i, i);
        int M = sz[i];
        ans += 1LL * M * (M - 1) * (M - 2);
        dfs(i, i, i);
    }  

    cout << ans << "\n";

    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 3 ms 12888 KB Output is correct
2 Correct 3 ms 12892 KB Output is correct
3 Correct 3 ms 12892 KB Output is correct
4 Correct 3 ms 12892 KB Output is correct
5 Correct 3 ms 12888 KB Output is correct
6 Correct 3 ms 12888 KB Output is correct
7 Correct 3 ms 12892 KB Output is correct
8 Correct 3 ms 12892 KB Output is correct
9 Correct 3 ms 12892 KB Output is correct
10 Correct 3 ms 12892 KB Output is correct
11 Correct 3 ms 13144 KB Output is correct
12 Correct 3 ms 12892 KB Output is correct
13 Correct 3 ms 12892 KB Output is correct
14 Correct 3 ms 12888 KB Output is correct
15 Correct 3 ms 12892 KB Output is correct
16 Correct 3 ms 12892 KB Output is correct
17 Correct 3 ms 12892 KB Output is correct
18 Correct 2 ms 12892 KB Output is correct
19 Correct 3 ms 12892 KB Output is correct
20 Correct 3 ms 12892 KB Output is correct
21 Correct 3 ms 12892 KB Output is correct
22 Correct 3 ms 13112 KB Output is correct
23 Correct 3 ms 12888 KB Output is correct
24 Correct 3 ms 12888 KB Output is correct
25 Correct 3 ms 12892 KB Output is correct
26 Correct 3 ms 13116 KB Output is correct
27 Correct 4 ms 12892 KB Output is correct
28 Correct 3 ms 12892 KB Output is correct
29 Correct 3 ms 12892 KB Output is correct
30 Correct 3 ms 12892 KB Output is correct
31 Correct 3 ms 12888 KB Output is correct
32 Correct 3 ms 12900 KB Output is correct
33 Correct 4 ms 13112 KB Output is correct
34 Correct 3 ms 12888 KB Output is correct
35 Correct 3 ms 12896 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 12888 KB Output is correct
2 Correct 3 ms 12892 KB Output is correct
3 Correct 3 ms 12892 KB Output is correct
4 Correct 3 ms 12892 KB Output is correct
5 Correct 3 ms 12888 KB Output is correct
6 Correct 3 ms 12888 KB Output is correct
7 Correct 3 ms 12892 KB Output is correct
8 Correct 3 ms 12892 KB Output is correct
9 Correct 3 ms 12892 KB Output is correct
10 Correct 3 ms 12892 KB Output is correct
11 Correct 3 ms 13144 KB Output is correct
12 Correct 3 ms 12892 KB Output is correct
13 Correct 3 ms 12892 KB Output is correct
14 Correct 3 ms 12888 KB Output is correct
15 Correct 3 ms 12892 KB Output is correct
16 Correct 3 ms 12892 KB Output is correct
17 Correct 3 ms 12892 KB Output is correct
18 Correct 2 ms 12892 KB Output is correct
19 Correct 3 ms 12892 KB Output is correct
20 Correct 3 ms 12892 KB Output is correct
21 Correct 3 ms 12892 KB Output is correct
22 Correct 3 ms 13112 KB Output is correct
23 Correct 3 ms 12888 KB Output is correct
24 Correct 3 ms 12888 KB Output is correct
25 Correct 3 ms 12892 KB Output is correct
26 Correct 3 ms 13116 KB Output is correct
27 Correct 4 ms 12892 KB Output is correct
28 Correct 3 ms 12892 KB Output is correct
29 Correct 3 ms 12892 KB Output is correct
30 Correct 3 ms 12892 KB Output is correct
31 Correct 3 ms 12888 KB Output is correct
32 Correct 3 ms 12900 KB Output is correct
33 Correct 4 ms 13112 KB Output is correct
34 Correct 3 ms 12888 KB Output is correct
35 Correct 3 ms 12896 KB Output is correct
36 Correct 3 ms 13092 KB Output is correct
37 Correct 5 ms 13116 KB Output is correct
38 Correct 3 ms 12892 KB Output is correct
39 Correct 3 ms 12888 KB Output is correct
40 Correct 3 ms 12892 KB Output is correct
41 Correct 3 ms 12892 KB Output is correct
42 Correct 3 ms 12896 KB Output is correct
43 Correct 3 ms 12892 KB Output is correct
44 Correct 3 ms 12892 KB Output is correct
45 Correct 3 ms 12892 KB Output is correct
46 Correct 3 ms 12888 KB Output is correct
47 Correct 3 ms 12888 KB Output is correct
48 Correct 3 ms 12892 KB Output is correct
49 Correct 3 ms 12892 KB Output is correct
50 Correct 3 ms 13112 KB Output is correct
51 Correct 3 ms 12892 KB Output is correct
52 Correct 4 ms 13068 KB Output is correct
53 Correct 3 ms 12892 KB Output is correct
54 Correct 3 ms 12892 KB Output is correct
55 Correct 3 ms 12892 KB Output is correct
56 Correct 2 ms 12892 KB Output is correct
57 Correct 3 ms 12892 KB Output is correct
58 Correct 3 ms 12888 KB Output is correct
59 Correct 3 ms 12892 KB Output is correct
60 Correct 3 ms 12892 KB Output is correct
61 Correct 3 ms 12892 KB Output is correct
62 Correct 3 ms 12892 KB Output is correct
63 Correct 3 ms 12888 KB Output is correct
64 Correct 3 ms 12892 KB Output is correct
65 Correct 3 ms 12888 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 57 ms 35788 KB Output is correct
2 Correct 61 ms 35848 KB Output is correct
3 Correct 81 ms 41148 KB Output is correct
4 Correct 68 ms 35076 KB Output is correct
5 Correct 79 ms 34360 KB Output is correct
6 Correct 96 ms 43084 KB Output is correct
7 Correct 77 ms 33800 KB Output is correct
8 Correct 86 ms 38116 KB Output is correct
9 Correct 76 ms 30724 KB Output is correct
10 Correct 75 ms 31496 KB Output is correct
11 Correct 51 ms 24684 KB Output is correct
12 Correct 48 ms 24580 KB Output is correct
13 Correct 50 ms 23696 KB Output is correct
14 Correct 44 ms 23940 KB Output is correct
15 Correct 34 ms 22280 KB Output is correct
16 Correct 35 ms 22276 KB Output is correct
17 Correct 12 ms 18696 KB Output is correct
18 Correct 11 ms 18696 KB Output is correct
19 Correct 12 ms 19212 KB Output is correct
20 Correct 12 ms 18952 KB Output is correct
21 Correct 12 ms 18700 KB Output is correct
22 Correct 12 ms 18700 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 13148 KB Output is correct
2 Correct 4 ms 13148 KB Output is correct
3 Correct 3 ms 13148 KB Output is correct
4 Correct 4 ms 13404 KB Output is correct
5 Correct 4 ms 13400 KB Output is correct
6 Correct 3 ms 13404 KB Output is correct
7 Correct 3 ms 13404 KB Output is correct
8 Correct 4 ms 13392 KB Output is correct
9 Correct 3 ms 13148 KB Output is correct
10 Correct 3 ms 13116 KB Output is correct
11 Correct 3 ms 13144 KB Output is correct
12 Correct 3 ms 13124 KB Output is correct
13 Correct 3 ms 13148 KB Output is correct
14 Correct 3 ms 13148 KB Output is correct
15 Correct 4 ms 13144 KB Output is correct
16 Correct 3 ms 13072 KB Output is correct
17 Correct 3 ms 13148 KB Output is correct
18 Correct 3 ms 13148 KB Output is correct
19 Correct 3 ms 13148 KB Output is correct
20 Correct 3 ms 13400 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 73 ms 29664 KB Output is correct
2 Correct 75 ms 29696 KB Output is correct
3 Correct 74 ms 29436 KB Output is correct
4 Correct 74 ms 29696 KB Output is correct
5 Correct 73 ms 30208 KB Output is correct
6 Correct 132 ms 60772 KB Output is correct
7 Correct 99 ms 41324 KB Output is correct
8 Correct 90 ms 38512 KB Output is correct
9 Correct 93 ms 35588 KB Output is correct
10 Correct 84 ms 29444 KB Output is correct
11 Correct 73 ms 30208 KB Output is correct
12 Correct 77 ms 29648 KB Output is correct
13 Correct 75 ms 29440 KB Output is correct
14 Correct 68 ms 29024 KB Output is correct
15 Correct 62 ms 27648 KB Output is correct
16 Correct 37 ms 23808 KB Output is correct
17 Correct 55 ms 29368 KB Output is correct
18 Correct 46 ms 28340 KB Output is correct
19 Correct 45 ms 28932 KB Output is correct
20 Correct 46 ms 27724 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 13148 KB Output is correct
2 Correct 4 ms 13148 KB Output is correct
3 Correct 3 ms 13148 KB Output is correct
4 Correct 3 ms 13148 KB Output is correct
5 Correct 3 ms 13148 KB Output is correct
6 Correct 4 ms 13148 KB Output is correct
7 Correct 3 ms 13148 KB Output is correct
8 Correct 3 ms 13120 KB Output is correct
9 Correct 4 ms 13400 KB Output is correct
10 Correct 4 ms 13148 KB Output is correct
11 Correct 3 ms 13148 KB Output is correct
12 Correct 3 ms 13404 KB Output is correct
13 Correct 4 ms 13148 KB Output is correct
14 Correct 3 ms 13148 KB Output is correct
15 Correct 3 ms 13276 KB Output is correct
16 Correct 3 ms 13148 KB Output is correct
17 Correct 3 ms 13148 KB Output is correct
18 Correct 3 ms 13256 KB Output is correct
19 Correct 4 ms 13148 KB Output is correct
20 Correct 3 ms 13148 KB Output is correct
21 Correct 3 ms 13144 KB Output is correct
22 Correct 3 ms 13148 KB Output is correct
23 Correct 3 ms 13144 KB Output is correct
24 Correct 3 ms 13144 KB Output is correct
25 Correct 3 ms 13148 KB Output is correct
26 Correct 3 ms 13148 KB Output is correct
27 Correct 3 ms 13148 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 82 ms 29756 KB Output is correct
2 Correct 84 ms 30348 KB Output is correct
3 Correct 80 ms 29024 KB Output is correct
4 Correct 71 ms 26900 KB Output is correct
5 Correct 72 ms 24580 KB Output is correct
6 Correct 74 ms 23672 KB Output is correct
7 Correct 53 ms 23116 KB Output is correct
8 Correct 50 ms 22416 KB Output is correct
9 Correct 48 ms 22156 KB Output is correct
10 Correct 47 ms 21844 KB Output is correct
11 Correct 53 ms 21672 KB Output is correct
12 Correct 45 ms 21596 KB Output is correct
13 Correct 67 ms 21908 KB Output is correct
14 Correct 75 ms 24964 KB Output is correct
15 Correct 92 ms 41256 KB Output is correct
16 Correct 96 ms 36608 KB Output is correct
17 Correct 100 ms 37400 KB Output is correct
18 Correct 87 ms 34224 KB Output is correct
19 Correct 70 ms 26792 KB Output is correct
20 Correct 81 ms 27256 KB Output is correct
21 Correct 86 ms 26840 KB Output is correct
22 Correct 71 ms 25604 KB Output is correct
23 Correct 50 ms 23860 KB Output is correct
24 Correct 69 ms 28592 KB Output is correct
25 Correct 68 ms 29632 KB Output is correct
26 Correct 65 ms 27968 KB Output is correct
27 Correct 69 ms 27904 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 12888 KB Output is correct
2 Correct 3 ms 12892 KB Output is correct
3 Correct 3 ms 12892 KB Output is correct
4 Correct 3 ms 12892 KB Output is correct
5 Correct 3 ms 12888 KB Output is correct
6 Correct 3 ms 12888 KB Output is correct
7 Correct 3 ms 12892 KB Output is correct
8 Correct 3 ms 12892 KB Output is correct
9 Correct 3 ms 12892 KB Output is correct
10 Correct 3 ms 12892 KB Output is correct
11 Correct 3 ms 13144 KB Output is correct
12 Correct 3 ms 12892 KB Output is correct
13 Correct 3 ms 12892 KB Output is correct
14 Correct 3 ms 12888 KB Output is correct
15 Correct 3 ms 12892 KB Output is correct
16 Correct 3 ms 12892 KB Output is correct
17 Correct 3 ms 12892 KB Output is correct
18 Correct 2 ms 12892 KB Output is correct
19 Correct 3 ms 12892 KB Output is correct
20 Correct 3 ms 12892 KB Output is correct
21 Correct 3 ms 12892 KB Output is correct
22 Correct 3 ms 13112 KB Output is correct
23 Correct 3 ms 12888 KB Output is correct
24 Correct 3 ms 12888 KB Output is correct
25 Correct 3 ms 12892 KB Output is correct
26 Correct 3 ms 13116 KB Output is correct
27 Correct 4 ms 12892 KB Output is correct
28 Correct 3 ms 12892 KB Output is correct
29 Correct 3 ms 12892 KB Output is correct
30 Correct 3 ms 12892 KB Output is correct
31 Correct 3 ms 12888 KB Output is correct
32 Correct 3 ms 12900 KB Output is correct
33 Correct 4 ms 13112 KB Output is correct
34 Correct 3 ms 12888 KB Output is correct
35 Correct 3 ms 12896 KB Output is correct
36 Correct 3 ms 13092 KB Output is correct
37 Correct 5 ms 13116 KB Output is correct
38 Correct 3 ms 12892 KB Output is correct
39 Correct 3 ms 12888 KB Output is correct
40 Correct 3 ms 12892 KB Output is correct
41 Correct 3 ms 12892 KB Output is correct
42 Correct 3 ms 12896 KB Output is correct
43 Correct 3 ms 12892 KB Output is correct
44 Correct 3 ms 12892 KB Output is correct
45 Correct 3 ms 12892 KB Output is correct
46 Correct 3 ms 12888 KB Output is correct
47 Correct 3 ms 12888 KB Output is correct
48 Correct 3 ms 12892 KB Output is correct
49 Correct 3 ms 12892 KB Output is correct
50 Correct 3 ms 13112 KB Output is correct
51 Correct 3 ms 12892 KB Output is correct
52 Correct 4 ms 13068 KB Output is correct
53 Correct 3 ms 12892 KB Output is correct
54 Correct 3 ms 12892 KB Output is correct
55 Correct 3 ms 12892 KB Output is correct
56 Correct 2 ms 12892 KB Output is correct
57 Correct 3 ms 12892 KB Output is correct
58 Correct 3 ms 12888 KB Output is correct
59 Correct 3 ms 12892 KB Output is correct
60 Correct 3 ms 12892 KB Output is correct
61 Correct 3 ms 12892 KB Output is correct
62 Correct 3 ms 12892 KB Output is correct
63 Correct 3 ms 12888 KB Output is correct
64 Correct 3 ms 12892 KB Output is correct
65 Correct 3 ms 12888 KB Output is correct
66 Correct 3 ms 13148 KB Output is correct
67 Correct 3 ms 13148 KB Output is correct
68 Correct 3 ms 13400 KB Output is correct
69 Correct 3 ms 13148 KB Output is correct
70 Correct 3 ms 13344 KB Output is correct
71 Correct 3 ms 13148 KB Output is correct
72 Correct 3 ms 13144 KB Output is correct
73 Correct 3 ms 13148 KB Output is correct
74 Correct 3 ms 13144 KB Output is correct
75 Correct 4 ms 13148 KB Output is correct
76 Correct 3 ms 12892 KB Output is correct
77 Correct 3 ms 13124 KB Output is correct
78 Correct 3 ms 13148 KB Output is correct
79 Correct 3 ms 13148 KB Output is correct
80 Correct 4 ms 13076 KB Output is correct
81 Correct 4 ms 13116 KB Output is correct
82 Correct 4 ms 13148 KB Output is correct
83 Correct 3 ms 13148 KB Output is correct
84 Correct 3 ms 13072 KB Output is correct
85 Correct 3 ms 13148 KB Output is correct
86 Correct 3 ms 13148 KB Output is correct
87 Correct 3 ms 13148 KB Output is correct
88 Correct 3 ms 13120 KB Output is correct
89 Correct 3 ms 13148 KB Output is correct
90 Correct 4 ms 13124 KB Output is correct
91 Correct 4 ms 13148 KB Output is correct
92 Correct 3 ms 13148 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 12888 KB Output is correct
2 Correct 3 ms 12892 KB Output is correct
3 Correct 3 ms 12892 KB Output is correct
4 Correct 3 ms 12892 KB Output is correct
5 Correct 3 ms 12888 KB Output is correct
6 Correct 3 ms 12888 KB Output is correct
7 Correct 3 ms 12892 KB Output is correct
8 Correct 3 ms 12892 KB Output is correct
9 Correct 3 ms 12892 KB Output is correct
10 Correct 3 ms 12892 KB Output is correct
11 Correct 3 ms 13144 KB Output is correct
12 Correct 3 ms 12892 KB Output is correct
13 Correct 3 ms 12892 KB Output is correct
14 Correct 3 ms 12888 KB Output is correct
15 Correct 3 ms 12892 KB Output is correct
16 Correct 3 ms 12892 KB Output is correct
17 Correct 3 ms 12892 KB Output is correct
18 Correct 2 ms 12892 KB Output is correct
19 Correct 3 ms 12892 KB Output is correct
20 Correct 3 ms 12892 KB Output is correct
21 Correct 3 ms 12892 KB Output is correct
22 Correct 3 ms 13112 KB Output is correct
23 Correct 3 ms 12888 KB Output is correct
24 Correct 3 ms 12888 KB Output is correct
25 Correct 3 ms 12892 KB Output is correct
26 Correct 3 ms 13116 KB Output is correct
27 Correct 4 ms 12892 KB Output is correct
28 Correct 3 ms 12892 KB Output is correct
29 Correct 3 ms 12892 KB Output is correct
30 Correct 3 ms 12892 KB Output is correct
31 Correct 3 ms 12888 KB Output is correct
32 Correct 3 ms 12900 KB Output is correct
33 Correct 4 ms 13112 KB Output is correct
34 Correct 3 ms 12888 KB Output is correct
35 Correct 3 ms 12896 KB Output is correct
36 Correct 3 ms 13092 KB Output is correct
37 Correct 5 ms 13116 KB Output is correct
38 Correct 3 ms 12892 KB Output is correct
39 Correct 3 ms 12888 KB Output is correct
40 Correct 3 ms 12892 KB Output is correct
41 Correct 3 ms 12892 KB Output is correct
42 Correct 3 ms 12896 KB Output is correct
43 Correct 3 ms 12892 KB Output is correct
44 Correct 3 ms 12892 KB Output is correct
45 Correct 3 ms 12892 KB Output is correct
46 Correct 3 ms 12888 KB Output is correct
47 Correct 3 ms 12888 KB Output is correct
48 Correct 3 ms 12892 KB Output is correct
49 Correct 3 ms 12892 KB Output is correct
50 Correct 3 ms 13112 KB Output is correct
51 Correct 3 ms 12892 KB Output is correct
52 Correct 4 ms 13068 KB Output is correct
53 Correct 3 ms 12892 KB Output is correct
54 Correct 3 ms 12892 KB Output is correct
55 Correct 3 ms 12892 KB Output is correct
56 Correct 2 ms 12892 KB Output is correct
57 Correct 3 ms 12892 KB Output is correct
58 Correct 3 ms 12888 KB Output is correct
59 Correct 3 ms 12892 KB Output is correct
60 Correct 3 ms 12892 KB Output is correct
61 Correct 3 ms 12892 KB Output is correct
62 Correct 3 ms 12892 KB Output is correct
63 Correct 3 ms 12888 KB Output is correct
64 Correct 3 ms 12892 KB Output is correct
65 Correct 3 ms 12888 KB Output is correct
66 Correct 57 ms 35788 KB Output is correct
67 Correct 61 ms 35848 KB Output is correct
68 Correct 81 ms 41148 KB Output is correct
69 Correct 68 ms 35076 KB Output is correct
70 Correct 79 ms 34360 KB Output is correct
71 Correct 96 ms 43084 KB Output is correct
72 Correct 77 ms 33800 KB Output is correct
73 Correct 86 ms 38116 KB Output is correct
74 Correct 76 ms 30724 KB Output is correct
75 Correct 75 ms 31496 KB Output is correct
76 Correct 51 ms 24684 KB Output is correct
77 Correct 48 ms 24580 KB Output is correct
78 Correct 50 ms 23696 KB Output is correct
79 Correct 44 ms 23940 KB Output is correct
80 Correct 34 ms 22280 KB Output is correct
81 Correct 35 ms 22276 KB Output is correct
82 Correct 12 ms 18696 KB Output is correct
83 Correct 11 ms 18696 KB Output is correct
84 Correct 12 ms 19212 KB Output is correct
85 Correct 12 ms 18952 KB Output is correct
86 Correct 12 ms 18700 KB Output is correct
87 Correct 12 ms 18700 KB Output is correct
88 Correct 3 ms 13148 KB Output is correct
89 Correct 4 ms 13148 KB Output is correct
90 Correct 3 ms 13148 KB Output is correct
91 Correct 4 ms 13404 KB Output is correct
92 Correct 4 ms 13400 KB Output is correct
93 Correct 3 ms 13404 KB Output is correct
94 Correct 3 ms 13404 KB Output is correct
95 Correct 4 ms 13392 KB Output is correct
96 Correct 3 ms 13148 KB Output is correct
97 Correct 3 ms 13116 KB Output is correct
98 Correct 3 ms 13144 KB Output is correct
99 Correct 3 ms 13124 KB Output is correct
100 Correct 3 ms 13148 KB Output is correct
101 Correct 3 ms 13148 KB Output is correct
102 Correct 4 ms 13144 KB Output is correct
103 Correct 3 ms 13072 KB Output is correct
104 Correct 3 ms 13148 KB Output is correct
105 Correct 3 ms 13148 KB Output is correct
106 Correct 3 ms 13148 KB Output is correct
107 Correct 3 ms 13400 KB Output is correct
108 Correct 73 ms 29664 KB Output is correct
109 Correct 75 ms 29696 KB Output is correct
110 Correct 74 ms 29436 KB Output is correct
111 Correct 74 ms 29696 KB Output is correct
112 Correct 73 ms 30208 KB Output is correct
113 Correct 132 ms 60772 KB Output is correct
114 Correct 99 ms 41324 KB Output is correct
115 Correct 90 ms 38512 KB Output is correct
116 Correct 93 ms 35588 KB Output is correct
117 Correct 84 ms 29444 KB Output is correct
118 Correct 73 ms 30208 KB Output is correct
119 Correct 77 ms 29648 KB Output is correct
120 Correct 75 ms 29440 KB Output is correct
121 Correct 68 ms 29024 KB Output is correct
122 Correct 62 ms 27648 KB Output is correct
123 Correct 37 ms 23808 KB Output is correct
124 Correct 55 ms 29368 KB Output is correct
125 Correct 46 ms 28340 KB Output is correct
126 Correct 45 ms 28932 KB Output is correct
127 Correct 46 ms 27724 KB Output is correct
128 Correct 3 ms 13148 KB Output is correct
129 Correct 4 ms 13148 KB Output is correct
130 Correct 3 ms 13148 KB Output is correct
131 Correct 3 ms 13148 KB Output is correct
132 Correct 3 ms 13148 KB Output is correct
133 Correct 4 ms 13148 KB Output is correct
134 Correct 3 ms 13148 KB Output is correct
135 Correct 3 ms 13120 KB Output is correct
136 Correct 4 ms 13400 KB Output is correct
137 Correct 4 ms 13148 KB Output is correct
138 Correct 3 ms 13148 KB Output is correct
139 Correct 3 ms 13404 KB Output is correct
140 Correct 4 ms 13148 KB Output is correct
141 Correct 3 ms 13148 KB Output is correct
142 Correct 3 ms 13276 KB Output is correct
143 Correct 3 ms 13148 KB Output is correct
144 Correct 3 ms 13148 KB Output is correct
145 Correct 3 ms 13256 KB Output is correct
146 Correct 4 ms 13148 KB Output is correct
147 Correct 3 ms 13148 KB Output is correct
148 Correct 3 ms 13144 KB Output is correct
149 Correct 3 ms 13148 KB Output is correct
150 Correct 3 ms 13144 KB Output is correct
151 Correct 3 ms 13144 KB Output is correct
152 Correct 3 ms 13148 KB Output is correct
153 Correct 3 ms 13148 KB Output is correct
154 Correct 3 ms 13148 KB Output is correct
155 Correct 82 ms 29756 KB Output is correct
156 Correct 84 ms 30348 KB Output is correct
157 Correct 80 ms 29024 KB Output is correct
158 Correct 71 ms 26900 KB Output is correct
159 Correct 72 ms 24580 KB Output is correct
160 Correct 74 ms 23672 KB Output is correct
161 Correct 53 ms 23116 KB Output is correct
162 Correct 50 ms 22416 KB Output is correct
163 Correct 48 ms 22156 KB Output is correct
164 Correct 47 ms 21844 KB Output is correct
165 Correct 53 ms 21672 KB Output is correct
166 Correct 45 ms 21596 KB Output is correct
167 Correct 67 ms 21908 KB Output is correct
168 Correct 75 ms 24964 KB Output is correct
169 Correct 92 ms 41256 KB Output is correct
170 Correct 96 ms 36608 KB Output is correct
171 Correct 100 ms 37400 KB Output is correct
172 Correct 87 ms 34224 KB Output is correct
173 Correct 70 ms 26792 KB Output is correct
174 Correct 81 ms 27256 KB Output is correct
175 Correct 86 ms 26840 KB Output is correct
176 Correct 71 ms 25604 KB Output is correct
177 Correct 50 ms 23860 KB Output is correct
178 Correct 69 ms 28592 KB Output is correct
179 Correct 68 ms 29632 KB Output is correct
180 Correct 65 ms 27968 KB Output is correct
181 Correct 69 ms 27904 KB Output is correct
182 Correct 3 ms 13148 KB Output is correct
183 Correct 3 ms 13148 KB Output is correct
184 Correct 3 ms 13400 KB Output is correct
185 Correct 3 ms 13148 KB Output is correct
186 Correct 3 ms 13344 KB Output is correct
187 Correct 3 ms 13148 KB Output is correct
188 Correct 3 ms 13144 KB Output is correct
189 Correct 3 ms 13148 KB Output is correct
190 Correct 3 ms 13144 KB Output is correct
191 Correct 4 ms 13148 KB Output is correct
192 Correct 3 ms 12892 KB Output is correct
193 Correct 3 ms 13124 KB Output is correct
194 Correct 3 ms 13148 KB Output is correct
195 Correct 3 ms 13148 KB Output is correct
196 Correct 4 ms 13076 KB Output is correct
197 Correct 4 ms 13116 KB Output is correct
198 Correct 4 ms 13148 KB Output is correct
199 Correct 3 ms 13148 KB Output is correct
200 Correct 3 ms 13072 KB Output is correct
201 Correct 3 ms 13148 KB Output is correct
202 Correct 3 ms 13148 KB Output is correct
203 Correct 3 ms 13148 KB Output is correct
204 Correct 3 ms 13120 KB Output is correct
205 Correct 3 ms 13148 KB Output is correct
206 Correct 4 ms 13124 KB Output is correct
207 Correct 4 ms 13148 KB Output is correct
208 Correct 3 ms 13148 KB Output is correct
209 Correct 12 ms 18700 KB Output is correct
210 Correct 44 ms 24068 KB Output is correct
211 Correct 76 ms 28040 KB Output is correct
212 Correct 71 ms 30336 KB Output is correct
213 Correct 82 ms 32200 KB Output is correct
214 Correct 43 ms 23824 KB Output is correct
215 Correct 42 ms 23048 KB Output is correct
216 Correct 88 ms 26880 KB Output is correct
217 Correct 64 ms 24680 KB Output is correct
218 Correct 60 ms 22196 KB Output is correct
219 Correct 68 ms 21584 KB Output is correct
220 Correct 47 ms 21584 KB Output is correct
221 Correct 43 ms 21332 KB Output is correct
222 Correct 48 ms 23212 KB Output is correct
223 Correct 71 ms 29164 KB Output is correct
224 Correct 73 ms 27652 KB Output is correct
225 Correct 63 ms 24068 KB Output is correct
226 Correct 62 ms 24276 KB Output is correct
227 Correct 70 ms 24072 KB Output is correct
228 Correct 56 ms 23408 KB Output is correct
229 Correct 46 ms 22028 KB Output is correct
230 Correct 60 ms 24324 KB Output is correct
231 Correct 55 ms 24068 KB Output is correct