답안 #594001

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
594001 2022-07-11T20:56:33 Z SlavicG 분수 공원 (IOI21_parks) C++17
100 / 100
519 ms 46500 KB
#include "parks.h"
#include "bits/stdc++.h"
using namespace std;

#define         sz(a)     (int)a.size()
#define        all(a)     a.begin(),a.end()
#define    forn(i, n)     for(int i = 0; i < n; ++i)

const int N = 2e5 + 10;
int p[N];
int get(int a) {
    return p[a] = (a == p[a] ? a : get(p[a]));
}
bool uni(int a, int b) {
    a = get(a), b = get(b);
    if(a == b) return false;
    p[a] = b;
    return true;
}

struct point {
    int x, y, idx;
};
bool cmp(point a, point b) {
    if(a.x < b.x) return 1;
    if(a.x > b.x) return 0;
    return a.y < b.y;
}
map<pair<int, int>, int> st, benches;
int construct_roads(vector<int> x, vector<int> y) {
    forn(i, N) p[i] = i;
    if (x.size() == 1) {
        build({}, {}, {}, {});
        return 1;
    }
    vector<int> u, v, a, b;
    vector<point> points;
    forn(i, sz(x)) points.push_back({x[i], y[i], i}), st[{x[i], y[i]}] = i;
    sort(all(points), cmp);

    for(auto p: points) {
        pair<int, int> c = {p.x - 2, p.y};
        if(st.count(c) && get(st[c]) != get(p.idx)) {
            if(p.x % 4 == 0) {
                if(p.y % 4 == 2) {
                    a.push_back(p.x - 1);
                    b.push_back(p.y - 1);
                    if(benches.count({a.back(), b.back()})) {
                        a.pop_back();
                        b.pop_back();
                    } else {
                        u.push_back(st[c]), v.push_back(p.idx);
                        uni(st[c], p.idx);
                        benches[{a.back(), b.back()}] = 1;
                    }
                } else {
                    a.push_back(p.x - 1);
                    b.push_back(p.y + 1);
                    if(benches.count({a.back(), b.back()})) {
                        a.pop_back();
                        b.pop_back();
                    } else {
                        u.push_back(st[c]), v.push_back(p.idx);
                        uni(st[c], p.idx);
                        benches[{a.back(), b.back()}] = 1;
                    }
                }
            } else {
                if(p.y % 4 == 2) {
                    a.push_back(p.x - 1);
                    b.push_back(p.y + 1);
                    if(benches.count({a.back(), b.back()})) {
                        a.pop_back();
                        b.pop_back();
                    } else {
                        u.push_back(st[c]), v.push_back(p.idx);
                        uni(st[c], p.idx);
                        benches[{a.back(), b.back()}] = 1;
                    }
                } else {
                    a.push_back(p.x - 1);
                    b.push_back(p.y - 1);
                    if(benches.count({a.back(), b.back()})) {
                        a.pop_back();
                        b.pop_back();
                    } else {
                        u.push_back(st[c]), v.push_back(p.idx);
                        uni(st[c], p.idx);
                        benches[{a.back(), b.back()}] = 1;
                    }
                }
            }
        }

        c = {p.x, p.y - 2};
        if(st.count(c) && get(st[c]) != get(p.idx)) {
            if(p.y % 4 == 0) {
                if(p.x % 4 == 2) {
                    a.push_back(p.x + 1);
                    b.push_back(p.y - 1);
                    if(benches.count({a.back(), b.back()})) {
                        a.pop_back();
                        b.pop_back();
                    } else {
                        u.push_back(st[c]), v.push_back(p.idx);
                        uni(st[c], p.idx);
                        benches[{a.back(), b.back()}] = 1;
                    }
                } else {
                    a.push_back(p.x - 1);
                    b.push_back(p.y - 1);
                    if(benches.count({a.back(), b.back()})) {
                        a.pop_back();
                        b.pop_back();
                    } else {
                        u.push_back(st[c]), v.push_back(p.idx);
                        uni(st[c], p.idx);
                        benches[{a.back(), b.back()}] = 1;
                    }
                }
            } else {
                if(p.x % 4 == 2) {
                    a.push_back(p.x - 1);
                    b.push_back(p.y - 1);
                    if(benches.count({a.back(), b.back()})) {
                        a.pop_back();
                        b.pop_back();
                    } else {
                        u.push_back(st[c]), v.push_back(p.idx);
                        uni(st[c], p.idx);
                        benches[{a.back(), b.back()}] = 1;
                    }
                } else {
                    a.push_back(p.x + 1);
                    b.push_back(p.y - 1);
                    if(benches.count({a.back(), b.back()})) {
                        a.pop_back();
                        b.pop_back();
                    } else {
                        u.push_back(st[c]), v.push_back(p.idx);
                        uni(st[c], p.idx);
                        benches[{a.back(), b.back()}] = 1;
                    }
                }
            }
        }

    }

    for(int i = 0; i < sz(x); ++i) if(get(i) != get(0)) return 0;
    build(u, v, a, b);
    return 1;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 980 KB Output is correct
2 Correct 1 ms 980 KB Output is correct
3 Correct 1 ms 980 KB Output is correct
4 Correct 1 ms 980 KB Output is correct
5 Correct 1 ms 980 KB Output is correct
6 Correct 1 ms 980 KB Output is correct
7 Correct 1 ms 980 KB Output is correct
8 Correct 1 ms 980 KB Output is correct
9 Correct 205 ms 22336 KB Output is correct
10 Correct 14 ms 3280 KB Output is correct
11 Correct 89 ms 12620 KB Output is correct
12 Correct 26 ms 4332 KB Output is correct
13 Correct 61 ms 8892 KB Output is correct
14 Correct 2 ms 1236 KB Output is correct
15 Correct 3 ms 1408 KB Output is correct
16 Correct 215 ms 21736 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 980 KB Output is correct
2 Correct 1 ms 980 KB Output is correct
3 Correct 1 ms 980 KB Output is correct
4 Correct 1 ms 980 KB Output is correct
5 Correct 1 ms 980 KB Output is correct
6 Correct 1 ms 980 KB Output is correct
7 Correct 1 ms 980 KB Output is correct
8 Correct 1 ms 980 KB Output is correct
9 Correct 205 ms 22336 KB Output is correct
10 Correct 14 ms 3280 KB Output is correct
11 Correct 89 ms 12620 KB Output is correct
12 Correct 26 ms 4332 KB Output is correct
13 Correct 61 ms 8892 KB Output is correct
14 Correct 2 ms 1236 KB Output is correct
15 Correct 3 ms 1408 KB Output is correct
16 Correct 215 ms 21736 KB Output is correct
17 Correct 1 ms 980 KB Output is correct
18 Correct 1 ms 980 KB Output is correct
19 Correct 1 ms 980 KB Output is correct
20 Correct 1 ms 980 KB Output is correct
21 Correct 1 ms 1080 KB Output is correct
22 Correct 1 ms 980 KB Output is correct
23 Correct 457 ms 44344 KB Output is correct
24 Correct 1 ms 1076 KB Output is correct
25 Correct 3 ms 1364 KB Output is correct
26 Correct 4 ms 1644 KB Output is correct
27 Correct 5 ms 1748 KB Output is correct
28 Correct 153 ms 18288 KB Output is correct
29 Correct 250 ms 26916 KB Output is correct
30 Correct 324 ms 35932 KB Output is correct
31 Correct 457 ms 44368 KB Output is correct
32 Correct 1 ms 980 KB Output is correct
33 Correct 1 ms 980 KB Output is correct
34 Correct 1 ms 980 KB Output is correct
35 Correct 1 ms 980 KB Output is correct
36 Correct 1 ms 1076 KB Output is correct
37 Correct 1 ms 1080 KB Output is correct
38 Correct 1 ms 1076 KB Output is correct
39 Correct 1 ms 980 KB Output is correct
40 Correct 1 ms 980 KB Output is correct
41 Correct 1 ms 980 KB Output is correct
42 Correct 1 ms 980 KB Output is correct
43 Correct 5 ms 1364 KB Output is correct
44 Correct 6 ms 1620 KB Output is correct
45 Correct 172 ms 22344 KB Output is correct
46 Correct 295 ms 32436 KB Output is correct
47 Correct 285 ms 32276 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 980 KB Output is correct
2 Correct 1 ms 980 KB Output is correct
3 Correct 1 ms 980 KB Output is correct
4 Correct 1 ms 980 KB Output is correct
5 Correct 1 ms 980 KB Output is correct
6 Correct 1 ms 980 KB Output is correct
7 Correct 1 ms 980 KB Output is correct
8 Correct 1 ms 980 KB Output is correct
9 Correct 205 ms 22336 KB Output is correct
10 Correct 14 ms 3280 KB Output is correct
11 Correct 89 ms 12620 KB Output is correct
12 Correct 26 ms 4332 KB Output is correct
13 Correct 61 ms 8892 KB Output is correct
14 Correct 2 ms 1236 KB Output is correct
15 Correct 3 ms 1408 KB Output is correct
16 Correct 215 ms 21736 KB Output is correct
17 Correct 1 ms 980 KB Output is correct
18 Correct 1 ms 980 KB Output is correct
19 Correct 1 ms 980 KB Output is correct
20 Correct 1 ms 980 KB Output is correct
21 Correct 1 ms 1080 KB Output is correct
22 Correct 1 ms 980 KB Output is correct
23 Correct 457 ms 44344 KB Output is correct
24 Correct 1 ms 1076 KB Output is correct
25 Correct 3 ms 1364 KB Output is correct
26 Correct 4 ms 1644 KB Output is correct
27 Correct 5 ms 1748 KB Output is correct
28 Correct 153 ms 18288 KB Output is correct
29 Correct 250 ms 26916 KB Output is correct
30 Correct 324 ms 35932 KB Output is correct
31 Correct 457 ms 44368 KB Output is correct
32 Correct 1 ms 980 KB Output is correct
33 Correct 1 ms 980 KB Output is correct
34 Correct 1 ms 980 KB Output is correct
35 Correct 1 ms 980 KB Output is correct
36 Correct 1 ms 1076 KB Output is correct
37 Correct 1 ms 1080 KB Output is correct
38 Correct 1 ms 1076 KB Output is correct
39 Correct 1 ms 980 KB Output is correct
40 Correct 1 ms 980 KB Output is correct
41 Correct 1 ms 980 KB Output is correct
42 Correct 1 ms 980 KB Output is correct
43 Correct 5 ms 1364 KB Output is correct
44 Correct 6 ms 1620 KB Output is correct
45 Correct 172 ms 22344 KB Output is correct
46 Correct 295 ms 32436 KB Output is correct
47 Correct 285 ms 32276 KB Output is correct
48 Correct 1 ms 980 KB Output is correct
49 Correct 1 ms 1076 KB Output is correct
50 Correct 1 ms 980 KB Output is correct
51 Correct 1 ms 980 KB Output is correct
52 Correct 2 ms 1084 KB Output is correct
53 Correct 1 ms 980 KB Output is correct
54 Correct 1 ms 1076 KB Output is correct
55 Correct 436 ms 43856 KB Output is correct
56 Correct 1 ms 980 KB Output is correct
57 Correct 6 ms 1472 KB Output is correct
58 Correct 9 ms 2388 KB Output is correct
59 Correct 13 ms 2792 KB Output is correct
60 Correct 196 ms 22332 KB Output is correct
61 Correct 301 ms 30884 KB Output is correct
62 Correct 343 ms 36796 KB Output is correct
63 Correct 471 ms 44072 KB Output is correct
64 Correct 1 ms 1024 KB Output is correct
65 Correct 1 ms 980 KB Output is correct
66 Correct 1 ms 980 KB Output is correct
67 Correct 403 ms 44124 KB Output is correct
68 Correct 447 ms 44348 KB Output is correct
69 Correct 445 ms 43644 KB Output is correct
70 Correct 7 ms 1748 KB Output is correct
71 Correct 9 ms 2516 KB Output is correct
72 Correct 177 ms 22116 KB Output is correct
73 Correct 309 ms 33420 KB Output is correct
74 Correct 496 ms 43668 KB Output is correct
75 Correct 422 ms 44092 KB Output is correct
76 Correct 430 ms 44404 KB Output is correct
77 Correct 6 ms 2004 KB Output is correct
78 Correct 11 ms 2628 KB Output is correct
79 Correct 206 ms 22032 KB Output is correct
80 Correct 277 ms 33096 KB Output is correct
81 Correct 519 ms 43704 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 980 KB Output is correct
2 Correct 1 ms 980 KB Output is correct
3 Correct 1 ms 980 KB Output is correct
4 Correct 1 ms 980 KB Output is correct
5 Correct 1 ms 980 KB Output is correct
6 Correct 1 ms 980 KB Output is correct
7 Correct 1 ms 980 KB Output is correct
8 Correct 1 ms 980 KB Output is correct
9 Correct 205 ms 22336 KB Output is correct
10 Correct 14 ms 3280 KB Output is correct
11 Correct 89 ms 12620 KB Output is correct
12 Correct 26 ms 4332 KB Output is correct
13 Correct 61 ms 8892 KB Output is correct
14 Correct 2 ms 1236 KB Output is correct
15 Correct 3 ms 1408 KB Output is correct
16 Correct 215 ms 21736 KB Output is correct
17 Correct 1 ms 980 KB Output is correct
18 Correct 1 ms 980 KB Output is correct
19 Correct 1 ms 980 KB Output is correct
20 Correct 431 ms 43200 KB Output is correct
21 Correct 408 ms 42936 KB Output is correct
22 Correct 442 ms 42428 KB Output is correct
23 Correct 375 ms 36872 KB Output is correct
24 Correct 203 ms 19220 KB Output is correct
25 Correct 344 ms 34940 KB Output is correct
26 Correct 317 ms 34924 KB Output is correct
27 Correct 442 ms 41676 KB Output is correct
28 Correct 381 ms 41576 KB Output is correct
29 Correct 411 ms 41516 KB Output is correct
30 Correct 393 ms 41476 KB Output is correct
31 Correct 1 ms 980 KB Output is correct
32 Correct 26 ms 4068 KB Output is correct
33 Correct 78 ms 9980 KB Output is correct
34 Correct 414 ms 44376 KB Output is correct
35 Correct 12 ms 2772 KB Output is correct
36 Correct 76 ms 9552 KB Output is correct
37 Correct 178 ms 18068 KB Output is correct
38 Correct 160 ms 17724 KB Output is correct
39 Correct 197 ms 23732 KB Output is correct
40 Correct 297 ms 30956 KB Output is correct
41 Correct 339 ms 36380 KB Output is correct
42 Correct 443 ms 42548 KB Output is correct
43 Correct 1 ms 980 KB Output is correct
44 Correct 1 ms 980 KB Output is correct
45 Correct 1 ms 980 KB Output is correct
46 Correct 1 ms 980 KB Output is correct
47 Correct 1 ms 980 KB Output is correct
48 Correct 1 ms 980 KB Output is correct
49 Correct 1 ms 980 KB Output is correct
50 Correct 1 ms 980 KB Output is correct
51 Correct 1 ms 980 KB Output is correct
52 Correct 1 ms 980 KB Output is correct
53 Correct 1 ms 980 KB Output is correct
54 Correct 3 ms 1296 KB Output is correct
55 Correct 5 ms 1492 KB Output is correct
56 Correct 207 ms 21548 KB Output is correct
57 Correct 272 ms 31368 KB Output is correct
58 Correct 290 ms 31032 KB Output is correct
59 Correct 1 ms 980 KB Output is correct
60 Correct 1 ms 980 KB Output is correct
61 Correct 1 ms 980 KB Output is correct
62 Correct 452 ms 42404 KB Output is correct
63 Correct 399 ms 42856 KB Output is correct
64 Correct 433 ms 41972 KB Output is correct
65 Correct 5 ms 1748 KB Output is correct
66 Correct 13 ms 2332 KB Output is correct
67 Correct 185 ms 21332 KB Output is correct
68 Correct 290 ms 32088 KB Output is correct
69 Correct 430 ms 41964 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 980 KB Output is correct
2 Correct 1 ms 980 KB Output is correct
3 Correct 1 ms 980 KB Output is correct
4 Correct 1 ms 980 KB Output is correct
5 Correct 1 ms 980 KB Output is correct
6 Correct 1 ms 980 KB Output is correct
7 Correct 1 ms 980 KB Output is correct
8 Correct 1 ms 980 KB Output is correct
9 Correct 205 ms 22336 KB Output is correct
10 Correct 14 ms 3280 KB Output is correct
11 Correct 89 ms 12620 KB Output is correct
12 Correct 26 ms 4332 KB Output is correct
13 Correct 61 ms 8892 KB Output is correct
14 Correct 2 ms 1236 KB Output is correct
15 Correct 3 ms 1408 KB Output is correct
16 Correct 215 ms 21736 KB Output is correct
17 Correct 407 ms 42744 KB Output is correct
18 Correct 464 ms 43212 KB Output is correct
19 Correct 421 ms 42848 KB Output is correct
20 Correct 405 ms 40628 KB Output is correct
21 Correct 351 ms 36684 KB Output is correct
22 Correct 1 ms 980 KB Output is correct
23 Correct 54 ms 7608 KB Output is correct
24 Correct 29 ms 4516 KB Output is correct
25 Correct 110 ms 13364 KB Output is correct
26 Correct 212 ms 21244 KB Output is correct
27 Correct 202 ms 21752 KB Output is correct
28 Correct 290 ms 26872 KB Output is correct
29 Correct 313 ms 32656 KB Output is correct
30 Correct 373 ms 37332 KB Output is correct
31 Correct 430 ms 42684 KB Output is correct
32 Correct 428 ms 42660 KB Output is correct
33 Correct 421 ms 42996 KB Output is correct
34 Correct 6 ms 1960 KB Output is correct
35 Correct 10 ms 2664 KB Output is correct
36 Correct 167 ms 21240 KB Output is correct
37 Correct 279 ms 31856 KB Output is correct
38 Correct 399 ms 42112 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 980 KB Output is correct
2 Correct 1 ms 980 KB Output is correct
3 Correct 1 ms 980 KB Output is correct
4 Correct 1 ms 980 KB Output is correct
5 Correct 1 ms 980 KB Output is correct
6 Correct 1 ms 980 KB Output is correct
7 Correct 1 ms 980 KB Output is correct
8 Correct 1 ms 980 KB Output is correct
9 Correct 205 ms 22336 KB Output is correct
10 Correct 14 ms 3280 KB Output is correct
11 Correct 89 ms 12620 KB Output is correct
12 Correct 26 ms 4332 KB Output is correct
13 Correct 61 ms 8892 KB Output is correct
14 Correct 2 ms 1236 KB Output is correct
15 Correct 3 ms 1408 KB Output is correct
16 Correct 215 ms 21736 KB Output is correct
17 Correct 1 ms 980 KB Output is correct
18 Correct 1 ms 980 KB Output is correct
19 Correct 1 ms 980 KB Output is correct
20 Correct 1 ms 980 KB Output is correct
21 Correct 1 ms 1080 KB Output is correct
22 Correct 1 ms 980 KB Output is correct
23 Correct 457 ms 44344 KB Output is correct
24 Correct 1 ms 1076 KB Output is correct
25 Correct 3 ms 1364 KB Output is correct
26 Correct 4 ms 1644 KB Output is correct
27 Correct 5 ms 1748 KB Output is correct
28 Correct 153 ms 18288 KB Output is correct
29 Correct 250 ms 26916 KB Output is correct
30 Correct 324 ms 35932 KB Output is correct
31 Correct 457 ms 44368 KB Output is correct
32 Correct 1 ms 980 KB Output is correct
33 Correct 1 ms 980 KB Output is correct
34 Correct 1 ms 980 KB Output is correct
35 Correct 1 ms 980 KB Output is correct
36 Correct 1 ms 1076 KB Output is correct
37 Correct 1 ms 1080 KB Output is correct
38 Correct 1 ms 1076 KB Output is correct
39 Correct 1 ms 980 KB Output is correct
40 Correct 1 ms 980 KB Output is correct
41 Correct 1 ms 980 KB Output is correct
42 Correct 1 ms 980 KB Output is correct
43 Correct 5 ms 1364 KB Output is correct
44 Correct 6 ms 1620 KB Output is correct
45 Correct 172 ms 22344 KB Output is correct
46 Correct 295 ms 32436 KB Output is correct
47 Correct 285 ms 32276 KB Output is correct
48 Correct 1 ms 980 KB Output is correct
49 Correct 1 ms 1076 KB Output is correct
50 Correct 1 ms 980 KB Output is correct
51 Correct 1 ms 980 KB Output is correct
52 Correct 2 ms 1084 KB Output is correct
53 Correct 1 ms 980 KB Output is correct
54 Correct 1 ms 1076 KB Output is correct
55 Correct 436 ms 43856 KB Output is correct
56 Correct 1 ms 980 KB Output is correct
57 Correct 6 ms 1472 KB Output is correct
58 Correct 9 ms 2388 KB Output is correct
59 Correct 13 ms 2792 KB Output is correct
60 Correct 196 ms 22332 KB Output is correct
61 Correct 301 ms 30884 KB Output is correct
62 Correct 343 ms 36796 KB Output is correct
63 Correct 471 ms 44072 KB Output is correct
64 Correct 1 ms 1024 KB Output is correct
65 Correct 1 ms 980 KB Output is correct
66 Correct 1 ms 980 KB Output is correct
67 Correct 403 ms 44124 KB Output is correct
68 Correct 447 ms 44348 KB Output is correct
69 Correct 445 ms 43644 KB Output is correct
70 Correct 7 ms 1748 KB Output is correct
71 Correct 9 ms 2516 KB Output is correct
72 Correct 177 ms 22116 KB Output is correct
73 Correct 309 ms 33420 KB Output is correct
74 Correct 496 ms 43668 KB Output is correct
75 Correct 422 ms 44092 KB Output is correct
76 Correct 430 ms 44404 KB Output is correct
77 Correct 6 ms 2004 KB Output is correct
78 Correct 11 ms 2628 KB Output is correct
79 Correct 206 ms 22032 KB Output is correct
80 Correct 277 ms 33096 KB Output is correct
81 Correct 519 ms 43704 KB Output is correct
82 Correct 1 ms 980 KB Output is correct
83 Correct 1 ms 980 KB Output is correct
84 Correct 1 ms 980 KB Output is correct
85 Correct 431 ms 43200 KB Output is correct
86 Correct 408 ms 42936 KB Output is correct
87 Correct 442 ms 42428 KB Output is correct
88 Correct 375 ms 36872 KB Output is correct
89 Correct 203 ms 19220 KB Output is correct
90 Correct 344 ms 34940 KB Output is correct
91 Correct 317 ms 34924 KB Output is correct
92 Correct 442 ms 41676 KB Output is correct
93 Correct 381 ms 41576 KB Output is correct
94 Correct 411 ms 41516 KB Output is correct
95 Correct 393 ms 41476 KB Output is correct
96 Correct 1 ms 980 KB Output is correct
97 Correct 26 ms 4068 KB Output is correct
98 Correct 78 ms 9980 KB Output is correct
99 Correct 414 ms 44376 KB Output is correct
100 Correct 12 ms 2772 KB Output is correct
101 Correct 76 ms 9552 KB Output is correct
102 Correct 178 ms 18068 KB Output is correct
103 Correct 160 ms 17724 KB Output is correct
104 Correct 197 ms 23732 KB Output is correct
105 Correct 297 ms 30956 KB Output is correct
106 Correct 339 ms 36380 KB Output is correct
107 Correct 443 ms 42548 KB Output is correct
108 Correct 1 ms 980 KB Output is correct
109 Correct 1 ms 980 KB Output is correct
110 Correct 1 ms 980 KB Output is correct
111 Correct 1 ms 980 KB Output is correct
112 Correct 1 ms 980 KB Output is correct
113 Correct 1 ms 980 KB Output is correct
114 Correct 1 ms 980 KB Output is correct
115 Correct 1 ms 980 KB Output is correct
116 Correct 1 ms 980 KB Output is correct
117 Correct 1 ms 980 KB Output is correct
118 Correct 1 ms 980 KB Output is correct
119 Correct 3 ms 1296 KB Output is correct
120 Correct 5 ms 1492 KB Output is correct
121 Correct 207 ms 21548 KB Output is correct
122 Correct 272 ms 31368 KB Output is correct
123 Correct 290 ms 31032 KB Output is correct
124 Correct 1 ms 980 KB Output is correct
125 Correct 1 ms 980 KB Output is correct
126 Correct 1 ms 980 KB Output is correct
127 Correct 452 ms 42404 KB Output is correct
128 Correct 399 ms 42856 KB Output is correct
129 Correct 433 ms 41972 KB Output is correct
130 Correct 5 ms 1748 KB Output is correct
131 Correct 13 ms 2332 KB Output is correct
132 Correct 185 ms 21332 KB Output is correct
133 Correct 290 ms 32088 KB Output is correct
134 Correct 430 ms 41964 KB Output is correct
135 Correct 407 ms 42744 KB Output is correct
136 Correct 464 ms 43212 KB Output is correct
137 Correct 421 ms 42848 KB Output is correct
138 Correct 405 ms 40628 KB Output is correct
139 Correct 351 ms 36684 KB Output is correct
140 Correct 1 ms 980 KB Output is correct
141 Correct 54 ms 7608 KB Output is correct
142 Correct 29 ms 4516 KB Output is correct
143 Correct 110 ms 13364 KB Output is correct
144 Correct 212 ms 21244 KB Output is correct
145 Correct 202 ms 21752 KB Output is correct
146 Correct 290 ms 26872 KB Output is correct
147 Correct 313 ms 32656 KB Output is correct
148 Correct 373 ms 37332 KB Output is correct
149 Correct 430 ms 42684 KB Output is correct
150 Correct 428 ms 42660 KB Output is correct
151 Correct 421 ms 42996 KB Output is correct
152 Correct 6 ms 1960 KB Output is correct
153 Correct 10 ms 2664 KB Output is correct
154 Correct 167 ms 21240 KB Output is correct
155 Correct 279 ms 31856 KB Output is correct
156 Correct 399 ms 42112 KB Output is correct
157 Correct 1 ms 980 KB Output is correct
158 Correct 1 ms 1080 KB Output is correct
159 Correct 1 ms 980 KB Output is correct
160 Correct 1 ms 980 KB Output is correct
161 Correct 399 ms 44064 KB Output is correct
162 Correct 409 ms 46500 KB Output is correct
163 Correct 468 ms 46308 KB Output is correct
164 Correct 439 ms 46116 KB Output is correct
165 Correct 498 ms 44836 KB Output is correct
166 Correct 444 ms 44040 KB Output is correct
167 Correct 81 ms 11188 KB Output is correct
168 Correct 45 ms 6552 KB Output is correct
169 Correct 174 ms 15764 KB Output is correct
170 Correct 246 ms 28608 KB Output is correct
171 Correct 372 ms 37480 KB Output is correct
172 Correct 194 ms 22868 KB Output is correct
173 Correct 262 ms 27312 KB Output is correct
174 Correct 279 ms 32580 KB Output is correct
175 Correct 306 ms 36152 KB Output is correct
176 Correct 364 ms 40720 KB Output is correct
177 Correct 437 ms 45088 KB Output is correct