답안 #115467

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
115467 2019-06-07T15:35:52 Z youngyojun Iqea (innopolis2018_final_C) C++11
100 / 100
610 ms 46492 KB
#include <bits/stdc++.h>
#define rf(x) (x)=0;while(*p<48)p++;while(47<*p)(x)=((x)<<3)+((x)<<1)+(*p++&15);
#define eb emplace_back
#define sz(V) ((int)(V).size())
#define allv(V) ((V).begin()),((V).end())
#define sorv(V) sort(allv(V))
#define univ(V) (V).erase(unique(allv(V)),(V).end())
#define rb(x) ((x)&(-(x)))
#define INF (0x3f3f3f3f)
using namespace std;
typedef pair<int, int> pii;
void fg(vector<int> G[], int a, int b) { G[a].eb(b); G[b].eb(a); }
static unsigned char str[5500055], *p=str;

const int MAXN = 100005;
const int MAXK = MAXN;
static int _int[MAXN*5], *_intp = _int;
inline int* newint(const unsigned int c) {
	_intp += c;
	return _intp - c;
}

struct BIT {
	int *d, n;

	void init(int _n) {
		n = _n + 2;
		d = newint(n);
		fill(d, d+n, INF);
	}
	void upd(int x, int r) {
		for(x++; x < n; x += rb(x))
			if(r < d[x]) d[x] = r;
	}
	int get(int x) {
		int r = INF; for(x++; x; x -= rb(x))
			if(d[x] < r) r = d[x];
		return r;
	}
};

struct NOD {
	NOD() : sy(INF), ey(-INF) {}
	BIT bitu, bitd;
	int x, sy, ey;

	void init() {
		int l = ey-sy+1;
		bitu.init(l);
		bitd.init(l);
	}
	void add(pii p) {
		x = p.first;
		if(p.second < sy) sy = p.second;
		if(ey < p.second) ey = p.second;
	}
	void add(int y, int d) {
		bitu.upd(y-sy, d-y);
		bitd.upd(ey-y, d+y);
	}
	int get(int y) {
		return min(bitu.get(y-sy) + y, bitd.get(ey-y) - y);
	}
} nod[MAXK];

vector<int> T[MAXN], G[MAXK];
int P[17][MAXK];
int C[17][MAXN], CY[17][MAXN];
int D[MAXK], prt[MAXK], cnt[MAXK];

pii A[MAXN];
int B[MAXN];

int N, Q, K;

int getidx(const pii &p) {
	int r = int(lower_bound(A+1, A+N+1, p) - A);
	return r <= N && p == A[r] ? r : 0;
}

void predfs(int i) {
	cnt[i] = 1;
	for(int v : G[i]) if(!cnt[v]) {
		predfs(v);
		cnt[i] += cnt[v];
	}
}

void cent(int &rt) {
	int N = cnt[rt];
	for(int hi, hc;;) {
		hi = hc = -1;
		for(int v : G[rt]) {
			if(N <= cnt[v] || cnt[v] <= hc) continue;
			hi = v; hc = cnt[v];
		}
		if(hc*2 <= N) break;
		cnt[rt] = N - hc;
		cnt[hi] = N;
		rt = hi;
	}
}

int makeCD(int i, int d) {
	cent(i);
	D[i] = d; P[d][i] = i;

	queue<int> PQ;
	for(int j = getidx({nod[i].x, nod[i].sy});; j++) {
		if(N < j || B[j] != i) break;
		PQ.push(j);
		C[d][j] = 0;
		CY[d][j] = A[j].second;
	}
	for(int j, c; !PQ.empty(); PQ.pop()) {
		j = PQ.front();
		c = C[d][j] + 1;
		for(int v : T[j]) {
			if(cnt[B[j]] < cnt[B[v]] || C[d][v] <= c) continue;
			PQ.push(v);
			C[d][v] = c;
			CY[d][v] = CY[d][j];
		}
	}

	for(int v : G[i]) if(cnt[v] < cnt[i]) {
		v = makeCD(v, d+1);
		prt[v] = i;
	}
	return i;
}

void makeTree() {
	K = B[1] = 1;
	nod[1].add(A[1]);
	for(int i = 2, j; i <= N; i++) {
		if(A[i-1].first != A[i].first || A[i-1].second != A[i].second-1) K++;
		else fg(T, i-1, i);
		B[i] = K;
		nod[K].add(A[i]);
		j = getidx({A[i].first-1, A[i].second});
		if(j) {
			fg(T, j, i);
			fg(G, B[j], B[i]);
		}
	}
	for(int i = 1; i <= K; i++) {
		nod[i].init();
		sorv(G[i]);
		univ(G[i]);
	}
}

void upd(int i) {
	for(int v = B[i], d = D[v]; v; v = prt[v], d--)
		nod[v].add(CY[d][i], C[d][i]);
}
int get(int i) {
	int r = INF;
	for(int v = B[i], d = D[v], t; v; v = prt[v], d--) {
		t = nod[v].get(CY[d][i]) + C[d][i];
		if(t < r) r = t;
	}
	return N <= r ? -1 : r;
}

int main() {
	fread(str, 1, 5500055, stdin);

	rf(N)
	for(int i = 1; i <= N; i++) { rf(A[i].first) rf(A[i].second) }
	sort(A+1, A+N+1);

	makeTree();
	predfs(1);
	fill(C[0], C[16]+MAXN, INF);
	makeCD(1, 0);

	rf(Q)
	for(int t, x, y; Q--;) {
		rf(t) rf(x) rf(y)
		x = getidx({x, y});
		if(1 == t) upd(x);
		else printf("%d\n", get(x));
	}
	return 0;
}

Compilation message

C.cpp: In function 'int main()':
C.cpp:168:7: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
  fread(str, 1, 5500055, stdin);
  ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 16384 KB Output is correct
2 Correct 14 ms 16384 KB Output is correct
3 Correct 14 ms 16512 KB Output is correct
4 Correct 19 ms 17024 KB Output is correct
5 Correct 19 ms 17024 KB Output is correct
6 Correct 19 ms 17024 KB Output is correct
7 Correct 21 ms 17528 KB Output is correct
8 Correct 21 ms 17536 KB Output is correct
9 Correct 21 ms 17500 KB Output is correct
10 Correct 19 ms 17152 KB Output is correct
11 Correct 20 ms 17372 KB Output is correct
12 Correct 20 ms 17280 KB Output is correct
13 Correct 20 ms 17440 KB Output is correct
14 Correct 27 ms 17400 KB Output is correct
15 Correct 21 ms 17372 KB Output is correct
16 Correct 24 ms 17528 KB Output is correct
17 Correct 27 ms 17552 KB Output is correct
18 Correct 19 ms 17280 KB Output is correct
19 Correct 20 ms 17280 KB Output is correct
20 Correct 24 ms 17408 KB Output is correct
21 Correct 24 ms 17408 KB Output is correct
22 Correct 38 ms 17528 KB Output is correct
23 Correct 21 ms 17536 KB Output is correct
24 Correct 23 ms 17664 KB Output is correct
25 Correct 26 ms 17884 KB Output is correct
26 Correct 22 ms 17152 KB Output is correct
27 Correct 18 ms 16896 KB Output is correct
28 Correct 26 ms 17664 KB Output is correct
29 Correct 22 ms 17656 KB Output is correct
30 Correct 20 ms 17664 KB Output is correct
31 Correct 20 ms 17664 KB Output is correct
32 Correct 20 ms 17280 KB Output is correct
33 Correct 21 ms 17408 KB Output is correct
34 Correct 22 ms 17656 KB Output is correct
35 Correct 22 ms 17408 KB Output is correct
36 Correct 22 ms 17912 KB Output is correct
37 Correct 29 ms 17396 KB Output is correct
38 Correct 20 ms 17408 KB Output is correct
39 Correct 43 ms 17400 KB Output is correct
40 Correct 19 ms 17408 KB Output is correct
41 Correct 20 ms 17664 KB Output is correct
42 Correct 26 ms 17536 KB Output is correct
43 Correct 27 ms 17664 KB Output is correct
44 Correct 20 ms 17372 KB Output is correct
45 Correct 28 ms 17408 KB Output is correct
46 Correct 17 ms 16896 KB Output is correct
47 Correct 19 ms 17272 KB Output is correct
48 Correct 20 ms 17272 KB Output is correct
49 Correct 20 ms 17152 KB Output is correct
50 Correct 20 ms 17188 KB Output is correct
51 Correct 20 ms 17312 KB Output is correct
52 Correct 16 ms 17244 KB Output is correct
53 Correct 20 ms 17408 KB Output is correct
54 Correct 19 ms 17408 KB Output is correct
55 Correct 20 ms 17280 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 16384 KB Output is correct
2 Correct 14 ms 16384 KB Output is correct
3 Correct 14 ms 16512 KB Output is correct
4 Correct 19 ms 17024 KB Output is correct
5 Correct 19 ms 17024 KB Output is correct
6 Correct 19 ms 17024 KB Output is correct
7 Correct 21 ms 17528 KB Output is correct
8 Correct 21 ms 17536 KB Output is correct
9 Correct 21 ms 17500 KB Output is correct
10 Correct 19 ms 17152 KB Output is correct
11 Correct 20 ms 17372 KB Output is correct
12 Correct 20 ms 17280 KB Output is correct
13 Correct 20 ms 17440 KB Output is correct
14 Correct 27 ms 17400 KB Output is correct
15 Correct 21 ms 17372 KB Output is correct
16 Correct 24 ms 17528 KB Output is correct
17 Correct 27 ms 17552 KB Output is correct
18 Correct 19 ms 17280 KB Output is correct
19 Correct 20 ms 17280 KB Output is correct
20 Correct 24 ms 17408 KB Output is correct
21 Correct 24 ms 17408 KB Output is correct
22 Correct 38 ms 17528 KB Output is correct
23 Correct 21 ms 17536 KB Output is correct
24 Correct 23 ms 17664 KB Output is correct
25 Correct 26 ms 17884 KB Output is correct
26 Correct 22 ms 17152 KB Output is correct
27 Correct 18 ms 16896 KB Output is correct
28 Correct 26 ms 17664 KB Output is correct
29 Correct 22 ms 17656 KB Output is correct
30 Correct 20 ms 17664 KB Output is correct
31 Correct 20 ms 17664 KB Output is correct
32 Correct 20 ms 17280 KB Output is correct
33 Correct 21 ms 17408 KB Output is correct
34 Correct 22 ms 17656 KB Output is correct
35 Correct 22 ms 17408 KB Output is correct
36 Correct 22 ms 17912 KB Output is correct
37 Correct 29 ms 17396 KB Output is correct
38 Correct 20 ms 17408 KB Output is correct
39 Correct 43 ms 17400 KB Output is correct
40 Correct 19 ms 17408 KB Output is correct
41 Correct 20 ms 17664 KB Output is correct
42 Correct 26 ms 17536 KB Output is correct
43 Correct 27 ms 17664 KB Output is correct
44 Correct 20 ms 17372 KB Output is correct
45 Correct 28 ms 17408 KB Output is correct
46 Correct 17 ms 16896 KB Output is correct
47 Correct 19 ms 17272 KB Output is correct
48 Correct 20 ms 17272 KB Output is correct
49 Correct 20 ms 17152 KB Output is correct
50 Correct 20 ms 17188 KB Output is correct
51 Correct 20 ms 17312 KB Output is correct
52 Correct 16 ms 17244 KB Output is correct
53 Correct 20 ms 17408 KB Output is correct
54 Correct 19 ms 17408 KB Output is correct
55 Correct 20 ms 17280 KB Output is correct
56 Correct 55 ms 18936 KB Output is correct
57 Correct 55 ms 18936 KB Output is correct
58 Correct 60 ms 18780 KB Output is correct
59 Correct 56 ms 20388 KB Output is correct
60 Correct 56 ms 19420 KB Output is correct
61 Correct 56 ms 20472 KB Output is correct
62 Correct 58 ms 20216 KB Output is correct
63 Correct 56 ms 20216 KB Output is correct
64 Correct 56 ms 20216 KB Output is correct
65 Correct 56 ms 19320 KB Output is correct
66 Correct 56 ms 19320 KB Output is correct
67 Correct 69 ms 19316 KB Output is correct
68 Correct 56 ms 20468 KB Output is correct
69 Correct 53 ms 19256 KB Output is correct
70 Correct 55 ms 20216 KB Output is correct
71 Correct 54 ms 20088 KB Output is correct
72 Correct 57 ms 20344 KB Output is correct
73 Correct 56 ms 19316 KB Output is correct
74 Correct 59 ms 20832 KB Output is correct
75 Correct 44 ms 19192 KB Output is correct
76 Correct 40 ms 20096 KB Output is correct
77 Correct 62 ms 20600 KB Output is correct
78 Correct 56 ms 20600 KB Output is correct
79 Correct 57 ms 21092 KB Output is correct
80 Correct 58 ms 20344 KB Output is correct
81 Correct 59 ms 20348 KB Output is correct
82 Correct 57 ms 19960 KB Output is correct
83 Correct 63 ms 20728 KB Output is correct
84 Correct 56 ms 20756 KB Output is correct
85 Correct 57 ms 19652 KB Output is correct
86 Correct 68 ms 19576 KB Output is correct
87 Correct 40 ms 18936 KB Output is correct
88 Correct 55 ms 20344 KB Output is correct
89 Correct 56 ms 20216 KB Output is correct
90 Correct 56 ms 20236 KB Output is correct
91 Correct 55 ms 19192 KB Output is correct
92 Correct 52 ms 18936 KB Output is correct
93 Correct 54 ms 19320 KB Output is correct
94 Correct 57 ms 20344 KB Output is correct
95 Correct 56 ms 20344 KB Output is correct
96 Correct 58 ms 20348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 86 ms 25848 KB Output is correct
2 Correct 248 ms 46360 KB Output is correct
3 Correct 228 ms 36088 KB Output is correct
4 Correct 225 ms 36088 KB Output is correct
5 Correct 222 ms 41480 KB Output is correct
6 Correct 224 ms 41464 KB Output is correct
7 Correct 207 ms 31224 KB Output is correct
8 Correct 114 ms 26844 KB Output is correct
9 Correct 83 ms 25376 KB Output is correct
10 Correct 262 ms 31192 KB Output is correct
11 Correct 133 ms 26744 KB Output is correct
12 Correct 109 ms 25320 KB Output is correct
13 Correct 88 ms 24696 KB Output is correct
14 Correct 104 ms 24724 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 302 ms 36824 KB Output is correct
2 Correct 317 ms 38216 KB Output is correct
3 Correct 356 ms 38312 KB Output is correct
4 Correct 270 ms 35960 KB Output is correct
5 Correct 281 ms 34364 KB Output is correct
6 Correct 277 ms 34392 KB Output is correct
7 Correct 301 ms 36368 KB Output is correct
8 Correct 387 ms 36316 KB Output is correct
9 Correct 283 ms 36792 KB Output is correct
10 Correct 358 ms 42388 KB Output is correct
11 Correct 280 ms 41516 KB Output is correct
12 Correct 258 ms 42232 KB Output is correct
13 Correct 268 ms 44172 KB Output is correct
14 Correct 154 ms 32464 KB Output is correct
15 Correct 82 ms 27740 KB Output is correct
16 Correct 236 ms 43256 KB Output is correct
17 Correct 216 ms 42488 KB Output is correct
18 Correct 231 ms 43584 KB Output is correct
19 Correct 231 ms 43568 KB Output is correct
20 Correct 259 ms 36984 KB Output is correct
21 Correct 210 ms 37276 KB Output is correct
22 Correct 220 ms 41336 KB Output is correct
23 Correct 282 ms 37112 KB Output is correct
24 Correct 241 ms 46492 KB Output is correct
25 Correct 206 ms 37884 KB Output is correct
26 Correct 203 ms 37496 KB Output is correct
27 Correct 205 ms 38136 KB Output is correct
28 Correct 212 ms 38136 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 16384 KB Output is correct
2 Correct 14 ms 16384 KB Output is correct
3 Correct 14 ms 16512 KB Output is correct
4 Correct 19 ms 17024 KB Output is correct
5 Correct 19 ms 17024 KB Output is correct
6 Correct 19 ms 17024 KB Output is correct
7 Correct 21 ms 17528 KB Output is correct
8 Correct 21 ms 17536 KB Output is correct
9 Correct 21 ms 17500 KB Output is correct
10 Correct 19 ms 17152 KB Output is correct
11 Correct 20 ms 17372 KB Output is correct
12 Correct 20 ms 17280 KB Output is correct
13 Correct 20 ms 17440 KB Output is correct
14 Correct 27 ms 17400 KB Output is correct
15 Correct 21 ms 17372 KB Output is correct
16 Correct 24 ms 17528 KB Output is correct
17 Correct 27 ms 17552 KB Output is correct
18 Correct 19 ms 17280 KB Output is correct
19 Correct 20 ms 17280 KB Output is correct
20 Correct 24 ms 17408 KB Output is correct
21 Correct 24 ms 17408 KB Output is correct
22 Correct 38 ms 17528 KB Output is correct
23 Correct 21 ms 17536 KB Output is correct
24 Correct 23 ms 17664 KB Output is correct
25 Correct 26 ms 17884 KB Output is correct
26 Correct 22 ms 17152 KB Output is correct
27 Correct 18 ms 16896 KB Output is correct
28 Correct 26 ms 17664 KB Output is correct
29 Correct 22 ms 17656 KB Output is correct
30 Correct 20 ms 17664 KB Output is correct
31 Correct 20 ms 17664 KB Output is correct
32 Correct 20 ms 17280 KB Output is correct
33 Correct 21 ms 17408 KB Output is correct
34 Correct 22 ms 17656 KB Output is correct
35 Correct 22 ms 17408 KB Output is correct
36 Correct 22 ms 17912 KB Output is correct
37 Correct 29 ms 17396 KB Output is correct
38 Correct 20 ms 17408 KB Output is correct
39 Correct 43 ms 17400 KB Output is correct
40 Correct 19 ms 17408 KB Output is correct
41 Correct 20 ms 17664 KB Output is correct
42 Correct 26 ms 17536 KB Output is correct
43 Correct 27 ms 17664 KB Output is correct
44 Correct 20 ms 17372 KB Output is correct
45 Correct 28 ms 17408 KB Output is correct
46 Correct 17 ms 16896 KB Output is correct
47 Correct 19 ms 17272 KB Output is correct
48 Correct 20 ms 17272 KB Output is correct
49 Correct 20 ms 17152 KB Output is correct
50 Correct 20 ms 17188 KB Output is correct
51 Correct 20 ms 17312 KB Output is correct
52 Correct 16 ms 17244 KB Output is correct
53 Correct 20 ms 17408 KB Output is correct
54 Correct 19 ms 17408 KB Output is correct
55 Correct 20 ms 17280 KB Output is correct
56 Correct 55 ms 18936 KB Output is correct
57 Correct 55 ms 18936 KB Output is correct
58 Correct 60 ms 18780 KB Output is correct
59 Correct 56 ms 20388 KB Output is correct
60 Correct 56 ms 19420 KB Output is correct
61 Correct 56 ms 20472 KB Output is correct
62 Correct 58 ms 20216 KB Output is correct
63 Correct 56 ms 20216 KB Output is correct
64 Correct 56 ms 20216 KB Output is correct
65 Correct 56 ms 19320 KB Output is correct
66 Correct 56 ms 19320 KB Output is correct
67 Correct 69 ms 19316 KB Output is correct
68 Correct 56 ms 20468 KB Output is correct
69 Correct 53 ms 19256 KB Output is correct
70 Correct 55 ms 20216 KB Output is correct
71 Correct 54 ms 20088 KB Output is correct
72 Correct 57 ms 20344 KB Output is correct
73 Correct 56 ms 19316 KB Output is correct
74 Correct 59 ms 20832 KB Output is correct
75 Correct 44 ms 19192 KB Output is correct
76 Correct 40 ms 20096 KB Output is correct
77 Correct 62 ms 20600 KB Output is correct
78 Correct 56 ms 20600 KB Output is correct
79 Correct 57 ms 21092 KB Output is correct
80 Correct 58 ms 20344 KB Output is correct
81 Correct 59 ms 20348 KB Output is correct
82 Correct 57 ms 19960 KB Output is correct
83 Correct 63 ms 20728 KB Output is correct
84 Correct 56 ms 20756 KB Output is correct
85 Correct 57 ms 19652 KB Output is correct
86 Correct 68 ms 19576 KB Output is correct
87 Correct 40 ms 18936 KB Output is correct
88 Correct 55 ms 20344 KB Output is correct
89 Correct 56 ms 20216 KB Output is correct
90 Correct 56 ms 20236 KB Output is correct
91 Correct 55 ms 19192 KB Output is correct
92 Correct 52 ms 18936 KB Output is correct
93 Correct 54 ms 19320 KB Output is correct
94 Correct 57 ms 20344 KB Output is correct
95 Correct 56 ms 20344 KB Output is correct
96 Correct 58 ms 20348 KB Output is correct
97 Correct 86 ms 25848 KB Output is correct
98 Correct 248 ms 46360 KB Output is correct
99 Correct 228 ms 36088 KB Output is correct
100 Correct 225 ms 36088 KB Output is correct
101 Correct 222 ms 41480 KB Output is correct
102 Correct 224 ms 41464 KB Output is correct
103 Correct 207 ms 31224 KB Output is correct
104 Correct 114 ms 26844 KB Output is correct
105 Correct 83 ms 25376 KB Output is correct
106 Correct 262 ms 31192 KB Output is correct
107 Correct 133 ms 26744 KB Output is correct
108 Correct 109 ms 25320 KB Output is correct
109 Correct 88 ms 24696 KB Output is correct
110 Correct 104 ms 24724 KB Output is correct
111 Correct 302 ms 36824 KB Output is correct
112 Correct 317 ms 38216 KB Output is correct
113 Correct 356 ms 38312 KB Output is correct
114 Correct 270 ms 35960 KB Output is correct
115 Correct 281 ms 34364 KB Output is correct
116 Correct 277 ms 34392 KB Output is correct
117 Correct 301 ms 36368 KB Output is correct
118 Correct 387 ms 36316 KB Output is correct
119 Correct 283 ms 36792 KB Output is correct
120 Correct 358 ms 42388 KB Output is correct
121 Correct 280 ms 41516 KB Output is correct
122 Correct 258 ms 42232 KB Output is correct
123 Correct 268 ms 44172 KB Output is correct
124 Correct 154 ms 32464 KB Output is correct
125 Correct 82 ms 27740 KB Output is correct
126 Correct 236 ms 43256 KB Output is correct
127 Correct 216 ms 42488 KB Output is correct
128 Correct 231 ms 43584 KB Output is correct
129 Correct 231 ms 43568 KB Output is correct
130 Correct 259 ms 36984 KB Output is correct
131 Correct 210 ms 37276 KB Output is correct
132 Correct 220 ms 41336 KB Output is correct
133 Correct 282 ms 37112 KB Output is correct
134 Correct 241 ms 46492 KB Output is correct
135 Correct 206 ms 37884 KB Output is correct
136 Correct 203 ms 37496 KB Output is correct
137 Correct 205 ms 38136 KB Output is correct
138 Correct 212 ms 38136 KB Output is correct
139 Correct 143 ms 26012 KB Output is correct
140 Correct 205 ms 29688 KB Output is correct
141 Correct 194 ms 29688 KB Output is correct
142 Correct 241 ms 30652 KB Output is correct
143 Correct 298 ms 37304 KB Output is correct
144 Correct 311 ms 37588 KB Output is correct
145 Correct 254 ms 33280 KB Output is correct
146 Correct 248 ms 31836 KB Output is correct
147 Correct 314 ms 36292 KB Output is correct
148 Correct 292 ms 37340 KB Output is correct
149 Correct 262 ms 41388 KB Output is correct
150 Correct 255 ms 40376 KB Output is correct
151 Correct 254 ms 43840 KB Output is correct
152 Correct 234 ms 36472 KB Output is correct
153 Correct 223 ms 35452 KB Output is correct
154 Correct 96 ms 25652 KB Output is correct
155 Correct 302 ms 36004 KB Output is correct
156 Correct 610 ms 34940 KB Output is correct
157 Correct 252 ms 34644 KB Output is correct
158 Correct 252 ms 32956 KB Output is correct
159 Correct 233 ms 31900 KB Output is correct
160 Correct 257 ms 34296 KB Output is correct
161 Correct 313 ms 37396 KB Output is correct
162 Correct 243 ms 36368 KB Output is correct
163 Correct 217 ms 36344 KB Output is correct