Submission #579604

# Submission time Handle Problem Language Result Execution time Memory
579604 2022-06-19T13:14:03 Z cheissmart Food Court (JOI21_foodcourt) C++14
100 / 100
846 ms 40928 KB
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#define IO_OP std::ios::sync_with_stdio(0); std::cin.tie(0);
#define F first
#define S second
#define V vector
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define SZ(v) int((v).size())
#define ALL(v) (v).begin(), (v).end()

using namespace std;

typedef long long ll;
typedef pair<int, int> pi;
typedef V<int> vi;

string _reset = "\u001b[0m", _yellow = "\u001b[33m", _bold = "\u001b[1m";
void DBG() { cerr << "]" << _reset << endl; }
template<class H, class...T> void DBG(H h, T ...t) {
	cerr << to_string(h);
	if(sizeof ...(t)) cerr << ", ";
	DBG(t...);
}
#ifdef CHEISSMART
#define debug(...) cerr << _yellow << _bold << "Line(" << __LINE__ << ") -> [" << #__VA_ARGS__ << "]: [", DBG(__VA_ARGS__)
#else
#define debug(...)
#endif

const int INF = 1e9 + 7, N = 250005;

int n;

namespace seg {
	struct node {
		ll tot_lz, len_add, len_mx;
		node() {
			tot_lz = len_add = len_mx = 0;
		}
	} t[N * 4];
	void apply_add_tot(int v, ll x) {
		t[v].tot_lz += x;
	}
	void apply_upd_len(int v, ll add, ll mx) {
		t[v].len_add += add;
		t[v].len_mx += add;
		t[v].len_mx = max(t[v].len_mx, mx);
	}
	void push_tot(int v) {
		apply_add_tot(v * 2, t[v].tot_lz);
		apply_add_tot(v * 2 + 1, t[v].tot_lz);
		t[v].tot_lz = 0;
	}
	void push_len(int v) {
		apply_upd_len(v * 2, t[v].len_add, t[v].len_mx);
		apply_upd_len(v * 2 + 1, t[v].len_add, t[v].len_mx);
		t[v].len_add = t[v].len_mx = 0;
	}
	void add_tot(int l, int r, ll x, int v = 1, int tl = 0, int tr = n) {
		if(l <= tl && tr <= r) {
			apply_add_tot(v, x);
			return;
		}
		push_tot(v);
		int tm = (tl + tr) / 2;
		if(l < tm) add_tot(l, r, x, v * 2, tl, tm);
		if(r > tm) add_tot(l, r, x, v * 2 + 1, tm, tr);
	}
	void upd_len(int l, int r, ll add, ll mx, int v = 1, int tl = 0, int tr = n) {
		if(l <= tl && tr <= r) {
			apply_upd_len(v, add, mx);
			return;
		}
		push_len(v);
		int tm = (tl + tr) / 2;
		if(l < tm) upd_len(l, r, add, mx, v * 2, tl, tm);
		if(r > tm) upd_len(l, r, add, mx, v * 2 + 1, tm, tr);
	}
	ll qry_tot(int pos, int v = 1, int tl = 0, int tr = n) {
		if(tr - tl == 1)
			return t[v].tot_lz;
		push_tot(v);
		int tm = (tl + tr) / 2;
		if(pos < tm) return qry_tot(pos, v * 2, tl, tm);
		else return qry_tot(pos, v * 2 + 1, tm, tr);
	}
	ll qry_len(int pos, int v = 1, int tl = 0, int tr = n) {
		if(tr - tl == 1)
			return max(t[v].len_add, t[v].len_mx);
		push_len(v);
		int tm = (tl + tr) / 2;
		if(pos < tm) return qry_len(pos, v * 2, tl, tm);
		else return qry_len(pos, v * 2 + 1, tm, tr);
	}
}

namespace seg2 {
	ll t[N * 4];
	void apply(int v, ll x) {
		t[v] += x;
	}
	void push(int v) {
		apply(v * 2, t[v]);
		apply(v * 2 + 1, t[v]);
		t[v] = 0;
	}
	void add(int l, int r, ll x, int v = 1, int tl = 0, int tr = n) {
		if(l <= tl && tr <= r) {
			apply(v, x);
			return;
		}
		push(v);
		int tm = (tl + tr) / 2;
		if(l < tm) add(l, r, x, v * 2, tl, tm);
		if(r > tm) add(l, r, x, v * 2 + 1, tm, tr);
	}
	ll qry(int pos, int v = 1, int tl = 0, int tr = n) {
		if(tr - tl == 1)
			return t[v];
		push(v);
		int tm = (tl + tr) / 2;
		if(pos < tm) return qry(pos, v * 2, tl, tm);
		else return qry(pos, v * 2 + 1, tm, tr);
	}
}

signed main()
{
	IO_OP;

	int m, q;
	cin >> n >> m >> q;

	V<array<int, 4>> ev;
	V<pair<int, ll>> qq;

	for(int i = 0; i < q; i++) {
		int t; cin >> t;
		if(t == 1) {
			int l, r, c, k;
			cin >> l >> r >> c >> k, l--;
			ev.PB({l, r, c, k});
			seg::add_tot(l, r, k);
			seg::upd_len(l, r, k, 0);
		} else if(t == 2) {
			int l, r, k;
			cin >> l >> r >> k, l--;
			seg::upd_len(l, r, -k, 0);
		} else {
			int a;
			ll b;
			cin >> a >> b, a--;
			if(b > seg::qry_len(a)) {
				qq.EB(a, -1);
			} else {
				qq.EB(a, seg::qry_tot(a) - seg::qry_len(a) + b);
			}
		}
	}

	vi ans(SZ(qq));

	int now = -1;

	auto gogo = [&] (int m) {
		while(now < m) {
			now++;
			seg2::add(ev[now][0], ev[now][1], ev[now][3]);
		}
		while(now > m) {
			seg2::add(ev[now][0], ev[now][1], -ev[now][3]);
			now--;
		}
	};

	function<void(vi&, int, int)> solve = [&] (vi& todo, int l, int r) {
		if(todo.empty()) return;
		if(l == r) {
			for(int i:todo) ans[i] = ev[l][2];
			return;
		}
		int m = (l + r) / 2;
		vi todo_l, todo_r;

		gogo(m);

		for(int i:todo) {
			if(seg2::qry(qq[i].F) >= qq[i].S) {
				todo_l.PB(i);
			} else {
				todo_r.PB(i);
			}
		}

		solve(todo_l, l, m);
		solve(todo_r, m + 1, r);
	};

	vi todo;
	for(int i = 0; i < SZ(qq); i++)
		if(qq[i].S != -1)
			todo.PB(i);

	solve(todo, 0, SZ(ev) - 1);

	for(int i = 0; i < SZ(qq); i++)
		cout << ans[i] << '\n';

}

# Verdict Execution time Memory Grader output
1 Correct 12 ms 23764 KB Output is correct
2 Correct 13 ms 23784 KB Output is correct
3 Correct 12 ms 23872 KB Output is correct
4 Correct 15 ms 23776 KB Output is correct
5 Correct 12 ms 23800 KB Output is correct
6 Correct 11 ms 23792 KB Output is correct
7 Correct 12 ms 23844 KB Output is correct
8 Correct 14 ms 23892 KB Output is correct
9 Correct 13 ms 23764 KB Output is correct
10 Correct 13 ms 23820 KB Output is correct
11 Correct 13 ms 23836 KB Output is correct
12 Correct 14 ms 23892 KB Output is correct
13 Correct 12 ms 23864 KB Output is correct
14 Correct 11 ms 23880 KB Output is correct
15 Correct 12 ms 23764 KB Output is correct
16 Correct 13 ms 23892 KB Output is correct
17 Correct 12 ms 23764 KB Output is correct
18 Correct 12 ms 23892 KB Output is correct
19 Correct 13 ms 23880 KB Output is correct
20 Correct 13 ms 23852 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 12 ms 23764 KB Output is correct
2 Correct 13 ms 23784 KB Output is correct
3 Correct 12 ms 23872 KB Output is correct
4 Correct 15 ms 23776 KB Output is correct
5 Correct 12 ms 23800 KB Output is correct
6 Correct 11 ms 23792 KB Output is correct
7 Correct 12 ms 23844 KB Output is correct
8 Correct 14 ms 23892 KB Output is correct
9 Correct 13 ms 23764 KB Output is correct
10 Correct 13 ms 23820 KB Output is correct
11 Correct 13 ms 23836 KB Output is correct
12 Correct 14 ms 23892 KB Output is correct
13 Correct 12 ms 23864 KB Output is correct
14 Correct 11 ms 23880 KB Output is correct
15 Correct 12 ms 23764 KB Output is correct
16 Correct 13 ms 23892 KB Output is correct
17 Correct 12 ms 23764 KB Output is correct
18 Correct 12 ms 23892 KB Output is correct
19 Correct 13 ms 23880 KB Output is correct
20 Correct 13 ms 23852 KB Output is correct
21 Correct 13 ms 23860 KB Output is correct
22 Correct 13 ms 23892 KB Output is correct
23 Correct 13 ms 23888 KB Output is correct
24 Correct 13 ms 23772 KB Output is correct
25 Correct 11 ms 23780 KB Output is correct
26 Correct 12 ms 23764 KB Output is correct
27 Correct 14 ms 23900 KB Output is correct
28 Correct 14 ms 23840 KB Output is correct
29 Correct 12 ms 23892 KB Output is correct
30 Correct 13 ms 23892 KB Output is correct
31 Correct 13 ms 23892 KB Output is correct
32 Correct 14 ms 23884 KB Output is correct
33 Correct 13 ms 23892 KB Output is correct
34 Correct 13 ms 23876 KB Output is correct
35 Correct 13 ms 23872 KB Output is correct
36 Correct 13 ms 23892 KB Output is correct
37 Correct 12 ms 23816 KB Output is correct
38 Correct 15 ms 23876 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 67 ms 25628 KB Output is correct
2 Correct 68 ms 25796 KB Output is correct
3 Correct 63 ms 25764 KB Output is correct
4 Correct 65 ms 25620 KB Output is correct
5 Correct 78 ms 25644 KB Output is correct
6 Correct 76 ms 25768 KB Output is correct
7 Correct 29 ms 24696 KB Output is correct
8 Correct 32 ms 24736 KB Output is correct
9 Correct 75 ms 25612 KB Output is correct
10 Correct 69 ms 25632 KB Output is correct
11 Correct 68 ms 25720 KB Output is correct
12 Correct 63 ms 25632 KB Output is correct
13 Correct 89 ms 25920 KB Output is correct
14 Correct 96 ms 25928 KB Output is correct
15 Correct 102 ms 26048 KB Output is correct
16 Correct 103 ms 26076 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 539 ms 31436 KB Output is correct
2 Correct 408 ms 30736 KB Output is correct
3 Correct 584 ms 31848 KB Output is correct
4 Correct 512 ms 31004 KB Output is correct
5 Correct 488 ms 31052 KB Output is correct
6 Correct 683 ms 31896 KB Output is correct
7 Correct 111 ms 27624 KB Output is correct
8 Correct 117 ms 27652 KB Output is correct
9 Correct 787 ms 33920 KB Output is correct
10 Correct 790 ms 39912 KB Output is correct
11 Correct 594 ms 37940 KB Output is correct
12 Correct 635 ms 37656 KB Output is correct
13 Correct 610 ms 37536 KB Output is correct
14 Correct 649 ms 37420 KB Output is correct
15 Correct 611 ms 37388 KB Output is correct
16 Correct 601 ms 37556 KB Output is correct
17 Correct 599 ms 37244 KB Output is correct
18 Correct 600 ms 37580 KB Output is correct
19 Correct 591 ms 37480 KB Output is correct
20 Correct 629 ms 37444 KB Output is correct
21 Correct 618 ms 37336 KB Output is correct
22 Correct 587 ms 37300 KB Output is correct
23 Correct 610 ms 37384 KB Output is correct
24 Correct 612 ms 37492 KB Output is correct
25 Correct 523 ms 37232 KB Output is correct
26 Correct 555 ms 37408 KB Output is correct
27 Correct 487 ms 38104 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 12 ms 23764 KB Output is correct
2 Correct 13 ms 23784 KB Output is correct
3 Correct 12 ms 23872 KB Output is correct
4 Correct 15 ms 23776 KB Output is correct
5 Correct 12 ms 23800 KB Output is correct
6 Correct 11 ms 23792 KB Output is correct
7 Correct 12 ms 23844 KB Output is correct
8 Correct 14 ms 23892 KB Output is correct
9 Correct 13 ms 23764 KB Output is correct
10 Correct 13 ms 23820 KB Output is correct
11 Correct 13 ms 23836 KB Output is correct
12 Correct 14 ms 23892 KB Output is correct
13 Correct 12 ms 23864 KB Output is correct
14 Correct 11 ms 23880 KB Output is correct
15 Correct 12 ms 23764 KB Output is correct
16 Correct 13 ms 23892 KB Output is correct
17 Correct 12 ms 23764 KB Output is correct
18 Correct 12 ms 23892 KB Output is correct
19 Correct 13 ms 23880 KB Output is correct
20 Correct 13 ms 23852 KB Output is correct
21 Correct 67 ms 25628 KB Output is correct
22 Correct 68 ms 25796 KB Output is correct
23 Correct 63 ms 25764 KB Output is correct
24 Correct 65 ms 25620 KB Output is correct
25 Correct 78 ms 25644 KB Output is correct
26 Correct 76 ms 25768 KB Output is correct
27 Correct 29 ms 24696 KB Output is correct
28 Correct 32 ms 24736 KB Output is correct
29 Correct 75 ms 25612 KB Output is correct
30 Correct 69 ms 25632 KB Output is correct
31 Correct 68 ms 25720 KB Output is correct
32 Correct 63 ms 25632 KB Output is correct
33 Correct 89 ms 25920 KB Output is correct
34 Correct 96 ms 25928 KB Output is correct
35 Correct 102 ms 26048 KB Output is correct
36 Correct 103 ms 26076 KB Output is correct
37 Correct 111 ms 25748 KB Output is correct
38 Correct 117 ms 25680 KB Output is correct
39 Correct 29 ms 24708 KB Output is correct
40 Correct 32 ms 24672 KB Output is correct
41 Correct 129 ms 25992 KB Output is correct
42 Correct 125 ms 25780 KB Output is correct
43 Correct 136 ms 25760 KB Output is correct
44 Correct 129 ms 25740 KB Output is correct
45 Correct 128 ms 25864 KB Output is correct
46 Correct 130 ms 25784 KB Output is correct
47 Correct 63 ms 25896 KB Output is correct
48 Correct 116 ms 25804 KB Output is correct
49 Correct 89 ms 25464 KB Output is correct
50 Correct 117 ms 25580 KB Output is correct
51 Correct 125 ms 25680 KB Output is correct
52 Correct 133 ms 25656 KB Output is correct
53 Correct 81 ms 25692 KB Output is correct
54 Correct 98 ms 26064 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 159 ms 26424 KB Output is correct
2 Correct 163 ms 26536 KB Output is correct
3 Correct 170 ms 26536 KB Output is correct
4 Correct 127 ms 26040 KB Output is correct
5 Correct 143 ms 26304 KB Output is correct
6 Correct 180 ms 26552 KB Output is correct
7 Correct 36 ms 25252 KB Output is correct
8 Correct 40 ms 25264 KB Output is correct
9 Correct 91 ms 26504 KB Output is correct
10 Correct 118 ms 25920 KB Output is correct
11 Correct 172 ms 26536 KB Output is correct
12 Correct 161 ms 26520 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 12 ms 23764 KB Output is correct
2 Correct 13 ms 23784 KB Output is correct
3 Correct 12 ms 23872 KB Output is correct
4 Correct 15 ms 23776 KB Output is correct
5 Correct 12 ms 23800 KB Output is correct
6 Correct 11 ms 23792 KB Output is correct
7 Correct 12 ms 23844 KB Output is correct
8 Correct 14 ms 23892 KB Output is correct
9 Correct 13 ms 23764 KB Output is correct
10 Correct 13 ms 23820 KB Output is correct
11 Correct 13 ms 23836 KB Output is correct
12 Correct 14 ms 23892 KB Output is correct
13 Correct 12 ms 23864 KB Output is correct
14 Correct 11 ms 23880 KB Output is correct
15 Correct 12 ms 23764 KB Output is correct
16 Correct 13 ms 23892 KB Output is correct
17 Correct 12 ms 23764 KB Output is correct
18 Correct 12 ms 23892 KB Output is correct
19 Correct 13 ms 23880 KB Output is correct
20 Correct 13 ms 23852 KB Output is correct
21 Correct 13 ms 23860 KB Output is correct
22 Correct 13 ms 23892 KB Output is correct
23 Correct 13 ms 23888 KB Output is correct
24 Correct 13 ms 23772 KB Output is correct
25 Correct 11 ms 23780 KB Output is correct
26 Correct 12 ms 23764 KB Output is correct
27 Correct 14 ms 23900 KB Output is correct
28 Correct 14 ms 23840 KB Output is correct
29 Correct 12 ms 23892 KB Output is correct
30 Correct 13 ms 23892 KB Output is correct
31 Correct 13 ms 23892 KB Output is correct
32 Correct 14 ms 23884 KB Output is correct
33 Correct 13 ms 23892 KB Output is correct
34 Correct 13 ms 23876 KB Output is correct
35 Correct 13 ms 23872 KB Output is correct
36 Correct 13 ms 23892 KB Output is correct
37 Correct 12 ms 23816 KB Output is correct
38 Correct 15 ms 23876 KB Output is correct
39 Correct 67 ms 25628 KB Output is correct
40 Correct 68 ms 25796 KB Output is correct
41 Correct 63 ms 25764 KB Output is correct
42 Correct 65 ms 25620 KB Output is correct
43 Correct 78 ms 25644 KB Output is correct
44 Correct 76 ms 25768 KB Output is correct
45 Correct 29 ms 24696 KB Output is correct
46 Correct 32 ms 24736 KB Output is correct
47 Correct 75 ms 25612 KB Output is correct
48 Correct 69 ms 25632 KB Output is correct
49 Correct 68 ms 25720 KB Output is correct
50 Correct 63 ms 25632 KB Output is correct
51 Correct 89 ms 25920 KB Output is correct
52 Correct 96 ms 25928 KB Output is correct
53 Correct 102 ms 26048 KB Output is correct
54 Correct 103 ms 26076 KB Output is correct
55 Correct 111 ms 25748 KB Output is correct
56 Correct 117 ms 25680 KB Output is correct
57 Correct 29 ms 24708 KB Output is correct
58 Correct 32 ms 24672 KB Output is correct
59 Correct 129 ms 25992 KB Output is correct
60 Correct 125 ms 25780 KB Output is correct
61 Correct 136 ms 25760 KB Output is correct
62 Correct 129 ms 25740 KB Output is correct
63 Correct 128 ms 25864 KB Output is correct
64 Correct 130 ms 25784 KB Output is correct
65 Correct 63 ms 25896 KB Output is correct
66 Correct 116 ms 25804 KB Output is correct
67 Correct 89 ms 25464 KB Output is correct
68 Correct 117 ms 25580 KB Output is correct
69 Correct 125 ms 25680 KB Output is correct
70 Correct 133 ms 25656 KB Output is correct
71 Correct 81 ms 25692 KB Output is correct
72 Correct 98 ms 26064 KB Output is correct
73 Correct 159 ms 26424 KB Output is correct
74 Correct 163 ms 26536 KB Output is correct
75 Correct 170 ms 26536 KB Output is correct
76 Correct 127 ms 26040 KB Output is correct
77 Correct 143 ms 26304 KB Output is correct
78 Correct 180 ms 26552 KB Output is correct
79 Correct 36 ms 25252 KB Output is correct
80 Correct 40 ms 25264 KB Output is correct
81 Correct 91 ms 26504 KB Output is correct
82 Correct 118 ms 25920 KB Output is correct
83 Correct 172 ms 26536 KB Output is correct
84 Correct 161 ms 26520 KB Output is correct
85 Correct 126 ms 25720 KB Output is correct
86 Correct 131 ms 25804 KB Output is correct
87 Correct 135 ms 25716 KB Output is correct
88 Correct 155 ms 25896 KB Output is correct
89 Correct 92 ms 25424 KB Output is correct
90 Correct 136 ms 25848 KB Output is correct
91 Correct 113 ms 25608 KB Output is correct
92 Correct 106 ms 25628 KB Output is correct
93 Correct 136 ms 25732 KB Output is correct
94 Correct 146 ms 25876 KB Output is correct
95 Correct 126 ms 25792 KB Output is correct
96 Correct 132 ms 25732 KB Output is correct
97 Correct 133 ms 25828 KB Output is correct
98 Correct 110 ms 25632 KB Output is correct
99 Correct 70 ms 25812 KB Output is correct
100 Correct 115 ms 25664 KB Output is correct
101 Correct 125 ms 25900 KB Output is correct
102 Correct 113 ms 25936 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 12 ms 23764 KB Output is correct
2 Correct 13 ms 23784 KB Output is correct
3 Correct 12 ms 23872 KB Output is correct
4 Correct 15 ms 23776 KB Output is correct
5 Correct 12 ms 23800 KB Output is correct
6 Correct 11 ms 23792 KB Output is correct
7 Correct 12 ms 23844 KB Output is correct
8 Correct 14 ms 23892 KB Output is correct
9 Correct 13 ms 23764 KB Output is correct
10 Correct 13 ms 23820 KB Output is correct
11 Correct 13 ms 23836 KB Output is correct
12 Correct 14 ms 23892 KB Output is correct
13 Correct 12 ms 23864 KB Output is correct
14 Correct 11 ms 23880 KB Output is correct
15 Correct 12 ms 23764 KB Output is correct
16 Correct 13 ms 23892 KB Output is correct
17 Correct 12 ms 23764 KB Output is correct
18 Correct 12 ms 23892 KB Output is correct
19 Correct 13 ms 23880 KB Output is correct
20 Correct 13 ms 23852 KB Output is correct
21 Correct 13 ms 23860 KB Output is correct
22 Correct 13 ms 23892 KB Output is correct
23 Correct 13 ms 23888 KB Output is correct
24 Correct 13 ms 23772 KB Output is correct
25 Correct 11 ms 23780 KB Output is correct
26 Correct 12 ms 23764 KB Output is correct
27 Correct 14 ms 23900 KB Output is correct
28 Correct 14 ms 23840 KB Output is correct
29 Correct 12 ms 23892 KB Output is correct
30 Correct 13 ms 23892 KB Output is correct
31 Correct 13 ms 23892 KB Output is correct
32 Correct 14 ms 23884 KB Output is correct
33 Correct 13 ms 23892 KB Output is correct
34 Correct 13 ms 23876 KB Output is correct
35 Correct 13 ms 23872 KB Output is correct
36 Correct 13 ms 23892 KB Output is correct
37 Correct 12 ms 23816 KB Output is correct
38 Correct 15 ms 23876 KB Output is correct
39 Correct 67 ms 25628 KB Output is correct
40 Correct 68 ms 25796 KB Output is correct
41 Correct 63 ms 25764 KB Output is correct
42 Correct 65 ms 25620 KB Output is correct
43 Correct 78 ms 25644 KB Output is correct
44 Correct 76 ms 25768 KB Output is correct
45 Correct 29 ms 24696 KB Output is correct
46 Correct 32 ms 24736 KB Output is correct
47 Correct 75 ms 25612 KB Output is correct
48 Correct 69 ms 25632 KB Output is correct
49 Correct 68 ms 25720 KB Output is correct
50 Correct 63 ms 25632 KB Output is correct
51 Correct 89 ms 25920 KB Output is correct
52 Correct 96 ms 25928 KB Output is correct
53 Correct 102 ms 26048 KB Output is correct
54 Correct 103 ms 26076 KB Output is correct
55 Correct 539 ms 31436 KB Output is correct
56 Correct 408 ms 30736 KB Output is correct
57 Correct 584 ms 31848 KB Output is correct
58 Correct 512 ms 31004 KB Output is correct
59 Correct 488 ms 31052 KB Output is correct
60 Correct 683 ms 31896 KB Output is correct
61 Correct 111 ms 27624 KB Output is correct
62 Correct 117 ms 27652 KB Output is correct
63 Correct 787 ms 33920 KB Output is correct
64 Correct 790 ms 39912 KB Output is correct
65 Correct 594 ms 37940 KB Output is correct
66 Correct 635 ms 37656 KB Output is correct
67 Correct 610 ms 37536 KB Output is correct
68 Correct 649 ms 37420 KB Output is correct
69 Correct 611 ms 37388 KB Output is correct
70 Correct 601 ms 37556 KB Output is correct
71 Correct 599 ms 37244 KB Output is correct
72 Correct 600 ms 37580 KB Output is correct
73 Correct 591 ms 37480 KB Output is correct
74 Correct 629 ms 37444 KB Output is correct
75 Correct 618 ms 37336 KB Output is correct
76 Correct 587 ms 37300 KB Output is correct
77 Correct 610 ms 37384 KB Output is correct
78 Correct 612 ms 37492 KB Output is correct
79 Correct 523 ms 37232 KB Output is correct
80 Correct 555 ms 37408 KB Output is correct
81 Correct 487 ms 38104 KB Output is correct
82 Correct 111 ms 25748 KB Output is correct
83 Correct 117 ms 25680 KB Output is correct
84 Correct 29 ms 24708 KB Output is correct
85 Correct 32 ms 24672 KB Output is correct
86 Correct 129 ms 25992 KB Output is correct
87 Correct 125 ms 25780 KB Output is correct
88 Correct 136 ms 25760 KB Output is correct
89 Correct 129 ms 25740 KB Output is correct
90 Correct 128 ms 25864 KB Output is correct
91 Correct 130 ms 25784 KB Output is correct
92 Correct 63 ms 25896 KB Output is correct
93 Correct 116 ms 25804 KB Output is correct
94 Correct 89 ms 25464 KB Output is correct
95 Correct 117 ms 25580 KB Output is correct
96 Correct 125 ms 25680 KB Output is correct
97 Correct 133 ms 25656 KB Output is correct
98 Correct 81 ms 25692 KB Output is correct
99 Correct 98 ms 26064 KB Output is correct
100 Correct 159 ms 26424 KB Output is correct
101 Correct 163 ms 26536 KB Output is correct
102 Correct 170 ms 26536 KB Output is correct
103 Correct 127 ms 26040 KB Output is correct
104 Correct 143 ms 26304 KB Output is correct
105 Correct 180 ms 26552 KB Output is correct
106 Correct 36 ms 25252 KB Output is correct
107 Correct 40 ms 25264 KB Output is correct
108 Correct 91 ms 26504 KB Output is correct
109 Correct 118 ms 25920 KB Output is correct
110 Correct 172 ms 26536 KB Output is correct
111 Correct 161 ms 26520 KB Output is correct
112 Correct 126 ms 25720 KB Output is correct
113 Correct 131 ms 25804 KB Output is correct
114 Correct 135 ms 25716 KB Output is correct
115 Correct 155 ms 25896 KB Output is correct
116 Correct 92 ms 25424 KB Output is correct
117 Correct 136 ms 25848 KB Output is correct
118 Correct 113 ms 25608 KB Output is correct
119 Correct 106 ms 25628 KB Output is correct
120 Correct 136 ms 25732 KB Output is correct
121 Correct 146 ms 25876 KB Output is correct
122 Correct 126 ms 25792 KB Output is correct
123 Correct 132 ms 25732 KB Output is correct
124 Correct 133 ms 25828 KB Output is correct
125 Correct 110 ms 25632 KB Output is correct
126 Correct 70 ms 25812 KB Output is correct
127 Correct 115 ms 25664 KB Output is correct
128 Correct 125 ms 25900 KB Output is correct
129 Correct 113 ms 25936 KB Output is correct
130 Correct 601 ms 38276 KB Output is correct
131 Correct 431 ms 35384 KB Output is correct
132 Correct 592 ms 38220 KB Output is correct
133 Correct 669 ms 38448 KB Output is correct
134 Correct 584 ms 37220 KB Output is correct
135 Correct 723 ms 38948 KB Output is correct
136 Correct 846 ms 40928 KB Output is correct
137 Correct 808 ms 40868 KB Output is correct
138 Correct 595 ms 38724 KB Output is correct
139 Correct 628 ms 38348 KB Output is correct
140 Correct 615 ms 37956 KB Output is correct
141 Correct 584 ms 38024 KB Output is correct
142 Correct 597 ms 38012 KB Output is correct
143 Correct 599 ms 37964 KB Output is correct
144 Correct 588 ms 38236 KB Output is correct
145 Correct 597 ms 38196 KB Output is correct
146 Correct 604 ms 37872 KB Output is correct
147 Correct 607 ms 38032 KB Output is correct
148 Correct 596 ms 38052 KB Output is correct
149 Correct 609 ms 38064 KB Output is correct
150 Correct 279 ms 37704 KB Output is correct
151 Correct 532 ms 38104 KB Output is correct
152 Correct 541 ms 38120 KB Output is correct
153 Correct 491 ms 38896 KB Output is correct