답안 #684590

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
684590 2023-01-21T22:06:52 Z NK_ 푸드 코트 (JOI21_foodcourt) C++17
100 / 100
455 ms 48076 KB
// Success consists of going from failure to failure without loss of enthusiasm
#include <bits/stdc++.h>

using namespace std;

#define nl '\n'

using ll = int64_t;

using T = array<ll, 2>;

struct Seg {
	vector<ll> suf, pos, all; int N;

	void init(int n) {
		N = 1; while(N < n) N *= 2; 
		suf.assign(2*N, 0); pos.assign(2*N, 0); all.assign(2*N, 0);
	}

	void pull(int p) {
		pos[p] = pos[2*p] + pos[2*p+1];
		all[p] = all[2*p] + all[2*p+1];
		suf[p] = max(suf[2*p] + all[2*p+1], suf[2*p+1]);
	}

	void upd(int p, ll v, int x, int L, int R) {
		if (p < L || R < p) return;
		if (L == R) {
			suf[x] = all[x] = v;
			pos[x] = max(v, ll(0));
			return;
		}

		int M = (L+R)/2;
		upd(p, v, 2*x, L, M); upd(p, v, 2*x+1, M+1, R);
		pull(x);
	}

	T max_suf(int l, int r, int x, int L, int R) {
		if (r < L || R < l) return T{0, 0};
		if (l <= L && R <= r) return T{suf[x], all[x]};

		int M = (L+R)/2;
		T a = max_suf(l, r, 2*x, L, M), b = max_suf(l, r, 2*x+1, M+1, R);

		return {max(a[0] + b[1], b[0]), a[1] + b[1]};
	};

	ll sum_pos(int l, int r, int x, int L, int R) {
		if (r < L || R < l) return 0;
		if (l <= L && R <= r) return pos[x];
		int M = (L+R)/2;
		return sum_pos(l, r, 2*x, L, M) + sum_pos(l, r, 2*x+1, M+1, R);
	}

	int walk(int l, int r, ll v, ll V, int x, int L, int R) {
		// cout << x << " " << L << " " << R << " " << V << endl;
		// cout << l << " " << r << " " << v << endl;
		if (r < L || R < l || v > V) return -1;
		if (L == R) return L;

		int M = (L+R)/2;

		int res = walk(l, r, v, V - pos[2*x+1], 2*x, L, M);
		if (res == -1) return walk(l, r, v, V, 2*x+1, M+1, R);
		return res;
	}

	void upd(int p, int x) { upd(p, x, 1, 0, N-1); }
	T max_suf(int l, int r) { return max_suf(l, r, 1, 0, N-1); }
	ll sum_pos(int l, int r) { return sum_pos(l, r, 1, 0, N-1); }
	ll walk(int l, int r, ll v) { return walk(l, r, v, pos[1], 1, 0, N-1); }
};



int main() {
	cin.tie(0)->sync_with_stdio(0);
	
	int N, M, Q; cin >> N >> M >> Q;

	vector<vector<int>> QL(N), QR(N), QQ(N);

	vector<ll> C(Q), K(Q);

	for(int q = 0; q < Q; q++) {
		int t; cin >> t;
		if (t == 1) {
			int l, r; cin >> l >> r >> C[q] >> K[q]; --l, --r;
			QL[l].push_back(q);
			QR[r].push_back(q);
		}

		if (t == 2) {
			int l, r; cin >> l >> r >> K[q]; --l, --r;
			K[q] = -K[q], C[q] = -1;
			QL[l].push_back(q);
			QR[r].push_back(q);
		}

		if (t == 3) {
			int i; cin >> i >> K[q]; --i;
			QQ[i].push_back(q);
		}
	}

	Seg st; st.init(Q);

	vector<ll> ans(Q, -1);

	for(int i = 0; i < N; i++) {
		for(auto q : QL[i]) { st.upd(q, K[q]);/* cout << "ON: " << q << endl;*/ }

		for(auto q : QQ[i]) {
			ll pos = st.sum_pos(0, q), suf = st.max_suf(0, q)[0];

			ll I = pos - suf + K[q];
			// cout << "INFO: " << q << " " << pos << " " << suf << " " << I << endl;

			int res = st.walk(0, q, I);
			assert(res == -1 || res <= q);
			ans[q] = (res == -1 ? 0 : C[res]);
			// cout << "DONE: " << res << endl;
		}

		for(auto q : QR[i]) { st.upd(q, 0); /*cout << "OFF: " << q << endl;*/ }
	}

	for(int q = 0; q < Q; q++) if (ans[q] != -1) cout << ans[q] << nl;

    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 596 KB Output is correct
2 Correct 2 ms 596 KB Output is correct
3 Correct 1 ms 596 KB Output is correct
4 Correct 2 ms 608 KB Output is correct
5 Correct 1 ms 468 KB Output is correct
6 Correct 1 ms 468 KB Output is correct
7 Correct 2 ms 680 KB Output is correct
8 Correct 2 ms 596 KB Output is correct
9 Correct 2 ms 676 KB Output is correct
10 Correct 2 ms 596 KB Output is correct
11 Correct 2 ms 680 KB Output is correct
12 Correct 2 ms 596 KB Output is correct
13 Correct 2 ms 596 KB Output is correct
14 Correct 2 ms 660 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 2 ms 596 KB Output is correct
17 Correct 2 ms 596 KB Output is correct
18 Correct 2 ms 588 KB Output is correct
19 Correct 2 ms 596 KB Output is correct
20 Correct 2 ms 596 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 596 KB Output is correct
2 Correct 2 ms 596 KB Output is correct
3 Correct 1 ms 596 KB Output is correct
4 Correct 2 ms 608 KB Output is correct
5 Correct 1 ms 468 KB Output is correct
6 Correct 1 ms 468 KB Output is correct
7 Correct 2 ms 680 KB Output is correct
8 Correct 2 ms 596 KB Output is correct
9 Correct 2 ms 676 KB Output is correct
10 Correct 2 ms 596 KB Output is correct
11 Correct 2 ms 680 KB Output is correct
12 Correct 2 ms 596 KB Output is correct
13 Correct 2 ms 596 KB Output is correct
14 Correct 2 ms 660 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 2 ms 596 KB Output is correct
17 Correct 2 ms 596 KB Output is correct
18 Correct 2 ms 588 KB Output is correct
19 Correct 2 ms 596 KB Output is correct
20 Correct 2 ms 596 KB Output is correct
21 Correct 2 ms 596 KB Output is correct
22 Correct 2 ms 680 KB Output is correct
23 Correct 2 ms 596 KB Output is correct
24 Correct 2 ms 724 KB Output is correct
25 Correct 2 ms 468 KB Output is correct
26 Correct 2 ms 512 KB Output is correct
27 Correct 2 ms 724 KB Output is correct
28 Correct 2 ms 724 KB Output is correct
29 Correct 2 ms 596 KB Output is correct
30 Correct 2 ms 712 KB Output is correct
31 Correct 2 ms 596 KB Output is correct
32 Correct 2 ms 724 KB Output is correct
33 Correct 2 ms 588 KB Output is correct
34 Correct 2 ms 592 KB Output is correct
35 Correct 2 ms 596 KB Output is correct
36 Correct 3 ms 588 KB Output is correct
37 Correct 2 ms 596 KB Output is correct
38 Correct 2 ms 596 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 71 ms 12548 KB Output is correct
2 Correct 79 ms 12716 KB Output is correct
3 Correct 90 ms 12572 KB Output is correct
4 Correct 77 ms 12592 KB Output is correct
5 Correct 72 ms 12464 KB Output is correct
6 Correct 73 ms 12680 KB Output is correct
7 Correct 35 ms 5876 KB Output is correct
8 Correct 37 ms 5812 KB Output is correct
9 Correct 76 ms 12608 KB Output is correct
10 Correct 88 ms 12692 KB Output is correct
11 Correct 72 ms 12620 KB Output is correct
12 Correct 70 ms 12616 KB Output is correct
13 Correct 58 ms 10244 KB Output is correct
14 Correct 70 ms 12472 KB Output is correct
15 Correct 94 ms 10836 KB Output is correct
16 Correct 81 ms 12680 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 380 ms 43352 KB Output is correct
2 Correct 280 ms 38472 KB Output is correct
3 Correct 404 ms 46428 KB Output is correct
4 Correct 288 ms 42296 KB Output is correct
5 Correct 271 ms 37668 KB Output is correct
6 Correct 430 ms 45904 KB Output is correct
7 Correct 172 ms 21576 KB Output is correct
8 Correct 173 ms 21568 KB Output is correct
9 Correct 405 ms 45604 KB Output is correct
10 Correct 388 ms 45568 KB Output is correct
11 Correct 443 ms 45592 KB Output is correct
12 Correct 401 ms 45592 KB Output is correct
13 Correct 400 ms 45680 KB Output is correct
14 Correct 399 ms 45596 KB Output is correct
15 Correct 411 ms 45576 KB Output is correct
16 Correct 403 ms 45604 KB Output is correct
17 Correct 386 ms 45660 KB Output is correct
18 Correct 406 ms 45696 KB Output is correct
19 Correct 400 ms 45608 KB Output is correct
20 Correct 397 ms 45656 KB Output is correct
21 Correct 381 ms 45580 KB Output is correct
22 Correct 393 ms 45640 KB Output is correct
23 Correct 455 ms 45584 KB Output is correct
24 Correct 402 ms 45444 KB Output is correct
25 Correct 323 ms 37324 KB Output is correct
26 Correct 311 ms 41668 KB Output is correct
27 Correct 369 ms 48076 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 596 KB Output is correct
2 Correct 2 ms 596 KB Output is correct
3 Correct 1 ms 596 KB Output is correct
4 Correct 2 ms 608 KB Output is correct
5 Correct 1 ms 468 KB Output is correct
6 Correct 1 ms 468 KB Output is correct
7 Correct 2 ms 680 KB Output is correct
8 Correct 2 ms 596 KB Output is correct
9 Correct 2 ms 676 KB Output is correct
10 Correct 2 ms 596 KB Output is correct
11 Correct 2 ms 680 KB Output is correct
12 Correct 2 ms 596 KB Output is correct
13 Correct 2 ms 596 KB Output is correct
14 Correct 2 ms 660 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 2 ms 596 KB Output is correct
17 Correct 2 ms 596 KB Output is correct
18 Correct 2 ms 588 KB Output is correct
19 Correct 2 ms 596 KB Output is correct
20 Correct 2 ms 596 KB Output is correct
21 Correct 71 ms 12548 KB Output is correct
22 Correct 79 ms 12716 KB Output is correct
23 Correct 90 ms 12572 KB Output is correct
24 Correct 77 ms 12592 KB Output is correct
25 Correct 72 ms 12464 KB Output is correct
26 Correct 73 ms 12680 KB Output is correct
27 Correct 35 ms 5876 KB Output is correct
28 Correct 37 ms 5812 KB Output is correct
29 Correct 76 ms 12608 KB Output is correct
30 Correct 88 ms 12692 KB Output is correct
31 Correct 72 ms 12620 KB Output is correct
32 Correct 70 ms 12616 KB Output is correct
33 Correct 58 ms 10244 KB Output is correct
34 Correct 70 ms 12472 KB Output is correct
35 Correct 94 ms 10836 KB Output is correct
36 Correct 81 ms 12680 KB Output is correct
37 Correct 69 ms 11432 KB Output is correct
38 Correct 59 ms 10916 KB Output is correct
39 Correct 31 ms 5432 KB Output is correct
40 Correct 36 ms 5744 KB Output is correct
41 Correct 70 ms 12188 KB Output is correct
42 Correct 68 ms 12144 KB Output is correct
43 Correct 68 ms 12140 KB Output is correct
44 Correct 74 ms 12056 KB Output is correct
45 Correct 83 ms 12076 KB Output is correct
46 Correct 84 ms 12024 KB Output is correct
47 Correct 48 ms 10688 KB Output is correct
48 Correct 60 ms 11044 KB Output is correct
49 Correct 51 ms 9624 KB Output is correct
50 Correct 74 ms 11544 KB Output is correct
51 Correct 82 ms 12140 KB Output is correct
52 Correct 74 ms 12140 KB Output is correct
53 Correct 53 ms 10884 KB Output is correct
54 Correct 84 ms 12492 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 66 ms 12096 KB Output is correct
2 Correct 79 ms 11808 KB Output is correct
3 Correct 85 ms 12744 KB Output is correct
4 Correct 52 ms 11308 KB Output is correct
5 Correct 75 ms 11964 KB Output is correct
6 Correct 85 ms 12580 KB Output is correct
7 Correct 39 ms 6192 KB Output is correct
8 Correct 39 ms 6080 KB Output is correct
9 Correct 60 ms 11464 KB Output is correct
10 Correct 47 ms 10180 KB Output is correct
11 Correct 70 ms 11604 KB Output is correct
12 Correct 67 ms 11608 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 596 KB Output is correct
2 Correct 2 ms 596 KB Output is correct
3 Correct 1 ms 596 KB Output is correct
4 Correct 2 ms 608 KB Output is correct
5 Correct 1 ms 468 KB Output is correct
6 Correct 1 ms 468 KB Output is correct
7 Correct 2 ms 680 KB Output is correct
8 Correct 2 ms 596 KB Output is correct
9 Correct 2 ms 676 KB Output is correct
10 Correct 2 ms 596 KB Output is correct
11 Correct 2 ms 680 KB Output is correct
12 Correct 2 ms 596 KB Output is correct
13 Correct 2 ms 596 KB Output is correct
14 Correct 2 ms 660 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 2 ms 596 KB Output is correct
17 Correct 2 ms 596 KB Output is correct
18 Correct 2 ms 588 KB Output is correct
19 Correct 2 ms 596 KB Output is correct
20 Correct 2 ms 596 KB Output is correct
21 Correct 2 ms 596 KB Output is correct
22 Correct 2 ms 680 KB Output is correct
23 Correct 2 ms 596 KB Output is correct
24 Correct 2 ms 724 KB Output is correct
25 Correct 2 ms 468 KB Output is correct
26 Correct 2 ms 512 KB Output is correct
27 Correct 2 ms 724 KB Output is correct
28 Correct 2 ms 724 KB Output is correct
29 Correct 2 ms 596 KB Output is correct
30 Correct 2 ms 712 KB Output is correct
31 Correct 2 ms 596 KB Output is correct
32 Correct 2 ms 724 KB Output is correct
33 Correct 2 ms 588 KB Output is correct
34 Correct 2 ms 592 KB Output is correct
35 Correct 2 ms 596 KB Output is correct
36 Correct 3 ms 588 KB Output is correct
37 Correct 2 ms 596 KB Output is correct
38 Correct 2 ms 596 KB Output is correct
39 Correct 71 ms 12548 KB Output is correct
40 Correct 79 ms 12716 KB Output is correct
41 Correct 90 ms 12572 KB Output is correct
42 Correct 77 ms 12592 KB Output is correct
43 Correct 72 ms 12464 KB Output is correct
44 Correct 73 ms 12680 KB Output is correct
45 Correct 35 ms 5876 KB Output is correct
46 Correct 37 ms 5812 KB Output is correct
47 Correct 76 ms 12608 KB Output is correct
48 Correct 88 ms 12692 KB Output is correct
49 Correct 72 ms 12620 KB Output is correct
50 Correct 70 ms 12616 KB Output is correct
51 Correct 58 ms 10244 KB Output is correct
52 Correct 70 ms 12472 KB Output is correct
53 Correct 94 ms 10836 KB Output is correct
54 Correct 81 ms 12680 KB Output is correct
55 Correct 69 ms 11432 KB Output is correct
56 Correct 59 ms 10916 KB Output is correct
57 Correct 31 ms 5432 KB Output is correct
58 Correct 36 ms 5744 KB Output is correct
59 Correct 70 ms 12188 KB Output is correct
60 Correct 68 ms 12144 KB Output is correct
61 Correct 68 ms 12140 KB Output is correct
62 Correct 74 ms 12056 KB Output is correct
63 Correct 83 ms 12076 KB Output is correct
64 Correct 84 ms 12024 KB Output is correct
65 Correct 48 ms 10688 KB Output is correct
66 Correct 60 ms 11044 KB Output is correct
67 Correct 51 ms 9624 KB Output is correct
68 Correct 74 ms 11544 KB Output is correct
69 Correct 82 ms 12140 KB Output is correct
70 Correct 74 ms 12140 KB Output is correct
71 Correct 53 ms 10884 KB Output is correct
72 Correct 84 ms 12492 KB Output is correct
73 Correct 66 ms 12096 KB Output is correct
74 Correct 79 ms 11808 KB Output is correct
75 Correct 85 ms 12744 KB Output is correct
76 Correct 52 ms 11308 KB Output is correct
77 Correct 75 ms 11964 KB Output is correct
78 Correct 85 ms 12580 KB Output is correct
79 Correct 39 ms 6192 KB Output is correct
80 Correct 39 ms 6080 KB Output is correct
81 Correct 60 ms 11464 KB Output is correct
82 Correct 47 ms 10180 KB Output is correct
83 Correct 70 ms 11604 KB Output is correct
84 Correct 67 ms 11608 KB Output is correct
85 Correct 71 ms 11340 KB Output is correct
86 Correct 75 ms 12836 KB Output is correct
87 Correct 68 ms 11816 KB Output is correct
88 Correct 74 ms 12584 KB Output is correct
89 Correct 54 ms 10436 KB Output is correct
90 Correct 84 ms 12592 KB Output is correct
91 Correct 58 ms 10204 KB Output is correct
92 Correct 54 ms 10228 KB Output is correct
93 Correct 85 ms 12528 KB Output is correct
94 Correct 79 ms 12496 KB Output is correct
95 Correct 77 ms 12084 KB Output is correct
96 Correct 75 ms 12492 KB Output is correct
97 Correct 72 ms 12548 KB Output is correct
98 Correct 74 ms 10488 KB Output is correct
99 Correct 63 ms 11244 KB Output is correct
100 Correct 58 ms 10308 KB Output is correct
101 Correct 66 ms 11496 KB Output is correct
102 Correct 63 ms 13132 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 596 KB Output is correct
2 Correct 2 ms 596 KB Output is correct
3 Correct 1 ms 596 KB Output is correct
4 Correct 2 ms 608 KB Output is correct
5 Correct 1 ms 468 KB Output is correct
6 Correct 1 ms 468 KB Output is correct
7 Correct 2 ms 680 KB Output is correct
8 Correct 2 ms 596 KB Output is correct
9 Correct 2 ms 676 KB Output is correct
10 Correct 2 ms 596 KB Output is correct
11 Correct 2 ms 680 KB Output is correct
12 Correct 2 ms 596 KB Output is correct
13 Correct 2 ms 596 KB Output is correct
14 Correct 2 ms 660 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 2 ms 596 KB Output is correct
17 Correct 2 ms 596 KB Output is correct
18 Correct 2 ms 588 KB Output is correct
19 Correct 2 ms 596 KB Output is correct
20 Correct 2 ms 596 KB Output is correct
21 Correct 2 ms 596 KB Output is correct
22 Correct 2 ms 680 KB Output is correct
23 Correct 2 ms 596 KB Output is correct
24 Correct 2 ms 724 KB Output is correct
25 Correct 2 ms 468 KB Output is correct
26 Correct 2 ms 512 KB Output is correct
27 Correct 2 ms 724 KB Output is correct
28 Correct 2 ms 724 KB Output is correct
29 Correct 2 ms 596 KB Output is correct
30 Correct 2 ms 712 KB Output is correct
31 Correct 2 ms 596 KB Output is correct
32 Correct 2 ms 724 KB Output is correct
33 Correct 2 ms 588 KB Output is correct
34 Correct 2 ms 592 KB Output is correct
35 Correct 2 ms 596 KB Output is correct
36 Correct 3 ms 588 KB Output is correct
37 Correct 2 ms 596 KB Output is correct
38 Correct 2 ms 596 KB Output is correct
39 Correct 71 ms 12548 KB Output is correct
40 Correct 79 ms 12716 KB Output is correct
41 Correct 90 ms 12572 KB Output is correct
42 Correct 77 ms 12592 KB Output is correct
43 Correct 72 ms 12464 KB Output is correct
44 Correct 73 ms 12680 KB Output is correct
45 Correct 35 ms 5876 KB Output is correct
46 Correct 37 ms 5812 KB Output is correct
47 Correct 76 ms 12608 KB Output is correct
48 Correct 88 ms 12692 KB Output is correct
49 Correct 72 ms 12620 KB Output is correct
50 Correct 70 ms 12616 KB Output is correct
51 Correct 58 ms 10244 KB Output is correct
52 Correct 70 ms 12472 KB Output is correct
53 Correct 94 ms 10836 KB Output is correct
54 Correct 81 ms 12680 KB Output is correct
55 Correct 380 ms 43352 KB Output is correct
56 Correct 280 ms 38472 KB Output is correct
57 Correct 404 ms 46428 KB Output is correct
58 Correct 288 ms 42296 KB Output is correct
59 Correct 271 ms 37668 KB Output is correct
60 Correct 430 ms 45904 KB Output is correct
61 Correct 172 ms 21576 KB Output is correct
62 Correct 173 ms 21568 KB Output is correct
63 Correct 405 ms 45604 KB Output is correct
64 Correct 388 ms 45568 KB Output is correct
65 Correct 443 ms 45592 KB Output is correct
66 Correct 401 ms 45592 KB Output is correct
67 Correct 400 ms 45680 KB Output is correct
68 Correct 399 ms 45596 KB Output is correct
69 Correct 411 ms 45576 KB Output is correct
70 Correct 403 ms 45604 KB Output is correct
71 Correct 386 ms 45660 KB Output is correct
72 Correct 406 ms 45696 KB Output is correct
73 Correct 400 ms 45608 KB Output is correct
74 Correct 397 ms 45656 KB Output is correct
75 Correct 381 ms 45580 KB Output is correct
76 Correct 393 ms 45640 KB Output is correct
77 Correct 455 ms 45584 KB Output is correct
78 Correct 402 ms 45444 KB Output is correct
79 Correct 323 ms 37324 KB Output is correct
80 Correct 311 ms 41668 KB Output is correct
81 Correct 369 ms 48076 KB Output is correct
82 Correct 69 ms 11432 KB Output is correct
83 Correct 59 ms 10916 KB Output is correct
84 Correct 31 ms 5432 KB Output is correct
85 Correct 36 ms 5744 KB Output is correct
86 Correct 70 ms 12188 KB Output is correct
87 Correct 68 ms 12144 KB Output is correct
88 Correct 68 ms 12140 KB Output is correct
89 Correct 74 ms 12056 KB Output is correct
90 Correct 83 ms 12076 KB Output is correct
91 Correct 84 ms 12024 KB Output is correct
92 Correct 48 ms 10688 KB Output is correct
93 Correct 60 ms 11044 KB Output is correct
94 Correct 51 ms 9624 KB Output is correct
95 Correct 74 ms 11544 KB Output is correct
96 Correct 82 ms 12140 KB Output is correct
97 Correct 74 ms 12140 KB Output is correct
98 Correct 53 ms 10884 KB Output is correct
99 Correct 84 ms 12492 KB Output is correct
100 Correct 66 ms 12096 KB Output is correct
101 Correct 79 ms 11808 KB Output is correct
102 Correct 85 ms 12744 KB Output is correct
103 Correct 52 ms 11308 KB Output is correct
104 Correct 75 ms 11964 KB Output is correct
105 Correct 85 ms 12580 KB Output is correct
106 Correct 39 ms 6192 KB Output is correct
107 Correct 39 ms 6080 KB Output is correct
108 Correct 60 ms 11464 KB Output is correct
109 Correct 47 ms 10180 KB Output is correct
110 Correct 70 ms 11604 KB Output is correct
111 Correct 67 ms 11608 KB Output is correct
112 Correct 71 ms 11340 KB Output is correct
113 Correct 75 ms 12836 KB Output is correct
114 Correct 68 ms 11816 KB Output is correct
115 Correct 74 ms 12584 KB Output is correct
116 Correct 54 ms 10436 KB Output is correct
117 Correct 84 ms 12592 KB Output is correct
118 Correct 58 ms 10204 KB Output is correct
119 Correct 54 ms 10228 KB Output is correct
120 Correct 85 ms 12528 KB Output is correct
121 Correct 79 ms 12496 KB Output is correct
122 Correct 77 ms 12084 KB Output is correct
123 Correct 75 ms 12492 KB Output is correct
124 Correct 72 ms 12548 KB Output is correct
125 Correct 74 ms 10488 KB Output is correct
126 Correct 63 ms 11244 KB Output is correct
127 Correct 58 ms 10308 KB Output is correct
128 Correct 66 ms 11496 KB Output is correct
129 Correct 63 ms 13132 KB Output is correct
130 Correct 395 ms 46028 KB Output is correct
131 Correct 282 ms 37848 KB Output is correct
132 Correct 383 ms 46576 KB Output is correct
133 Correct 380 ms 44692 KB Output is correct
134 Correct 332 ms 43428 KB Output is correct
135 Correct 396 ms 45832 KB Output is correct
136 Correct 384 ms 45776 KB Output is correct
137 Correct 389 ms 45800 KB Output is correct
138 Correct 382 ms 45584 KB Output is correct
139 Correct 395 ms 45756 KB Output is correct
140 Correct 391 ms 45596 KB Output is correct
141 Correct 398 ms 45644 KB Output is correct
142 Correct 386 ms 45672 KB Output is correct
143 Correct 378 ms 45644 KB Output is correct
144 Correct 386 ms 45588 KB Output is correct
145 Correct 385 ms 45592 KB Output is correct
146 Correct 395 ms 45564 KB Output is correct
147 Correct 390 ms 45592 KB Output is correct
148 Correct 408 ms 45416 KB Output is correct
149 Correct 396 ms 45500 KB Output is correct
150 Correct 239 ms 40560 KB Output is correct
151 Correct 308 ms 41672 KB Output is correct
152 Correct 306 ms 41656 KB Output is correct
153 Correct 303 ms 47840 KB Output is correct