Submission #397653

# Submission time Handle Problem Language Result Execution time Memory
397653 2021-05-02T18:37:58 Z phathnv IOI Fever (JOI21_fever) C++11
57 / 100
977 ms 119364 KB
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

const int N = 1e5 + 7;
const int LOGN = 17;
const int INF = 1e9 + 7;

struct Edge{
    int v, w;
    Edge(int _v, int _w){
        v = _v;
        w = _w;
    }
};

int n, x[N], y[N], curInd, ind[N][4], f[N][2][4], nxt[N][2][4][LOGN], ord[N], dist[N * 12];
vector<Edge> adj[N * 12];
bool imp[N];

int Dist(int a, int b){
    int dx = abs(x[a] - x[b]);
    int dy = abs(y[a] - y[b]);
    assert(dx == dy);
    return dx;
}

int Calc(int s){
    for(int i = 1; i <= curInd; i++)
        dist[i] = INF;
    priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>> pq;
    dist[s] = 0;
    pq.push({0, s});
    while (!pq.empty()){
        int u = pq.top().second;
        int d = pq.top().first;
        pq.pop();
        if (d != dist[u])
            continue;
        for(Edge e : adj[u])
            if (dist[e.v] > dist[u] + e.w){
                dist[e.v] = dist[u] + e.w;
                pq.push({dist[e.v], e.v});
            }
        if (u <= 4 * n){
            int dir = (u - 1) % 4;
            u = (u + 3) / 4;
            for(int type = 0; type < 2; type++){
                int v = u;
                for(int i = 16; i >= 0; i--)
                if (Dist(u, nxt[v][type][dir][i]) < d)
                    v = nxt[v][type][dir][i];
                v = nxt[v][type][dir][0];
                if (u != v && Dist(u, v) >= d && dist[f[v][type][dir]] > Dist(u, v)){
                    dist[f[v][type][dir]] = Dist(u, v);
                    pq.push({Dist(u, v), f[v][type][dir]});
                }
            }
        }
    }
    int res = 0;
    for(int i = 1; i <= n; i++)
        for(int dir = 0; dir < 4; dir++)
            res += (dist[ind[i][dir]] != INF);
    return res;
}

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cin >> n;
    for(int i = 1; i <= n; i++){
        cin >> x[i] >> y[i];
        x[i] *= 2;
        y[i] *= 2;
        ord[i] = i;
    }
    for(int i = 1; i <= n; i++)
        for(int dir = 0; dir < 4; dir++)
            ind[i][dir] = ++curInd;
    for(int i = 1; i <= n; i++)
        for(int type = 0; type < 2; type++)
            for(int dir = 0; dir < 4; dir++)
                f[i][type][dir] = ++curInd;
    for(int i = 1; i <= n; i++){
        adj[f[i][0][0]].push_back(Edge(ind[i][3], 0));
        adj[f[i][0][1]].push_back(Edge(ind[i][2], 0));
        adj[f[i][0][2]].push_back(Edge(ind[i][1], 0));
        adj[f[i][0][3]].push_back(Edge(ind[i][0], 0));
        adj[f[i][1][0]].push_back(Edge(ind[i][1], 0));
        adj[f[i][1][1]].push_back(Edge(ind[i][0], 0));
        adj[f[i][1][2]].push_back(Edge(ind[i][3], 0));
        adj[f[i][1][3]].push_back(Edge(ind[i][2], 0));
    }
    sort(ord + 1, ord + 1 + n, [&](const int &a, const int &b){
            return pair<int, int>(x[a] - y[a], x[a]) < pair<int, int>(x[b] - y[b], x[b]);
         });
    for(int l = 1; l <= n; l++){
        int r = l;
        while (r <= n && x[ord[l]] - y[ord[l]] == x[ord[r]] - y[ord[r]])
            r++;
        r--;
        for(int i = l; i <= r; i++){
            int u = ord[i];
            nxt[u][0][0][0] = (i == r? u : ord[i + 1]);
            nxt[u][0][1][0] = (i == r? u : ord[i + 1]);
            nxt[u][0][2][0] = (i == l? u : ord[i - 1]);
            nxt[u][0][3][0] = (i == l? u : ord[i - 1]);
        }
        for(int i = l; i <= r; i++){
            int u = ord[i];
            for(int j = 1; j < LOGN; j++){
                nxt[u][0][2][j] = nxt[nxt[u][0][2][j - 1]][0][2][j - 1];
                nxt[u][0][3][j] = nxt[nxt[u][0][3][j - 1]][0][3][j - 1];
            }
        }
        for(int i = r; i >= l; i--){
            int u = ord[i];
            for(int j = 1; j < LOGN; j++){
                nxt[u][0][0][j] = nxt[nxt[u][0][0][j - 1]][0][0][j - 1];
                nxt[u][0][1][j] = nxt[nxt[u][0][1][j - 1]][0][1][j - 1];
            }
        }
        for(int i = l; i < r; i++){
            int u = ord[i];
            int v = ord[i + 1];
            int d = Dist(u, v);
            adj[f[u][0][0]].push_back(Edge(f[v][0][0], d));
            adj[f[u][0][1]].push_back(Edge(f[v][0][1], d));
            adj[f[v][0][2]].push_back(Edge(f[u][0][2], d));
            adj[f[v][0][3]].push_back(Edge(f[u][0][3], d));
        }
        l = r;
    }
    sort(ord + 1, ord + 1 + n, [&](const int &a, const int &b){
            return pair<int, int>(x[a] + y[a], x[a]) < pair<int, int>(x[b] + y[b], x[b]);
         });
    for(int l = 1; l <= n; l++){
        int r = l;
        while (r <= n && x[ord[l]] + y[ord[l]] == x[ord[r]] + y[ord[r]])
            r++;
        r--;
        for(int i = l; i <= r; i++){
            int u = ord[i];
            nxt[u][1][0][0] = (i == l? u : ord[i - 1]);
            nxt[u][1][1][0] = (i == r? u : ord[i + 1]);
            nxt[u][1][2][0] = (i == r? u : ord[i + 1]);
            nxt[u][1][3][0] = (i == l? u : ord[i - 1]);
        }
        for(int i = l; i <= r; i++){
            int u = ord[i];
            for(int j = 1; j < LOGN; j++){
                nxt[u][1][0][j] = nxt[nxt[u][1][0][j - 1]][1][0][j - 1];
                nxt[u][1][3][j] = nxt[nxt[u][1][3][j - 1]][1][3][j - 1];
            }
        }
        for(int i = r; i >= l; i--){
            int u = ord[i];
            for(int j = 1; j < LOGN; j++){
                nxt[u][1][1][j] = nxt[nxt[u][1][1][j - 1]][1][1][j - 1];
                nxt[u][1][2][j] = nxt[nxt[u][1][2][j - 1]][1][2][j - 1];
            }
        }
        for(int i = l; i < r; i++){
            int u = ord[i];
            int v = ord[i + 1];
            int d = Dist(u, v);
            adj[f[v][1][0]].push_back(Edge(f[u][1][0], d));
            adj[f[u][1][1]].push_back(Edge(f[v][1][1], d));
            adj[f[u][1][2]].push_back(Edge(f[v][1][2], d));
            adj[f[v][1][3]].push_back(Edge(f[u][1][3], d));
        }
        l = r;
    }

    int res = 0;
    for(int dir = 0; dir < 4; dir++)
        res = max(res, Calc(ind[1][dir]));
    cout << res;

    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 18 ms 28492 KB Output is correct
2 Correct 18 ms 28544 KB Output is correct
3 Correct 18 ms 28544 KB Output is correct
4 Correct 18 ms 28492 KB Output is correct
5 Correct 19 ms 28492 KB Output is correct
6 Correct 18 ms 28544 KB Output is correct
7 Correct 18 ms 28476 KB Output is correct
8 Correct 18 ms 28492 KB Output is correct
9 Correct 19 ms 28444 KB Output is correct
10 Correct 18 ms 28508 KB Output is correct
11 Correct 18 ms 28492 KB Output is correct
12 Correct 19 ms 28492 KB Output is correct
13 Correct 18 ms 28440 KB Output is correct
14 Correct 18 ms 28556 KB Output is correct
15 Correct 18 ms 28492 KB Output is correct
16 Correct 19 ms 28460 KB Output is correct
17 Correct 19 ms 28488 KB Output is correct
18 Correct 20 ms 28620 KB Output is correct
19 Correct 19 ms 28492 KB Output is correct
20 Correct 19 ms 28488 KB Output is correct
21 Correct 18 ms 28492 KB Output is correct
22 Correct 19 ms 28492 KB Output is correct
23 Correct 18 ms 28552 KB Output is correct
24 Correct 19 ms 28476 KB Output is correct
25 Correct 19 ms 28656 KB Output is correct
26 Correct 18 ms 28520 KB Output is correct
27 Correct 19 ms 28480 KB Output is correct
28 Correct 19 ms 28492 KB Output is correct
29 Correct 18 ms 28492 KB Output is correct
30 Correct 19 ms 28492 KB Output is correct
31 Correct 19 ms 28496 KB Output is correct
32 Correct 20 ms 28496 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 18 ms 28492 KB Output is correct
2 Correct 18 ms 28544 KB Output is correct
3 Correct 18 ms 28544 KB Output is correct
4 Correct 18 ms 28492 KB Output is correct
5 Correct 19 ms 28492 KB Output is correct
6 Correct 18 ms 28544 KB Output is correct
7 Correct 18 ms 28476 KB Output is correct
8 Correct 18 ms 28492 KB Output is correct
9 Correct 19 ms 28444 KB Output is correct
10 Correct 18 ms 28508 KB Output is correct
11 Correct 18 ms 28492 KB Output is correct
12 Correct 19 ms 28492 KB Output is correct
13 Correct 18 ms 28440 KB Output is correct
14 Correct 18 ms 28556 KB Output is correct
15 Correct 18 ms 28492 KB Output is correct
16 Correct 19 ms 28460 KB Output is correct
17 Correct 19 ms 28488 KB Output is correct
18 Correct 20 ms 28620 KB Output is correct
19 Correct 19 ms 28492 KB Output is correct
20 Correct 19 ms 28488 KB Output is correct
21 Correct 18 ms 28492 KB Output is correct
22 Correct 19 ms 28492 KB Output is correct
23 Correct 18 ms 28552 KB Output is correct
24 Correct 19 ms 28476 KB Output is correct
25 Correct 19 ms 28656 KB Output is correct
26 Correct 18 ms 28520 KB Output is correct
27 Correct 19 ms 28480 KB Output is correct
28 Correct 19 ms 28492 KB Output is correct
29 Correct 18 ms 28492 KB Output is correct
30 Correct 19 ms 28492 KB Output is correct
31 Correct 19 ms 28496 KB Output is correct
32 Correct 20 ms 28496 KB Output is correct
33 Correct 20 ms 28492 KB Output is correct
34 Correct 20 ms 28492 KB Output is correct
35 Correct 21 ms 28568 KB Output is correct
36 Correct 18 ms 28616 KB Output is correct
37 Correct 18 ms 28456 KB Output is correct
38 Correct 19 ms 28528 KB Output is correct
39 Correct 18 ms 28444 KB Output is correct
40 Correct 19 ms 28492 KB Output is correct
41 Correct 18 ms 28492 KB Output is correct
42 Correct 19 ms 28492 KB Output is correct
43 Correct 18 ms 28492 KB Output is correct
44 Correct 18 ms 28444 KB Output is correct
45 Correct 19 ms 28568 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 18 ms 28552 KB Output is correct
2 Correct 18 ms 28540 KB Output is correct
3 Correct 18 ms 28604 KB Output is correct
4 Correct 19 ms 28520 KB Output is correct
5 Correct 19 ms 28624 KB Output is correct
6 Correct 18 ms 28524 KB Output is correct
7 Correct 18 ms 28608 KB Output is correct
8 Correct 19 ms 28748 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 18 ms 28492 KB Output is correct
2 Correct 18 ms 28544 KB Output is correct
3 Correct 18 ms 28544 KB Output is correct
4 Correct 18 ms 28492 KB Output is correct
5 Correct 19 ms 28492 KB Output is correct
6 Correct 18 ms 28544 KB Output is correct
7 Correct 18 ms 28476 KB Output is correct
8 Correct 18 ms 28492 KB Output is correct
9 Correct 19 ms 28444 KB Output is correct
10 Correct 18 ms 28508 KB Output is correct
11 Correct 18 ms 28492 KB Output is correct
12 Correct 19 ms 28492 KB Output is correct
13 Correct 18 ms 28440 KB Output is correct
14 Correct 18 ms 28556 KB Output is correct
15 Correct 18 ms 28492 KB Output is correct
16 Correct 19 ms 28460 KB Output is correct
17 Correct 19 ms 28488 KB Output is correct
18 Correct 20 ms 28620 KB Output is correct
19 Correct 19 ms 28492 KB Output is correct
20 Correct 19 ms 28488 KB Output is correct
21 Correct 18 ms 28492 KB Output is correct
22 Correct 19 ms 28492 KB Output is correct
23 Correct 18 ms 28552 KB Output is correct
24 Correct 19 ms 28476 KB Output is correct
25 Correct 19 ms 28656 KB Output is correct
26 Correct 18 ms 28520 KB Output is correct
27 Correct 19 ms 28480 KB Output is correct
28 Correct 19 ms 28492 KB Output is correct
29 Correct 18 ms 28492 KB Output is correct
30 Correct 19 ms 28492 KB Output is correct
31 Correct 19 ms 28496 KB Output is correct
32 Correct 20 ms 28496 KB Output is correct
33 Correct 20 ms 28492 KB Output is correct
34 Correct 20 ms 28492 KB Output is correct
35 Correct 21 ms 28568 KB Output is correct
36 Correct 18 ms 28616 KB Output is correct
37 Correct 18 ms 28456 KB Output is correct
38 Correct 19 ms 28528 KB Output is correct
39 Correct 18 ms 28444 KB Output is correct
40 Correct 19 ms 28492 KB Output is correct
41 Correct 18 ms 28492 KB Output is correct
42 Correct 19 ms 28492 KB Output is correct
43 Correct 18 ms 28492 KB Output is correct
44 Correct 18 ms 28444 KB Output is correct
45 Correct 19 ms 28568 KB Output is correct
46 Correct 18 ms 28552 KB Output is correct
47 Correct 18 ms 28540 KB Output is correct
48 Correct 18 ms 28604 KB Output is correct
49 Correct 19 ms 28520 KB Output is correct
50 Correct 19 ms 28624 KB Output is correct
51 Correct 18 ms 28524 KB Output is correct
52 Correct 18 ms 28608 KB Output is correct
53 Correct 19 ms 28748 KB Output is correct
54 Correct 19 ms 28640 KB Output is correct
55 Correct 18 ms 28620 KB Output is correct
56 Correct 17 ms 28584 KB Output is correct
57 Correct 19 ms 28620 KB Output is correct
58 Correct 19 ms 28636 KB Output is correct
59 Correct 18 ms 28632 KB Output is correct
60 Correct 18 ms 28596 KB Output is correct
61 Correct 18 ms 28620 KB Output is correct
62 Correct 19 ms 28620 KB Output is correct
63 Correct 19 ms 28620 KB Output is correct
64 Correct 18 ms 28540 KB Output is correct
65 Correct 19 ms 28584 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 18 ms 28492 KB Output is correct
2 Correct 18 ms 28544 KB Output is correct
3 Correct 18 ms 28544 KB Output is correct
4 Correct 18 ms 28492 KB Output is correct
5 Correct 19 ms 28492 KB Output is correct
6 Correct 18 ms 28544 KB Output is correct
7 Correct 18 ms 28476 KB Output is correct
8 Correct 18 ms 28492 KB Output is correct
9 Correct 19 ms 28444 KB Output is correct
10 Correct 18 ms 28508 KB Output is correct
11 Correct 18 ms 28492 KB Output is correct
12 Correct 19 ms 28492 KB Output is correct
13 Correct 18 ms 28440 KB Output is correct
14 Correct 18 ms 28556 KB Output is correct
15 Correct 18 ms 28492 KB Output is correct
16 Correct 19 ms 28460 KB Output is correct
17 Correct 19 ms 28488 KB Output is correct
18 Correct 20 ms 28620 KB Output is correct
19 Correct 19 ms 28492 KB Output is correct
20 Correct 19 ms 28488 KB Output is correct
21 Correct 18 ms 28492 KB Output is correct
22 Correct 19 ms 28492 KB Output is correct
23 Correct 18 ms 28552 KB Output is correct
24 Correct 19 ms 28476 KB Output is correct
25 Correct 19 ms 28656 KB Output is correct
26 Correct 18 ms 28520 KB Output is correct
27 Correct 19 ms 28480 KB Output is correct
28 Correct 19 ms 28492 KB Output is correct
29 Correct 18 ms 28492 KB Output is correct
30 Correct 19 ms 28492 KB Output is correct
31 Correct 19 ms 28496 KB Output is correct
32 Correct 20 ms 28496 KB Output is correct
33 Correct 20 ms 28492 KB Output is correct
34 Correct 20 ms 28492 KB Output is correct
35 Correct 21 ms 28568 KB Output is correct
36 Correct 18 ms 28616 KB Output is correct
37 Correct 18 ms 28456 KB Output is correct
38 Correct 19 ms 28528 KB Output is correct
39 Correct 18 ms 28444 KB Output is correct
40 Correct 19 ms 28492 KB Output is correct
41 Correct 18 ms 28492 KB Output is correct
42 Correct 19 ms 28492 KB Output is correct
43 Correct 18 ms 28492 KB Output is correct
44 Correct 18 ms 28444 KB Output is correct
45 Correct 19 ms 28568 KB Output is correct
46 Correct 18 ms 28552 KB Output is correct
47 Correct 18 ms 28540 KB Output is correct
48 Correct 18 ms 28604 KB Output is correct
49 Correct 19 ms 28520 KB Output is correct
50 Correct 19 ms 28624 KB Output is correct
51 Correct 18 ms 28524 KB Output is correct
52 Correct 18 ms 28608 KB Output is correct
53 Correct 19 ms 28748 KB Output is correct
54 Correct 19 ms 28640 KB Output is correct
55 Correct 18 ms 28620 KB Output is correct
56 Correct 17 ms 28584 KB Output is correct
57 Correct 19 ms 28620 KB Output is correct
58 Correct 19 ms 28636 KB Output is correct
59 Correct 18 ms 28632 KB Output is correct
60 Correct 18 ms 28596 KB Output is correct
61 Correct 18 ms 28620 KB Output is correct
62 Correct 19 ms 28620 KB Output is correct
63 Correct 19 ms 28620 KB Output is correct
64 Correct 18 ms 28540 KB Output is correct
65 Correct 19 ms 28584 KB Output is correct
66 Correct 24 ms 31180 KB Output is correct
67 Correct 22 ms 31180 KB Output is correct
68 Correct 23 ms 31180 KB Output is correct
69 Incorrect 28 ms 31204 KB Output isn't correct
70 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 18 ms 28492 KB Output is correct
2 Correct 18 ms 28544 KB Output is correct
3 Correct 18 ms 28544 KB Output is correct
4 Correct 18 ms 28492 KB Output is correct
5 Correct 19 ms 28492 KB Output is correct
6 Correct 18 ms 28544 KB Output is correct
7 Correct 18 ms 28476 KB Output is correct
8 Correct 18 ms 28492 KB Output is correct
9 Correct 19 ms 28444 KB Output is correct
10 Correct 18 ms 28508 KB Output is correct
11 Correct 18 ms 28492 KB Output is correct
12 Correct 19 ms 28492 KB Output is correct
13 Correct 18 ms 28440 KB Output is correct
14 Correct 18 ms 28556 KB Output is correct
15 Correct 18 ms 28492 KB Output is correct
16 Correct 19 ms 28460 KB Output is correct
17 Correct 19 ms 28488 KB Output is correct
18 Correct 20 ms 28620 KB Output is correct
19 Correct 19 ms 28492 KB Output is correct
20 Correct 19 ms 28488 KB Output is correct
21 Correct 18 ms 28492 KB Output is correct
22 Correct 19 ms 28492 KB Output is correct
23 Correct 18 ms 28552 KB Output is correct
24 Correct 19 ms 28476 KB Output is correct
25 Correct 19 ms 28656 KB Output is correct
26 Correct 18 ms 28520 KB Output is correct
27 Correct 19 ms 28480 KB Output is correct
28 Correct 19 ms 28492 KB Output is correct
29 Correct 18 ms 28492 KB Output is correct
30 Correct 19 ms 28492 KB Output is correct
31 Correct 19 ms 28496 KB Output is correct
32 Correct 20 ms 28496 KB Output is correct
33 Correct 20 ms 28492 KB Output is correct
34 Correct 20 ms 28492 KB Output is correct
35 Correct 21 ms 28568 KB Output is correct
36 Correct 18 ms 28616 KB Output is correct
37 Correct 18 ms 28456 KB Output is correct
38 Correct 19 ms 28528 KB Output is correct
39 Correct 18 ms 28444 KB Output is correct
40 Correct 19 ms 28492 KB Output is correct
41 Correct 18 ms 28492 KB Output is correct
42 Correct 19 ms 28492 KB Output is correct
43 Correct 18 ms 28492 KB Output is correct
44 Correct 18 ms 28444 KB Output is correct
45 Correct 19 ms 28568 KB Output is correct
46 Correct 18 ms 28552 KB Output is correct
47 Correct 18 ms 28540 KB Output is correct
48 Correct 18 ms 28604 KB Output is correct
49 Correct 19 ms 28520 KB Output is correct
50 Correct 19 ms 28624 KB Output is correct
51 Correct 18 ms 28524 KB Output is correct
52 Correct 18 ms 28608 KB Output is correct
53 Correct 19 ms 28748 KB Output is correct
54 Correct 19 ms 28640 KB Output is correct
55 Correct 18 ms 28620 KB Output is correct
56 Correct 17 ms 28584 KB Output is correct
57 Correct 19 ms 28620 KB Output is correct
58 Correct 19 ms 28636 KB Output is correct
59 Correct 18 ms 28632 KB Output is correct
60 Correct 18 ms 28596 KB Output is correct
61 Correct 18 ms 28620 KB Output is correct
62 Correct 19 ms 28620 KB Output is correct
63 Correct 19 ms 28620 KB Output is correct
64 Correct 18 ms 28540 KB Output is correct
65 Correct 19 ms 28584 KB Output is correct
66 Correct 207 ms 99568 KB Output is correct
67 Correct 255 ms 117316 KB Output is correct
68 Correct 215 ms 117276 KB Output is correct
69 Correct 627 ms 117316 KB Output is correct
70 Correct 977 ms 119364 KB Output is correct
71 Correct 216 ms 119236 KB Output is correct
72 Correct 234 ms 118784 KB Output is correct
73 Correct 335 ms 119216 KB Output is correct
74 Correct 214 ms 119188 KB Output is correct
75 Correct 232 ms 119364 KB Output is correct
76 Correct 407 ms 119272 KB Output is correct
77 Correct 223 ms 119236 KB Output is correct
78 Correct 410 ms 119212 KB Output is correct
79 Correct 415 ms 119212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 18 ms 28492 KB Output is correct
2 Correct 18 ms 28544 KB Output is correct
3 Correct 18 ms 28544 KB Output is correct
4 Correct 18 ms 28492 KB Output is correct
5 Correct 19 ms 28492 KB Output is correct
6 Correct 18 ms 28544 KB Output is correct
7 Correct 18 ms 28476 KB Output is correct
8 Correct 18 ms 28492 KB Output is correct
9 Correct 19 ms 28444 KB Output is correct
10 Correct 18 ms 28508 KB Output is correct
11 Correct 18 ms 28492 KB Output is correct
12 Correct 19 ms 28492 KB Output is correct
13 Correct 18 ms 28440 KB Output is correct
14 Correct 18 ms 28556 KB Output is correct
15 Correct 18 ms 28492 KB Output is correct
16 Correct 19 ms 28460 KB Output is correct
17 Correct 19 ms 28488 KB Output is correct
18 Correct 20 ms 28620 KB Output is correct
19 Correct 19 ms 28492 KB Output is correct
20 Correct 19 ms 28488 KB Output is correct
21 Correct 18 ms 28492 KB Output is correct
22 Correct 19 ms 28492 KB Output is correct
23 Correct 18 ms 28552 KB Output is correct
24 Correct 19 ms 28476 KB Output is correct
25 Correct 19 ms 28656 KB Output is correct
26 Correct 18 ms 28520 KB Output is correct
27 Correct 19 ms 28480 KB Output is correct
28 Correct 19 ms 28492 KB Output is correct
29 Correct 18 ms 28492 KB Output is correct
30 Correct 19 ms 28492 KB Output is correct
31 Correct 19 ms 28496 KB Output is correct
32 Correct 20 ms 28496 KB Output is correct
33 Correct 20 ms 28492 KB Output is correct
34 Correct 20 ms 28492 KB Output is correct
35 Correct 21 ms 28568 KB Output is correct
36 Correct 18 ms 28616 KB Output is correct
37 Correct 18 ms 28456 KB Output is correct
38 Correct 19 ms 28528 KB Output is correct
39 Correct 18 ms 28444 KB Output is correct
40 Correct 19 ms 28492 KB Output is correct
41 Correct 18 ms 28492 KB Output is correct
42 Correct 19 ms 28492 KB Output is correct
43 Correct 18 ms 28492 KB Output is correct
44 Correct 18 ms 28444 KB Output is correct
45 Correct 19 ms 28568 KB Output is correct
46 Correct 18 ms 28552 KB Output is correct
47 Correct 18 ms 28540 KB Output is correct
48 Correct 18 ms 28604 KB Output is correct
49 Correct 19 ms 28520 KB Output is correct
50 Correct 19 ms 28624 KB Output is correct
51 Correct 18 ms 28524 KB Output is correct
52 Correct 18 ms 28608 KB Output is correct
53 Correct 19 ms 28748 KB Output is correct
54 Correct 19 ms 28640 KB Output is correct
55 Correct 18 ms 28620 KB Output is correct
56 Correct 17 ms 28584 KB Output is correct
57 Correct 19 ms 28620 KB Output is correct
58 Correct 19 ms 28636 KB Output is correct
59 Correct 18 ms 28632 KB Output is correct
60 Correct 18 ms 28596 KB Output is correct
61 Correct 18 ms 28620 KB Output is correct
62 Correct 19 ms 28620 KB Output is correct
63 Correct 19 ms 28620 KB Output is correct
64 Correct 18 ms 28540 KB Output is correct
65 Correct 19 ms 28584 KB Output is correct
66 Correct 24 ms 31180 KB Output is correct
67 Correct 22 ms 31180 KB Output is correct
68 Correct 23 ms 31180 KB Output is correct
69 Incorrect 28 ms 31204 KB Output isn't correct
70 Halted 0 ms 0 KB -