답안 #426041

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
426041 2021-06-13T13:11:57 Z Kevin_Zhang_TW 푸드 코트 (JOI21_foodcourt) C++17
100 / 100
773 ms 44560 KB
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define pb emplace_back
#define AI(i) begin(i), end(i)
template<class T> bool chmin(T &a, T b) { return b < a && (a = b, true); }
template<class T> bool chmax(T &a, T b) { return a < b && (a = b, true); }
#ifdef KEV
#define DE(args...) kout("[ " + string(#args) + " ] = ", args)
void kout() { cerr << endl; }
template<class T, class ...U> void kout(T a, U ...b) { cerr << a << ' ', kout(b...); }
template<class T> void debug(T l, T r) { while (l != r) cerr << *l << " \n"[next(l)==r], ++l; }
#else
#define DE(...) 0
#define debug(...) 0
#endif
 
const int MAX_N = 300010;
const ll inf = 1ll << 60;
 
int n, m, q;
int res[MAX_N], cid[MAX_N];
 
bool is_leave[MAX_N];
 
//          position, delta
vector<pair<int,ll>> rec[MAX_N];
//         time, k
vector<pair<int,ll>> allq[MAX_N];
 
struct sgt {
	struct node {
		ll mn, pos, tg;
		void operator += (ll v) {
			mn += v, tg += v;
		}
		node (node a, node b) {
			tg = 0;
			mn = min(a.mn, b.mn);
			pos = a.mn == mn ? a.pos : b.pos;
		}
		node () : mn(0), pos(0), tg(0) {}
		pair<ll,ll> get() { return make_pair(mn, pos); }
	};
	int n;
	vector<node> val;
	sgt(int _n) {
		n = _n;
		val.resize(n<<1);
		for (int i = 0;i < n+n;++i) {
			assert(val[i].mn == 0 && val[i].pos == 0 && val[i].tg == 0);
		}
		for (int i = 0;i < n;++i)
			val[i+n].pos = i;
		for (int i = n-1;i > 0;--i)
			upd(i);
	}
	void pa(int j) { for (int i = 20;i >= 0;--i) push(j>>i); }
	void add(int l, int r, ll v) {
		assert(r == q);
		int sl = l+=n, sr = r+=n;
		pa(l), pa(r-1);
		for (;l < r;l>>=1, r>>=1) {
			if (l&1) val[l++] += v;
			if (r&1) val[--r] += v;
		}
		for (--sr;sl>>=1, sr>>=1;) 
			upd(sl), upd(sr);
	}
	void push(int i) {
		if (i >= n) return;
		ll &t = val[i].tg;
		val[i<<1] += t, val[i<<1|1] += t;
		t = 0;
	}
	void upd(int i) {
		if (i >= n) return;
		push(i);
		val[i] = node(val[i<<1], val[i<<1|1]);
	}
	pair<ll,ll> qmn(int l, int r) {
		l += n, r += n;
		pa(l), pa(r-1);
		pair<ll,ll> res {inf, n};
		for (;l < r;l>>=1, r>>=1) {
			if (l&1) chmin(res, val[l++].get());
			if (r&1) chmin(res, val[--r].get());
		}
		assert(res.first < inf);
		return res;
	} 
};
 
// t1 for +
// t2 for -
struct bit { 
	int n;
	vector<ll> val;
	bit (int n) : n(n) {
		val.resize(n);
	}
	void add(int i, ll v) {
		for (;i < n;i += i&-i)
			val[i] += v;
	}
	ll qry(int i) {
		ll res = 0;
		for (;i;i^=i&-i) res += val[i];
		return res;
	}
	ll qry(int l, int r) { return qry(r) - qry(l-1); }
	int kth(ll k) {
		int res = 0;
		for (int i = 1<<19;i > 0;i>>=1) {
			if ((i|res) >= n || k <= val[res|i]) continue;
			assert(k > val[res|i]);
			k -= val[res|=i];
		}
		assert(k > 0);
		return res + 1; 
	} 
};
 
struct sss {
	vector<ll> val;
	int n;
	sss (int n) : n(n) {
		val.resize(n);
	}
	void add(int l, int r, ll v) {
		for (;l < r;++l)
			val[l] += v;
	}
	pair<ll,ll> qmn(int l, int r) {
		pair<ll,ll> res {inf, n};
		for (;l < r;++l)
			chmin(res, make_pair(val[l], (ll)l));
		return res;
	}
};
void solve() {
 
	//sss tree(q);
	sgt tree(q);
	bit t1(q + 10), t2(q + 10);
 
	for (int i = 1;i <= n;++i) {
		for (auto [j, d] : rec[i]) {
			tree.add(j, q, d);
			if (is_leave[j]) 
				t2.add(j, -d);
			else {
				assert(cid[j]);
				t1.add(j, d);
			} 
		}
 
		for (auto [t, k] : allq[i]) {
			auto [v, p] = tree.qmn(0, t); 
 
			assert(p == 0 || is_leave[p]);
 
			assert(p < t);
 
			ll rk = t1.qry(p) + k + t2.qry(p+1, t);
 
			//assert(p == 0 || t1.qry(p) == t1.qry(p-1));
 
			assert(t1.qry(p) - t2.qry(p) == v);
 
			if (t1.qry(t) < rk) {
				res[t] = 0;
				continue;
			}
			
			int ind = t1.kth(rk);
			
			assert(ind < t);
			res[t] = cid[ind]; 
 
			assert(cid[ind] >= 1 && cid[ind] <= m);
		}
	} 
}
int32_t main() {
	ios_base::sync_with_stdio(0), cin.tie(0);
	cin >> n >> m >> q; ++q;
 
	fill(res, res + q, -1);
 
	for (ll t, l, r, k, i = 1;i < q;++i) {
		cin >> t;
		if (t == 1) {
			cin >> l >> r >> cid[i] >> k;
			rec[l].pb(i, k);
			rec[r+1].pb(i,-k);
		}
		if (t == 2) {
			cin >> l >> r >> k;
			is_leave[i] = true;
			rec[l].pb(i, -k);
			rec[r+1].pb(i, k);
		}
		if (t == 3) {
			cin >> l >> k;
			allq[l].pb(i, k);
		}
	}
 
	solve();
 
	for (int i = 0;i < q;++i) {
		if (res[i] == -1) continue;
		cout << res[i] << '\n';
	}
} 
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 14540 KB Output is correct
2 Correct 13 ms 14540 KB Output is correct
3 Correct 13 ms 14540 KB Output is correct
4 Correct 15 ms 14540 KB Output is correct
5 Correct 12 ms 14604 KB Output is correct
6 Correct 13 ms 14620 KB Output is correct
7 Correct 12 ms 14540 KB Output is correct
8 Correct 12 ms 14540 KB Output is correct
9 Correct 12 ms 14540 KB Output is correct
10 Correct 13 ms 14540 KB Output is correct
11 Correct 13 ms 14596 KB Output is correct
12 Correct 14 ms 14612 KB Output is correct
13 Correct 13 ms 14612 KB Output is correct
14 Correct 12 ms 14628 KB Output is correct
15 Correct 12 ms 14540 KB Output is correct
16 Correct 13 ms 14668 KB Output is correct
17 Correct 13 ms 14540 KB Output is correct
18 Correct 14 ms 14668 KB Output is correct
19 Correct 14 ms 14612 KB Output is correct
20 Correct 14 ms 14664 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 14540 KB Output is correct
2 Correct 13 ms 14540 KB Output is correct
3 Correct 13 ms 14540 KB Output is correct
4 Correct 15 ms 14540 KB Output is correct
5 Correct 12 ms 14604 KB Output is correct
6 Correct 13 ms 14620 KB Output is correct
7 Correct 12 ms 14540 KB Output is correct
8 Correct 12 ms 14540 KB Output is correct
9 Correct 12 ms 14540 KB Output is correct
10 Correct 13 ms 14540 KB Output is correct
11 Correct 13 ms 14596 KB Output is correct
12 Correct 14 ms 14612 KB Output is correct
13 Correct 13 ms 14612 KB Output is correct
14 Correct 12 ms 14628 KB Output is correct
15 Correct 12 ms 14540 KB Output is correct
16 Correct 13 ms 14668 KB Output is correct
17 Correct 13 ms 14540 KB Output is correct
18 Correct 14 ms 14668 KB Output is correct
19 Correct 14 ms 14612 KB Output is correct
20 Correct 14 ms 14664 KB Output is correct
21 Correct 13 ms 14640 KB Output is correct
22 Correct 13 ms 14540 KB Output is correct
23 Correct 12 ms 14584 KB Output is correct
24 Correct 13 ms 14540 KB Output is correct
25 Correct 14 ms 14540 KB Output is correct
26 Correct 13 ms 14640 KB Output is correct
27 Correct 13 ms 14656 KB Output is correct
28 Correct 13 ms 14532 KB Output is correct
29 Correct 14 ms 14540 KB Output is correct
30 Correct 15 ms 14536 KB Output is correct
31 Correct 13 ms 14596 KB Output is correct
32 Correct 13 ms 14660 KB Output is correct
33 Correct 12 ms 14540 KB Output is correct
34 Correct 13 ms 14540 KB Output is correct
35 Correct 14 ms 14540 KB Output is correct
36 Correct 14 ms 14804 KB Output is correct
37 Correct 13 ms 14540 KB Output is correct
38 Correct 14 ms 14540 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 152 ms 21824 KB Output is correct
2 Correct 122 ms 22068 KB Output is correct
3 Correct 121 ms 22056 KB Output is correct
4 Correct 138 ms 22052 KB Output is correct
5 Correct 141 ms 22164 KB Output is correct
6 Correct 130 ms 22120 KB Output is correct
7 Correct 60 ms 20364 KB Output is correct
8 Correct 74 ms 21028 KB Output is correct
9 Correct 128 ms 21996 KB Output is correct
10 Correct 139 ms 22084 KB Output is correct
11 Correct 124 ms 22128 KB Output is correct
12 Correct 138 ms 22132 KB Output is correct
13 Correct 103 ms 21184 KB Output is correct
14 Correct 116 ms 21996 KB Output is correct
15 Correct 125 ms 22172 KB Output is correct
16 Correct 131 ms 22216 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 636 ms 41056 KB Output is correct
2 Correct 491 ms 35832 KB Output is correct
3 Correct 734 ms 43468 KB Output is correct
4 Correct 482 ms 35884 KB Output is correct
5 Correct 456 ms 36200 KB Output is correct
6 Correct 698 ms 43940 KB Output is correct
7 Correct 232 ms 38988 KB Output is correct
8 Correct 256 ms 40040 KB Output is correct
9 Correct 641 ms 42564 KB Output is correct
10 Correct 634 ms 42748 KB Output is correct
11 Correct 707 ms 43212 KB Output is correct
12 Correct 730 ms 43824 KB Output is correct
13 Correct 703 ms 43272 KB Output is correct
14 Correct 675 ms 43832 KB Output is correct
15 Correct 690 ms 43852 KB Output is correct
16 Correct 762 ms 43844 KB Output is correct
17 Correct 762 ms 43820 KB Output is correct
18 Correct 708 ms 43556 KB Output is correct
19 Correct 758 ms 43820 KB Output is correct
20 Correct 720 ms 43708 KB Output is correct
21 Correct 690 ms 43816 KB Output is correct
22 Correct 706 ms 43848 KB Output is correct
23 Correct 704 ms 43748 KB Output is correct
24 Correct 684 ms 43824 KB Output is correct
25 Correct 566 ms 43464 KB Output is correct
26 Correct 582 ms 44012 KB Output is correct
27 Correct 547 ms 44488 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 14540 KB Output is correct
2 Correct 13 ms 14540 KB Output is correct
3 Correct 13 ms 14540 KB Output is correct
4 Correct 15 ms 14540 KB Output is correct
5 Correct 12 ms 14604 KB Output is correct
6 Correct 13 ms 14620 KB Output is correct
7 Correct 12 ms 14540 KB Output is correct
8 Correct 12 ms 14540 KB Output is correct
9 Correct 12 ms 14540 KB Output is correct
10 Correct 13 ms 14540 KB Output is correct
11 Correct 13 ms 14596 KB Output is correct
12 Correct 14 ms 14612 KB Output is correct
13 Correct 13 ms 14612 KB Output is correct
14 Correct 12 ms 14628 KB Output is correct
15 Correct 12 ms 14540 KB Output is correct
16 Correct 13 ms 14668 KB Output is correct
17 Correct 13 ms 14540 KB Output is correct
18 Correct 14 ms 14668 KB Output is correct
19 Correct 14 ms 14612 KB Output is correct
20 Correct 14 ms 14664 KB Output is correct
21 Correct 152 ms 21824 KB Output is correct
22 Correct 122 ms 22068 KB Output is correct
23 Correct 121 ms 22056 KB Output is correct
24 Correct 138 ms 22052 KB Output is correct
25 Correct 141 ms 22164 KB Output is correct
26 Correct 130 ms 22120 KB Output is correct
27 Correct 60 ms 20364 KB Output is correct
28 Correct 74 ms 21028 KB Output is correct
29 Correct 128 ms 21996 KB Output is correct
30 Correct 139 ms 22084 KB Output is correct
31 Correct 124 ms 22128 KB Output is correct
32 Correct 138 ms 22132 KB Output is correct
33 Correct 103 ms 21184 KB Output is correct
34 Correct 116 ms 21996 KB Output is correct
35 Correct 125 ms 22172 KB Output is correct
36 Correct 131 ms 22216 KB Output is correct
37 Correct 114 ms 21276 KB Output is correct
38 Correct 104 ms 20600 KB Output is correct
39 Correct 59 ms 19952 KB Output is correct
40 Correct 69 ms 20516 KB Output is correct
41 Correct 127 ms 21960 KB Output is correct
42 Correct 127 ms 22084 KB Output is correct
43 Correct 144 ms 22100 KB Output is correct
44 Correct 130 ms 22072 KB Output is correct
45 Correct 132 ms 22144 KB Output is correct
46 Correct 130 ms 22080 KB Output is correct
47 Correct 77 ms 21112 KB Output is correct
48 Correct 109 ms 22172 KB Output is correct
49 Correct 113 ms 19968 KB Output is correct
50 Correct 106 ms 21060 KB Output is correct
51 Correct 133 ms 22188 KB Output is correct
52 Correct 135 ms 22128 KB Output is correct
53 Correct 99 ms 20548 KB Output is correct
54 Correct 120 ms 22220 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 103 ms 20804 KB Output is correct
2 Correct 122 ms 21532 KB Output is correct
3 Correct 115 ms 21612 KB Output is correct
4 Correct 86 ms 19560 KB Output is correct
5 Correct 130 ms 20676 KB Output is correct
6 Correct 117 ms 21572 KB Output is correct
7 Correct 61 ms 19892 KB Output is correct
8 Correct 60 ms 19596 KB Output is correct
9 Correct 83 ms 20932 KB Output is correct
10 Correct 76 ms 19396 KB Output is correct
11 Correct 110 ms 21356 KB Output is correct
12 Correct 113 ms 21316 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 14540 KB Output is correct
2 Correct 13 ms 14540 KB Output is correct
3 Correct 13 ms 14540 KB Output is correct
4 Correct 15 ms 14540 KB Output is correct
5 Correct 12 ms 14604 KB Output is correct
6 Correct 13 ms 14620 KB Output is correct
7 Correct 12 ms 14540 KB Output is correct
8 Correct 12 ms 14540 KB Output is correct
9 Correct 12 ms 14540 KB Output is correct
10 Correct 13 ms 14540 KB Output is correct
11 Correct 13 ms 14596 KB Output is correct
12 Correct 14 ms 14612 KB Output is correct
13 Correct 13 ms 14612 KB Output is correct
14 Correct 12 ms 14628 KB Output is correct
15 Correct 12 ms 14540 KB Output is correct
16 Correct 13 ms 14668 KB Output is correct
17 Correct 13 ms 14540 KB Output is correct
18 Correct 14 ms 14668 KB Output is correct
19 Correct 14 ms 14612 KB Output is correct
20 Correct 14 ms 14664 KB Output is correct
21 Correct 13 ms 14640 KB Output is correct
22 Correct 13 ms 14540 KB Output is correct
23 Correct 12 ms 14584 KB Output is correct
24 Correct 13 ms 14540 KB Output is correct
25 Correct 14 ms 14540 KB Output is correct
26 Correct 13 ms 14640 KB Output is correct
27 Correct 13 ms 14656 KB Output is correct
28 Correct 13 ms 14532 KB Output is correct
29 Correct 14 ms 14540 KB Output is correct
30 Correct 15 ms 14536 KB Output is correct
31 Correct 13 ms 14596 KB Output is correct
32 Correct 13 ms 14660 KB Output is correct
33 Correct 12 ms 14540 KB Output is correct
34 Correct 13 ms 14540 KB Output is correct
35 Correct 14 ms 14540 KB Output is correct
36 Correct 14 ms 14804 KB Output is correct
37 Correct 13 ms 14540 KB Output is correct
38 Correct 14 ms 14540 KB Output is correct
39 Correct 152 ms 21824 KB Output is correct
40 Correct 122 ms 22068 KB Output is correct
41 Correct 121 ms 22056 KB Output is correct
42 Correct 138 ms 22052 KB Output is correct
43 Correct 141 ms 22164 KB Output is correct
44 Correct 130 ms 22120 KB Output is correct
45 Correct 60 ms 20364 KB Output is correct
46 Correct 74 ms 21028 KB Output is correct
47 Correct 128 ms 21996 KB Output is correct
48 Correct 139 ms 22084 KB Output is correct
49 Correct 124 ms 22128 KB Output is correct
50 Correct 138 ms 22132 KB Output is correct
51 Correct 103 ms 21184 KB Output is correct
52 Correct 116 ms 21996 KB Output is correct
53 Correct 125 ms 22172 KB Output is correct
54 Correct 131 ms 22216 KB Output is correct
55 Correct 114 ms 21276 KB Output is correct
56 Correct 104 ms 20600 KB Output is correct
57 Correct 59 ms 19952 KB Output is correct
58 Correct 69 ms 20516 KB Output is correct
59 Correct 127 ms 21960 KB Output is correct
60 Correct 127 ms 22084 KB Output is correct
61 Correct 144 ms 22100 KB Output is correct
62 Correct 130 ms 22072 KB Output is correct
63 Correct 132 ms 22144 KB Output is correct
64 Correct 130 ms 22080 KB Output is correct
65 Correct 77 ms 21112 KB Output is correct
66 Correct 109 ms 22172 KB Output is correct
67 Correct 113 ms 19968 KB Output is correct
68 Correct 106 ms 21060 KB Output is correct
69 Correct 133 ms 22188 KB Output is correct
70 Correct 135 ms 22128 KB Output is correct
71 Correct 99 ms 20548 KB Output is correct
72 Correct 120 ms 22220 KB Output is correct
73 Correct 103 ms 20804 KB Output is correct
74 Correct 122 ms 21532 KB Output is correct
75 Correct 115 ms 21612 KB Output is correct
76 Correct 86 ms 19560 KB Output is correct
77 Correct 130 ms 20676 KB Output is correct
78 Correct 117 ms 21572 KB Output is correct
79 Correct 61 ms 19892 KB Output is correct
80 Correct 60 ms 19596 KB Output is correct
81 Correct 83 ms 20932 KB Output is correct
82 Correct 76 ms 19396 KB Output is correct
83 Correct 110 ms 21356 KB Output is correct
84 Correct 113 ms 21316 KB Output is correct
85 Correct 125 ms 21316 KB Output is correct
86 Correct 128 ms 22056 KB Output is correct
87 Correct 112 ms 21212 KB Output is correct
88 Correct 130 ms 22052 KB Output is correct
89 Correct 99 ms 19548 KB Output is correct
90 Correct 138 ms 22212 KB Output is correct
91 Correct 103 ms 20796 KB Output is correct
92 Correct 104 ms 20412 KB Output is correct
93 Correct 144 ms 22248 KB Output is correct
94 Correct 169 ms 22068 KB Output is correct
95 Correct 140 ms 21956 KB Output is correct
96 Correct 136 ms 22216 KB Output is correct
97 Correct 141 ms 22120 KB Output is correct
98 Correct 121 ms 21036 KB Output is correct
99 Correct 79 ms 21176 KB Output is correct
100 Correct 115 ms 20676 KB Output is correct
101 Correct 122 ms 22216 KB Output is correct
102 Correct 118 ms 22244 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 14540 KB Output is correct
2 Correct 13 ms 14540 KB Output is correct
3 Correct 13 ms 14540 KB Output is correct
4 Correct 15 ms 14540 KB Output is correct
5 Correct 12 ms 14604 KB Output is correct
6 Correct 13 ms 14620 KB Output is correct
7 Correct 12 ms 14540 KB Output is correct
8 Correct 12 ms 14540 KB Output is correct
9 Correct 12 ms 14540 KB Output is correct
10 Correct 13 ms 14540 KB Output is correct
11 Correct 13 ms 14596 KB Output is correct
12 Correct 14 ms 14612 KB Output is correct
13 Correct 13 ms 14612 KB Output is correct
14 Correct 12 ms 14628 KB Output is correct
15 Correct 12 ms 14540 KB Output is correct
16 Correct 13 ms 14668 KB Output is correct
17 Correct 13 ms 14540 KB Output is correct
18 Correct 14 ms 14668 KB Output is correct
19 Correct 14 ms 14612 KB Output is correct
20 Correct 14 ms 14664 KB Output is correct
21 Correct 13 ms 14640 KB Output is correct
22 Correct 13 ms 14540 KB Output is correct
23 Correct 12 ms 14584 KB Output is correct
24 Correct 13 ms 14540 KB Output is correct
25 Correct 14 ms 14540 KB Output is correct
26 Correct 13 ms 14640 KB Output is correct
27 Correct 13 ms 14656 KB Output is correct
28 Correct 13 ms 14532 KB Output is correct
29 Correct 14 ms 14540 KB Output is correct
30 Correct 15 ms 14536 KB Output is correct
31 Correct 13 ms 14596 KB Output is correct
32 Correct 13 ms 14660 KB Output is correct
33 Correct 12 ms 14540 KB Output is correct
34 Correct 13 ms 14540 KB Output is correct
35 Correct 14 ms 14540 KB Output is correct
36 Correct 14 ms 14804 KB Output is correct
37 Correct 13 ms 14540 KB Output is correct
38 Correct 14 ms 14540 KB Output is correct
39 Correct 152 ms 21824 KB Output is correct
40 Correct 122 ms 22068 KB Output is correct
41 Correct 121 ms 22056 KB Output is correct
42 Correct 138 ms 22052 KB Output is correct
43 Correct 141 ms 22164 KB Output is correct
44 Correct 130 ms 22120 KB Output is correct
45 Correct 60 ms 20364 KB Output is correct
46 Correct 74 ms 21028 KB Output is correct
47 Correct 128 ms 21996 KB Output is correct
48 Correct 139 ms 22084 KB Output is correct
49 Correct 124 ms 22128 KB Output is correct
50 Correct 138 ms 22132 KB Output is correct
51 Correct 103 ms 21184 KB Output is correct
52 Correct 116 ms 21996 KB Output is correct
53 Correct 125 ms 22172 KB Output is correct
54 Correct 131 ms 22216 KB Output is correct
55 Correct 636 ms 41056 KB Output is correct
56 Correct 491 ms 35832 KB Output is correct
57 Correct 734 ms 43468 KB Output is correct
58 Correct 482 ms 35884 KB Output is correct
59 Correct 456 ms 36200 KB Output is correct
60 Correct 698 ms 43940 KB Output is correct
61 Correct 232 ms 38988 KB Output is correct
62 Correct 256 ms 40040 KB Output is correct
63 Correct 641 ms 42564 KB Output is correct
64 Correct 634 ms 42748 KB Output is correct
65 Correct 707 ms 43212 KB Output is correct
66 Correct 730 ms 43824 KB Output is correct
67 Correct 703 ms 43272 KB Output is correct
68 Correct 675 ms 43832 KB Output is correct
69 Correct 690 ms 43852 KB Output is correct
70 Correct 762 ms 43844 KB Output is correct
71 Correct 762 ms 43820 KB Output is correct
72 Correct 708 ms 43556 KB Output is correct
73 Correct 758 ms 43820 KB Output is correct
74 Correct 720 ms 43708 KB Output is correct
75 Correct 690 ms 43816 KB Output is correct
76 Correct 706 ms 43848 KB Output is correct
77 Correct 704 ms 43748 KB Output is correct
78 Correct 684 ms 43824 KB Output is correct
79 Correct 566 ms 43464 KB Output is correct
80 Correct 582 ms 44012 KB Output is correct
81 Correct 547 ms 44488 KB Output is correct
82 Correct 114 ms 21276 KB Output is correct
83 Correct 104 ms 20600 KB Output is correct
84 Correct 59 ms 19952 KB Output is correct
85 Correct 69 ms 20516 KB Output is correct
86 Correct 127 ms 21960 KB Output is correct
87 Correct 127 ms 22084 KB Output is correct
88 Correct 144 ms 22100 KB Output is correct
89 Correct 130 ms 22072 KB Output is correct
90 Correct 132 ms 22144 KB Output is correct
91 Correct 130 ms 22080 KB Output is correct
92 Correct 77 ms 21112 KB Output is correct
93 Correct 109 ms 22172 KB Output is correct
94 Correct 113 ms 19968 KB Output is correct
95 Correct 106 ms 21060 KB Output is correct
96 Correct 133 ms 22188 KB Output is correct
97 Correct 135 ms 22128 KB Output is correct
98 Correct 99 ms 20548 KB Output is correct
99 Correct 120 ms 22220 KB Output is correct
100 Correct 103 ms 20804 KB Output is correct
101 Correct 122 ms 21532 KB Output is correct
102 Correct 115 ms 21612 KB Output is correct
103 Correct 86 ms 19560 KB Output is correct
104 Correct 130 ms 20676 KB Output is correct
105 Correct 117 ms 21572 KB Output is correct
106 Correct 61 ms 19892 KB Output is correct
107 Correct 60 ms 19596 KB Output is correct
108 Correct 83 ms 20932 KB Output is correct
109 Correct 76 ms 19396 KB Output is correct
110 Correct 110 ms 21356 KB Output is correct
111 Correct 113 ms 21316 KB Output is correct
112 Correct 125 ms 21316 KB Output is correct
113 Correct 128 ms 22056 KB Output is correct
114 Correct 112 ms 21212 KB Output is correct
115 Correct 130 ms 22052 KB Output is correct
116 Correct 99 ms 19548 KB Output is correct
117 Correct 138 ms 22212 KB Output is correct
118 Correct 103 ms 20796 KB Output is correct
119 Correct 104 ms 20412 KB Output is correct
120 Correct 144 ms 22248 KB Output is correct
121 Correct 169 ms 22068 KB Output is correct
122 Correct 140 ms 21956 KB Output is correct
123 Correct 136 ms 22216 KB Output is correct
124 Correct 141 ms 22120 KB Output is correct
125 Correct 121 ms 21036 KB Output is correct
126 Correct 79 ms 21176 KB Output is correct
127 Correct 115 ms 20676 KB Output is correct
128 Correct 122 ms 22216 KB Output is correct
129 Correct 118 ms 22244 KB Output is correct
130 Correct 729 ms 43440 KB Output is correct
131 Correct 488 ms 35624 KB Output is correct
132 Correct 725 ms 43564 KB Output is correct
133 Correct 689 ms 42512 KB Output is correct
134 Correct 639 ms 39512 KB Output is correct
135 Correct 654 ms 43836 KB Output is correct
136 Correct 606 ms 42652 KB Output is correct
137 Correct 584 ms 42636 KB Output is correct
138 Correct 630 ms 43232 KB Output is correct
139 Correct 688 ms 43820 KB Output is correct
140 Correct 708 ms 43448 KB Output is correct
141 Correct 730 ms 43716 KB Output is correct
142 Correct 716 ms 43876 KB Output is correct
143 Correct 768 ms 43864 KB Output is correct
144 Correct 714 ms 43508 KB Output is correct
145 Correct 703 ms 43848 KB Output is correct
146 Correct 739 ms 43708 KB Output is correct
147 Correct 773 ms 43816 KB Output is correct
148 Correct 681 ms 43824 KB Output is correct
149 Correct 770 ms 43764 KB Output is correct
150 Correct 324 ms 40072 KB Output is correct
151 Correct 633 ms 44008 KB Output is correct
152 Correct 584 ms 44044 KB Output is correct
153 Correct 532 ms 44560 KB Output is correct