답안 #570261

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
570261 2022-05-29T03:49:15 Z dutinmeow 푸드 코트 (JOI21_foodcourt) C++17
100 / 100
528 ms 64160 KB
#include <bits/stdc++.h>
using namespace std;

#pragma region y_combinator

#ifndef Y_COMBINATOR_HPP
#define Y_COMBINATOR_HPP

template<class Fun>
class y_combinator_result {
	Fun fun_;
public:
	template<class T>
	explicit y_combinator_result(T &&fun) : fun_(std::forward<T>(fun)) {}

	template<class ...Args>
	decltype(auto) operator()(Args &&...args) {
		return fun_(std::ref(*this), std::forward<Args>(args)...);
	}
};

template<class Fun>
decltype(auto) y_combinator(Fun &&fun) {
	return y_combinator_result<std::decay_t<Fun>>(std::forward<Fun>(fun));
}

#endif

#pragma endregion y_combinator

int main() {
	ios_base::sync_with_stdio(0); cin.tie(0);

	int N, M, Q;
	cin >> N >> M >> Q;

	vector<int> typ(Q), grp(Q);
	vector<long long> num(Q);
	vector<vector<int>> qlb(N), qmb(N), qrb(N);
	for (int i = 0; i < Q; i++) {
		int t;
		cin >> t;
		typ[i] = t;
		if (t == 1) {
			int l, r, c;
			long long k;
			cin >> l >> r >> c >> k;
			l--, r--;
			qlb[l].push_back(i);
			qrb[r].push_back(i);
			grp[i] = c;
			num[i] = k;
		} else if (t == 2) {
			int l, r;
			long long k;
			cin >> l >> r >> k;
			l--, r--;
			qlb[l].push_back(i);
			qrb[r].push_back(i);
			num[i] = k;
		} else if (t == 3) {
			int a;
			long long b;
			cin >> a >> b;
			a--;
			qmb[a].push_back(i);
			num[i] = b;
		}
	}

	vector<long long> suf_sum(4 * Q, 0), all_sum(4 * Q, 0), add_sum(4 * Q, 0);

	// updates index i in segment tree to v
	auto seg_update = y_combinator([&](auto seg_update, int i, int v, int t, int tl, int tr) -> void {
		if (tl == tr) {
			assert(tl == i);
			all_sum[t] = v;
			suf_sum[t] = add_sum[t] = max(v, 0);
			return;
		}
		int tm = (tl + tr) / 2;
		if (i <= tm)
			seg_update(i, v, t * 2, tl, tm);
		else 
			seg_update(i, v, t * 2 + 1, tm + 1, tr);
		suf_sum[t] = max(suf_sum[t * 2] + all_sum[t * 2 + 1], suf_sum[t * 2 + 1]);
		all_sum[t] = all_sum[t * 2] + all_sum[t * 2 + 1];
		add_sum[t] = add_sum[t * 2] + add_sum[t * 2 + 1];
	});

	// finds maximum suffix sum that ends at index i (number of customers)
	auto seg_max_suf = y_combinator([&](auto seg_max_suf, int i, int t, int tl, int tr) -> pair<long long, long long> {
		if (i < tl)
			return make_pair(0, 0);
		if (tr <= i)
			return make_pair(suf_sum[t], all_sum[t]);
		int tm = (tl + tr) / 2;
		auto [lsuf, lall] = seg_max_suf(i, t * 2, tl, tm);
		auto [rsuf, rall] = seg_max_suf(i, t * 2 + 1, tm + 1, tr);
		return make_pair(max(lsuf + rall, rsuf), lall + rall);
	});

	// finds sum of first i queries that are positive
	auto seg_add_sum = y_combinator([&](auto seg_add_sum, int i, int t, int tl, int tr) -> long long {
		if (i < tl)
			return 0;
		if (tr <= i)
			return add_sum[t];
		int tm = (tl + tr) / 2;
		return seg_add_sum(i, t * 2, tl, tm) + seg_add_sum(i, t * 2 + 1, tm + 1, tr);
	});

	// find index of query where kth customer arrived
	auto seg_find_index = y_combinator([&](auto seg_find_index, long long k, int t, int tl, int tr) -> int {
		if (tl == tr)
			return tl;
		int tm = (tl + tr) / 2;
		if (k <= add_sum[t * 2])
			return seg_find_index(k, t * 2, tl, tm);
		else 
			return seg_find_index(k - add_sum[t * 2], t * 2 + 1, tm + 1, tr);
	});

	vector<int> ans(Q);
	for (int i = 0; i < N; i++) {
		for (int q : qlb[i]) {
			if (typ[q] == 1)
				seg_update(q, num[q], 1, 0, Q - 1);
			else if (typ[q] == 2)
				seg_update(q, -num[q], 1, 0, Q - 1);
		}
		for (int q : qmb[i]) {
			long long b = num[q], f = seg_max_suf(q, 1, 0, Q - 1).first;
			if (f < b) {
				ans[q] = 0;
				continue;
			}
			long long d = f - b, s = seg_add_sum(q, 1, 0, Q - 1);
			int a = seg_find_index(s - d, 1, 0, Q - 1);
			ans[q] = grp[a];
		}
		for (int q : qrb[i]) {
			seg_update(q, 0, 1, 0, Q - 1);
		}
	}

	for (int i = 0; i < Q; i++)
		if (typ[i] == 3)
			cout << ans[i] << '\n';
}

Compilation message

foodcourt.cpp:4: warning: ignoring '#pragma region y_combinator' [-Wunknown-pragmas]
    4 | #pragma region y_combinator
      | 
foodcourt.cpp:29: warning: ignoring '#pragma endregion y_combinator' [-Wunknown-pragmas]
   29 | #pragma endregion y_combinator
      |
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 596 KB Output is correct
2 Correct 3 ms 724 KB Output is correct
3 Correct 2 ms 676 KB Output is correct
4 Correct 3 ms 724 KB Output is correct
5 Correct 2 ms 476 KB Output is correct
6 Correct 2 ms 464 KB Output is correct
7 Correct 3 ms 720 KB Output is correct
8 Correct 3 ms 728 KB Output is correct
9 Correct 2 ms 724 KB Output is correct
10 Correct 2 ms 684 KB Output is correct
11 Correct 3 ms 724 KB Output is correct
12 Correct 3 ms 784 KB Output is correct
13 Correct 2 ms 596 KB Output is correct
14 Correct 2 ms 720 KB Output is correct
15 Correct 2 ms 584 KB Output is correct
16 Correct 3 ms 724 KB Output is correct
17 Correct 2 ms 596 KB Output is correct
18 Correct 3 ms 724 KB Output is correct
19 Correct 3 ms 724 KB Output is correct
20 Correct 3 ms 724 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 596 KB Output is correct
2 Correct 3 ms 724 KB Output is correct
3 Correct 2 ms 676 KB Output is correct
4 Correct 3 ms 724 KB Output is correct
5 Correct 2 ms 476 KB Output is correct
6 Correct 2 ms 464 KB Output is correct
7 Correct 3 ms 720 KB Output is correct
8 Correct 3 ms 728 KB Output is correct
9 Correct 2 ms 724 KB Output is correct
10 Correct 2 ms 684 KB Output is correct
11 Correct 3 ms 724 KB Output is correct
12 Correct 3 ms 784 KB Output is correct
13 Correct 2 ms 596 KB Output is correct
14 Correct 2 ms 720 KB Output is correct
15 Correct 2 ms 584 KB Output is correct
16 Correct 3 ms 724 KB Output is correct
17 Correct 2 ms 596 KB Output is correct
18 Correct 3 ms 724 KB Output is correct
19 Correct 3 ms 724 KB Output is correct
20 Correct 3 ms 724 KB Output is correct
21 Correct 3 ms 716 KB Output is correct
22 Correct 3 ms 712 KB Output is correct
23 Correct 3 ms 724 KB Output is correct
24 Correct 3 ms 676 KB Output is correct
25 Correct 2 ms 468 KB Output is correct
26 Correct 2 ms 524 KB Output is correct
27 Correct 3 ms 816 KB Output is correct
28 Correct 3 ms 724 KB Output is correct
29 Correct 3 ms 716 KB Output is correct
30 Correct 3 ms 728 KB Output is correct
31 Correct 3 ms 724 KB Output is correct
32 Correct 2 ms 724 KB Output is correct
33 Correct 2 ms 716 KB Output is correct
34 Correct 3 ms 720 KB Output is correct
35 Correct 2 ms 596 KB Output is correct
36 Correct 3 ms 724 KB Output is correct
37 Correct 3 ms 596 KB Output is correct
38 Correct 2 ms 728 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 93 ms 15992 KB Output is correct
2 Correct 98 ms 16112 KB Output is correct
3 Correct 102 ms 16000 KB Output is correct
4 Correct 91 ms 15936 KB Output is correct
5 Correct 88 ms 16052 KB Output is correct
6 Correct 97 ms 16096 KB Output is correct
7 Correct 57 ms 8392 KB Output is correct
8 Correct 50 ms 8784 KB Output is correct
9 Correct 86 ms 15948 KB Output is correct
10 Correct 95 ms 16024 KB Output is correct
11 Correct 88 ms 16048 KB Output is correct
12 Correct 104 ms 15948 KB Output is correct
13 Correct 73 ms 13108 KB Output is correct
14 Correct 84 ms 15872 KB Output is correct
15 Correct 100 ms 14160 KB Output is correct
16 Correct 113 ms 16052 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 436 ms 56148 KB Output is correct
2 Correct 333 ms 46112 KB Output is correct
3 Correct 463 ms 61640 KB Output is correct
4 Correct 333 ms 49744 KB Output is correct
5 Correct 364 ms 45688 KB Output is correct
6 Correct 480 ms 61412 KB Output is correct
7 Correct 226 ms 35004 KB Output is correct
8 Correct 212 ms 35004 KB Output is correct
9 Correct 455 ms 61028 KB Output is correct
10 Correct 484 ms 61132 KB Output is correct
11 Correct 487 ms 61024 KB Output is correct
12 Correct 477 ms 61100 KB Output is correct
13 Correct 528 ms 60972 KB Output is correct
14 Correct 490 ms 60972 KB Output is correct
15 Correct 478 ms 60888 KB Output is correct
16 Correct 513 ms 61004 KB Output is correct
17 Correct 484 ms 60892 KB Output is correct
18 Correct 484 ms 61120 KB Output is correct
19 Correct 456 ms 61092 KB Output is correct
20 Correct 489 ms 60940 KB Output is correct
21 Correct 497 ms 60940 KB Output is correct
22 Correct 471 ms 61004 KB Output is correct
23 Correct 483 ms 60908 KB Output is correct
24 Correct 454 ms 60936 KB Output is correct
25 Correct 360 ms 52008 KB Output is correct
26 Correct 388 ms 56772 KB Output is correct
27 Correct 408 ms 63352 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 596 KB Output is correct
2 Correct 3 ms 724 KB Output is correct
3 Correct 2 ms 676 KB Output is correct
4 Correct 3 ms 724 KB Output is correct
5 Correct 2 ms 476 KB Output is correct
6 Correct 2 ms 464 KB Output is correct
7 Correct 3 ms 720 KB Output is correct
8 Correct 3 ms 728 KB Output is correct
9 Correct 2 ms 724 KB Output is correct
10 Correct 2 ms 684 KB Output is correct
11 Correct 3 ms 724 KB Output is correct
12 Correct 3 ms 784 KB Output is correct
13 Correct 2 ms 596 KB Output is correct
14 Correct 2 ms 720 KB Output is correct
15 Correct 2 ms 584 KB Output is correct
16 Correct 3 ms 724 KB Output is correct
17 Correct 2 ms 596 KB Output is correct
18 Correct 3 ms 724 KB Output is correct
19 Correct 3 ms 724 KB Output is correct
20 Correct 3 ms 724 KB Output is correct
21 Correct 93 ms 15992 KB Output is correct
22 Correct 98 ms 16112 KB Output is correct
23 Correct 102 ms 16000 KB Output is correct
24 Correct 91 ms 15936 KB Output is correct
25 Correct 88 ms 16052 KB Output is correct
26 Correct 97 ms 16096 KB Output is correct
27 Correct 57 ms 8392 KB Output is correct
28 Correct 50 ms 8784 KB Output is correct
29 Correct 86 ms 15948 KB Output is correct
30 Correct 95 ms 16024 KB Output is correct
31 Correct 88 ms 16048 KB Output is correct
32 Correct 104 ms 15948 KB Output is correct
33 Correct 73 ms 13108 KB Output is correct
34 Correct 84 ms 15872 KB Output is correct
35 Correct 100 ms 14160 KB Output is correct
36 Correct 113 ms 16052 KB Output is correct
37 Correct 81 ms 14260 KB Output is correct
38 Correct 81 ms 13144 KB Output is correct
39 Correct 47 ms 7408 KB Output is correct
40 Correct 47 ms 8520 KB Output is correct
41 Correct 83 ms 15608 KB Output is correct
42 Correct 91 ms 15600 KB Output is correct
43 Correct 91 ms 15568 KB Output is correct
44 Correct 98 ms 15596 KB Output is correct
45 Correct 91 ms 15604 KB Output is correct
46 Correct 90 ms 15572 KB Output is correct
47 Correct 74 ms 14152 KB Output is correct
48 Correct 84 ms 14440 KB Output is correct
49 Correct 60 ms 11104 KB Output is correct
50 Correct 81 ms 14028 KB Output is correct
51 Correct 94 ms 15708 KB Output is correct
52 Correct 106 ms 15704 KB Output is correct
53 Correct 71 ms 13028 KB Output is correct
54 Correct 102 ms 16084 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 84 ms 15040 KB Output is correct
2 Correct 92 ms 15268 KB Output is correct
3 Correct 109 ms 16280 KB Output is correct
4 Correct 97 ms 12744 KB Output is correct
5 Correct 84 ms 14572 KB Output is correct
6 Correct 102 ms 16228 KB Output is correct
7 Correct 57 ms 8608 KB Output is correct
8 Correct 47 ms 8140 KB Output is correct
9 Correct 74 ms 15004 KB Output is correct
10 Correct 51 ms 11464 KB Output is correct
11 Correct 89 ms 15200 KB Output is correct
12 Correct 85 ms 15192 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 596 KB Output is correct
2 Correct 3 ms 724 KB Output is correct
3 Correct 2 ms 676 KB Output is correct
4 Correct 3 ms 724 KB Output is correct
5 Correct 2 ms 476 KB Output is correct
6 Correct 2 ms 464 KB Output is correct
7 Correct 3 ms 720 KB Output is correct
8 Correct 3 ms 728 KB Output is correct
9 Correct 2 ms 724 KB Output is correct
10 Correct 2 ms 684 KB Output is correct
11 Correct 3 ms 724 KB Output is correct
12 Correct 3 ms 784 KB Output is correct
13 Correct 2 ms 596 KB Output is correct
14 Correct 2 ms 720 KB Output is correct
15 Correct 2 ms 584 KB Output is correct
16 Correct 3 ms 724 KB Output is correct
17 Correct 2 ms 596 KB Output is correct
18 Correct 3 ms 724 KB Output is correct
19 Correct 3 ms 724 KB Output is correct
20 Correct 3 ms 724 KB Output is correct
21 Correct 3 ms 716 KB Output is correct
22 Correct 3 ms 712 KB Output is correct
23 Correct 3 ms 724 KB Output is correct
24 Correct 3 ms 676 KB Output is correct
25 Correct 2 ms 468 KB Output is correct
26 Correct 2 ms 524 KB Output is correct
27 Correct 3 ms 816 KB Output is correct
28 Correct 3 ms 724 KB Output is correct
29 Correct 3 ms 716 KB Output is correct
30 Correct 3 ms 728 KB Output is correct
31 Correct 3 ms 724 KB Output is correct
32 Correct 2 ms 724 KB Output is correct
33 Correct 2 ms 716 KB Output is correct
34 Correct 3 ms 720 KB Output is correct
35 Correct 2 ms 596 KB Output is correct
36 Correct 3 ms 724 KB Output is correct
37 Correct 3 ms 596 KB Output is correct
38 Correct 2 ms 728 KB Output is correct
39 Correct 93 ms 15992 KB Output is correct
40 Correct 98 ms 16112 KB Output is correct
41 Correct 102 ms 16000 KB Output is correct
42 Correct 91 ms 15936 KB Output is correct
43 Correct 88 ms 16052 KB Output is correct
44 Correct 97 ms 16096 KB Output is correct
45 Correct 57 ms 8392 KB Output is correct
46 Correct 50 ms 8784 KB Output is correct
47 Correct 86 ms 15948 KB Output is correct
48 Correct 95 ms 16024 KB Output is correct
49 Correct 88 ms 16048 KB Output is correct
50 Correct 104 ms 15948 KB Output is correct
51 Correct 73 ms 13108 KB Output is correct
52 Correct 84 ms 15872 KB Output is correct
53 Correct 100 ms 14160 KB Output is correct
54 Correct 113 ms 16052 KB Output is correct
55 Correct 81 ms 14260 KB Output is correct
56 Correct 81 ms 13144 KB Output is correct
57 Correct 47 ms 7408 KB Output is correct
58 Correct 47 ms 8520 KB Output is correct
59 Correct 83 ms 15608 KB Output is correct
60 Correct 91 ms 15600 KB Output is correct
61 Correct 91 ms 15568 KB Output is correct
62 Correct 98 ms 15596 KB Output is correct
63 Correct 91 ms 15604 KB Output is correct
64 Correct 90 ms 15572 KB Output is correct
65 Correct 74 ms 14152 KB Output is correct
66 Correct 84 ms 14440 KB Output is correct
67 Correct 60 ms 11104 KB Output is correct
68 Correct 81 ms 14028 KB Output is correct
69 Correct 94 ms 15708 KB Output is correct
70 Correct 106 ms 15704 KB Output is correct
71 Correct 71 ms 13028 KB Output is correct
72 Correct 102 ms 16084 KB Output is correct
73 Correct 84 ms 15040 KB Output is correct
74 Correct 92 ms 15268 KB Output is correct
75 Correct 109 ms 16280 KB Output is correct
76 Correct 97 ms 12744 KB Output is correct
77 Correct 84 ms 14572 KB Output is correct
78 Correct 102 ms 16228 KB Output is correct
79 Correct 57 ms 8608 KB Output is correct
80 Correct 47 ms 8140 KB Output is correct
81 Correct 74 ms 15004 KB Output is correct
82 Correct 51 ms 11464 KB Output is correct
83 Correct 89 ms 15200 KB Output is correct
84 Correct 85 ms 15192 KB Output is correct
85 Correct 78 ms 14128 KB Output is correct
86 Correct 101 ms 16312 KB Output is correct
87 Correct 96 ms 14560 KB Output is correct
88 Correct 105 ms 16220 KB Output is correct
89 Correct 59 ms 11596 KB Output is correct
90 Correct 100 ms 16196 KB Output is correct
91 Correct 71 ms 12484 KB Output is correct
92 Correct 81 ms 12224 KB Output is correct
93 Correct 102 ms 16100 KB Output is correct
94 Correct 99 ms 16104 KB Output is correct
95 Correct 102 ms 15392 KB Output is correct
96 Correct 97 ms 16172 KB Output is correct
97 Correct 102 ms 16088 KB Output is correct
98 Correct 86 ms 13004 KB Output is correct
99 Correct 68 ms 14624 KB Output is correct
100 Correct 62 ms 12748 KB Output is correct
101 Correct 73 ms 14952 KB Output is correct
102 Correct 84 ms 16792 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 596 KB Output is correct
2 Correct 3 ms 724 KB Output is correct
3 Correct 2 ms 676 KB Output is correct
4 Correct 3 ms 724 KB Output is correct
5 Correct 2 ms 476 KB Output is correct
6 Correct 2 ms 464 KB Output is correct
7 Correct 3 ms 720 KB Output is correct
8 Correct 3 ms 728 KB Output is correct
9 Correct 2 ms 724 KB Output is correct
10 Correct 2 ms 684 KB Output is correct
11 Correct 3 ms 724 KB Output is correct
12 Correct 3 ms 784 KB Output is correct
13 Correct 2 ms 596 KB Output is correct
14 Correct 2 ms 720 KB Output is correct
15 Correct 2 ms 584 KB Output is correct
16 Correct 3 ms 724 KB Output is correct
17 Correct 2 ms 596 KB Output is correct
18 Correct 3 ms 724 KB Output is correct
19 Correct 3 ms 724 KB Output is correct
20 Correct 3 ms 724 KB Output is correct
21 Correct 3 ms 716 KB Output is correct
22 Correct 3 ms 712 KB Output is correct
23 Correct 3 ms 724 KB Output is correct
24 Correct 3 ms 676 KB Output is correct
25 Correct 2 ms 468 KB Output is correct
26 Correct 2 ms 524 KB Output is correct
27 Correct 3 ms 816 KB Output is correct
28 Correct 3 ms 724 KB Output is correct
29 Correct 3 ms 716 KB Output is correct
30 Correct 3 ms 728 KB Output is correct
31 Correct 3 ms 724 KB Output is correct
32 Correct 2 ms 724 KB Output is correct
33 Correct 2 ms 716 KB Output is correct
34 Correct 3 ms 720 KB Output is correct
35 Correct 2 ms 596 KB Output is correct
36 Correct 3 ms 724 KB Output is correct
37 Correct 3 ms 596 KB Output is correct
38 Correct 2 ms 728 KB Output is correct
39 Correct 93 ms 15992 KB Output is correct
40 Correct 98 ms 16112 KB Output is correct
41 Correct 102 ms 16000 KB Output is correct
42 Correct 91 ms 15936 KB Output is correct
43 Correct 88 ms 16052 KB Output is correct
44 Correct 97 ms 16096 KB Output is correct
45 Correct 57 ms 8392 KB Output is correct
46 Correct 50 ms 8784 KB Output is correct
47 Correct 86 ms 15948 KB Output is correct
48 Correct 95 ms 16024 KB Output is correct
49 Correct 88 ms 16048 KB Output is correct
50 Correct 104 ms 15948 KB Output is correct
51 Correct 73 ms 13108 KB Output is correct
52 Correct 84 ms 15872 KB Output is correct
53 Correct 100 ms 14160 KB Output is correct
54 Correct 113 ms 16052 KB Output is correct
55 Correct 436 ms 56148 KB Output is correct
56 Correct 333 ms 46112 KB Output is correct
57 Correct 463 ms 61640 KB Output is correct
58 Correct 333 ms 49744 KB Output is correct
59 Correct 364 ms 45688 KB Output is correct
60 Correct 480 ms 61412 KB Output is correct
61 Correct 226 ms 35004 KB Output is correct
62 Correct 212 ms 35004 KB Output is correct
63 Correct 455 ms 61028 KB Output is correct
64 Correct 484 ms 61132 KB Output is correct
65 Correct 487 ms 61024 KB Output is correct
66 Correct 477 ms 61100 KB Output is correct
67 Correct 528 ms 60972 KB Output is correct
68 Correct 490 ms 60972 KB Output is correct
69 Correct 478 ms 60888 KB Output is correct
70 Correct 513 ms 61004 KB Output is correct
71 Correct 484 ms 60892 KB Output is correct
72 Correct 484 ms 61120 KB Output is correct
73 Correct 456 ms 61092 KB Output is correct
74 Correct 489 ms 60940 KB Output is correct
75 Correct 497 ms 60940 KB Output is correct
76 Correct 471 ms 61004 KB Output is correct
77 Correct 483 ms 60908 KB Output is correct
78 Correct 454 ms 60936 KB Output is correct
79 Correct 360 ms 52008 KB Output is correct
80 Correct 388 ms 56772 KB Output is correct
81 Correct 408 ms 63352 KB Output is correct
82 Correct 81 ms 14260 KB Output is correct
83 Correct 81 ms 13144 KB Output is correct
84 Correct 47 ms 7408 KB Output is correct
85 Correct 47 ms 8520 KB Output is correct
86 Correct 83 ms 15608 KB Output is correct
87 Correct 91 ms 15600 KB Output is correct
88 Correct 91 ms 15568 KB Output is correct
89 Correct 98 ms 15596 KB Output is correct
90 Correct 91 ms 15604 KB Output is correct
91 Correct 90 ms 15572 KB Output is correct
92 Correct 74 ms 14152 KB Output is correct
93 Correct 84 ms 14440 KB Output is correct
94 Correct 60 ms 11104 KB Output is correct
95 Correct 81 ms 14028 KB Output is correct
96 Correct 94 ms 15708 KB Output is correct
97 Correct 106 ms 15704 KB Output is correct
98 Correct 71 ms 13028 KB Output is correct
99 Correct 102 ms 16084 KB Output is correct
100 Correct 84 ms 15040 KB Output is correct
101 Correct 92 ms 15268 KB Output is correct
102 Correct 109 ms 16280 KB Output is correct
103 Correct 97 ms 12744 KB Output is correct
104 Correct 84 ms 14572 KB Output is correct
105 Correct 102 ms 16228 KB Output is correct
106 Correct 57 ms 8608 KB Output is correct
107 Correct 47 ms 8140 KB Output is correct
108 Correct 74 ms 15004 KB Output is correct
109 Correct 51 ms 11464 KB Output is correct
110 Correct 89 ms 15200 KB Output is correct
111 Correct 85 ms 15192 KB Output is correct
112 Correct 78 ms 14128 KB Output is correct
113 Correct 101 ms 16312 KB Output is correct
114 Correct 96 ms 14560 KB Output is correct
115 Correct 105 ms 16220 KB Output is correct
116 Correct 59 ms 11596 KB Output is correct
117 Correct 100 ms 16196 KB Output is correct
118 Correct 71 ms 12484 KB Output is correct
119 Correct 81 ms 12224 KB Output is correct
120 Correct 102 ms 16100 KB Output is correct
121 Correct 99 ms 16104 KB Output is correct
122 Correct 102 ms 15392 KB Output is correct
123 Correct 97 ms 16172 KB Output is correct
124 Correct 102 ms 16088 KB Output is correct
125 Correct 86 ms 13004 KB Output is correct
126 Correct 68 ms 14624 KB Output is correct
127 Correct 62 ms 12748 KB Output is correct
128 Correct 73 ms 14952 KB Output is correct
129 Correct 84 ms 16792 KB Output is correct
130 Correct 487 ms 61704 KB Output is correct
131 Correct 300 ms 45644 KB Output is correct
132 Correct 470 ms 62212 KB Output is correct
133 Correct 443 ms 59448 KB Output is correct
134 Correct 411 ms 55184 KB Output is correct
135 Correct 464 ms 62188 KB Output is correct
136 Correct 449 ms 61892 KB Output is correct
137 Correct 443 ms 62016 KB Output is correct
138 Correct 488 ms 61696 KB Output is correct
139 Correct 481 ms 61788 KB Output is correct
140 Correct 494 ms 61720 KB Output is correct
141 Correct 449 ms 61620 KB Output is correct
142 Correct 483 ms 61644 KB Output is correct
143 Correct 465 ms 61680 KB Output is correct
144 Correct 477 ms 61644 KB Output is correct
145 Correct 472 ms 61644 KB Output is correct
146 Correct 474 ms 61572 KB Output is correct
147 Correct 470 ms 61732 KB Output is correct
148 Correct 491 ms 61672 KB Output is correct
149 Correct 472 ms 61552 KB Output is correct
150 Correct 300 ms 55912 KB Output is correct
151 Correct 365 ms 57308 KB Output is correct
152 Correct 395 ms 57376 KB Output is correct
153 Correct 404 ms 64160 KB Output is correct