Submission #945225

# Submission time Handle Problem Language Result Execution time Memory
945225 2024-03-13T14:41:04 Z Nhoksocqt1 Beech Tree (IOI23_beechtree) C++17
23 / 100
2000 ms 41108 KB
#ifndef Nhoksocqt1
    #include "beechtree.h"
#endif // Nhoksocqt1
#include<bits/stdc++.h>
using namespace std;

#define inf 0x3f3f3f3f
#define sz(x) int((x).size())
#define fi first
#define se second
typedef long long ll;
typedef pair<int, int> ii;

template<class X, class Y>
	inline bool maximize(X &x, const Y &y) {return (x < y ? x = y, 1 : 0);}
template<class X, class Y>
	inline bool minimize(X &x, const Y &y) {return (x > y ? x = y, 1 : 0);}

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int Random(int l, int r) {
    return uniform_int_distribution<int>(l, r)(rng);
}

const bool isMultiTest = 0;
const int MAXN = 200005;

vector<int> adj[MAXN], B[MAXN];
int maxDepth[MAXN];
int depth[MAXN], par[MAXN], col[MAXN], cnt[MAXN], lastQuery[MAXN], numNode, numColor;
bool canChoose[MAXN], allEqual[MAXN];

void preDfs(int u) {
    canChoose[u] = 1;
    for (int it = 0; it < sz(adj[u]); ++it) {
        int v(adj[u][it]);
        if(lastQuery[col[v]])
            canChoose[u] = 0;

        lastQuery[col[v]] = 1;
    }

    for (int it = 0; it < sz(adj[u]); ++it) {
        int v(adj[u][it]);
        lastQuery[col[v]] = 0;
    }

    allEqual[u] = 1;
    maxDepth[u] = depth[u];
    for (int it = 0; it < sz(adj[u]); ++it) {
        int v(adj[u][it]);
        depth[v] = depth[u] + 1;

        preDfs(v);
        maxDepth[u] = max(maxDepth[u], maxDepth[v]);
        canChoose[u] &= canChoose[v];
        allEqual[u] &= allEqual[v] & (sz(adj[v]) == 0 || col[v] == col[adj[v][0]]) & (col[v] == col[adj[u][0]]);
    }
}

void dfs1(int u) {
    B[u].clear();
    B[u].push_back(u);
    for (int it = 0; it < sz(adj[u]); ++it) {
        int v(adj[u][it]);
        dfs1(v);
        for (int jt = 0; jt < sz(B[v]); ++jt)
            B[u].push_back(B[v][jt]);
    }
}

vector<int> sub1(void) {
    dfs1(0);

    vector<int> ans;
    for (int i = 0; i < numNode; ++i) {
        sort(B[i].begin() + 1, B[i].end());
        bool check(0);
        do {
            for (int it = 0; it < sz(B[i]); ++it)
                cnt[col[B[i][it]]] = 0;

            check = 1;
            for (int it = 1; it < sz(B[i]); ++it) {
                int u(B[i][it]);
                if(B[i][cnt[col[u]]] != par[u]) {
                    check = 0;
                    break;
                }

                ++cnt[col[u]];
            }

            if(check)
                break;

        } while(next_permutation(B[i].begin() + 1, B[i].end()));
        ans.push_back(check);
    }

    return ans;
}

vector<int> subn2(void) {
    vector<int> ans;
    for (int i = 0; i < numNode; ++i) {
        if(!canChoose[i]) {
            ans.push_back(0);
            continue;
        }

        if(maxDepth[i] - depth[i] <= 1) {
            ans.push_back(1);
            continue;
        }

        if(maxDepth[i] - depth[i] > 2) {
            ans.push_back(allEqual[i]);
            continue;
        }

        for (int j = 0; j <= numNode; ++j) {
            B[j].clear();
            lastQuery[col[j]] = 0;
        }

        B[sz(adj[i])].push_back(i);

        int cnt(0);
        bool check(1);
        for (int j = numNode; j > 0; --j) {
            for (int it = 0; it < sz(B[j]); ++it) {
                int u(B[j][it]);
                for (int jt = 0; jt < sz(adj[u]); ++jt) {
                    int v(adj[u][jt]);
                    if(lastQuery[col[v]] != cnt || sz(adj[v]) > j) {
                        //cout << '.' << sz(adj[v]) << ' ' << j << '\n';
                        check = 0;
                        break;
                    }

                    lastQuery[col[v]] = cnt + 1;
                    B[sz(adj[v])].push_back(v);
                }

                ++cnt;
                if(!check)
                    break;
            }

            if(!check)
                break;
        }

        ans.push_back(check);
    }

    //for (int it = 0; it < sz(ans); ++it) cout << ans[it]; cout << '\n';
    return ans;
}

vector<int> beechtree(int _N, int _M, vector<int> _P, vector<int> _C) {
    numNode = _N, numColor = _M;
    for (int i = 0; i < numNode; ++i) {
        par[i] = _P[i];
        col[i] = _C[i];
        if(i > 0)
            adj[par[i]].push_back(i);
    }

    preDfs(0);
    /*if(subn2() != sub1()) {
        cout << numNode << ' ' << numColor << '\n';
        for (int i = 0; i < numNode; ++i)
            cout << par[i] << ' '; cout << '\n';
        for (int i = 0; i < numNode; ++i)
            cout << col[i] << ' '; cout << '\n';

        exit(1);
    }*/

    //subn2();
    if(numNode <= 8) {
        return sub1();
    } else {
        return subn2();
    }
}

#ifdef Nhoksocqt1

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

    #define TASK "beechtree"
    if(fopen(TASK".inp", "r")) {
        freopen(TASK".inp", "r", stdin);
        freopen(TASK".out", "w", stdout);
    }

    vector<int> P, C;
    int N, M;
    cin >> N >> M;

    P.resize(N);
    C.resize(N);
    for (int i = 0; i < N; ++i) {
        cin >> P[i];
        //P[i] = (i == 0 ? -1 : Random(0, i - 1)); cout << P[i] << " \n"[i + 1 == N];
    }

    for (int i = 0; i < N; ++i) {
        cin >> C[i];
        //C[i] = Random(1, M); cout << C[i] << " \n"[i + 1 == N];
    }

    vector<int> ans = beechtree(N, M, P, C);
    cout << "ANSWER: ";
    for (int it = 0; it < sz(ans); ++it)
        cout << ans[it]; cout << '\n';

    return 0;
}

#endif // Nhoksocqt1
# Verdict Execution time Memory Grader output
1 Correct 3 ms 14684 KB Output is correct
2 Correct 3 ms 14684 KB Output is correct
3 Correct 3 ms 14744 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 14684 KB Output is correct
2 Correct 3 ms 14684 KB Output is correct
3 Correct 3 ms 14680 KB Output is correct
4 Correct 3 ms 14684 KB Output is correct
5 Correct 4 ms 14684 KB Output is correct
6 Correct 3 ms 14680 KB Output is correct
7 Correct 3 ms 14684 KB Output is correct
8 Correct 4 ms 14680 KB Output is correct
9 Correct 3 ms 14684 KB Output is correct
10 Correct 3 ms 14684 KB Output is correct
11 Correct 4 ms 14680 KB Output is correct
12 Correct 4 ms 14684 KB Output is correct
13 Correct 4 ms 14684 KB Output is correct
14 Correct 3 ms 14684 KB Output is correct
15 Correct 3 ms 14684 KB Output is correct
16 Correct 3 ms 14692 KB Output is correct
17 Correct 3 ms 14684 KB Output is correct
18 Correct 3 ms 14684 KB Output is correct
19 Correct 4 ms 14684 KB Output is correct
20 Correct 4 ms 14684 KB Output is correct
21 Correct 3 ms 14684 KB Output is correct
22 Correct 4 ms 14684 KB Output is correct
23 Correct 3 ms 14536 KB Output is correct
24 Correct 3 ms 14684 KB Output is correct
25 Correct 4 ms 14680 KB Output is correct
26 Correct 3 ms 14684 KB Output is correct
27 Correct 3 ms 14684 KB Output is correct
28 Correct 4 ms 14936 KB Output is correct
29 Correct 3 ms 14684 KB Output is correct
30 Correct 3 ms 14684 KB Output is correct
31 Correct 3 ms 14680 KB Output is correct
32 Correct 3 ms 14684 KB Output is correct
33 Correct 3 ms 14684 KB Output is correct
34 Correct 3 ms 14684 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 14684 KB Output is correct
2 Correct 3 ms 14684 KB Output is correct
3 Correct 3 ms 14680 KB Output is correct
4 Correct 3 ms 14684 KB Output is correct
5 Correct 4 ms 14684 KB Output is correct
6 Correct 3 ms 14680 KB Output is correct
7 Correct 68 ms 40912 KB Output is correct
8 Correct 74 ms 41108 KB Output is correct
9 Correct 4 ms 14684 KB Output is correct
10 Correct 4 ms 14684 KB Output is correct
11 Correct 3 ms 14684 KB Output is correct
12 Correct 3 ms 14684 KB Output is correct
13 Correct 4 ms 14940 KB Output is correct
14 Correct 4 ms 14940 KB Output is correct
15 Correct 4 ms 14940 KB Output is correct
16 Correct 4 ms 14936 KB Output is correct
17 Correct 68 ms 40908 KB Output is correct
18 Correct 80 ms 41104 KB Output is correct
19 Correct 74 ms 40904 KB Output is correct
20 Correct 70 ms 40908 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 14680 KB Output is correct
2 Correct 3 ms 14684 KB Output is correct
3 Correct 4 ms 14680 KB Output is correct
4 Correct 3 ms 14684 KB Output is correct
5 Correct 3 ms 14752 KB Output is correct
6 Correct 4 ms 14736 KB Output is correct
7 Correct 3 ms 14684 KB Output is correct
8 Correct 3 ms 14684 KB Output is correct
9 Correct 3 ms 14680 KB Output is correct
10 Correct 4 ms 14684 KB Output is correct
11 Correct 3 ms 14684 KB Output is correct
12 Correct 4 ms 14680 KB Output is correct
13 Correct 4 ms 14684 KB Output is correct
14 Correct 4 ms 14680 KB Output is correct
15 Correct 30 ms 17608 KB Output is correct
16 Correct 29 ms 17368 KB Output is correct
17 Correct 31 ms 17624 KB Output is correct
18 Correct 30 ms 18132 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 14684 KB Output is correct
2 Correct 3 ms 14684 KB Output is correct
3 Correct 3 ms 14684 KB Output is correct
4 Correct 4 ms 14680 KB Output is correct
5 Correct 68 ms 40912 KB Output is correct
6 Correct 74 ms 41108 KB Output is correct
7 Correct 3 ms 14684 KB Output is correct
8 Correct 3 ms 14684 KB Output is correct
9 Correct 5 ms 14936 KB Output is correct
10 Correct 5 ms 14684 KB Output is correct
11 Execution timed out 2028 ms 21528 KB Time limit exceeded
12 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 3 ms 14684 KB Output is correct
2 Correct 3 ms 14684 KB Output is correct
3 Correct 3 ms 14744 KB Output is correct
4 Correct 3 ms 14684 KB Output is correct
5 Correct 3 ms 14684 KB Output is correct
6 Correct 3 ms 14680 KB Output is correct
7 Correct 3 ms 14684 KB Output is correct
8 Correct 4 ms 14684 KB Output is correct
9 Correct 3 ms 14680 KB Output is correct
10 Correct 3 ms 14684 KB Output is correct
11 Correct 4 ms 14680 KB Output is correct
12 Correct 3 ms 14684 KB Output is correct
13 Correct 3 ms 14684 KB Output is correct
14 Correct 4 ms 14680 KB Output is correct
15 Correct 4 ms 14684 KB Output is correct
16 Correct 4 ms 14684 KB Output is correct
17 Correct 3 ms 14684 KB Output is correct
18 Correct 3 ms 14684 KB Output is correct
19 Correct 3 ms 14692 KB Output is correct
20 Correct 3 ms 14684 KB Output is correct
21 Correct 3 ms 14684 KB Output is correct
22 Correct 4 ms 14684 KB Output is correct
23 Correct 4 ms 14684 KB Output is correct
24 Correct 3 ms 14684 KB Output is correct
25 Correct 4 ms 14684 KB Output is correct
26 Correct 3 ms 14536 KB Output is correct
27 Correct 3 ms 14684 KB Output is correct
28 Correct 4 ms 14680 KB Output is correct
29 Correct 3 ms 14684 KB Output is correct
30 Correct 3 ms 14684 KB Output is correct
31 Correct 4 ms 14936 KB Output is correct
32 Correct 3 ms 14684 KB Output is correct
33 Correct 3 ms 14684 KB Output is correct
34 Correct 3 ms 14680 KB Output is correct
35 Correct 3 ms 14684 KB Output is correct
36 Correct 3 ms 14684 KB Output is correct
37 Correct 3 ms 14684 KB Output is correct
38 Correct 4 ms 14684 KB Output is correct
39 Correct 4 ms 14684 KB Output is correct
40 Correct 3 ms 14684 KB Output is correct
41 Correct 3 ms 14684 KB Output is correct
42 Correct 3 ms 14680 KB Output is correct
43 Correct 3 ms 14684 KB Output is correct
44 Correct 4 ms 14680 KB Output is correct
45 Correct 3 ms 14684 KB Output is correct
46 Correct 3 ms 14752 KB Output is correct
47 Correct 4 ms 14736 KB Output is correct
48 Correct 3 ms 14684 KB Output is correct
49 Correct 3 ms 14684 KB Output is correct
50 Correct 3 ms 14680 KB Output is correct
51 Correct 4 ms 14684 KB Output is correct
52 Correct 3 ms 14684 KB Output is correct
53 Correct 3 ms 14684 KB Output is correct
54 Incorrect 3 ms 14936 KB 2nd lines differ - on the 1st token, expected: '1', found: '0'
55 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 3 ms 14684 KB Output is correct
2 Correct 3 ms 14684 KB Output is correct
3 Correct 3 ms 14684 KB Output is correct
4 Correct 4 ms 14680 KB Output is correct
5 Correct 3 ms 14684 KB Output is correct
6 Correct 3 ms 14684 KB Output is correct
7 Correct 4 ms 14680 KB Output is correct
8 Correct 4 ms 14684 KB Output is correct
9 Correct 4 ms 14684 KB Output is correct
10 Correct 3 ms 14684 KB Output is correct
11 Correct 3 ms 14684 KB Output is correct
12 Correct 3 ms 14692 KB Output is correct
13 Correct 3 ms 14684 KB Output is correct
14 Correct 3 ms 14684 KB Output is correct
15 Correct 4 ms 14684 KB Output is correct
16 Correct 4 ms 14684 KB Output is correct
17 Correct 3 ms 14684 KB Output is correct
18 Correct 4 ms 14684 KB Output is correct
19 Correct 3 ms 14536 KB Output is correct
20 Correct 3 ms 14684 KB Output is correct
21 Correct 4 ms 14680 KB Output is correct
22 Correct 3 ms 14684 KB Output is correct
23 Correct 3 ms 14684 KB Output is correct
24 Correct 4 ms 14936 KB Output is correct
25 Correct 4 ms 14940 KB Output is correct
26 Correct 4 ms 14940 KB Output is correct
27 Correct 4 ms 14940 KB Output is correct
28 Correct 5 ms 14940 KB Output is correct
29 Correct 4 ms 14940 KB Output is correct
30 Incorrect 4 ms 14684 KB 2nd lines differ - on the 6th token, expected: '1', found: '0'
31 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 3 ms 14684 KB Output is correct
2 Correct 3 ms 14684 KB Output is correct
3 Correct 3 ms 14744 KB Output is correct
4 Correct 3 ms 14684 KB Output is correct
5 Correct 3 ms 14684 KB Output is correct
6 Correct 3 ms 14680 KB Output is correct
7 Correct 3 ms 14684 KB Output is correct
8 Correct 4 ms 14684 KB Output is correct
9 Correct 3 ms 14680 KB Output is correct
10 Correct 3 ms 14684 KB Output is correct
11 Correct 4 ms 14680 KB Output is correct
12 Correct 3 ms 14684 KB Output is correct
13 Correct 3 ms 14684 KB Output is correct
14 Correct 4 ms 14680 KB Output is correct
15 Correct 4 ms 14684 KB Output is correct
16 Correct 4 ms 14684 KB Output is correct
17 Correct 3 ms 14684 KB Output is correct
18 Correct 3 ms 14684 KB Output is correct
19 Correct 3 ms 14692 KB Output is correct
20 Correct 3 ms 14684 KB Output is correct
21 Correct 3 ms 14684 KB Output is correct
22 Correct 4 ms 14684 KB Output is correct
23 Correct 4 ms 14684 KB Output is correct
24 Correct 3 ms 14684 KB Output is correct
25 Correct 4 ms 14684 KB Output is correct
26 Correct 3 ms 14536 KB Output is correct
27 Correct 3 ms 14684 KB Output is correct
28 Correct 4 ms 14680 KB Output is correct
29 Correct 3 ms 14684 KB Output is correct
30 Correct 3 ms 14684 KB Output is correct
31 Correct 4 ms 14936 KB Output is correct
32 Correct 3 ms 14684 KB Output is correct
33 Correct 3 ms 14684 KB Output is correct
34 Correct 3 ms 14680 KB Output is correct
35 Correct 3 ms 14684 KB Output is correct
36 Correct 3 ms 14684 KB Output is correct
37 Correct 3 ms 14684 KB Output is correct
38 Correct 4 ms 14684 KB Output is correct
39 Correct 4 ms 14684 KB Output is correct
40 Correct 3 ms 14684 KB Output is correct
41 Correct 3 ms 14684 KB Output is correct
42 Correct 4 ms 14940 KB Output is correct
43 Correct 4 ms 14940 KB Output is correct
44 Correct 4 ms 14940 KB Output is correct
45 Correct 4 ms 14936 KB Output is correct
46 Correct 3 ms 14680 KB Output is correct
47 Correct 3 ms 14684 KB Output is correct
48 Correct 4 ms 14680 KB Output is correct
49 Correct 3 ms 14684 KB Output is correct
50 Correct 3 ms 14752 KB Output is correct
51 Correct 4 ms 14736 KB Output is correct
52 Correct 3 ms 14684 KB Output is correct
53 Correct 3 ms 14684 KB Output is correct
54 Correct 3 ms 14680 KB Output is correct
55 Correct 4 ms 14684 KB Output is correct
56 Correct 3 ms 14684 KB Output is correct
57 Correct 4 ms 14680 KB Output is correct
58 Correct 4 ms 14684 KB Output is correct
59 Correct 4 ms 14680 KB Output is correct
60 Correct 3 ms 14684 KB Output is correct
61 Correct 3 ms 14684 KB Output is correct
62 Correct 5 ms 14936 KB Output is correct
63 Correct 5 ms 14684 KB Output is correct
64 Incorrect 3 ms 14936 KB 2nd lines differ - on the 1st token, expected: '1', found: '0'
65 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 3 ms 14684 KB Output is correct
2 Correct 3 ms 14684 KB Output is correct
3 Correct 3 ms 14684 KB Output is correct
4 Correct 4 ms 14680 KB Output is correct
5 Correct 3 ms 14684 KB Output is correct
6 Correct 3 ms 14684 KB Output is correct
7 Correct 4 ms 14680 KB Output is correct
8 Correct 4 ms 14684 KB Output is correct
9 Correct 4 ms 14684 KB Output is correct
10 Correct 3 ms 14684 KB Output is correct
11 Correct 3 ms 14684 KB Output is correct
12 Correct 3 ms 14692 KB Output is correct
13 Correct 3 ms 14684 KB Output is correct
14 Correct 3 ms 14684 KB Output is correct
15 Correct 4 ms 14684 KB Output is correct
16 Correct 4 ms 14684 KB Output is correct
17 Correct 3 ms 14684 KB Output is correct
18 Correct 4 ms 14684 KB Output is correct
19 Correct 3 ms 14536 KB Output is correct
20 Correct 3 ms 14684 KB Output is correct
21 Correct 4 ms 14680 KB Output is correct
22 Correct 3 ms 14684 KB Output is correct
23 Correct 3 ms 14684 KB Output is correct
24 Correct 4 ms 14936 KB Output is correct
25 Correct 4 ms 14940 KB Output is correct
26 Correct 4 ms 14940 KB Output is correct
27 Correct 4 ms 14940 KB Output is correct
28 Correct 5 ms 14940 KB Output is correct
29 Correct 4 ms 14940 KB Output is correct
30 Incorrect 4 ms 14684 KB 2nd lines differ - on the 6th token, expected: '1', found: '0'
31 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 3 ms 14684 KB Output is correct
2 Correct 3 ms 14684 KB Output is correct
3 Correct 3 ms 14744 KB Output is correct
4 Correct 3 ms 14684 KB Output is correct
5 Correct 3 ms 14684 KB Output is correct
6 Correct 3 ms 14680 KB Output is correct
7 Correct 3 ms 14684 KB Output is correct
8 Correct 4 ms 14684 KB Output is correct
9 Correct 3 ms 14680 KB Output is correct
10 Correct 3 ms 14684 KB Output is correct
11 Correct 4 ms 14680 KB Output is correct
12 Correct 3 ms 14684 KB Output is correct
13 Correct 3 ms 14684 KB Output is correct
14 Correct 4 ms 14680 KB Output is correct
15 Correct 4 ms 14684 KB Output is correct
16 Correct 4 ms 14684 KB Output is correct
17 Correct 3 ms 14684 KB Output is correct
18 Correct 3 ms 14684 KB Output is correct
19 Correct 3 ms 14692 KB Output is correct
20 Correct 3 ms 14684 KB Output is correct
21 Correct 3 ms 14684 KB Output is correct
22 Correct 4 ms 14684 KB Output is correct
23 Correct 4 ms 14684 KB Output is correct
24 Correct 3 ms 14684 KB Output is correct
25 Correct 4 ms 14684 KB Output is correct
26 Correct 3 ms 14536 KB Output is correct
27 Correct 3 ms 14684 KB Output is correct
28 Correct 4 ms 14680 KB Output is correct
29 Correct 3 ms 14684 KB Output is correct
30 Correct 3 ms 14684 KB Output is correct
31 Correct 4 ms 14936 KB Output is correct
32 Correct 3 ms 14684 KB Output is correct
33 Correct 3 ms 14684 KB Output is correct
34 Correct 3 ms 14680 KB Output is correct
35 Correct 3 ms 14684 KB Output is correct
36 Correct 3 ms 14684 KB Output is correct
37 Correct 3 ms 14684 KB Output is correct
38 Correct 68 ms 40912 KB Output is correct
39 Correct 74 ms 41108 KB Output is correct
40 Correct 4 ms 14684 KB Output is correct
41 Correct 4 ms 14684 KB Output is correct
42 Correct 3 ms 14684 KB Output is correct
43 Correct 3 ms 14684 KB Output is correct
44 Correct 4 ms 14940 KB Output is correct
45 Correct 4 ms 14940 KB Output is correct
46 Correct 4 ms 14940 KB Output is correct
47 Correct 4 ms 14936 KB Output is correct
48 Correct 68 ms 40908 KB Output is correct
49 Correct 80 ms 41104 KB Output is correct
50 Correct 74 ms 40904 KB Output is correct
51 Correct 70 ms 40908 KB Output is correct
52 Correct 3 ms 14680 KB Output is correct
53 Correct 3 ms 14684 KB Output is correct
54 Correct 4 ms 14680 KB Output is correct
55 Correct 3 ms 14684 KB Output is correct
56 Correct 3 ms 14752 KB Output is correct
57 Correct 4 ms 14736 KB Output is correct
58 Correct 3 ms 14684 KB Output is correct
59 Correct 3 ms 14684 KB Output is correct
60 Correct 3 ms 14680 KB Output is correct
61 Correct 4 ms 14684 KB Output is correct
62 Correct 3 ms 14684 KB Output is correct
63 Correct 4 ms 14680 KB Output is correct
64 Correct 4 ms 14684 KB Output is correct
65 Correct 4 ms 14680 KB Output is correct
66 Correct 30 ms 17608 KB Output is correct
67 Correct 29 ms 17368 KB Output is correct
68 Correct 31 ms 17624 KB Output is correct
69 Correct 30 ms 18132 KB Output is correct
70 Correct 3 ms 14684 KB Output is correct
71 Correct 3 ms 14684 KB Output is correct
72 Correct 5 ms 14936 KB Output is correct
73 Correct 5 ms 14684 KB Output is correct
74 Execution timed out 2028 ms 21528 KB Time limit exceeded
75 Halted 0 ms 0 KB -