답안 #446965

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
446965 2021-07-24T05:49:35 Z blue 분수 공원 (IOI21_parks) C++17
100 / 100
1308 ms 73640 KB
#include "parks.h"
#include <vector>
#include <set>
#include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;

const int maxN = 200'000;

int N;
vector<int> X, Y;


vector<int> fountain_edge[maxN];
vector<int> fountain_visit(maxN, 0);
int visit_count = 0;

void fountain_dfs(int u)
{
    fountain_visit[u] = 1;
    visit_count++;
    for(int v: fountain_edge[u])
    {
        if(fountain_visit[v]) continue;
        fountain_dfs(v);
    }
}


struct obj
{
    int i;
    int x;
    int y;
};

bool operator < (obj A, obj B)
{
    if(A.x == B.x) return A.y < B.y;
    return A.x < B.x;
};

set<obj> fountains;
set<obj> benches;

int point_index(int x, int y)
{
    set<obj>::iterator it = fountains.find(obj{-1, x, y});
    if(it == fountains.end()) return -1;
    else return it->i;
}

int bench_id = -1;
void insert_bench(int x, int y)
{
    set<obj>::iterator it = benches.find(obj{-1, x, y});
    if(it == benches.end())
    {
        bench_id++;
        benches.insert(obj{bench_id, x, y});
    }
}


vector<int> U, V, A, B;
void add_edge(int u, int v, int a, int b)
{
    // printf("add_edge %d(%d, %d) - %d(%d, %d) with bench at (%d, %d) \n", u, X[u], Y[u], v, X[v], Y[v], a, b);
    U.push_back(u);
    V.push_back(v);
    A.push_back(a);
    B.push_back(b);
}



int construct_roads(vector<int> x, vector<int> y)
{
    // cerr << "check\n";
    X = x;
    Y = y;

    N = X.size();

    for(int i = 0; i < N; i++)
        fountains.insert(obj{i, x[i], y[i]});



    for(int i = 0; i < N; i++)
    {
        int I;

        I = point_index(x[i] - 2, y[i]);
        if(I != -1)
        {
            fountain_edge[i].push_back(I);
            fountain_edge[I].push_back(i);
        }

        I = point_index(x[i], y[i] - 2);
        if(I != -1)
        {
            fountain_edge[i].push_back(I);
            fountain_edge[I].push_back(i);
        }

        insert_bench(x[i] - 1, y[i] - 1);
        insert_bench(x[i] + 1, y[i] - 1);
        insert_bench(x[i] - 1, y[i] + 1);
        insert_bench(x[i] + 1, y[i] + 1);
    }



    fountain_dfs(0);
    if(visit_count != N)
    {
        return 0;
    }

    for(obj B: benches)
    {
        // cerr << "B = " << B.x << ' ' << B.y << '\n';
        int P1, P2;
        if((B.x + B.y) % 4 == 0) //horizontal
        {
            // cerr << "horizontal\n";
            P1 = point_index(B.x - 1, B.y - 1);
            P2 = point_index(B.x + 1, B.y - 1);
            if(P1 != -1 && P2 != -1)
            {
                add_edge(P1, P2, B.x, B.y);
                continue;
            }



            P1 = point_index(B.x - 1, B.y + 1);
            P2 = point_index(B.x + 1, B.y + 1);
            if(P1 != -1 && P2 != -1)
                add_edge(P1, P2, B.x, B.y);
        }
        else
        {
            // cerr << "vertical\n";
            P1 = point_index(B.x - 1, B.y - 1);
            P2 = point_index(B.x - 1, B.y + 1);

            // cerr << B.x - 1 << ' ' << B.y - 1 << "    " << B.x - 1 << ' ' << B.y + 1 << '\n';
            // cerr << P1 << ' ' << P2 << '\n';

            if(P1 != -1 && P2 != -1)
            {
                add_edge(P1, P2, B.x, B.y);
                continue;
            }

            P1 = point_index(B.x + 1, B.y - 1);
            P2 = point_index(B.x + 1, B.y + 1);
            if(P1 != -1 && P2 != -1)
            {
                add_edge(P1, P2, B.x, B.y);
            }
        }
    }

    build(U, V, A, B);
    return 1;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 5708 KB Output is correct
2 Correct 3 ms 5792 KB Output is correct
3 Correct 3 ms 5708 KB Output is correct
4 Correct 3 ms 5708 KB Output is correct
5 Correct 4 ms 5708 KB Output is correct
6 Correct 3 ms 5708 KB Output is correct
7 Correct 3 ms 5708 KB Output is correct
8 Correct 4 ms 5708 KB Output is correct
9 Correct 447 ms 37708 KB Output is correct
10 Correct 31 ms 9156 KB Output is correct
11 Correct 181 ms 23180 KB Output is correct
12 Correct 46 ms 10824 KB Output is correct
13 Correct 87 ms 17352 KB Output is correct
14 Correct 5 ms 5964 KB Output is correct
15 Correct 7 ms 6220 KB Output is correct
16 Correct 437 ms 36380 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 5708 KB Output is correct
2 Correct 3 ms 5792 KB Output is correct
3 Correct 3 ms 5708 KB Output is correct
4 Correct 3 ms 5708 KB Output is correct
5 Correct 4 ms 5708 KB Output is correct
6 Correct 3 ms 5708 KB Output is correct
7 Correct 3 ms 5708 KB Output is correct
8 Correct 4 ms 5708 KB Output is correct
9 Correct 447 ms 37708 KB Output is correct
10 Correct 31 ms 9156 KB Output is correct
11 Correct 181 ms 23180 KB Output is correct
12 Correct 46 ms 10824 KB Output is correct
13 Correct 87 ms 17352 KB Output is correct
14 Correct 5 ms 5964 KB Output is correct
15 Correct 7 ms 6220 KB Output is correct
16 Correct 437 ms 36380 KB Output is correct
17 Correct 4 ms 5708 KB Output is correct
18 Correct 3 ms 5708 KB Output is correct
19 Correct 3 ms 5708 KB Output is correct
20 Correct 3 ms 5708 KB Output is correct
21 Correct 3 ms 5708 KB Output is correct
22 Correct 4 ms 5708 KB Output is correct
23 Correct 1107 ms 62168 KB Output is correct
24 Correct 3 ms 5708 KB Output is correct
25 Correct 7 ms 6092 KB Output is correct
26 Correct 7 ms 6348 KB Output is correct
27 Correct 11 ms 6604 KB Output is correct
28 Correct 359 ms 28580 KB Output is correct
29 Correct 621 ms 39104 KB Output is correct
30 Correct 896 ms 50776 KB Output is correct
31 Correct 1143 ms 61724 KB Output is correct
32 Correct 3 ms 5708 KB Output is correct
33 Correct 3 ms 5708 KB Output is correct
34 Correct 4 ms 5708 KB Output is correct
35 Correct 4 ms 5708 KB Output is correct
36 Correct 3 ms 5708 KB Output is correct
37 Correct 3 ms 5708 KB Output is correct
38 Correct 3 ms 5708 KB Output is correct
39 Correct 4 ms 5708 KB Output is correct
40 Correct 3 ms 5708 KB Output is correct
41 Correct 3 ms 5708 KB Output is correct
42 Correct 3 ms 5708 KB Output is correct
43 Correct 6 ms 6220 KB Output is correct
44 Correct 8 ms 6476 KB Output is correct
45 Correct 479 ms 36856 KB Output is correct
46 Correct 823 ms 50956 KB Output is correct
47 Correct 815 ms 50716 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 5708 KB Output is correct
2 Correct 3 ms 5792 KB Output is correct
3 Correct 3 ms 5708 KB Output is correct
4 Correct 3 ms 5708 KB Output is correct
5 Correct 4 ms 5708 KB Output is correct
6 Correct 3 ms 5708 KB Output is correct
7 Correct 3 ms 5708 KB Output is correct
8 Correct 4 ms 5708 KB Output is correct
9 Correct 447 ms 37708 KB Output is correct
10 Correct 31 ms 9156 KB Output is correct
11 Correct 181 ms 23180 KB Output is correct
12 Correct 46 ms 10824 KB Output is correct
13 Correct 87 ms 17352 KB Output is correct
14 Correct 5 ms 5964 KB Output is correct
15 Correct 7 ms 6220 KB Output is correct
16 Correct 437 ms 36380 KB Output is correct
17 Correct 4 ms 5708 KB Output is correct
18 Correct 3 ms 5708 KB Output is correct
19 Correct 3 ms 5708 KB Output is correct
20 Correct 3 ms 5708 KB Output is correct
21 Correct 3 ms 5708 KB Output is correct
22 Correct 4 ms 5708 KB Output is correct
23 Correct 1107 ms 62168 KB Output is correct
24 Correct 3 ms 5708 KB Output is correct
25 Correct 7 ms 6092 KB Output is correct
26 Correct 7 ms 6348 KB Output is correct
27 Correct 11 ms 6604 KB Output is correct
28 Correct 359 ms 28580 KB Output is correct
29 Correct 621 ms 39104 KB Output is correct
30 Correct 896 ms 50776 KB Output is correct
31 Correct 1143 ms 61724 KB Output is correct
32 Correct 3 ms 5708 KB Output is correct
33 Correct 3 ms 5708 KB Output is correct
34 Correct 4 ms 5708 KB Output is correct
35 Correct 4 ms 5708 KB Output is correct
36 Correct 3 ms 5708 KB Output is correct
37 Correct 3 ms 5708 KB Output is correct
38 Correct 3 ms 5708 KB Output is correct
39 Correct 4 ms 5708 KB Output is correct
40 Correct 3 ms 5708 KB Output is correct
41 Correct 3 ms 5708 KB Output is correct
42 Correct 3 ms 5708 KB Output is correct
43 Correct 6 ms 6220 KB Output is correct
44 Correct 8 ms 6476 KB Output is correct
45 Correct 479 ms 36856 KB Output is correct
46 Correct 823 ms 50956 KB Output is correct
47 Correct 815 ms 50716 KB Output is correct
48 Correct 3 ms 5708 KB Output is correct
49 Correct 3 ms 5708 KB Output is correct
50 Correct 3 ms 5708 KB Output is correct
51 Correct 3 ms 5708 KB Output is correct
52 Correct 4 ms 5708 KB Output is correct
53 Correct 3 ms 5708 KB Output is correct
54 Correct 4 ms 5708 KB Output is correct
55 Correct 1147 ms 58688 KB Output is correct
56 Correct 3 ms 5708 KB Output is correct
57 Correct 7 ms 6220 KB Output is correct
58 Correct 17 ms 7496 KB Output is correct
59 Correct 21 ms 7884 KB Output is correct
60 Correct 463 ms 33348 KB Output is correct
61 Correct 678 ms 42884 KB Output is correct
62 Correct 850 ms 50840 KB Output is correct
63 Correct 1083 ms 59932 KB Output is correct
64 Correct 3 ms 5708 KB Output is correct
65 Correct 3 ms 5708 KB Output is correct
66 Correct 3 ms 5708 KB Output is correct
67 Correct 1043 ms 70036 KB Output is correct
68 Correct 1049 ms 70188 KB Output is correct
69 Correct 1051 ms 70388 KB Output is correct
70 Correct 9 ms 6732 KB Output is correct
71 Correct 18 ms 7652 KB Output is correct
72 Correct 484 ms 35980 KB Output is correct
73 Correct 884 ms 51924 KB Output is correct
74 Correct 1228 ms 66324 KB Output is correct
75 Correct 1130 ms 66076 KB Output is correct
76 Correct 1047 ms 71708 KB Output is correct
77 Correct 11 ms 6988 KB Output is correct
78 Correct 19 ms 7924 KB Output is correct
79 Correct 497 ms 36164 KB Output is correct
80 Correct 845 ms 51716 KB Output is correct
81 Correct 1231 ms 66600 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 5708 KB Output is correct
2 Correct 3 ms 5792 KB Output is correct
3 Correct 3 ms 5708 KB Output is correct
4 Correct 3 ms 5708 KB Output is correct
5 Correct 4 ms 5708 KB Output is correct
6 Correct 3 ms 5708 KB Output is correct
7 Correct 3 ms 5708 KB Output is correct
8 Correct 4 ms 5708 KB Output is correct
9 Correct 447 ms 37708 KB Output is correct
10 Correct 31 ms 9156 KB Output is correct
11 Correct 181 ms 23180 KB Output is correct
12 Correct 46 ms 10824 KB Output is correct
13 Correct 87 ms 17352 KB Output is correct
14 Correct 5 ms 5964 KB Output is correct
15 Correct 7 ms 6220 KB Output is correct
16 Correct 437 ms 36380 KB Output is correct
17 Correct 4 ms 5780 KB Output is correct
18 Correct 4 ms 5708 KB Output is correct
19 Correct 4 ms 5780 KB Output is correct
20 Correct 1146 ms 70612 KB Output is correct
21 Correct 1200 ms 69520 KB Output is correct
22 Correct 1226 ms 68976 KB Output is correct
23 Correct 904 ms 59108 KB Output is correct
24 Correct 881 ms 73640 KB Output is correct
25 Correct 1010 ms 54852 KB Output is correct
26 Correct 866 ms 54860 KB Output is correct
27 Correct 1120 ms 64448 KB Output is correct
28 Correct 1125 ms 64488 KB Output is correct
29 Correct 1295 ms 64384 KB Output is correct
30 Correct 1288 ms 64424 KB Output is correct
31 Correct 4 ms 5836 KB Output is correct
32 Correct 45 ms 10424 KB Output is correct
33 Correct 318 ms 33556 KB Output is correct
34 Correct 1090 ms 69852 KB Output is correct
35 Correct 22 ms 8140 KB Output is correct
36 Correct 156 ms 17220 KB Output is correct
37 Correct 411 ms 28648 KB Output is correct
38 Correct 383 ms 28228 KB Output is correct
39 Correct 601 ms 36192 KB Output is correct
40 Correct 831 ms 44432 KB Output is correct
41 Correct 1039 ms 52824 KB Output is correct
42 Correct 1257 ms 60856 KB Output is correct
43 Correct 4 ms 5708 KB Output is correct
44 Correct 4 ms 5788 KB Output is correct
45 Correct 4 ms 5708 KB Output is correct
46 Correct 4 ms 5708 KB Output is correct
47 Correct 4 ms 5788 KB Output is correct
48 Correct 4 ms 5784 KB Output is correct
49 Correct 4 ms 5708 KB Output is correct
50 Correct 5 ms 5836 KB Output is correct
51 Correct 4 ms 5788 KB Output is correct
52 Correct 4 ms 5708 KB Output is correct
53 Correct 4 ms 5708 KB Output is correct
54 Correct 7 ms 6220 KB Output is correct
55 Correct 9 ms 6540 KB Output is correct
56 Correct 544 ms 37272 KB Output is correct
57 Correct 901 ms 51360 KB Output is correct
58 Correct 905 ms 51548 KB Output is correct
59 Correct 4 ms 5736 KB Output is correct
60 Correct 4 ms 5708 KB Output is correct
61 Correct 4 ms 5708 KB Output is correct
62 Correct 1212 ms 68840 KB Output is correct
63 Correct 1140 ms 69004 KB Output is correct
64 Correct 1144 ms 69388 KB Output is correct
65 Correct 11 ms 6732 KB Output is correct
66 Correct 19 ms 7756 KB Output is correct
67 Correct 642 ms 35736 KB Output is correct
68 Correct 935 ms 51392 KB Output is correct
69 Correct 1308 ms 65272 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 5708 KB Output is correct
2 Correct 3 ms 5792 KB Output is correct
3 Correct 3 ms 5708 KB Output is correct
4 Correct 3 ms 5708 KB Output is correct
5 Correct 4 ms 5708 KB Output is correct
6 Correct 3 ms 5708 KB Output is correct
7 Correct 3 ms 5708 KB Output is correct
8 Correct 4 ms 5708 KB Output is correct
9 Correct 447 ms 37708 KB Output is correct
10 Correct 31 ms 9156 KB Output is correct
11 Correct 181 ms 23180 KB Output is correct
12 Correct 46 ms 10824 KB Output is correct
13 Correct 87 ms 17352 KB Output is correct
14 Correct 5 ms 5964 KB Output is correct
15 Correct 7 ms 6220 KB Output is correct
16 Correct 437 ms 36380 KB Output is correct
17 Correct 1130 ms 70692 KB Output is correct
18 Correct 1158 ms 70072 KB Output is correct
19 Correct 1203 ms 70924 KB Output is correct
20 Correct 1292 ms 60364 KB Output is correct
21 Correct 1073 ms 57360 KB Output is correct
22 Correct 4 ms 5708 KB Output is correct
23 Correct 125 ms 15160 KB Output is correct
24 Correct 48 ms 10336 KB Output is correct
25 Correct 254 ms 21356 KB Output is correct
26 Correct 540 ms 31788 KB Output is correct
27 Correct 571 ms 34380 KB Output is correct
28 Correct 686 ms 41800 KB Output is correct
29 Correct 915 ms 48560 KB Output is correct
30 Correct 1131 ms 55356 KB Output is correct
31 Correct 1286 ms 62592 KB Output is correct
32 Correct 1219 ms 64988 KB Output is correct
33 Correct 1087 ms 70428 KB Output is correct
34 Correct 12 ms 6988 KB Output is correct
35 Correct 19 ms 7984 KB Output is correct
36 Correct 528 ms 35672 KB Output is correct
37 Correct 847 ms 50608 KB Output is correct
38 Correct 1261 ms 65376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 5708 KB Output is correct
2 Correct 3 ms 5792 KB Output is correct
3 Correct 3 ms 5708 KB Output is correct
4 Correct 3 ms 5708 KB Output is correct
5 Correct 4 ms 5708 KB Output is correct
6 Correct 3 ms 5708 KB Output is correct
7 Correct 3 ms 5708 KB Output is correct
8 Correct 4 ms 5708 KB Output is correct
9 Correct 447 ms 37708 KB Output is correct
10 Correct 31 ms 9156 KB Output is correct
11 Correct 181 ms 23180 KB Output is correct
12 Correct 46 ms 10824 KB Output is correct
13 Correct 87 ms 17352 KB Output is correct
14 Correct 5 ms 5964 KB Output is correct
15 Correct 7 ms 6220 KB Output is correct
16 Correct 437 ms 36380 KB Output is correct
17 Correct 4 ms 5708 KB Output is correct
18 Correct 3 ms 5708 KB Output is correct
19 Correct 3 ms 5708 KB Output is correct
20 Correct 3 ms 5708 KB Output is correct
21 Correct 3 ms 5708 KB Output is correct
22 Correct 4 ms 5708 KB Output is correct
23 Correct 1107 ms 62168 KB Output is correct
24 Correct 3 ms 5708 KB Output is correct
25 Correct 7 ms 6092 KB Output is correct
26 Correct 7 ms 6348 KB Output is correct
27 Correct 11 ms 6604 KB Output is correct
28 Correct 359 ms 28580 KB Output is correct
29 Correct 621 ms 39104 KB Output is correct
30 Correct 896 ms 50776 KB Output is correct
31 Correct 1143 ms 61724 KB Output is correct
32 Correct 3 ms 5708 KB Output is correct
33 Correct 3 ms 5708 KB Output is correct
34 Correct 4 ms 5708 KB Output is correct
35 Correct 4 ms 5708 KB Output is correct
36 Correct 3 ms 5708 KB Output is correct
37 Correct 3 ms 5708 KB Output is correct
38 Correct 3 ms 5708 KB Output is correct
39 Correct 4 ms 5708 KB Output is correct
40 Correct 3 ms 5708 KB Output is correct
41 Correct 3 ms 5708 KB Output is correct
42 Correct 3 ms 5708 KB Output is correct
43 Correct 6 ms 6220 KB Output is correct
44 Correct 8 ms 6476 KB Output is correct
45 Correct 479 ms 36856 KB Output is correct
46 Correct 823 ms 50956 KB Output is correct
47 Correct 815 ms 50716 KB Output is correct
48 Correct 3 ms 5708 KB Output is correct
49 Correct 3 ms 5708 KB Output is correct
50 Correct 3 ms 5708 KB Output is correct
51 Correct 3 ms 5708 KB Output is correct
52 Correct 4 ms 5708 KB Output is correct
53 Correct 3 ms 5708 KB Output is correct
54 Correct 4 ms 5708 KB Output is correct
55 Correct 1147 ms 58688 KB Output is correct
56 Correct 3 ms 5708 KB Output is correct
57 Correct 7 ms 6220 KB Output is correct
58 Correct 17 ms 7496 KB Output is correct
59 Correct 21 ms 7884 KB Output is correct
60 Correct 463 ms 33348 KB Output is correct
61 Correct 678 ms 42884 KB Output is correct
62 Correct 850 ms 50840 KB Output is correct
63 Correct 1083 ms 59932 KB Output is correct
64 Correct 3 ms 5708 KB Output is correct
65 Correct 3 ms 5708 KB Output is correct
66 Correct 3 ms 5708 KB Output is correct
67 Correct 1043 ms 70036 KB Output is correct
68 Correct 1049 ms 70188 KB Output is correct
69 Correct 1051 ms 70388 KB Output is correct
70 Correct 9 ms 6732 KB Output is correct
71 Correct 18 ms 7652 KB Output is correct
72 Correct 484 ms 35980 KB Output is correct
73 Correct 884 ms 51924 KB Output is correct
74 Correct 1228 ms 66324 KB Output is correct
75 Correct 1130 ms 66076 KB Output is correct
76 Correct 1047 ms 71708 KB Output is correct
77 Correct 11 ms 6988 KB Output is correct
78 Correct 19 ms 7924 KB Output is correct
79 Correct 497 ms 36164 KB Output is correct
80 Correct 845 ms 51716 KB Output is correct
81 Correct 1231 ms 66600 KB Output is correct
82 Correct 4 ms 5780 KB Output is correct
83 Correct 4 ms 5708 KB Output is correct
84 Correct 4 ms 5780 KB Output is correct
85 Correct 1146 ms 70612 KB Output is correct
86 Correct 1200 ms 69520 KB Output is correct
87 Correct 1226 ms 68976 KB Output is correct
88 Correct 904 ms 59108 KB Output is correct
89 Correct 881 ms 73640 KB Output is correct
90 Correct 1010 ms 54852 KB Output is correct
91 Correct 866 ms 54860 KB Output is correct
92 Correct 1120 ms 64448 KB Output is correct
93 Correct 1125 ms 64488 KB Output is correct
94 Correct 1295 ms 64384 KB Output is correct
95 Correct 1288 ms 64424 KB Output is correct
96 Correct 4 ms 5836 KB Output is correct
97 Correct 45 ms 10424 KB Output is correct
98 Correct 318 ms 33556 KB Output is correct
99 Correct 1090 ms 69852 KB Output is correct
100 Correct 22 ms 8140 KB Output is correct
101 Correct 156 ms 17220 KB Output is correct
102 Correct 411 ms 28648 KB Output is correct
103 Correct 383 ms 28228 KB Output is correct
104 Correct 601 ms 36192 KB Output is correct
105 Correct 831 ms 44432 KB Output is correct
106 Correct 1039 ms 52824 KB Output is correct
107 Correct 1257 ms 60856 KB Output is correct
108 Correct 4 ms 5708 KB Output is correct
109 Correct 4 ms 5788 KB Output is correct
110 Correct 4 ms 5708 KB Output is correct
111 Correct 4 ms 5708 KB Output is correct
112 Correct 4 ms 5788 KB Output is correct
113 Correct 4 ms 5784 KB Output is correct
114 Correct 4 ms 5708 KB Output is correct
115 Correct 5 ms 5836 KB Output is correct
116 Correct 4 ms 5788 KB Output is correct
117 Correct 4 ms 5708 KB Output is correct
118 Correct 4 ms 5708 KB Output is correct
119 Correct 7 ms 6220 KB Output is correct
120 Correct 9 ms 6540 KB Output is correct
121 Correct 544 ms 37272 KB Output is correct
122 Correct 901 ms 51360 KB Output is correct
123 Correct 905 ms 51548 KB Output is correct
124 Correct 4 ms 5736 KB Output is correct
125 Correct 4 ms 5708 KB Output is correct
126 Correct 4 ms 5708 KB Output is correct
127 Correct 1212 ms 68840 KB Output is correct
128 Correct 1140 ms 69004 KB Output is correct
129 Correct 1144 ms 69388 KB Output is correct
130 Correct 11 ms 6732 KB Output is correct
131 Correct 19 ms 7756 KB Output is correct
132 Correct 642 ms 35736 KB Output is correct
133 Correct 935 ms 51392 KB Output is correct
134 Correct 1308 ms 65272 KB Output is correct
135 Correct 1130 ms 70692 KB Output is correct
136 Correct 1158 ms 70072 KB Output is correct
137 Correct 1203 ms 70924 KB Output is correct
138 Correct 1292 ms 60364 KB Output is correct
139 Correct 1073 ms 57360 KB Output is correct
140 Correct 4 ms 5708 KB Output is correct
141 Correct 125 ms 15160 KB Output is correct
142 Correct 48 ms 10336 KB Output is correct
143 Correct 254 ms 21356 KB Output is correct
144 Correct 540 ms 31788 KB Output is correct
145 Correct 571 ms 34380 KB Output is correct
146 Correct 686 ms 41800 KB Output is correct
147 Correct 915 ms 48560 KB Output is correct
148 Correct 1131 ms 55356 KB Output is correct
149 Correct 1286 ms 62592 KB Output is correct
150 Correct 1219 ms 64988 KB Output is correct
151 Correct 1087 ms 70428 KB Output is correct
152 Correct 12 ms 6988 KB Output is correct
153 Correct 19 ms 7984 KB Output is correct
154 Correct 528 ms 35672 KB Output is correct
155 Correct 847 ms 50608 KB Output is correct
156 Correct 1261 ms 65376 KB Output is correct
157 Correct 4 ms 5708 KB Output is correct
158 Correct 4 ms 5708 KB Output is correct
159 Correct 4 ms 5708 KB Output is correct
160 Correct 5 ms 5708 KB Output is correct
161 Correct 1168 ms 55420 KB Output is correct
162 Correct 1076 ms 71040 KB Output is correct
163 Correct 1045 ms 64980 KB Output is correct
164 Correct 1059 ms 64816 KB Output is correct
165 Correct 1062 ms 59988 KB Output is correct
166 Correct 1164 ms 56576 KB Output is correct
167 Correct 195 ms 17932 KB Output is correct
168 Correct 74 ms 11844 KB Output is correct
169 Correct 276 ms 21572 KB Output is correct
170 Correct 626 ms 35352 KB Output is correct
171 Correct 964 ms 45396 KB Output is correct
172 Correct 457 ms 30916 KB Output is correct
173 Correct 593 ms 36588 KB Output is correct
174 Correct 691 ms 41528 KB Output is correct
175 Correct 798 ms 45928 KB Output is correct
176 Correct 981 ms 51432 KB Output is correct
177 Correct 1224 ms 56624 KB Output is correct