답안 #837466

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
837466 2023-08-25T11:11:33 Z QwertyPi 분수 공원 (IOI21_parks) C++17
70 / 100
1274 ms 84980 KB
#include "parks.h"
#include <bits/stdc++.h>
#define all(x) x.begin(), x.end()
using namespace std;

const int N_MAX = 2e5 + 11;

struct point{
    int x, y;
    bool operator< (const point& o) const {
        return x < o.x || (x == o.x && y < o.y);
    }
};

struct edge{
    int u, v;
};

int n;
map<point, int> mp;
vector<point> a;

struct DSU{
    int dsu[N_MAX];
    void init(int n){
        for(int i = 0; i < n; i++) dsu[i] = i;
    }
    int f(int x){ return x == dsu[x] ? x : dsu[x] = f(dsu[x]); }
    void g(int x, int y){ x = f(x), y = f(y); dsu[x] = y; }
} dsu;

vector<point> adj(int u, int v){
    assert(abs(a[u].x - a[v].x) + abs(a[u].y - a[v].y) == 2);
    if(a[u].x == a[v].x) return {{a[u].x - 1, (a[u].y + a[v].y) / 2}, {a[u].x + 1, (a[u].y + a[v].y) / 2}};
    else return {{(a[u].x + a[v].x) / 2, a[v].y - 1}, {(a[u].x + a[v].x) / 2, a[v].y + 1}};
}

vector<edge> construct_tree(){
    vector<edge> ans;
    dsu.init(n);
    vector<int> p; for(int i = 0; i < n; i++) p.push_back(i);
    sort(p.begin(), p.end(), [](int u, int v){ return a[u] < a[v]; });
    set<point> used;
    for(int j = 0; j < n; j++){
        int i = p[j];
        for(auto [dx, dy] : (a[i].x + a[i].y) % 4 ? vector<pair<int, int>>{{2, 0}, {0, 2}} : vector<pair<int, int>>{{0, -2}, {-2, 0}}){
            int nx = a[i].x + dx, ny = a[i].y + dy;
            if(mp.count({nx, ny})){
                int v = mp[{nx, ny}];
                if(dsu.f(i) == dsu.f(v)) continue;
                ans.push_back({i, v});
                dsu.g(i, v);
                if(a[i].x == nx){
                    used.insert({nx - 1, (a[i].y + ny) / 2});
                }else{
                    used.insert({(a[i].x + nx) / 2, ny + 1});
                }
            }
        }
    }
    for(int j = 0; j < n; j++){
        int i = p[j];
        for(auto [dx, dy] : vector<pair<int, int>>{{0, -2}, {0, 2}, {2, 0}, {-2, 0}}){
            int nx = a[i].x + dx, ny = a[i].y + dy;
            if(mp.count({nx, ny})){
                int v = mp[{nx, ny}];
                vector<point> p = adj(i, v);
                if(used.count(p[0]) && used.count(p[1])) continue;
                if(dsu.f(i) != dsu.f(v)){
                    dsu.g(i, v);
                    ans.push_back({i, v});
                }
            }
        }
    }
    return ans;
}

vector<point> assign_benches(vector<edge> roads){
    vector<point> ans(roads.size());
    map<point, vector<int>> deg;
    set<point> done;
    for(int i = 0; i < (int) roads.size(); i++){
        int u = roads[i].u, v = roads[i].v;
        vector<point> p = adj(u, v);
        deg[p[0]].push_back(i);
        deg[p[1]].push_back(i);
    }
    vector<point> deg_0, deg_1;
    for(auto [p, v] : deg){
        if(v.size() == 0) deg_0.push_back(p);
        if(v.size() == 1) deg_1.push_back(p);
    }
    while(deg.size()){
        while(deg_0.size()) deg.erase(deg_0.back()), deg_0.pop_back();
        while(deg_1.size()){
            point v = deg_1.back(); deg_1.pop_back();
            if(done.count(v) || deg[v].empty()) continue; done.insert(v);

            int r = deg[v][0];
            ans[r] = v;

            int a = roads[r].u, b = roads[r].v;
            vector<point> p = adj(a, b);
            if(find(all(deg[p[0]]), r) != deg[p[0]].end()) deg[p[0]].erase(find(all(deg[p[0]]), r));
            if(find(all(deg[p[1]]), r) != deg[p[1]].end()) deg[p[1]].erase(find(all(deg[p[1]]), r));

            if(deg.count(p[0]) && deg[p[0]].size() == 0) deg_0.push_back(p[0]);
            if(deg.count(p[0]) && deg[p[0]].size() == 1) deg_1.push_back(p[0]);

            if(deg.count(p[1]) && deg[p[1]].size() == 0) deg_0.push_back(p[1]);
            if(deg.count(p[1]) && deg[p[1]].size() == 1) deg_1.push_back(p[1]);
        }
        if(deg.size()){
            auto [c, v] = *deg.begin(); 
            if(done.count(c) || deg[c].size() < 2){
                deg.erase(deg.begin());
                continue;
            }
            done.insert(c);
            int r = v[0];
            ans[r] = c;

            int a = roads[r].u, b = roads[r].v;
            vector<point> p = adj(a, b);

            deg[p[0]].clear();
            if(find(all(deg[p[1]]), r) != deg[p[1]].end()) deg[p[1]].erase(find(all(deg[p[1]]), r));

            if(deg[p[0]].size() == 0) deg_0.push_back(p[0]);
            if(deg[p[0]].size() == 1) deg_1.push_back(p[0]);

            if(deg[p[1]].size() == 0) deg_0.push_back(p[1]);
            if(deg[p[1]].size() == 1) deg_1.push_back(p[1]);
        }
    }
    return ans;
}

int construct_roads(vector<int> x, vector<int> y) {
    n = x.size();
    for(int i = 0; i < n; i++){
        a.push_back({x[i], y[i]});
        mp[a[i]] = i;
    }

    vector<edge> edges = construct_tree();
    if((int) edges.size() < n - 1) return 0;
    vector<point> benches = assign_benches(edges);
    vector<int> u(n - 1), v(n - 1), a(n - 1), b(n - 1);
    for(int i = 0; i < n - 1; i++){
        u[i] = edges[i].u, v[i] = edges[i].v;
        a[i] = benches[i].x, b[i] = benches[i].y;
    }
    build(u, v, a, b);
    return 1;
}

Compilation message

parks.cpp: In function 'std::vector<point> assign_benches(std::vector<edge>)':
parks.cpp:98:13: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   98 |             if(done.count(v) || deg[v].empty()) continue; done.insert(v);
      |             ^~
parks.cpp:98:59: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   98 |             if(done.count(v) || deg[v].empty()) continue; done.insert(v);
      |                                                           ^~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 489 ms 42192 KB Output is correct
10 Correct 37 ms 4432 KB Output is correct
11 Correct 245 ms 22856 KB Output is correct
12 Correct 59 ms 6472 KB Output is correct
13 Correct 63 ms 6404 KB Output is correct
14 Correct 3 ms 340 KB Output is correct
15 Correct 3 ms 468 KB Output is correct
16 Correct 518 ms 42212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 489 ms 42192 KB Output is correct
10 Correct 37 ms 4432 KB Output is correct
11 Correct 245 ms 22856 KB Output is correct
12 Correct 59 ms 6472 KB Output is correct
13 Correct 63 ms 6404 KB Output is correct
14 Correct 3 ms 340 KB Output is correct
15 Correct 3 ms 468 KB Output is correct
16 Correct 518 ms 42212 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 1 ms 316 KB Output is correct
20 Correct 1 ms 340 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 1193 ms 65252 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 5 ms 596 KB Output is correct
26 Correct 5 ms 708 KB Output is correct
27 Correct 6 ms 852 KB Output is correct
28 Correct 402 ms 26220 KB Output is correct
29 Correct 636 ms 39536 KB Output is correct
30 Correct 864 ms 52472 KB Output is correct
31 Correct 1136 ms 65192 KB Output is correct
32 Correct 1 ms 212 KB Output is correct
33 Correct 1 ms 212 KB Output is correct
34 Correct 0 ms 212 KB Output is correct
35 Correct 0 ms 212 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 1 ms 212 KB Output is correct
38 Correct 1 ms 212 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 1 ms 260 KB Output is correct
41 Correct 0 ms 212 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 3 ms 468 KB Output is correct
44 Correct 4 ms 724 KB Output is correct
45 Correct 432 ms 34704 KB Output is correct
46 Correct 727 ms 49116 KB Output is correct
47 Correct 769 ms 49112 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 489 ms 42192 KB Output is correct
10 Correct 37 ms 4432 KB Output is correct
11 Correct 245 ms 22856 KB Output is correct
12 Correct 59 ms 6472 KB Output is correct
13 Correct 63 ms 6404 KB Output is correct
14 Correct 3 ms 340 KB Output is correct
15 Correct 3 ms 468 KB Output is correct
16 Correct 518 ms 42212 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 1 ms 316 KB Output is correct
20 Correct 1 ms 340 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 1193 ms 65252 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 5 ms 596 KB Output is correct
26 Correct 5 ms 708 KB Output is correct
27 Correct 6 ms 852 KB Output is correct
28 Correct 402 ms 26220 KB Output is correct
29 Correct 636 ms 39536 KB Output is correct
30 Correct 864 ms 52472 KB Output is correct
31 Correct 1136 ms 65192 KB Output is correct
32 Correct 1 ms 212 KB Output is correct
33 Correct 1 ms 212 KB Output is correct
34 Correct 0 ms 212 KB Output is correct
35 Correct 0 ms 212 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 1 ms 212 KB Output is correct
38 Correct 1 ms 212 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 1 ms 260 KB Output is correct
41 Correct 0 ms 212 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 3 ms 468 KB Output is correct
44 Correct 4 ms 724 KB Output is correct
45 Correct 432 ms 34704 KB Output is correct
46 Correct 727 ms 49116 KB Output is correct
47 Correct 769 ms 49112 KB Output is correct
48 Correct 1 ms 212 KB Output is correct
49 Correct 1 ms 340 KB Output is correct
50 Correct 1 ms 212 KB Output is correct
51 Correct 1 ms 212 KB Output is correct
52 Correct 1 ms 212 KB Output is correct
53 Correct 1 ms 212 KB Output is correct
54 Correct 0 ms 212 KB Output is correct
55 Correct 1207 ms 62616 KB Output is correct
56 Correct 1 ms 212 KB Output is correct
57 Correct 9 ms 852 KB Output is correct
58 Correct 24 ms 2132 KB Output is correct
59 Correct 17 ms 1864 KB Output is correct
60 Correct 508 ms 31436 KB Output is correct
61 Correct 796 ms 42432 KB Output is correct
62 Correct 942 ms 51908 KB Output is correct
63 Correct 1188 ms 62752 KB Output is correct
64 Correct 1 ms 212 KB Output is correct
65 Correct 0 ms 308 KB Output is correct
66 Correct 1 ms 212 KB Output is correct
67 Correct 1119 ms 84164 KB Output is correct
68 Correct 1101 ms 84900 KB Output is correct
69 Correct 1098 ms 84172 KB Output is correct
70 Correct 5 ms 852 KB Output is correct
71 Correct 10 ms 1364 KB Output is correct
72 Correct 475 ms 32988 KB Output is correct
73 Correct 722 ms 49364 KB Output is correct
74 Correct 1154 ms 65732 KB Output is correct
75 Correct 1046 ms 70064 KB Output is correct
76 Correct 1198 ms 84916 KB Output is correct
77 Correct 7 ms 980 KB Output is correct
78 Correct 12 ms 1492 KB Output is correct
79 Correct 450 ms 32608 KB Output is correct
80 Correct 748 ms 49084 KB Output is correct
81 Correct 998 ms 65156 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 489 ms 42192 KB Output is correct
10 Correct 37 ms 4432 KB Output is correct
11 Correct 245 ms 22856 KB Output is correct
12 Correct 59 ms 6472 KB Output is correct
13 Correct 63 ms 6404 KB Output is correct
14 Correct 3 ms 340 KB Output is correct
15 Correct 3 ms 468 KB Output is correct
16 Correct 518 ms 42212 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 915 ms 57320 KB Output is correct
21 Correct 1006 ms 57624 KB Output is correct
22 Correct 867 ms 57560 KB Output is correct
23 Correct 785 ms 72072 KB Output is correct
24 Correct 220 ms 21768 KB Output is correct
25 Correct 362 ms 27824 KB Output is correct
26 Correct 316 ms 27832 KB Output is correct
27 Correct 892 ms 84004 KB Output is correct
28 Correct 935 ms 83876 KB Output is correct
29 Correct 1054 ms 83912 KB Output is correct
30 Correct 1056 ms 83992 KB Output is correct
31 Correct 1 ms 212 KB Output is correct
32 Correct 54 ms 4912 KB Output is correct
33 Correct 91 ms 11404 KB Output is correct
34 Correct 918 ms 57604 KB Output is correct
35 Correct 15 ms 1748 KB Output is correct
36 Correct 85 ms 7364 KB Output is correct
37 Correct 163 ms 14592 KB Output is correct
38 Correct 340 ms 25024 KB Output is correct
39 Correct 494 ms 34112 KB Output is correct
40 Correct 651 ms 43932 KB Output is correct
41 Correct 835 ms 52188 KB Output is correct
42 Correct 968 ms 60948 KB Output is correct
43 Correct 1 ms 212 KB Output is correct
44 Correct 1 ms 212 KB Output is correct
45 Correct 0 ms 336 KB Output is correct
46 Correct 1 ms 212 KB Output is correct
47 Correct 1 ms 212 KB Output is correct
48 Correct 1 ms 212 KB Output is correct
49 Correct 1 ms 212 KB Output is correct
50 Correct 1 ms 212 KB Output is correct
51 Correct 1 ms 212 KB Output is correct
52 Correct 1 ms 212 KB Output is correct
53 Correct 1 ms 308 KB Output is correct
54 Correct 3 ms 468 KB Output is correct
55 Correct 4 ms 724 KB Output is correct
56 Correct 446 ms 34644 KB Output is correct
57 Correct 719 ms 49108 KB Output is correct
58 Correct 675 ms 49144 KB Output is correct
59 Correct 1 ms 212 KB Output is correct
60 Correct 1 ms 212 KB Output is correct
61 Correct 1 ms 336 KB Output is correct
62 Correct 1067 ms 84096 KB Output is correct
63 Correct 1170 ms 84980 KB Output is correct
64 Correct 1119 ms 84140 KB Output is correct
65 Correct 6 ms 988 KB Output is correct
66 Correct 11 ms 1364 KB Output is correct
67 Correct 461 ms 32920 KB Output is correct
68 Correct 772 ms 49312 KB Output is correct
69 Correct 1020 ms 65864 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 489 ms 42192 KB Output is correct
10 Correct 37 ms 4432 KB Output is correct
11 Correct 245 ms 22856 KB Output is correct
12 Correct 59 ms 6472 KB Output is correct
13 Correct 63 ms 6404 KB Output is correct
14 Correct 3 ms 340 KB Output is correct
15 Correct 3 ms 468 KB Output is correct
16 Correct 518 ms 42212 KB Output is correct
17 Correct 979 ms 84368 KB Output is correct
18 Correct 979 ms 84220 KB Output is correct
19 Correct 866 ms 58184 KB Output is correct
20 Correct 987 ms 65080 KB Output is correct
21 Correct 761 ms 64148 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 129 ms 10372 KB Output is correct
24 Correct 30 ms 3264 KB Output is correct
25 Correct 129 ms 10784 KB Output is correct
26 Correct 214 ms 17564 KB Output is correct
27 Correct 453 ms 32448 KB Output is correct
28 Correct 602 ms 40888 KB Output is correct
29 Correct 738 ms 48336 KB Output is correct
30 Correct 856 ms 56164 KB Output is correct
31 Correct 1006 ms 63836 KB Output is correct
32 Correct 1098 ms 70068 KB Output is correct
33 Correct 1064 ms 84924 KB Output is correct
34 Correct 7 ms 980 KB Output is correct
35 Correct 12 ms 1548 KB Output is correct
36 Correct 459 ms 32656 KB Output is correct
37 Correct 716 ms 48968 KB Output is correct
38 Correct 1016 ms 65280 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 489 ms 42192 KB Output is correct
10 Correct 37 ms 4432 KB Output is correct
11 Correct 245 ms 22856 KB Output is correct
12 Correct 59 ms 6472 KB Output is correct
13 Correct 63 ms 6404 KB Output is correct
14 Correct 3 ms 340 KB Output is correct
15 Correct 3 ms 468 KB Output is correct
16 Correct 518 ms 42212 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 1 ms 316 KB Output is correct
20 Correct 1 ms 340 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 1193 ms 65252 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 5 ms 596 KB Output is correct
26 Correct 5 ms 708 KB Output is correct
27 Correct 6 ms 852 KB Output is correct
28 Correct 402 ms 26220 KB Output is correct
29 Correct 636 ms 39536 KB Output is correct
30 Correct 864 ms 52472 KB Output is correct
31 Correct 1136 ms 65192 KB Output is correct
32 Correct 1 ms 212 KB Output is correct
33 Correct 1 ms 212 KB Output is correct
34 Correct 0 ms 212 KB Output is correct
35 Correct 0 ms 212 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 1 ms 212 KB Output is correct
38 Correct 1 ms 212 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 1 ms 260 KB Output is correct
41 Correct 0 ms 212 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 3 ms 468 KB Output is correct
44 Correct 4 ms 724 KB Output is correct
45 Correct 432 ms 34704 KB Output is correct
46 Correct 727 ms 49116 KB Output is correct
47 Correct 769 ms 49112 KB Output is correct
48 Correct 1 ms 212 KB Output is correct
49 Correct 1 ms 340 KB Output is correct
50 Correct 1 ms 212 KB Output is correct
51 Correct 1 ms 212 KB Output is correct
52 Correct 1 ms 212 KB Output is correct
53 Correct 1 ms 212 KB Output is correct
54 Correct 0 ms 212 KB Output is correct
55 Correct 1207 ms 62616 KB Output is correct
56 Correct 1 ms 212 KB Output is correct
57 Correct 9 ms 852 KB Output is correct
58 Correct 24 ms 2132 KB Output is correct
59 Correct 17 ms 1864 KB Output is correct
60 Correct 508 ms 31436 KB Output is correct
61 Correct 796 ms 42432 KB Output is correct
62 Correct 942 ms 51908 KB Output is correct
63 Correct 1188 ms 62752 KB Output is correct
64 Correct 1 ms 212 KB Output is correct
65 Correct 0 ms 308 KB Output is correct
66 Correct 1 ms 212 KB Output is correct
67 Correct 1119 ms 84164 KB Output is correct
68 Correct 1101 ms 84900 KB Output is correct
69 Correct 1098 ms 84172 KB Output is correct
70 Correct 5 ms 852 KB Output is correct
71 Correct 10 ms 1364 KB Output is correct
72 Correct 475 ms 32988 KB Output is correct
73 Correct 722 ms 49364 KB Output is correct
74 Correct 1154 ms 65732 KB Output is correct
75 Correct 1046 ms 70064 KB Output is correct
76 Correct 1198 ms 84916 KB Output is correct
77 Correct 7 ms 980 KB Output is correct
78 Correct 12 ms 1492 KB Output is correct
79 Correct 450 ms 32608 KB Output is correct
80 Correct 748 ms 49084 KB Output is correct
81 Correct 998 ms 65156 KB Output is correct
82 Correct 1 ms 212 KB Output is correct
83 Correct 1 ms 212 KB Output is correct
84 Correct 1 ms 212 KB Output is correct
85 Correct 915 ms 57320 KB Output is correct
86 Correct 1006 ms 57624 KB Output is correct
87 Correct 867 ms 57560 KB Output is correct
88 Correct 785 ms 72072 KB Output is correct
89 Correct 220 ms 21768 KB Output is correct
90 Correct 362 ms 27824 KB Output is correct
91 Correct 316 ms 27832 KB Output is correct
92 Correct 892 ms 84004 KB Output is correct
93 Correct 935 ms 83876 KB Output is correct
94 Correct 1054 ms 83912 KB Output is correct
95 Correct 1056 ms 83992 KB Output is correct
96 Correct 1 ms 212 KB Output is correct
97 Correct 54 ms 4912 KB Output is correct
98 Correct 91 ms 11404 KB Output is correct
99 Correct 918 ms 57604 KB Output is correct
100 Correct 15 ms 1748 KB Output is correct
101 Correct 85 ms 7364 KB Output is correct
102 Correct 163 ms 14592 KB Output is correct
103 Correct 340 ms 25024 KB Output is correct
104 Correct 494 ms 34112 KB Output is correct
105 Correct 651 ms 43932 KB Output is correct
106 Correct 835 ms 52188 KB Output is correct
107 Correct 968 ms 60948 KB Output is correct
108 Correct 1 ms 212 KB Output is correct
109 Correct 1 ms 212 KB Output is correct
110 Correct 0 ms 336 KB Output is correct
111 Correct 1 ms 212 KB Output is correct
112 Correct 1 ms 212 KB Output is correct
113 Correct 1 ms 212 KB Output is correct
114 Correct 1 ms 212 KB Output is correct
115 Correct 1 ms 212 KB Output is correct
116 Correct 1 ms 212 KB Output is correct
117 Correct 1 ms 212 KB Output is correct
118 Correct 1 ms 308 KB Output is correct
119 Correct 3 ms 468 KB Output is correct
120 Correct 4 ms 724 KB Output is correct
121 Correct 446 ms 34644 KB Output is correct
122 Correct 719 ms 49108 KB Output is correct
123 Correct 675 ms 49144 KB Output is correct
124 Correct 1 ms 212 KB Output is correct
125 Correct 1 ms 212 KB Output is correct
126 Correct 1 ms 336 KB Output is correct
127 Correct 1067 ms 84096 KB Output is correct
128 Correct 1170 ms 84980 KB Output is correct
129 Correct 1119 ms 84140 KB Output is correct
130 Correct 6 ms 988 KB Output is correct
131 Correct 11 ms 1364 KB Output is correct
132 Correct 461 ms 32920 KB Output is correct
133 Correct 772 ms 49312 KB Output is correct
134 Correct 1020 ms 65864 KB Output is correct
135 Correct 979 ms 84368 KB Output is correct
136 Correct 979 ms 84220 KB Output is correct
137 Correct 866 ms 58184 KB Output is correct
138 Correct 987 ms 65080 KB Output is correct
139 Correct 761 ms 64148 KB Output is correct
140 Correct 1 ms 212 KB Output is correct
141 Correct 129 ms 10372 KB Output is correct
142 Correct 30 ms 3264 KB Output is correct
143 Correct 129 ms 10784 KB Output is correct
144 Correct 214 ms 17564 KB Output is correct
145 Correct 453 ms 32448 KB Output is correct
146 Correct 602 ms 40888 KB Output is correct
147 Correct 738 ms 48336 KB Output is correct
148 Correct 856 ms 56164 KB Output is correct
149 Correct 1006 ms 63836 KB Output is correct
150 Correct 1098 ms 70068 KB Output is correct
151 Correct 1064 ms 84924 KB Output is correct
152 Correct 7 ms 980 KB Output is correct
153 Correct 12 ms 1548 KB Output is correct
154 Correct 459 ms 32656 KB Output is correct
155 Correct 716 ms 48968 KB Output is correct
156 Correct 1016 ms 65280 KB Output is correct
157 Correct 1 ms 212 KB Output is correct
158 Correct 1 ms 212 KB Output is correct
159 Correct 0 ms 212 KB Output is correct
160 Correct 0 ms 212 KB Output is correct
161 Correct 1274 ms 57432 KB Output is correct
162 Correct 921 ms 57520 KB Output is correct
163 Correct 994 ms 58132 KB Output is correct
164 Correct 928 ms 58124 KB Output is correct
165 Correct 1000 ms 57684 KB Output is correct
166 Correct 1053 ms 57564 KB Output is correct
167 Incorrect 229 ms 14268 KB a[40704] = 0 is not an odd integer
168 Halted 0 ms 0 KB -