답안 #802315

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
802315 2023-08-02T11:34:56 Z puppy IOI 바이러스 (JOI21_fever) C++17
19 / 100
39 ms 63048 KB
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <functional>
#define all(v) (v).begin(), (v).end()
using namespace std;
using ll = long long;
struct Dot
{
    ll x, y;
};
int N;
Dot dot[100005];
ll dir[100005];
ll dis[100005][8];
const ll inf = 1e10;
vector<pair<ll, int>> line[4][100005][4];
vector<pair<ll, int>> minor[100005][8];
int id[100005][4];
signed main()
{
    ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    cin >> N;
    for (int i = 1; i <= N; i++) {
        cin >> dot[i].x >> dot[i].y;
        if (i >= 2) {
            dot[i].x -= dot[1].x;
            dot[i].y -= dot[1].y;
        }
    }
    dot[1] = {0, 0};
    int ans = 0;
    for (int k = 0; k < 4; k++) {
        for (int i = 2; i <= N; i++) {
            if (dot[i].y < dot[i].x && -dot[i].x < dot[i].y) {
                dir[i] = 2;
            }
            else if (dot[i].y >= dot[i].x && dot[i].y > -dot[i].x) {
                dir[i] = 3;
            }
            else if (dot[i].y < dot[i].x && dot[i].y <= -dot[i].x) {
                dir[i] = 1;
            }
            else {
                dir[i] = 0;
            }
        }
        vector<ll> cpx[4];
        for (int i = 1; i <= N; i++) {
            cpx[0].push_back(dot[i].y - dot[i].x);
            cpx[1].push_back(dot[i].x + dot[i].y);
            cpx[2].push_back(dot[i].y);
            cpx[3].push_back(dot[i].x);
        }
        for (int k = 0; k < 4; k++) {
            sort(all(cpx[k]));
            cpx[k].erase(unique(all(cpx[k])), cpx[k].end());
        }
        auto lb = [&](int k, ll i)
        {
            return lower_bound(all(cpx[k]), i) - cpx[k].begin();
        };
        for (int k = 0; k < 4; k++) {
            for (int i = 0; i < (int)cpx[k].size(); i++) {
                for (int j = 0; j < 4; j++) {
                    line[k][i][j].clear();
                }
            }
        }
        for (int i = 1; i <= N; i++) {
            for (int j = 0; j < 8; j++) {
                minor[i][j].clear();
            }
        }
        for (int i = 1; i <= N; i++) {
            id[i][0] = lb(0, dot[i].y - dot[i].x);
            id[i][1] = lb(1, dot[i].y + dot[i].x);
            id[i][2] = lb(2, dot[i].y);
            id[i][3] = lb(3, dot[i].x);
            line[0][id[i][0]][dir[i]].push_back(make_pair(dot[i].x, i));
            line[1][id[i][1]][dir[i]].push_back(make_pair(dot[i].x, i));
            line[2][id[i][2]][dir[i]].push_back(make_pair(dot[i].x, i));
            line[3][id[i][3]][dir[i]].push_back(make_pair(dot[i].y, i));
        }
        for (int k = 0; k < 4; k++) {
            for (int i = 0; i < (int)cpx[k].size(); i++) {
                for (int j = 0; j < 4; j++) {
                    sort(all(line[k][i][j]));
                    for (int l = 0; l < (int)line[k][i][j].size() - 1; l++) {
                        if (k < 2) {
                            minor[line[k][i][j][l].second][2*k].push_back(make_pair(2 * (line[k][i][j][l+1].first - line[k][i][j][l].first), line[k][i][j][l+1].second));
                            minor[line[k][i][j][l+1].second][2*k+1].push_back(make_pair(2 * (line[k][i][j][l+1].first - line[k][i][j][l].first), line[k][i][j][l].second));
                        }
                        else {
                            minor[line[k][i][j][l].second][2*k].push_back(make_pair(line[k][i][j][l+1].first - line[k][i][j][l].first, line[k][i][j][l+1].second));
                            minor[line[k][i][j][l+1].second][2*k+1].push_back(make_pair(line[k][i][j][l+1].first - line[k][i][j][l].first, line[k][i][j][l].second));
                        }
                    }
                }
            }
        }
        fill(&dis[0][0], &dis[100004][8], inf);
        priority_queue<pair<int, pair<int, int>>> pq; pq.push(make_pair(0, make_pair(1, -1)));
        while (!pq.empty()) {
            int ver = pq.top().second.first, state = pq.top().second.second;
            ll now = -pq.top().first;
            pq.pop();
            if (state != -1) {
                for (pair<int, int> p: minor[ver][state]) {
                    int nxt = p.second, newdis = now + p.first;
                    if (dis[nxt][state] > newdis) {
                        dis[nxt][state] = newdis;
                        pq.push(make_pair(-newdis, make_pair(nxt, state)));
                    }
                }
            }
            if (dir[ver] == 0) {
                auto it = lower_bound(all(line[0][id[ver][0]][3]), make_pair(dot[ver].x + (now + 1) / 2, -1));
                if (it != line[0][id[ver][0]][3].end() && dis[(*it).second][0] > 2 * ((*it).first - dot[ver].x)) {
                    dis[(*it).second][0] = 2 * ((*it).first - dot[ver].x);
                    pq.push(make_pair(-dis[(*it).second][0], make_pair((*it).second, 0)));
                }
                auto it2 = lower_bound(all(line[1][id[ver][1]][1]), make_pair(dot[ver].x + (now + 1) / 2, -1));
                if (it2 != line[1][id[ver][1]][1].end() && dis[(*it2).second][2] > 2 * ((*it2).first - dot[ver].x)) {
                    dis[(*it2).second][2] = 2 * ((*it2).first - dot[ver].x);
                    pq.push(make_pair(-dis[(*it2).second][2], make_pair((*it2).second, 2)));
                }
                auto it3 = lower_bound(all(line[2][id[ver][2]][2]), make_pair(dot[ver].x + now, -1));
                if (it3 != line[2][id[ver][2]][2].end() && dis[(*it3).second][4] > (*it3).first - dot[ver].x) {
                    dis[(*it3).second][4] = (*it3).first - dot[ver].x;
                    pq.push(make_pair(-dis[(*it3).second][4], make_pair((*it3).second, 4)));
                }
            }
            else if (dir[ver] == 1) {
                auto it = lower_bound(all(line[0][id[ver][0]][2]), make_pair(dot[ver].x + (now + 1) / 2, -1));
                if (it != line[0][id[ver][0]][2].end() && dis[(*it).second][0] > 2 * ((*it).first - dot[ver].x)) {
                    dis[(*it).second][0] = 2 * ((*it).first - dot[ver].x);
                    pq.push(make_pair(-dis[(*it).second][0], make_pair((*it).second, 0)));
                }
                auto it2 = lower_bound(all(line[1][id[ver][1]][0]), make_pair(dot[ver].x - (now + 1) / 2 + 1, -1));
                if (it2 != line[1][id[ver][1]][0].begin()) {
                    --it2;
                    if (dis[(*it2).second][3] > 2 * (dot[ver].x - (*it2).first)) {
                        dis[(*it2).second][3] = 2 * (dot[ver].x - (*it2).first);
                        pq.push(make_pair(-dis[(*it2).second][3], make_pair((*it2).second, 3)));
                    }
                }
                auto it3 = lower_bound(all(line[3][id[ver][3]][3]), make_pair(dot[ver].y + now, -1));
                if (it3 != line[3][id[ver][3]][3].end() && dis[(*it3).second][6] > (*it3).first - dot[ver].y) {
                    dis[(*it3).second][6] = (*it3).first - dot[ver].y;
                    pq.push(make_pair(-dis[(*it3).second][6], make_pair((*it3).second, 6)));
                }
            }
            else if (dir[ver] == 2) {
                auto it = lower_bound(all(line[0][id[ver][0]][1]), make_pair(dot[ver].x - (now + 1) / 2 + 1, -1));
                if (it != line[0][id[ver][0]][1].begin()) {
                    --it;
                    if (dis[(*it).second][1] > 2 * (dot[ver].x - (*it).first)) {
                        dis[(*it).second][1] = 2 * (dot[ver].x - (*it).first);
                        pq.push(make_pair(-dis[(*it).second][1], make_pair((*it).second, 1)));
                    }
                }
                auto it2 = lower_bound(all(line[1][id[ver][1]][3]), make_pair(dot[ver].x - (now + 1) / 2 + 1, -1));
                if (it2 != line[1][id[ver][1]][3].begin()) {
                    --it2;
                    if (dis[(*it2).second][3] > 2 * (dot[ver].x - (*it2).first)) {
                        dis[(*it2).second][3] = 2 * (dot[ver].x - (*it2).first);
                        pq.push(make_pair(-dis[(*it2).second][3], make_pair((*it2).second, 3)));
                    }
                }
                auto it3 = lower_bound(all(line[2][id[ver][2]][0]), make_pair(dot[ver].x - now + 1, -1));
                if (it3 != line[2][id[ver][2]][0].begin()) {
                    --it3;
                    if (dis[(*it3).second][5] > dot[ver].x - (*it3).first) {
                        dis[(*it3).second][5] = dot[ver].x - (*it3).first;
                        pq.push(make_pair(-dis[(*it3).second][5], make_pair((*it3).second, 5)));
                    }
                }
            }
            else {
                auto it = lower_bound(all(line[0][id[ver][0]][0]), make_pair(dot[ver].x - (now + 1) / 2 + 1, -1));
                if (it != line[0][id[ver][0]][0].begin()) {
                    --it;
                    if (dis[(*it).second][1] > 2 * (dot[ver].x - (*it).first)) {
                        dis[(*it).second][1] = 2 * (dot[ver].x - (*it).first);
                        pq.push(make_pair(-dis[(*it).second][1], make_pair((*it).second, 1)));
                    }
                }
                auto it2 = lower_bound(all(line[1][id[ver][1]][2]), make_pair(dot[ver].x + (now + 1) / 2, -1));
                if (it2 != line[1][id[ver][1]][2].end() && dis[(*it2).second][2] > 2 * ((*it2).first - dot[ver].x)) {
                    dis[(*it2).second][2] = 2 * ((*it).first - dot[ver].x);
                    pq.push(make_pair(-dis[(*it2).second][2], make_pair((*it2).second, 2)));
                }
                auto it3 = lower_bound(all(line[3][id[ver][3]][1]), make_pair(dot[ver].x - now + 1, -1));
                if (it3 != line[3][id[ver][3]][1].begin()) {
                    --it3;
                    if (dis[(*it3).second][7] > dot[ver].y - (*it3).first) {
                        dis[(*it3).second][7] = dot[ver].y - (*it3).first;
                        pq.push(make_pair(-dis[(*it3).second][7], make_pair((*it3).second, 7)));
                    }
                }
            }
        }
        int res = 1;
        for (int i = 2; i <= N; i++) {
            bool flag = false;
            for (int j = 0; j < 8; j++) flag |= dis[i][j] != inf;
            res += flag;
        }
        ans = max(ans, res);
        for (int i = 2; i <= N; i++) {
            ll tmp = dot[i].y;
            dot[i].y = dot[i].x;
            dot[i].x = -tmp;
        }
        dir[1] = 0;
    }
    cout << ans << '\n';
}
# 결과 실행 시간 메모리 Grader output
1 Correct 30 ms 62868 KB Output is correct
2 Correct 29 ms 62816 KB Output is correct
3 Correct 30 ms 62840 KB Output is correct
4 Correct 29 ms 62916 KB Output is correct
5 Correct 30 ms 62952 KB Output is correct
6 Correct 30 ms 62924 KB Output is correct
7 Correct 32 ms 62932 KB Output is correct
8 Correct 34 ms 62920 KB Output is correct
9 Correct 32 ms 62892 KB Output is correct
10 Correct 39 ms 62840 KB Output is correct
11 Correct 32 ms 62848 KB Output is correct
12 Correct 31 ms 62848 KB Output is correct
13 Correct 33 ms 62932 KB Output is correct
14 Correct 30 ms 62924 KB Output is correct
15 Correct 38 ms 62868 KB Output is correct
16 Correct 28 ms 62884 KB Output is correct
17 Correct 28 ms 62964 KB Output is correct
18 Correct 28 ms 62912 KB Output is correct
19 Correct 28 ms 62940 KB Output is correct
20 Correct 28 ms 63048 KB Output is correct
21 Correct 27 ms 62896 KB Output is correct
22 Correct 27 ms 62960 KB Output is correct
23 Correct 36 ms 62880 KB Output is correct
24 Correct 35 ms 62900 KB Output is correct
25 Correct 27 ms 62932 KB Output is correct
26 Correct 27 ms 62924 KB Output is correct
27 Correct 36 ms 62920 KB Output is correct
28 Correct 36 ms 62924 KB Output is correct
29 Correct 27 ms 62912 KB Output is correct
30 Correct 26 ms 62856 KB Output is correct
31 Correct 30 ms 62944 KB Output is correct
32 Correct 33 ms 62948 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 30 ms 62868 KB Output is correct
2 Correct 29 ms 62816 KB Output is correct
3 Correct 30 ms 62840 KB Output is correct
4 Correct 29 ms 62916 KB Output is correct
5 Correct 30 ms 62952 KB Output is correct
6 Correct 30 ms 62924 KB Output is correct
7 Correct 32 ms 62932 KB Output is correct
8 Correct 34 ms 62920 KB Output is correct
9 Correct 32 ms 62892 KB Output is correct
10 Correct 39 ms 62840 KB Output is correct
11 Correct 32 ms 62848 KB Output is correct
12 Correct 31 ms 62848 KB Output is correct
13 Correct 33 ms 62932 KB Output is correct
14 Correct 30 ms 62924 KB Output is correct
15 Correct 38 ms 62868 KB Output is correct
16 Correct 28 ms 62884 KB Output is correct
17 Correct 28 ms 62964 KB Output is correct
18 Correct 28 ms 62912 KB Output is correct
19 Correct 28 ms 62940 KB Output is correct
20 Correct 28 ms 63048 KB Output is correct
21 Correct 27 ms 62896 KB Output is correct
22 Correct 27 ms 62960 KB Output is correct
23 Correct 36 ms 62880 KB Output is correct
24 Correct 35 ms 62900 KB Output is correct
25 Correct 27 ms 62932 KB Output is correct
26 Correct 27 ms 62924 KB Output is correct
27 Correct 36 ms 62920 KB Output is correct
28 Correct 36 ms 62924 KB Output is correct
29 Correct 27 ms 62912 KB Output is correct
30 Correct 26 ms 62856 KB Output is correct
31 Correct 30 ms 62944 KB Output is correct
32 Correct 33 ms 62948 KB Output is correct
33 Correct 31 ms 62936 KB Output is correct
34 Correct 30 ms 62896 KB Output is correct
35 Correct 31 ms 62968 KB Output is correct
36 Correct 32 ms 62952 KB Output is correct
37 Correct 33 ms 62952 KB Output is correct
38 Correct 36 ms 62844 KB Output is correct
39 Correct 29 ms 62896 KB Output is correct
40 Correct 29 ms 62908 KB Output is correct
41 Correct 28 ms 62888 KB Output is correct
42 Correct 33 ms 62984 KB Output is correct
43 Correct 32 ms 62884 KB Output is correct
44 Correct 33 ms 62952 KB Output is correct
45 Correct 30 ms 62952 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 31 ms 62968 KB Output is correct
2 Correct 34 ms 62960 KB Output is correct
3 Correct 36 ms 62932 KB Output is correct
4 Correct 32 ms 62900 KB Output is correct
5 Correct 32 ms 62988 KB Output is correct
6 Correct 31 ms 63020 KB Output is correct
7 Correct 37 ms 62992 KB Output is correct
8 Correct 37 ms 63008 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 30 ms 62868 KB Output is correct
2 Correct 29 ms 62816 KB Output is correct
3 Correct 30 ms 62840 KB Output is correct
4 Correct 29 ms 62916 KB Output is correct
5 Correct 30 ms 62952 KB Output is correct
6 Correct 30 ms 62924 KB Output is correct
7 Correct 32 ms 62932 KB Output is correct
8 Correct 34 ms 62920 KB Output is correct
9 Correct 32 ms 62892 KB Output is correct
10 Correct 39 ms 62840 KB Output is correct
11 Correct 32 ms 62848 KB Output is correct
12 Correct 31 ms 62848 KB Output is correct
13 Correct 33 ms 62932 KB Output is correct
14 Correct 30 ms 62924 KB Output is correct
15 Correct 38 ms 62868 KB Output is correct
16 Correct 28 ms 62884 KB Output is correct
17 Correct 28 ms 62964 KB Output is correct
18 Correct 28 ms 62912 KB Output is correct
19 Correct 28 ms 62940 KB Output is correct
20 Correct 28 ms 63048 KB Output is correct
21 Correct 27 ms 62896 KB Output is correct
22 Correct 27 ms 62960 KB Output is correct
23 Correct 36 ms 62880 KB Output is correct
24 Correct 35 ms 62900 KB Output is correct
25 Correct 27 ms 62932 KB Output is correct
26 Correct 27 ms 62924 KB Output is correct
27 Correct 36 ms 62920 KB Output is correct
28 Correct 36 ms 62924 KB Output is correct
29 Correct 27 ms 62912 KB Output is correct
30 Correct 26 ms 62856 KB Output is correct
31 Correct 30 ms 62944 KB Output is correct
32 Correct 33 ms 62948 KB Output is correct
33 Correct 31 ms 62936 KB Output is correct
34 Correct 30 ms 62896 KB Output is correct
35 Correct 31 ms 62968 KB Output is correct
36 Correct 32 ms 62952 KB Output is correct
37 Correct 33 ms 62952 KB Output is correct
38 Correct 36 ms 62844 KB Output is correct
39 Correct 29 ms 62896 KB Output is correct
40 Correct 29 ms 62908 KB Output is correct
41 Correct 28 ms 62888 KB Output is correct
42 Correct 33 ms 62984 KB Output is correct
43 Correct 32 ms 62884 KB Output is correct
44 Correct 33 ms 62952 KB Output is correct
45 Correct 30 ms 62952 KB Output is correct
46 Correct 31 ms 62968 KB Output is correct
47 Correct 34 ms 62960 KB Output is correct
48 Correct 36 ms 62932 KB Output is correct
49 Correct 32 ms 62900 KB Output is correct
50 Correct 32 ms 62988 KB Output is correct
51 Correct 31 ms 63020 KB Output is correct
52 Correct 37 ms 62992 KB Output is correct
53 Correct 37 ms 63008 KB Output is correct
54 Correct 34 ms 62956 KB Output is correct
55 Correct 32 ms 62956 KB Output is correct
56 Correct 36 ms 62960 KB Output is correct
57 Correct 35 ms 62956 KB Output is correct
58 Correct 31 ms 62948 KB Output is correct
59 Incorrect 34 ms 62940 KB Output isn't correct
60 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 30 ms 62868 KB Output is correct
2 Correct 29 ms 62816 KB Output is correct
3 Correct 30 ms 62840 KB Output is correct
4 Correct 29 ms 62916 KB Output is correct
5 Correct 30 ms 62952 KB Output is correct
6 Correct 30 ms 62924 KB Output is correct
7 Correct 32 ms 62932 KB Output is correct
8 Correct 34 ms 62920 KB Output is correct
9 Correct 32 ms 62892 KB Output is correct
10 Correct 39 ms 62840 KB Output is correct
11 Correct 32 ms 62848 KB Output is correct
12 Correct 31 ms 62848 KB Output is correct
13 Correct 33 ms 62932 KB Output is correct
14 Correct 30 ms 62924 KB Output is correct
15 Correct 38 ms 62868 KB Output is correct
16 Correct 28 ms 62884 KB Output is correct
17 Correct 28 ms 62964 KB Output is correct
18 Correct 28 ms 62912 KB Output is correct
19 Correct 28 ms 62940 KB Output is correct
20 Correct 28 ms 63048 KB Output is correct
21 Correct 27 ms 62896 KB Output is correct
22 Correct 27 ms 62960 KB Output is correct
23 Correct 36 ms 62880 KB Output is correct
24 Correct 35 ms 62900 KB Output is correct
25 Correct 27 ms 62932 KB Output is correct
26 Correct 27 ms 62924 KB Output is correct
27 Correct 36 ms 62920 KB Output is correct
28 Correct 36 ms 62924 KB Output is correct
29 Correct 27 ms 62912 KB Output is correct
30 Correct 26 ms 62856 KB Output is correct
31 Correct 30 ms 62944 KB Output is correct
32 Correct 33 ms 62948 KB Output is correct
33 Correct 31 ms 62936 KB Output is correct
34 Correct 30 ms 62896 KB Output is correct
35 Correct 31 ms 62968 KB Output is correct
36 Correct 32 ms 62952 KB Output is correct
37 Correct 33 ms 62952 KB Output is correct
38 Correct 36 ms 62844 KB Output is correct
39 Correct 29 ms 62896 KB Output is correct
40 Correct 29 ms 62908 KB Output is correct
41 Correct 28 ms 62888 KB Output is correct
42 Correct 33 ms 62984 KB Output is correct
43 Correct 32 ms 62884 KB Output is correct
44 Correct 33 ms 62952 KB Output is correct
45 Correct 30 ms 62952 KB Output is correct
46 Correct 31 ms 62968 KB Output is correct
47 Correct 34 ms 62960 KB Output is correct
48 Correct 36 ms 62932 KB Output is correct
49 Correct 32 ms 62900 KB Output is correct
50 Correct 32 ms 62988 KB Output is correct
51 Correct 31 ms 63020 KB Output is correct
52 Correct 37 ms 62992 KB Output is correct
53 Correct 37 ms 63008 KB Output is correct
54 Correct 34 ms 62956 KB Output is correct
55 Correct 32 ms 62956 KB Output is correct
56 Correct 36 ms 62960 KB Output is correct
57 Correct 35 ms 62956 KB Output is correct
58 Correct 31 ms 62948 KB Output is correct
59 Incorrect 34 ms 62940 KB Output isn't correct
60 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 30 ms 62868 KB Output is correct
2 Correct 29 ms 62816 KB Output is correct
3 Correct 30 ms 62840 KB Output is correct
4 Correct 29 ms 62916 KB Output is correct
5 Correct 30 ms 62952 KB Output is correct
6 Correct 30 ms 62924 KB Output is correct
7 Correct 32 ms 62932 KB Output is correct
8 Correct 34 ms 62920 KB Output is correct
9 Correct 32 ms 62892 KB Output is correct
10 Correct 39 ms 62840 KB Output is correct
11 Correct 32 ms 62848 KB Output is correct
12 Correct 31 ms 62848 KB Output is correct
13 Correct 33 ms 62932 KB Output is correct
14 Correct 30 ms 62924 KB Output is correct
15 Correct 38 ms 62868 KB Output is correct
16 Correct 28 ms 62884 KB Output is correct
17 Correct 28 ms 62964 KB Output is correct
18 Correct 28 ms 62912 KB Output is correct
19 Correct 28 ms 62940 KB Output is correct
20 Correct 28 ms 63048 KB Output is correct
21 Correct 27 ms 62896 KB Output is correct
22 Correct 27 ms 62960 KB Output is correct
23 Correct 36 ms 62880 KB Output is correct
24 Correct 35 ms 62900 KB Output is correct
25 Correct 27 ms 62932 KB Output is correct
26 Correct 27 ms 62924 KB Output is correct
27 Correct 36 ms 62920 KB Output is correct
28 Correct 36 ms 62924 KB Output is correct
29 Correct 27 ms 62912 KB Output is correct
30 Correct 26 ms 62856 KB Output is correct
31 Correct 30 ms 62944 KB Output is correct
32 Correct 33 ms 62948 KB Output is correct
33 Correct 31 ms 62936 KB Output is correct
34 Correct 30 ms 62896 KB Output is correct
35 Correct 31 ms 62968 KB Output is correct
36 Correct 32 ms 62952 KB Output is correct
37 Correct 33 ms 62952 KB Output is correct
38 Correct 36 ms 62844 KB Output is correct
39 Correct 29 ms 62896 KB Output is correct
40 Correct 29 ms 62908 KB Output is correct
41 Correct 28 ms 62888 KB Output is correct
42 Correct 33 ms 62984 KB Output is correct
43 Correct 32 ms 62884 KB Output is correct
44 Correct 33 ms 62952 KB Output is correct
45 Correct 30 ms 62952 KB Output is correct
46 Correct 31 ms 62968 KB Output is correct
47 Correct 34 ms 62960 KB Output is correct
48 Correct 36 ms 62932 KB Output is correct
49 Correct 32 ms 62900 KB Output is correct
50 Correct 32 ms 62988 KB Output is correct
51 Correct 31 ms 63020 KB Output is correct
52 Correct 37 ms 62992 KB Output is correct
53 Correct 37 ms 63008 KB Output is correct
54 Correct 34 ms 62956 KB Output is correct
55 Correct 32 ms 62956 KB Output is correct
56 Correct 36 ms 62960 KB Output is correct
57 Correct 35 ms 62956 KB Output is correct
58 Correct 31 ms 62948 KB Output is correct
59 Incorrect 34 ms 62940 KB Output isn't correct
60 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 30 ms 62868 KB Output is correct
2 Correct 29 ms 62816 KB Output is correct
3 Correct 30 ms 62840 KB Output is correct
4 Correct 29 ms 62916 KB Output is correct
5 Correct 30 ms 62952 KB Output is correct
6 Correct 30 ms 62924 KB Output is correct
7 Correct 32 ms 62932 KB Output is correct
8 Correct 34 ms 62920 KB Output is correct
9 Correct 32 ms 62892 KB Output is correct
10 Correct 39 ms 62840 KB Output is correct
11 Correct 32 ms 62848 KB Output is correct
12 Correct 31 ms 62848 KB Output is correct
13 Correct 33 ms 62932 KB Output is correct
14 Correct 30 ms 62924 KB Output is correct
15 Correct 38 ms 62868 KB Output is correct
16 Correct 28 ms 62884 KB Output is correct
17 Correct 28 ms 62964 KB Output is correct
18 Correct 28 ms 62912 KB Output is correct
19 Correct 28 ms 62940 KB Output is correct
20 Correct 28 ms 63048 KB Output is correct
21 Correct 27 ms 62896 KB Output is correct
22 Correct 27 ms 62960 KB Output is correct
23 Correct 36 ms 62880 KB Output is correct
24 Correct 35 ms 62900 KB Output is correct
25 Correct 27 ms 62932 KB Output is correct
26 Correct 27 ms 62924 KB Output is correct
27 Correct 36 ms 62920 KB Output is correct
28 Correct 36 ms 62924 KB Output is correct
29 Correct 27 ms 62912 KB Output is correct
30 Correct 26 ms 62856 KB Output is correct
31 Correct 30 ms 62944 KB Output is correct
32 Correct 33 ms 62948 KB Output is correct
33 Correct 31 ms 62936 KB Output is correct
34 Correct 30 ms 62896 KB Output is correct
35 Correct 31 ms 62968 KB Output is correct
36 Correct 32 ms 62952 KB Output is correct
37 Correct 33 ms 62952 KB Output is correct
38 Correct 36 ms 62844 KB Output is correct
39 Correct 29 ms 62896 KB Output is correct
40 Correct 29 ms 62908 KB Output is correct
41 Correct 28 ms 62888 KB Output is correct
42 Correct 33 ms 62984 KB Output is correct
43 Correct 32 ms 62884 KB Output is correct
44 Correct 33 ms 62952 KB Output is correct
45 Correct 30 ms 62952 KB Output is correct
46 Correct 31 ms 62968 KB Output is correct
47 Correct 34 ms 62960 KB Output is correct
48 Correct 36 ms 62932 KB Output is correct
49 Correct 32 ms 62900 KB Output is correct
50 Correct 32 ms 62988 KB Output is correct
51 Correct 31 ms 63020 KB Output is correct
52 Correct 37 ms 62992 KB Output is correct
53 Correct 37 ms 63008 KB Output is correct
54 Correct 34 ms 62956 KB Output is correct
55 Correct 32 ms 62956 KB Output is correct
56 Correct 36 ms 62960 KB Output is correct
57 Correct 35 ms 62956 KB Output is correct
58 Correct 31 ms 62948 KB Output is correct
59 Incorrect 34 ms 62940 KB Output isn't correct
60 Halted 0 ms 0 KB -