답안 #684588

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
684588 2023-01-21T22:05:20 Z NK_ 푸드 코트 (JOI21_foodcourt) C++17
100 / 100
450 ms 53976 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 = long long;

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, 0LL);
			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 2 ms 596 KB Output is correct
4 Correct 2 ms 596 KB Output is correct
5 Correct 2 ms 468 KB Output is correct
6 Correct 1 ms 468 KB Output is correct
7 Correct 2 ms 596 KB Output is correct
8 Correct 2 ms 596 KB Output is correct
9 Correct 2 ms 596 KB Output is correct
10 Correct 2 ms 596 KB Output is correct
11 Correct 2 ms 596 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 596 KB Output is correct
15 Correct 1 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 596 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 2 ms 596 KB Output is correct
4 Correct 2 ms 596 KB Output is correct
5 Correct 2 ms 468 KB Output is correct
6 Correct 1 ms 468 KB Output is correct
7 Correct 2 ms 596 KB Output is correct
8 Correct 2 ms 596 KB Output is correct
9 Correct 2 ms 596 KB Output is correct
10 Correct 2 ms 596 KB Output is correct
11 Correct 2 ms 596 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 596 KB Output is correct
15 Correct 1 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 596 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 724 KB Output is correct
23 Correct 2 ms 596 KB Output is correct
24 Correct 2 ms 724 KB Output is correct
25 Correct 1 ms 468 KB Output is correct
26 Correct 1 ms 468 KB Output is correct
27 Correct 3 ms 724 KB Output is correct
28 Correct 2 ms 596 KB Output is correct
29 Correct 2 ms 596 KB Output is correct
30 Correct 2 ms 676 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 596 KB Output is correct
34 Correct 2 ms 596 KB Output is correct
35 Correct 2 ms 640 KB Output is correct
36 Correct 2 ms 596 KB Output is correct
37 Correct 2 ms 620 KB Output is correct
38 Correct 2 ms 724 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 64 ms 12044 KB Output is correct
2 Correct 70 ms 12036 KB Output is correct
3 Correct 73 ms 12032 KB Output is correct
4 Correct 73 ms 12036 KB Output is correct
5 Correct 80 ms 12092 KB Output is correct
6 Correct 70 ms 12024 KB Output is correct
7 Correct 36 ms 5500 KB Output is correct
8 Correct 36 ms 5584 KB Output is correct
9 Correct 70 ms 11996 KB Output is correct
10 Correct 84 ms 11952 KB Output is correct
11 Correct 77 ms 11980 KB Output is correct
12 Correct 74 ms 11988 KB Output is correct
13 Correct 56 ms 9932 KB Output is correct
14 Correct 64 ms 11992 KB Output is correct
15 Correct 62 ms 10208 KB Output is correct
16 Correct 86 ms 12024 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 369 ms 47680 KB Output is correct
2 Correct 272 ms 41852 KB Output is correct
3 Correct 398 ms 51440 KB Output is correct
4 Correct 292 ms 45836 KB Output is correct
5 Correct 289 ms 41368 KB Output is correct
6 Correct 400 ms 51272 KB Output is correct
7 Correct 172 ms 24896 KB Output is correct
8 Correct 168 ms 24916 KB Output is correct
9 Correct 390 ms 50788 KB Output is correct
10 Correct 394 ms 50812 KB Output is correct
11 Correct 386 ms 50892 KB Output is correct
12 Correct 396 ms 50816 KB Output is correct
13 Correct 408 ms 50876 KB Output is correct
14 Correct 388 ms 50780 KB Output is correct
15 Correct 399 ms 50796 KB Output is correct
16 Correct 375 ms 50704 KB Output is correct
17 Correct 419 ms 50688 KB Output is correct
18 Correct 379 ms 50828 KB Output is correct
19 Correct 410 ms 50908 KB Output is correct
20 Correct 430 ms 50864 KB Output is correct
21 Correct 397 ms 50952 KB Output is correct
22 Correct 384 ms 50808 KB Output is correct
23 Correct 382 ms 50748 KB Output is correct
24 Correct 388 ms 50684 KB Output is correct
25 Correct 317 ms 42148 KB Output is correct
26 Correct 348 ms 46552 KB Output is correct
27 Correct 308 ms 53108 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 2 ms 596 KB Output is correct
4 Correct 2 ms 596 KB Output is correct
5 Correct 2 ms 468 KB Output is correct
6 Correct 1 ms 468 KB Output is correct
7 Correct 2 ms 596 KB Output is correct
8 Correct 2 ms 596 KB Output is correct
9 Correct 2 ms 596 KB Output is correct
10 Correct 2 ms 596 KB Output is correct
11 Correct 2 ms 596 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 596 KB Output is correct
15 Correct 1 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 596 KB Output is correct
19 Correct 2 ms 596 KB Output is correct
20 Correct 2 ms 596 KB Output is correct
21 Correct 64 ms 12044 KB Output is correct
22 Correct 70 ms 12036 KB Output is correct
23 Correct 73 ms 12032 KB Output is correct
24 Correct 73 ms 12036 KB Output is correct
25 Correct 80 ms 12092 KB Output is correct
26 Correct 70 ms 12024 KB Output is correct
27 Correct 36 ms 5500 KB Output is correct
28 Correct 36 ms 5584 KB Output is correct
29 Correct 70 ms 11996 KB Output is correct
30 Correct 84 ms 11952 KB Output is correct
31 Correct 77 ms 11980 KB Output is correct
32 Correct 74 ms 11988 KB Output is correct
33 Correct 56 ms 9932 KB Output is correct
34 Correct 64 ms 11992 KB Output is correct
35 Correct 62 ms 10208 KB Output is correct
36 Correct 86 ms 12024 KB Output is correct
37 Correct 64 ms 11212 KB Output is correct
38 Correct 62 ms 10792 KB Output is correct
39 Correct 33 ms 5320 KB Output is correct
40 Correct 40 ms 5628 KB Output is correct
41 Correct 68 ms 11992 KB Output is correct
42 Correct 82 ms 11996 KB Output is correct
43 Correct 70 ms 12012 KB Output is correct
44 Correct 72 ms 12012 KB Output is correct
45 Correct 76 ms 11984 KB Output is correct
46 Correct 73 ms 12028 KB Output is correct
47 Correct 50 ms 10568 KB Output is correct
48 Correct 56 ms 10892 KB Output is correct
49 Correct 46 ms 9480 KB Output is correct
50 Correct 72 ms 11552 KB Output is correct
51 Correct 74 ms 12084 KB Output is correct
52 Correct 73 ms 12024 KB Output is correct
53 Correct 54 ms 10796 KB Output is correct
54 Correct 70 ms 12236 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 69 ms 12888 KB Output is correct
2 Correct 74 ms 12620 KB Output is correct
3 Correct 121 ms 13576 KB Output is correct
4 Correct 51 ms 11680 KB Output is correct
5 Correct 62 ms 12596 KB Output is correct
6 Correct 82 ms 13560 KB Output is correct
7 Correct 39 ms 6548 KB Output is correct
8 Correct 37 ms 6416 KB Output is correct
9 Correct 66 ms 12236 KB Output is correct
10 Correct 42 ms 10572 KB Output is correct
11 Correct 62 ms 12440 KB Output is correct
12 Correct 63 ms 12364 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 2 ms 596 KB Output is correct
4 Correct 2 ms 596 KB Output is correct
5 Correct 2 ms 468 KB Output is correct
6 Correct 1 ms 468 KB Output is correct
7 Correct 2 ms 596 KB Output is correct
8 Correct 2 ms 596 KB Output is correct
9 Correct 2 ms 596 KB Output is correct
10 Correct 2 ms 596 KB Output is correct
11 Correct 2 ms 596 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 596 KB Output is correct
15 Correct 1 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 596 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 724 KB Output is correct
23 Correct 2 ms 596 KB Output is correct
24 Correct 2 ms 724 KB Output is correct
25 Correct 1 ms 468 KB Output is correct
26 Correct 1 ms 468 KB Output is correct
27 Correct 3 ms 724 KB Output is correct
28 Correct 2 ms 596 KB Output is correct
29 Correct 2 ms 596 KB Output is correct
30 Correct 2 ms 676 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 596 KB Output is correct
34 Correct 2 ms 596 KB Output is correct
35 Correct 2 ms 640 KB Output is correct
36 Correct 2 ms 596 KB Output is correct
37 Correct 2 ms 620 KB Output is correct
38 Correct 2 ms 724 KB Output is correct
39 Correct 64 ms 12044 KB Output is correct
40 Correct 70 ms 12036 KB Output is correct
41 Correct 73 ms 12032 KB Output is correct
42 Correct 73 ms 12036 KB Output is correct
43 Correct 80 ms 12092 KB Output is correct
44 Correct 70 ms 12024 KB Output is correct
45 Correct 36 ms 5500 KB Output is correct
46 Correct 36 ms 5584 KB Output is correct
47 Correct 70 ms 11996 KB Output is correct
48 Correct 84 ms 11952 KB Output is correct
49 Correct 77 ms 11980 KB Output is correct
50 Correct 74 ms 11988 KB Output is correct
51 Correct 56 ms 9932 KB Output is correct
52 Correct 64 ms 11992 KB Output is correct
53 Correct 62 ms 10208 KB Output is correct
54 Correct 86 ms 12024 KB Output is correct
55 Correct 64 ms 11212 KB Output is correct
56 Correct 62 ms 10792 KB Output is correct
57 Correct 33 ms 5320 KB Output is correct
58 Correct 40 ms 5628 KB Output is correct
59 Correct 68 ms 11992 KB Output is correct
60 Correct 82 ms 11996 KB Output is correct
61 Correct 70 ms 12012 KB Output is correct
62 Correct 72 ms 12012 KB Output is correct
63 Correct 76 ms 11984 KB Output is correct
64 Correct 73 ms 12028 KB Output is correct
65 Correct 50 ms 10568 KB Output is correct
66 Correct 56 ms 10892 KB Output is correct
67 Correct 46 ms 9480 KB Output is correct
68 Correct 72 ms 11552 KB Output is correct
69 Correct 74 ms 12084 KB Output is correct
70 Correct 73 ms 12024 KB Output is correct
71 Correct 54 ms 10796 KB Output is correct
72 Correct 70 ms 12236 KB Output is correct
73 Correct 69 ms 12888 KB Output is correct
74 Correct 74 ms 12620 KB Output is correct
75 Correct 121 ms 13576 KB Output is correct
76 Correct 51 ms 11680 KB Output is correct
77 Correct 62 ms 12596 KB Output is correct
78 Correct 82 ms 13560 KB Output is correct
79 Correct 39 ms 6548 KB Output is correct
80 Correct 37 ms 6416 KB Output is correct
81 Correct 66 ms 12236 KB Output is correct
82 Correct 42 ms 10572 KB Output is correct
83 Correct 62 ms 12440 KB Output is correct
84 Correct 63 ms 12364 KB Output is correct
85 Correct 71 ms 11900 KB Output is correct
86 Correct 78 ms 13512 KB Output is correct
87 Correct 75 ms 12592 KB Output is correct
88 Correct 76 ms 13456 KB Output is correct
89 Correct 47 ms 10700 KB Output is correct
90 Correct 73 ms 13348 KB Output is correct
91 Correct 66 ms 10744 KB Output is correct
92 Correct 62 ms 10568 KB Output is correct
93 Correct 81 ms 13336 KB Output is correct
94 Correct 73 ms 13336 KB Output is correct
95 Correct 71 ms 12836 KB Output is correct
96 Correct 88 ms 13416 KB Output is correct
97 Correct 77 ms 13320 KB Output is correct
98 Correct 62 ms 11116 KB Output is correct
99 Correct 53 ms 11844 KB Output is correct
100 Correct 50 ms 10828 KB Output is correct
101 Correct 67 ms 12196 KB Output is correct
102 Correct 82 ms 14020 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 2 ms 596 KB Output is correct
4 Correct 2 ms 596 KB Output is correct
5 Correct 2 ms 468 KB Output is correct
6 Correct 1 ms 468 KB Output is correct
7 Correct 2 ms 596 KB Output is correct
8 Correct 2 ms 596 KB Output is correct
9 Correct 2 ms 596 KB Output is correct
10 Correct 2 ms 596 KB Output is correct
11 Correct 2 ms 596 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 596 KB Output is correct
15 Correct 1 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 596 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 724 KB Output is correct
23 Correct 2 ms 596 KB Output is correct
24 Correct 2 ms 724 KB Output is correct
25 Correct 1 ms 468 KB Output is correct
26 Correct 1 ms 468 KB Output is correct
27 Correct 3 ms 724 KB Output is correct
28 Correct 2 ms 596 KB Output is correct
29 Correct 2 ms 596 KB Output is correct
30 Correct 2 ms 676 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 596 KB Output is correct
34 Correct 2 ms 596 KB Output is correct
35 Correct 2 ms 640 KB Output is correct
36 Correct 2 ms 596 KB Output is correct
37 Correct 2 ms 620 KB Output is correct
38 Correct 2 ms 724 KB Output is correct
39 Correct 64 ms 12044 KB Output is correct
40 Correct 70 ms 12036 KB Output is correct
41 Correct 73 ms 12032 KB Output is correct
42 Correct 73 ms 12036 KB Output is correct
43 Correct 80 ms 12092 KB Output is correct
44 Correct 70 ms 12024 KB Output is correct
45 Correct 36 ms 5500 KB Output is correct
46 Correct 36 ms 5584 KB Output is correct
47 Correct 70 ms 11996 KB Output is correct
48 Correct 84 ms 11952 KB Output is correct
49 Correct 77 ms 11980 KB Output is correct
50 Correct 74 ms 11988 KB Output is correct
51 Correct 56 ms 9932 KB Output is correct
52 Correct 64 ms 11992 KB Output is correct
53 Correct 62 ms 10208 KB Output is correct
54 Correct 86 ms 12024 KB Output is correct
55 Correct 369 ms 47680 KB Output is correct
56 Correct 272 ms 41852 KB Output is correct
57 Correct 398 ms 51440 KB Output is correct
58 Correct 292 ms 45836 KB Output is correct
59 Correct 289 ms 41368 KB Output is correct
60 Correct 400 ms 51272 KB Output is correct
61 Correct 172 ms 24896 KB Output is correct
62 Correct 168 ms 24916 KB Output is correct
63 Correct 390 ms 50788 KB Output is correct
64 Correct 394 ms 50812 KB Output is correct
65 Correct 386 ms 50892 KB Output is correct
66 Correct 396 ms 50816 KB Output is correct
67 Correct 408 ms 50876 KB Output is correct
68 Correct 388 ms 50780 KB Output is correct
69 Correct 399 ms 50796 KB Output is correct
70 Correct 375 ms 50704 KB Output is correct
71 Correct 419 ms 50688 KB Output is correct
72 Correct 379 ms 50828 KB Output is correct
73 Correct 410 ms 50908 KB Output is correct
74 Correct 430 ms 50864 KB Output is correct
75 Correct 397 ms 50952 KB Output is correct
76 Correct 384 ms 50808 KB Output is correct
77 Correct 382 ms 50748 KB Output is correct
78 Correct 388 ms 50684 KB Output is correct
79 Correct 317 ms 42148 KB Output is correct
80 Correct 348 ms 46552 KB Output is correct
81 Correct 308 ms 53108 KB Output is correct
82 Correct 64 ms 11212 KB Output is correct
83 Correct 62 ms 10792 KB Output is correct
84 Correct 33 ms 5320 KB Output is correct
85 Correct 40 ms 5628 KB Output is correct
86 Correct 68 ms 11992 KB Output is correct
87 Correct 82 ms 11996 KB Output is correct
88 Correct 70 ms 12012 KB Output is correct
89 Correct 72 ms 12012 KB Output is correct
90 Correct 76 ms 11984 KB Output is correct
91 Correct 73 ms 12028 KB Output is correct
92 Correct 50 ms 10568 KB Output is correct
93 Correct 56 ms 10892 KB Output is correct
94 Correct 46 ms 9480 KB Output is correct
95 Correct 72 ms 11552 KB Output is correct
96 Correct 74 ms 12084 KB Output is correct
97 Correct 73 ms 12024 KB Output is correct
98 Correct 54 ms 10796 KB Output is correct
99 Correct 70 ms 12236 KB Output is correct
100 Correct 69 ms 12888 KB Output is correct
101 Correct 74 ms 12620 KB Output is correct
102 Correct 121 ms 13576 KB Output is correct
103 Correct 51 ms 11680 KB Output is correct
104 Correct 62 ms 12596 KB Output is correct
105 Correct 82 ms 13560 KB Output is correct
106 Correct 39 ms 6548 KB Output is correct
107 Correct 37 ms 6416 KB Output is correct
108 Correct 66 ms 12236 KB Output is correct
109 Correct 42 ms 10572 KB Output is correct
110 Correct 62 ms 12440 KB Output is correct
111 Correct 63 ms 12364 KB Output is correct
112 Correct 71 ms 11900 KB Output is correct
113 Correct 78 ms 13512 KB Output is correct
114 Correct 75 ms 12592 KB Output is correct
115 Correct 76 ms 13456 KB Output is correct
116 Correct 47 ms 10700 KB Output is correct
117 Correct 73 ms 13348 KB Output is correct
118 Correct 66 ms 10744 KB Output is correct
119 Correct 62 ms 10568 KB Output is correct
120 Correct 81 ms 13336 KB Output is correct
121 Correct 73 ms 13336 KB Output is correct
122 Correct 71 ms 12836 KB Output is correct
123 Correct 88 ms 13416 KB Output is correct
124 Correct 77 ms 13320 KB Output is correct
125 Correct 62 ms 11116 KB Output is correct
126 Correct 53 ms 11844 KB Output is correct
127 Correct 50 ms 10828 KB Output is correct
128 Correct 67 ms 12196 KB Output is correct
129 Correct 82 ms 14020 KB Output is correct
130 Correct 388 ms 51484 KB Output is correct
131 Correct 274 ms 41596 KB Output is correct
132 Correct 389 ms 51972 KB Output is correct
133 Correct 381 ms 50372 KB Output is correct
134 Correct 334 ms 48384 KB Output is correct
135 Correct 419 ms 52032 KB Output is correct
136 Correct 450 ms 51788 KB Output is correct
137 Correct 419 ms 51804 KB Output is correct
138 Correct 402 ms 51468 KB Output is correct
139 Correct 414 ms 51480 KB Output is correct
140 Correct 405 ms 51424 KB Output is correct
141 Correct 419 ms 51428 KB Output is correct
142 Correct 416 ms 51384 KB Output is correct
143 Correct 399 ms 51416 KB Output is correct
144 Correct 417 ms 51476 KB Output is correct
145 Correct 392 ms 51448 KB Output is correct
146 Correct 445 ms 51516 KB Output is correct
147 Correct 405 ms 51380 KB Output is correct
148 Correct 411 ms 51376 KB Output is correct
149 Correct 445 ms 51404 KB Output is correct
150 Correct 242 ms 45672 KB Output is correct
151 Correct 316 ms 47120 KB Output is correct
152 Correct 313 ms 47192 KB Output is correct
153 Correct 333 ms 53976 KB Output is correct