답안 #557199

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
557199 2022-05-04T20:59:07 Z lunchbox 푸드 코트 (JOI21_foodcourt) C++17
100 / 100
398 ms 35416 KB
#include <bits/stdc++.h>
using namespace std;

using LL = long long;
const int N = 250000, N_ = 1 << 18, INF = 0x3f3f3f3f;

int n_;

array<LL, 2> st1[N_ * 2];

array<LL, 2> join(array<LL, 2> a, array<LL, 2> b) {
	return { a[0] + b[0], max(a[1] + b[0], b[1]) };
}

void update1(int i, int x) {
	i |= n_;
	st1[i][0] = x;
	st1[i][1] = max(0, x);
	while (i >>= 1)
		st1[i] = join(st1[i << 1 | 0], st1[i << 1 | 1]);
}

LL query1(int l, int r) {
	vector<int> ll, rr;
	array<LL, 2> v = { 0, 0 };

	for (l |= n_, r |= n_; l <= r; l >>= 1, r >>= 1) {
		if ((l & 1) == 1)
			ll.push_back(l++);
		if ((r & 1) == 0)
			rr.push_back(r--);
	}
	for (int i : ll)
		v = join(v, st1[i]);
	reverse(rr.begin(), rr.end());
	for (int i : rr)
		v = join(v, st1[i]);
	return v[1];
}

LL st2[N_ * 2];

void update2(int i, int x) {
	st2[i |= n_] = x;
	while (i >>= 1)
		st2[i] = st2[i << 1 | 0] + st2[i << 1 | 1];
}

LL query2(int l, int r) {
	LL sum = 0;

	for (l |= n_, r |= n_; l <= r; l >>= 1, r >>= 1) {
		if ((l & 1) == 1)
			sum += st2[l++];
		if ((r & 1) == 0)
			sum += st2[r--];
	}
	return sum;
}

int query3(LL x) {
	int i = 1;

	while (i < n_) {
		if (x <= st2[i << 1 | 0])
			i = i << 1 | 0;
		else {
			x -= st2[i << 1 | 0];
			i = i << 1 | 1;
		}
	}
	return i ^ n_;
}

vector<pair<int, int>> uu[N + 1];
vector<pair<int, LL>> qq[N];

void run() {
	static int cc[N], ans[N];
	int n, m, q;

	scanf("%d%d%d", &n, &m, &q);
	n_ = 1;
	while (n_ < q)
		n_ <<= 1;
	for (int h = 0; h < q; h++) {
		int t;

		scanf("%d", &t);
		if (t == 1) {
			int l, r, k;

			scanf("%d%d%d%d", &l, &r, &cc[h], &k), l--;
			uu[l].push_back({ h << 1 | 0, k });
			uu[r].push_back({ h << 1 | 0, 0 });
		} else if (t == 2) {
			int l, r, k;

			scanf("%d%d%d", &l, &r, &k), l--;
			uu[l].push_back({ h << 1 | 1, -k });
			uu[r].push_back({ h << 1 | 1, 0 });
		} else {
			long long k;
			int i;

			scanf("%d%lld", &i, &k), i--;
			qq[i].push_back({ h, k });
		}
	}
	memset(ans, -1, q * sizeof * ans);
	for (int i = 0; i < n; i++) {
		for (auto [h2, k] : uu[i]) {
			int h = h2 >> 1;

			update1(h, k);
			if ((h2 & 1) == 0)
				update2(h, k);
		}
		for (auto [h, k] : qq[i]) {
			LL x = query1(0, h);

			ans[h] = x < k ? 0 : cc[query3(query2(0, h) - x + k)];
		}
	}
	for (int h = 0; h < q; h++)
		if (ans[h] != -1)
			printf("%d\n", ans[h]);
}

int main() {
	run();
	return 0;
}

Compilation message

foodcourt.cpp: In function 'void run()':
foodcourt.cpp:82:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   82 |  scanf("%d%d%d", &n, &m, &q);
      |  ~~~~~^~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:89:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   89 |   scanf("%d", &t);
      |   ~~~~~^~~~~~~~~~
foodcourt.cpp:93:9: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   93 |    scanf("%d%d%d%d", &l, &r, &cc[h], &k), l--;
      |    ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:99:9: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   99 |    scanf("%d%d%d", &l, &r, &k), l--;
      |    ~~~~~^~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:106:9: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
  106 |    scanf("%d%lld", &i, &k), i--;
      |    ~~~~~^~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 12116 KB Output is correct
2 Correct 8 ms 12188 KB Output is correct
3 Correct 9 ms 12116 KB Output is correct
4 Correct 8 ms 12276 KB Output is correct
5 Correct 8 ms 12248 KB Output is correct
6 Correct 9 ms 12116 KB Output is correct
7 Correct 8 ms 12244 KB Output is correct
8 Correct 8 ms 12188 KB Output is correct
9 Correct 8 ms 12188 KB Output is correct
10 Correct 8 ms 12256 KB Output is correct
11 Correct 8 ms 12152 KB Output is correct
12 Correct 8 ms 12192 KB Output is correct
13 Correct 8 ms 12192 KB Output is correct
14 Correct 8 ms 12140 KB Output is correct
15 Correct 8 ms 12176 KB Output is correct
16 Correct 8 ms 12244 KB Output is correct
17 Correct 8 ms 12116 KB Output is correct
18 Correct 8 ms 12244 KB Output is correct
19 Correct 8 ms 12244 KB Output is correct
20 Correct 9 ms 12280 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 12116 KB Output is correct
2 Correct 8 ms 12188 KB Output is correct
3 Correct 9 ms 12116 KB Output is correct
4 Correct 8 ms 12276 KB Output is correct
5 Correct 8 ms 12248 KB Output is correct
6 Correct 9 ms 12116 KB Output is correct
7 Correct 8 ms 12244 KB Output is correct
8 Correct 8 ms 12188 KB Output is correct
9 Correct 8 ms 12188 KB Output is correct
10 Correct 8 ms 12256 KB Output is correct
11 Correct 8 ms 12152 KB Output is correct
12 Correct 8 ms 12192 KB Output is correct
13 Correct 8 ms 12192 KB Output is correct
14 Correct 8 ms 12140 KB Output is correct
15 Correct 8 ms 12176 KB Output is correct
16 Correct 8 ms 12244 KB Output is correct
17 Correct 8 ms 12116 KB Output is correct
18 Correct 8 ms 12244 KB Output is correct
19 Correct 8 ms 12244 KB Output is correct
20 Correct 9 ms 12280 KB Output is correct
21 Correct 10 ms 12244 KB Output is correct
22 Correct 8 ms 12244 KB Output is correct
23 Correct 8 ms 12244 KB Output is correct
24 Correct 8 ms 12244 KB Output is correct
25 Correct 8 ms 12244 KB Output is correct
26 Correct 8 ms 12244 KB Output is correct
27 Correct 8 ms 12244 KB Output is correct
28 Correct 8 ms 12276 KB Output is correct
29 Correct 8 ms 12244 KB Output is correct
30 Correct 8 ms 12244 KB Output is correct
31 Correct 8 ms 12244 KB Output is correct
32 Correct 8 ms 12292 KB Output is correct
33 Correct 8 ms 12244 KB Output is correct
34 Correct 7 ms 12244 KB Output is correct
35 Correct 8 ms 12256 KB Output is correct
36 Correct 9 ms 12244 KB Output is correct
37 Correct 9 ms 12116 KB Output is correct
38 Correct 8 ms 12244 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 63 ms 18204 KB Output is correct
2 Correct 59 ms 18236 KB Output is correct
3 Correct 59 ms 18196 KB Output is correct
4 Correct 59 ms 18252 KB Output is correct
5 Correct 60 ms 18216 KB Output is correct
6 Correct 58 ms 18220 KB Output is correct
7 Correct 38 ms 16764 KB Output is correct
8 Correct 38 ms 16992 KB Output is correct
9 Correct 58 ms 17836 KB Output is correct
10 Correct 55 ms 18200 KB Output is correct
11 Correct 58 ms 18068 KB Output is correct
12 Correct 62 ms 18196 KB Output is correct
13 Correct 50 ms 17484 KB Output is correct
14 Correct 62 ms 18204 KB Output is correct
15 Correct 57 ms 17940 KB Output is correct
16 Correct 57 ms 18156 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 306 ms 33232 KB Output is correct
2 Correct 245 ms 29144 KB Output is correct
3 Correct 334 ms 35256 KB Output is correct
4 Correct 262 ms 29212 KB Output is correct
5 Correct 274 ms 29148 KB Output is correct
6 Correct 349 ms 35064 KB Output is correct
7 Correct 146 ms 30284 KB Output is correct
8 Correct 146 ms 30528 KB Output is correct
9 Correct 348 ms 35156 KB Output is correct
10 Correct 348 ms 35100 KB Output is correct
11 Correct 318 ms 32452 KB Output is correct
12 Correct 323 ms 35020 KB Output is correct
13 Correct 312 ms 32816 KB Output is correct
14 Correct 334 ms 35100 KB Output is correct
15 Correct 322 ms 35004 KB Output is correct
16 Correct 329 ms 35016 KB Output is correct
17 Correct 319 ms 35012 KB Output is correct
18 Correct 330 ms 33860 KB Output is correct
19 Correct 328 ms 35000 KB Output is correct
20 Correct 327 ms 34088 KB Output is correct
21 Correct 330 ms 34932 KB Output is correct
22 Correct 325 ms 35068 KB Output is correct
23 Correct 330 ms 35116 KB Output is correct
24 Correct 321 ms 34996 KB Output is correct
25 Correct 254 ms 32872 KB Output is correct
26 Correct 257 ms 33300 KB Output is correct
27 Correct 262 ms 34388 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 12116 KB Output is correct
2 Correct 8 ms 12188 KB Output is correct
3 Correct 9 ms 12116 KB Output is correct
4 Correct 8 ms 12276 KB Output is correct
5 Correct 8 ms 12248 KB Output is correct
6 Correct 9 ms 12116 KB Output is correct
7 Correct 8 ms 12244 KB Output is correct
8 Correct 8 ms 12188 KB Output is correct
9 Correct 8 ms 12188 KB Output is correct
10 Correct 8 ms 12256 KB Output is correct
11 Correct 8 ms 12152 KB Output is correct
12 Correct 8 ms 12192 KB Output is correct
13 Correct 8 ms 12192 KB Output is correct
14 Correct 8 ms 12140 KB Output is correct
15 Correct 8 ms 12176 KB Output is correct
16 Correct 8 ms 12244 KB Output is correct
17 Correct 8 ms 12116 KB Output is correct
18 Correct 8 ms 12244 KB Output is correct
19 Correct 8 ms 12244 KB Output is correct
20 Correct 9 ms 12280 KB Output is correct
21 Correct 63 ms 18204 KB Output is correct
22 Correct 59 ms 18236 KB Output is correct
23 Correct 59 ms 18196 KB Output is correct
24 Correct 59 ms 18252 KB Output is correct
25 Correct 60 ms 18216 KB Output is correct
26 Correct 58 ms 18220 KB Output is correct
27 Correct 38 ms 16764 KB Output is correct
28 Correct 38 ms 16992 KB Output is correct
29 Correct 58 ms 17836 KB Output is correct
30 Correct 55 ms 18200 KB Output is correct
31 Correct 58 ms 18068 KB Output is correct
32 Correct 62 ms 18196 KB Output is correct
33 Correct 50 ms 17484 KB Output is correct
34 Correct 62 ms 18204 KB Output is correct
35 Correct 57 ms 17940 KB Output is correct
36 Correct 57 ms 18156 KB Output is correct
37 Correct 53 ms 17668 KB Output is correct
38 Correct 57 ms 17100 KB Output is correct
39 Correct 42 ms 16272 KB Output is correct
40 Correct 40 ms 16872 KB Output is correct
41 Correct 59 ms 17588 KB Output is correct
42 Correct 63 ms 18296 KB Output is correct
43 Correct 58 ms 18252 KB Output is correct
44 Correct 59 ms 17868 KB Output is correct
45 Correct 60 ms 18252 KB Output is correct
46 Correct 57 ms 18292 KB Output is correct
47 Correct 45 ms 17348 KB Output is correct
48 Correct 53 ms 17772 KB Output is correct
49 Correct 42 ms 16460 KB Output is correct
50 Correct 56 ms 17408 KB Output is correct
51 Correct 59 ms 18240 KB Output is correct
52 Correct 61 ms 18232 KB Output is correct
53 Correct 45 ms 16920 KB Output is correct
54 Correct 56 ms 18196 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 68 ms 17700 KB Output is correct
2 Correct 69 ms 18188 KB Output is correct
3 Correct 77 ms 18380 KB Output is correct
4 Correct 52 ms 16716 KB Output is correct
5 Correct 60 ms 17612 KB Output is correct
6 Correct 76 ms 18380 KB Output is correct
7 Correct 44 ms 16812 KB Output is correct
8 Correct 42 ms 16704 KB Output is correct
9 Correct 55 ms 17604 KB Output is correct
10 Correct 44 ms 16232 KB Output is correct
11 Correct 61 ms 17768 KB Output is correct
12 Correct 62 ms 17780 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 12116 KB Output is correct
2 Correct 8 ms 12188 KB Output is correct
3 Correct 9 ms 12116 KB Output is correct
4 Correct 8 ms 12276 KB Output is correct
5 Correct 8 ms 12248 KB Output is correct
6 Correct 9 ms 12116 KB Output is correct
7 Correct 8 ms 12244 KB Output is correct
8 Correct 8 ms 12188 KB Output is correct
9 Correct 8 ms 12188 KB Output is correct
10 Correct 8 ms 12256 KB Output is correct
11 Correct 8 ms 12152 KB Output is correct
12 Correct 8 ms 12192 KB Output is correct
13 Correct 8 ms 12192 KB Output is correct
14 Correct 8 ms 12140 KB Output is correct
15 Correct 8 ms 12176 KB Output is correct
16 Correct 8 ms 12244 KB Output is correct
17 Correct 8 ms 12116 KB Output is correct
18 Correct 8 ms 12244 KB Output is correct
19 Correct 8 ms 12244 KB Output is correct
20 Correct 9 ms 12280 KB Output is correct
21 Correct 10 ms 12244 KB Output is correct
22 Correct 8 ms 12244 KB Output is correct
23 Correct 8 ms 12244 KB Output is correct
24 Correct 8 ms 12244 KB Output is correct
25 Correct 8 ms 12244 KB Output is correct
26 Correct 8 ms 12244 KB Output is correct
27 Correct 8 ms 12244 KB Output is correct
28 Correct 8 ms 12276 KB Output is correct
29 Correct 8 ms 12244 KB Output is correct
30 Correct 8 ms 12244 KB Output is correct
31 Correct 8 ms 12244 KB Output is correct
32 Correct 8 ms 12292 KB Output is correct
33 Correct 8 ms 12244 KB Output is correct
34 Correct 7 ms 12244 KB Output is correct
35 Correct 8 ms 12256 KB Output is correct
36 Correct 9 ms 12244 KB Output is correct
37 Correct 9 ms 12116 KB Output is correct
38 Correct 8 ms 12244 KB Output is correct
39 Correct 63 ms 18204 KB Output is correct
40 Correct 59 ms 18236 KB Output is correct
41 Correct 59 ms 18196 KB Output is correct
42 Correct 59 ms 18252 KB Output is correct
43 Correct 60 ms 18216 KB Output is correct
44 Correct 58 ms 18220 KB Output is correct
45 Correct 38 ms 16764 KB Output is correct
46 Correct 38 ms 16992 KB Output is correct
47 Correct 58 ms 17836 KB Output is correct
48 Correct 55 ms 18200 KB Output is correct
49 Correct 58 ms 18068 KB Output is correct
50 Correct 62 ms 18196 KB Output is correct
51 Correct 50 ms 17484 KB Output is correct
52 Correct 62 ms 18204 KB Output is correct
53 Correct 57 ms 17940 KB Output is correct
54 Correct 57 ms 18156 KB Output is correct
55 Correct 53 ms 17668 KB Output is correct
56 Correct 57 ms 17100 KB Output is correct
57 Correct 42 ms 16272 KB Output is correct
58 Correct 40 ms 16872 KB Output is correct
59 Correct 59 ms 17588 KB Output is correct
60 Correct 63 ms 18296 KB Output is correct
61 Correct 58 ms 18252 KB Output is correct
62 Correct 59 ms 17868 KB Output is correct
63 Correct 60 ms 18252 KB Output is correct
64 Correct 57 ms 18292 KB Output is correct
65 Correct 45 ms 17348 KB Output is correct
66 Correct 53 ms 17772 KB Output is correct
67 Correct 42 ms 16460 KB Output is correct
68 Correct 56 ms 17408 KB Output is correct
69 Correct 59 ms 18240 KB Output is correct
70 Correct 61 ms 18232 KB Output is correct
71 Correct 45 ms 16920 KB Output is correct
72 Correct 56 ms 18196 KB Output is correct
73 Correct 68 ms 17700 KB Output is correct
74 Correct 69 ms 18188 KB Output is correct
75 Correct 77 ms 18380 KB Output is correct
76 Correct 52 ms 16716 KB Output is correct
77 Correct 60 ms 17612 KB Output is correct
78 Correct 76 ms 18380 KB Output is correct
79 Correct 44 ms 16812 KB Output is correct
80 Correct 42 ms 16704 KB Output is correct
81 Correct 55 ms 17604 KB Output is correct
82 Correct 44 ms 16232 KB Output is correct
83 Correct 61 ms 17768 KB Output is correct
84 Correct 62 ms 17780 KB Output is correct
85 Correct 59 ms 17748 KB Output is correct
86 Correct 68 ms 18312 KB Output is correct
87 Correct 62 ms 17584 KB Output is correct
88 Correct 83 ms 18360 KB Output is correct
89 Correct 43 ms 16068 KB Output is correct
90 Correct 65 ms 18268 KB Output is correct
91 Correct 50 ms 17188 KB Output is correct
92 Correct 51 ms 16956 KB Output is correct
93 Correct 63 ms 18236 KB Output is correct
94 Correct 62 ms 17956 KB Output is correct
95 Correct 62 ms 18172 KB Output is correct
96 Correct 64 ms 18260 KB Output is correct
97 Correct 65 ms 18248 KB Output is correct
98 Correct 54 ms 17428 KB Output is correct
99 Correct 48 ms 17336 KB Output is correct
100 Correct 48 ms 16816 KB Output is correct
101 Correct 53 ms 17824 KB Output is correct
102 Correct 58 ms 18072 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 12116 KB Output is correct
2 Correct 8 ms 12188 KB Output is correct
3 Correct 9 ms 12116 KB Output is correct
4 Correct 8 ms 12276 KB Output is correct
5 Correct 8 ms 12248 KB Output is correct
6 Correct 9 ms 12116 KB Output is correct
7 Correct 8 ms 12244 KB Output is correct
8 Correct 8 ms 12188 KB Output is correct
9 Correct 8 ms 12188 KB Output is correct
10 Correct 8 ms 12256 KB Output is correct
11 Correct 8 ms 12152 KB Output is correct
12 Correct 8 ms 12192 KB Output is correct
13 Correct 8 ms 12192 KB Output is correct
14 Correct 8 ms 12140 KB Output is correct
15 Correct 8 ms 12176 KB Output is correct
16 Correct 8 ms 12244 KB Output is correct
17 Correct 8 ms 12116 KB Output is correct
18 Correct 8 ms 12244 KB Output is correct
19 Correct 8 ms 12244 KB Output is correct
20 Correct 9 ms 12280 KB Output is correct
21 Correct 10 ms 12244 KB Output is correct
22 Correct 8 ms 12244 KB Output is correct
23 Correct 8 ms 12244 KB Output is correct
24 Correct 8 ms 12244 KB Output is correct
25 Correct 8 ms 12244 KB Output is correct
26 Correct 8 ms 12244 KB Output is correct
27 Correct 8 ms 12244 KB Output is correct
28 Correct 8 ms 12276 KB Output is correct
29 Correct 8 ms 12244 KB Output is correct
30 Correct 8 ms 12244 KB Output is correct
31 Correct 8 ms 12244 KB Output is correct
32 Correct 8 ms 12292 KB Output is correct
33 Correct 8 ms 12244 KB Output is correct
34 Correct 7 ms 12244 KB Output is correct
35 Correct 8 ms 12256 KB Output is correct
36 Correct 9 ms 12244 KB Output is correct
37 Correct 9 ms 12116 KB Output is correct
38 Correct 8 ms 12244 KB Output is correct
39 Correct 63 ms 18204 KB Output is correct
40 Correct 59 ms 18236 KB Output is correct
41 Correct 59 ms 18196 KB Output is correct
42 Correct 59 ms 18252 KB Output is correct
43 Correct 60 ms 18216 KB Output is correct
44 Correct 58 ms 18220 KB Output is correct
45 Correct 38 ms 16764 KB Output is correct
46 Correct 38 ms 16992 KB Output is correct
47 Correct 58 ms 17836 KB Output is correct
48 Correct 55 ms 18200 KB Output is correct
49 Correct 58 ms 18068 KB Output is correct
50 Correct 62 ms 18196 KB Output is correct
51 Correct 50 ms 17484 KB Output is correct
52 Correct 62 ms 18204 KB Output is correct
53 Correct 57 ms 17940 KB Output is correct
54 Correct 57 ms 18156 KB Output is correct
55 Correct 306 ms 33232 KB Output is correct
56 Correct 245 ms 29144 KB Output is correct
57 Correct 334 ms 35256 KB Output is correct
58 Correct 262 ms 29212 KB Output is correct
59 Correct 274 ms 29148 KB Output is correct
60 Correct 349 ms 35064 KB Output is correct
61 Correct 146 ms 30284 KB Output is correct
62 Correct 146 ms 30528 KB Output is correct
63 Correct 348 ms 35156 KB Output is correct
64 Correct 348 ms 35100 KB Output is correct
65 Correct 318 ms 32452 KB Output is correct
66 Correct 323 ms 35020 KB Output is correct
67 Correct 312 ms 32816 KB Output is correct
68 Correct 334 ms 35100 KB Output is correct
69 Correct 322 ms 35004 KB Output is correct
70 Correct 329 ms 35016 KB Output is correct
71 Correct 319 ms 35012 KB Output is correct
72 Correct 330 ms 33860 KB Output is correct
73 Correct 328 ms 35000 KB Output is correct
74 Correct 327 ms 34088 KB Output is correct
75 Correct 330 ms 34932 KB Output is correct
76 Correct 325 ms 35068 KB Output is correct
77 Correct 330 ms 35116 KB Output is correct
78 Correct 321 ms 34996 KB Output is correct
79 Correct 254 ms 32872 KB Output is correct
80 Correct 257 ms 33300 KB Output is correct
81 Correct 262 ms 34388 KB Output is correct
82 Correct 53 ms 17668 KB Output is correct
83 Correct 57 ms 17100 KB Output is correct
84 Correct 42 ms 16272 KB Output is correct
85 Correct 40 ms 16872 KB Output is correct
86 Correct 59 ms 17588 KB Output is correct
87 Correct 63 ms 18296 KB Output is correct
88 Correct 58 ms 18252 KB Output is correct
89 Correct 59 ms 17868 KB Output is correct
90 Correct 60 ms 18252 KB Output is correct
91 Correct 57 ms 18292 KB Output is correct
92 Correct 45 ms 17348 KB Output is correct
93 Correct 53 ms 17772 KB Output is correct
94 Correct 42 ms 16460 KB Output is correct
95 Correct 56 ms 17408 KB Output is correct
96 Correct 59 ms 18240 KB Output is correct
97 Correct 61 ms 18232 KB Output is correct
98 Correct 45 ms 16920 KB Output is correct
99 Correct 56 ms 18196 KB Output is correct
100 Correct 68 ms 17700 KB Output is correct
101 Correct 69 ms 18188 KB Output is correct
102 Correct 77 ms 18380 KB Output is correct
103 Correct 52 ms 16716 KB Output is correct
104 Correct 60 ms 17612 KB Output is correct
105 Correct 76 ms 18380 KB Output is correct
106 Correct 44 ms 16812 KB Output is correct
107 Correct 42 ms 16704 KB Output is correct
108 Correct 55 ms 17604 KB Output is correct
109 Correct 44 ms 16232 KB Output is correct
110 Correct 61 ms 17768 KB Output is correct
111 Correct 62 ms 17780 KB Output is correct
112 Correct 59 ms 17748 KB Output is correct
113 Correct 68 ms 18312 KB Output is correct
114 Correct 62 ms 17584 KB Output is correct
115 Correct 83 ms 18360 KB Output is correct
116 Correct 43 ms 16068 KB Output is correct
117 Correct 65 ms 18268 KB Output is correct
118 Correct 50 ms 17188 KB Output is correct
119 Correct 51 ms 16956 KB Output is correct
120 Correct 63 ms 18236 KB Output is correct
121 Correct 62 ms 17956 KB Output is correct
122 Correct 62 ms 18172 KB Output is correct
123 Correct 64 ms 18260 KB Output is correct
124 Correct 65 ms 18248 KB Output is correct
125 Correct 54 ms 17428 KB Output is correct
126 Correct 48 ms 17336 KB Output is correct
127 Correct 48 ms 16816 KB Output is correct
128 Correct 53 ms 17824 KB Output is correct
129 Correct 58 ms 18072 KB Output is correct
130 Correct 325 ms 35280 KB Output is correct
131 Correct 227 ms 29212 KB Output is correct
132 Correct 334 ms 35416 KB Output is correct
133 Correct 314 ms 34116 KB Output is correct
134 Correct 273 ms 31936 KB Output is correct
135 Correct 332 ms 35020 KB Output is correct
136 Correct 343 ms 35288 KB Output is correct
137 Correct 356 ms 35284 KB Output is correct
138 Correct 314 ms 32636 KB Output is correct
139 Correct 326 ms 35068 KB Output is correct
140 Correct 304 ms 33296 KB Output is correct
141 Correct 320 ms 35024 KB Output is correct
142 Correct 398 ms 35032 KB Output is correct
143 Correct 331 ms 35020 KB Output is correct
144 Correct 323 ms 33792 KB Output is correct
145 Correct 321 ms 35020 KB Output is correct
146 Correct 323 ms 34432 KB Output is correct
147 Correct 315 ms 35016 KB Output is correct
148 Correct 353 ms 34836 KB Output is correct
149 Correct 338 ms 34892 KB Output is correct
150 Correct 189 ms 31536 KB Output is correct
151 Correct 250 ms 33364 KB Output is correct
152 Correct 251 ms 33256 KB Output is correct
153 Correct 258 ms 34304 KB Output is correct