Submission #521521

# Submission time Handle Problem Language Result Execution time Memory
521521 2022-02-02T10:31:09 Z amunduzbaev Food Court (JOI21_foodcourt) C++14
100 / 100
933 ms 70268 KB
#include "bits/stdc++.h"
using namespace std;

#define ar array
#define int long long

const int N = 25e4 + 5;

struct node{
	int t, l, r, c, k, a, b;
};
struct ST{
	int tree[N * 4], ps[N * 4], pm[N * 4];
	
	void push(int x, int l, int r){
		if(l == r || (!ps[x] && !pm[x])) return;
		tree[x<<1] += ps[x], tree[x<<1|1] += ps[x];
		ps[x<<1] += ps[x], ps[x<<1|1] += ps[x];
		pm[x<<1] += ps[x], pm[x<<1|1] += ps[x];
		
		tree[x<<1] = max(tree[x<<1], pm[x]);
		tree[x<<1|1] = max(tree[x<<1|1], pm[x]);
		pm[x<<1] = max(pm[x<<1], pm[x]);
		pm[x<<1|1] = max(pm[x<<1|1], pm[x]);
		
		ps[x] = pm[x] = 0;
	}
	
	void add(int l, int r, int v, int lx = 0, int rx = N, int x = 1){
		push(x, lx, rx);
		if(lx > r || rx < l) return;
		if(lx >= l && rx <= r){
			tree[x] += v;
			ps[x] += v;
			return;
		} int m = (lx + rx) >> 1;
		add(l, r, v, lx, m, x<<1), add(l, r, v, m+1, rx, x<<1|1);
		tree[x] = max(tree[x<<1], tree[x<<1|1]);
	}
	
	void umax(int l, int r, int v, int lx = 0, int rx = N, int x = 1){
		push(x, lx, rx);
		if(lx > r || rx < l) return;
		if(lx >= l && rx <= r){
			tree[x] = max(tree[x], v);
			pm[x] = max(pm[x], v);
			return;
		} int m = (lx + rx) >> 1;
		umax(l, r, v, lx, m, x<<1), umax(l, r, v, m+1, rx, x<<1|1);
		tree[x] = max(tree[x<<1], tree[x<<1|1]);
	}
	
	int get(int i, int lx = 0, int rx = N, int x = 1){
		if(lx == rx) return tree[x];
		int m = (lx + rx) >> 1;
		push(x, lx, rx);
		if(i <= m) return get(i, lx, m, x<<1);
		else return get(i, m+1, rx, x<<1|1);
	}
}cur, tot;

struct ST2{
	ar<int, 2> tree[N<<2];
	int p[N<<2];
	void push(int x, int lx, int rx){
		if(lx == rx) return;
		tree[x<<1][0] += p[x], tree[x<<1|1][0] += p[x];
		p[x<<1] += p[x], p[x<<1|1] += p[x];
		p[x] = 0;
	}
	
	void sett(int i, int v, int lx = 0, int rx = N, int x = 1){
		if(lx == rx) { tree[x] = {v, i}; return; }
		int m = (lx + rx) >> 1;
		push(x, lx, rx);
		if(i <= m) sett(i, v, lx, m, x<<1);
		else sett(i, v, m+1, rx, x<<1|1);
		tree[x] = min(tree[x<<1], tree[x<<1|1]);
	}
	
	void add(int l, int r, int v, int lx = 0, int rx = N, int x = 1){
		if(lx > r || rx < l) return;
		if(lx >= l && rx <= r){
			tree[x][0] += v;
			p[x] += v; return;
		} int m = (lx + rx) >> 1;
		push(x, lx, rx);
		add(l, r, v, lx, m, x<<1), 
		add(l, r, v, m+1, rx, x<<1|1);
		tree[x] = min(tree[x<<1], tree[x<<1|1]);
	}
	
	ar<int, 2> get(int l, int r, int lx = 0, int rx = N, int x = 1){
		if(lx > r || rx < l) return {(int)1e18, (int)1e18};
		if(lx >= l && rx <= r) return tree[x];
		int m = (lx + rx) >> 1;
		push(x, lx, rx);
		return min(get(l, r, lx, m, x<<1), get(l, r, m+1, rx, x<<1|1));
	}
}tree;

int res[N], pos[N];
vector<int> qq[N];
node a[N];

signed main(){
	ios::sync_with_stdio(0); cin.tie(0);
	
	int n, m, q; cin>>n>>m>>q;
	for(int i=0;i<q;i++){
		cin>>a[i].t;
		if(a[i].t == 1){
			cin>>a[i].l>>a[i].r>>a[i].c>>a[i].k;
			cur.add(a[i].l, a[i].r, a[i].k);
			tot.add(a[i].l, a[i].r, a[i].k);
		} if(a[i].t == 2){
			cin>>a[i].l>>a[i].r>>a[i].k;
			cur.add(a[i].l, a[i].r, -a[i].k);
			cur.umax(a[i].l, a[i].r, 0);
		} if(a[i].t == 3){
			cin>>a[i].a>>a[i].b;
			int c = cur.get(a[i].a), t = tot.get(a[i].a) - c;
			if(a[i].b > c) res[i] = 0;
			else {
				qq[a[i].a].push_back(i);
				pos[i] = t + a[i].b;
			}
		}
	}
	
	for(int i=1;i<=n;i++){
		sort(qq[i].begin(), qq[i].end(), [&](int i, int j){
			return (pos[i] > pos[j]);
		});
		
		if(qq[i].empty()) tree.sett(i, 1e18);
		else tree.sett(i, pos[qq[i].back()]);
	}
	
	for(auto x : a){
		if(x.t != 1) continue;
		tree.add(x.l, x.r, -x.k);
		auto mn = tree.get(x.l, x.r);
		while(mn[0] <= 0){
			int i = mn[1], last = qq[i].back();
			qq[i].pop_back();
			res[last] = x.c;
			if(qq[i].empty()) tree.sett(i, 1e18);
			else tree.sett(i, pos[qq[i].back()] - pos[last] + mn[0]);
			mn = tree.get(x.l, x.r);
		}
	}
	
	for(int i=0;i<q;i++){
		if(a[i].t == 3) cout<<res[i]<<"\n";
	} cout<<"\n";
}
# Verdict Execution time Memory Grader output
1 Correct 7 ms 6860 KB Output is correct
2 Correct 9 ms 7096 KB Output is correct
3 Correct 9 ms 6976 KB Output is correct
4 Correct 9 ms 7104 KB Output is correct
5 Correct 7 ms 6596 KB Output is correct
6 Correct 7 ms 6604 KB Output is correct
7 Correct 9 ms 7116 KB Output is correct
8 Correct 9 ms 7116 KB Output is correct
9 Correct 9 ms 7104 KB Output is correct
10 Correct 9 ms 7116 KB Output is correct
11 Correct 9 ms 7116 KB Output is correct
12 Correct 9 ms 7108 KB Output is correct
13 Correct 7 ms 6980 KB Output is correct
14 Correct 9 ms 7116 KB Output is correct
15 Correct 8 ms 6988 KB Output is correct
16 Correct 9 ms 7100 KB Output is correct
17 Correct 8 ms 6980 KB Output is correct
18 Correct 9 ms 7116 KB Output is correct
19 Correct 9 ms 6844 KB Output is correct
20 Correct 12 ms 6988 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 7 ms 6860 KB Output is correct
2 Correct 9 ms 7096 KB Output is correct
3 Correct 9 ms 6976 KB Output is correct
4 Correct 9 ms 7104 KB Output is correct
5 Correct 7 ms 6596 KB Output is correct
6 Correct 7 ms 6604 KB Output is correct
7 Correct 9 ms 7116 KB Output is correct
8 Correct 9 ms 7116 KB Output is correct
9 Correct 9 ms 7104 KB Output is correct
10 Correct 9 ms 7116 KB Output is correct
11 Correct 9 ms 7116 KB Output is correct
12 Correct 9 ms 7108 KB Output is correct
13 Correct 7 ms 6980 KB Output is correct
14 Correct 9 ms 7116 KB Output is correct
15 Correct 8 ms 6988 KB Output is correct
16 Correct 9 ms 7100 KB Output is correct
17 Correct 8 ms 6980 KB Output is correct
18 Correct 9 ms 7116 KB Output is correct
19 Correct 9 ms 6844 KB Output is correct
20 Correct 12 ms 6988 KB Output is correct
21 Correct 9 ms 6980 KB Output is correct
22 Correct 10 ms 7124 KB Output is correct
23 Correct 8 ms 6980 KB Output is correct
24 Correct 13 ms 7028 KB Output is correct
25 Correct 7 ms 6600 KB Output is correct
26 Correct 8 ms 6604 KB Output is correct
27 Correct 9 ms 7020 KB Output is correct
28 Correct 10 ms 7116 KB Output is correct
29 Correct 9 ms 7104 KB Output is correct
30 Correct 10 ms 7108 KB Output is correct
31 Correct 9 ms 7112 KB Output is correct
32 Correct 14 ms 7116 KB Output is correct
33 Correct 9 ms 6988 KB Output is correct
34 Correct 10 ms 7116 KB Output is correct
35 Correct 9 ms 6988 KB Output is correct
36 Correct 10 ms 7120 KB Output is correct
37 Correct 8 ms 6860 KB Output is correct
38 Correct 8 ms 6980 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 110 ms 20132 KB Output is correct
2 Correct 118 ms 20108 KB Output is correct
3 Correct 116 ms 20136 KB Output is correct
4 Correct 122 ms 21316 KB Output is correct
5 Correct 122 ms 21468 KB Output is correct
6 Correct 123 ms 21316 KB Output is correct
7 Correct 50 ms 11588 KB Output is correct
8 Correct 53 ms 11604 KB Output is correct
9 Correct 114 ms 21564 KB Output is correct
10 Correct 116 ms 21312 KB Output is correct
11 Correct 120 ms 21444 KB Output is correct
12 Correct 124 ms 21316 KB Output is correct
13 Correct 107 ms 18144 KB Output is correct
14 Correct 113 ms 21820 KB Output is correct
15 Correct 122 ms 18672 KB Output is correct
16 Correct 128 ms 21808 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 712 ms 57356 KB Output is correct
2 Correct 578 ms 53676 KB Output is correct
3 Correct 790 ms 68424 KB Output is correct
4 Correct 655 ms 61068 KB Output is correct
5 Correct 664 ms 52712 KB Output is correct
6 Correct 933 ms 68268 KB Output is correct
7 Correct 210 ms 28804 KB Output is correct
8 Correct 210 ms 28996 KB Output is correct
9 Correct 851 ms 69348 KB Output is correct
10 Correct 878 ms 69228 KB Output is correct
11 Correct 808 ms 68216 KB Output is correct
12 Correct 796 ms 68128 KB Output is correct
13 Correct 783 ms 68204 KB Output is correct
14 Correct 813 ms 68164 KB Output is correct
15 Correct 815 ms 68220 KB Output is correct
16 Correct 815 ms 68160 KB Output is correct
17 Correct 815 ms 68164 KB Output is correct
18 Correct 797 ms 68096 KB Output is correct
19 Correct 795 ms 68228 KB Output is correct
20 Correct 818 ms 68204 KB Output is correct
21 Correct 827 ms 68252 KB Output is correct
22 Correct 808 ms 68036 KB Output is correct
23 Correct 819 ms 68148 KB Output is correct
24 Correct 807 ms 68148 KB Output is correct
25 Correct 565 ms 59560 KB Output is correct
26 Correct 605 ms 68156 KB Output is correct
27 Correct 655 ms 65552 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 7 ms 6860 KB Output is correct
2 Correct 9 ms 7096 KB Output is correct
3 Correct 9 ms 6976 KB Output is correct
4 Correct 9 ms 7104 KB Output is correct
5 Correct 7 ms 6596 KB Output is correct
6 Correct 7 ms 6604 KB Output is correct
7 Correct 9 ms 7116 KB Output is correct
8 Correct 9 ms 7116 KB Output is correct
9 Correct 9 ms 7104 KB Output is correct
10 Correct 9 ms 7116 KB Output is correct
11 Correct 9 ms 7116 KB Output is correct
12 Correct 9 ms 7108 KB Output is correct
13 Correct 7 ms 6980 KB Output is correct
14 Correct 9 ms 7116 KB Output is correct
15 Correct 8 ms 6988 KB Output is correct
16 Correct 9 ms 7100 KB Output is correct
17 Correct 8 ms 6980 KB Output is correct
18 Correct 9 ms 7116 KB Output is correct
19 Correct 9 ms 6844 KB Output is correct
20 Correct 12 ms 6988 KB Output is correct
21 Correct 110 ms 20132 KB Output is correct
22 Correct 118 ms 20108 KB Output is correct
23 Correct 116 ms 20136 KB Output is correct
24 Correct 122 ms 21316 KB Output is correct
25 Correct 122 ms 21468 KB Output is correct
26 Correct 123 ms 21316 KB Output is correct
27 Correct 50 ms 11588 KB Output is correct
28 Correct 53 ms 11604 KB Output is correct
29 Correct 114 ms 21564 KB Output is correct
30 Correct 116 ms 21312 KB Output is correct
31 Correct 120 ms 21444 KB Output is correct
32 Correct 124 ms 21316 KB Output is correct
33 Correct 107 ms 18144 KB Output is correct
34 Correct 113 ms 21820 KB Output is correct
35 Correct 122 ms 18672 KB Output is correct
36 Correct 128 ms 21808 KB Output is correct
37 Correct 138 ms 20776 KB Output is correct
38 Correct 135 ms 20020 KB Output is correct
39 Correct 47 ms 10944 KB Output is correct
40 Correct 54 ms 11532 KB Output is correct
41 Correct 172 ms 22360 KB Output is correct
42 Correct 179 ms 22252 KB Output is correct
43 Correct 164 ms 22216 KB Output is correct
44 Correct 163 ms 22212 KB Output is correct
45 Correct 161 ms 22256 KB Output is correct
46 Correct 164 ms 22208 KB Output is correct
47 Correct 123 ms 22056 KB Output is correct
48 Correct 142 ms 22204 KB Output is correct
49 Correct 116 ms 17556 KB Output is correct
50 Correct 143 ms 21052 KB Output is correct
51 Correct 166 ms 22180 KB Output is correct
52 Correct 168 ms 22240 KB Output is correct
53 Correct 104 ms 19316 KB Output is correct
54 Correct 126 ms 21728 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 158 ms 20616 KB Output is correct
2 Correct 162 ms 19784 KB Output is correct
3 Correct 171 ms 21432 KB Output is correct
4 Correct 122 ms 19360 KB Output is correct
5 Correct 148 ms 20412 KB Output is correct
6 Correct 171 ms 21488 KB Output is correct
7 Correct 61 ms 10952 KB Output is correct
8 Correct 57 ms 10656 KB Output is correct
9 Correct 139 ms 21464 KB Output is correct
10 Correct 109 ms 18744 KB Output is correct
11 Correct 157 ms 21544 KB Output is correct
12 Correct 154 ms 21456 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 7 ms 6860 KB Output is correct
2 Correct 9 ms 7096 KB Output is correct
3 Correct 9 ms 6976 KB Output is correct
4 Correct 9 ms 7104 KB Output is correct
5 Correct 7 ms 6596 KB Output is correct
6 Correct 7 ms 6604 KB Output is correct
7 Correct 9 ms 7116 KB Output is correct
8 Correct 9 ms 7116 KB Output is correct
9 Correct 9 ms 7104 KB Output is correct
10 Correct 9 ms 7116 KB Output is correct
11 Correct 9 ms 7116 KB Output is correct
12 Correct 9 ms 7108 KB Output is correct
13 Correct 7 ms 6980 KB Output is correct
14 Correct 9 ms 7116 KB Output is correct
15 Correct 8 ms 6988 KB Output is correct
16 Correct 9 ms 7100 KB Output is correct
17 Correct 8 ms 6980 KB Output is correct
18 Correct 9 ms 7116 KB Output is correct
19 Correct 9 ms 6844 KB Output is correct
20 Correct 12 ms 6988 KB Output is correct
21 Correct 9 ms 6980 KB Output is correct
22 Correct 10 ms 7124 KB Output is correct
23 Correct 8 ms 6980 KB Output is correct
24 Correct 13 ms 7028 KB Output is correct
25 Correct 7 ms 6600 KB Output is correct
26 Correct 8 ms 6604 KB Output is correct
27 Correct 9 ms 7020 KB Output is correct
28 Correct 10 ms 7116 KB Output is correct
29 Correct 9 ms 7104 KB Output is correct
30 Correct 10 ms 7108 KB Output is correct
31 Correct 9 ms 7112 KB Output is correct
32 Correct 14 ms 7116 KB Output is correct
33 Correct 9 ms 6988 KB Output is correct
34 Correct 10 ms 7116 KB Output is correct
35 Correct 9 ms 6988 KB Output is correct
36 Correct 10 ms 7120 KB Output is correct
37 Correct 8 ms 6860 KB Output is correct
38 Correct 8 ms 6980 KB Output is correct
39 Correct 110 ms 20132 KB Output is correct
40 Correct 118 ms 20108 KB Output is correct
41 Correct 116 ms 20136 KB Output is correct
42 Correct 122 ms 21316 KB Output is correct
43 Correct 122 ms 21468 KB Output is correct
44 Correct 123 ms 21316 KB Output is correct
45 Correct 50 ms 11588 KB Output is correct
46 Correct 53 ms 11604 KB Output is correct
47 Correct 114 ms 21564 KB Output is correct
48 Correct 116 ms 21312 KB Output is correct
49 Correct 120 ms 21444 KB Output is correct
50 Correct 124 ms 21316 KB Output is correct
51 Correct 107 ms 18144 KB Output is correct
52 Correct 113 ms 21820 KB Output is correct
53 Correct 122 ms 18672 KB Output is correct
54 Correct 128 ms 21808 KB Output is correct
55 Correct 138 ms 20776 KB Output is correct
56 Correct 135 ms 20020 KB Output is correct
57 Correct 47 ms 10944 KB Output is correct
58 Correct 54 ms 11532 KB Output is correct
59 Correct 172 ms 22360 KB Output is correct
60 Correct 179 ms 22252 KB Output is correct
61 Correct 164 ms 22216 KB Output is correct
62 Correct 163 ms 22212 KB Output is correct
63 Correct 161 ms 22256 KB Output is correct
64 Correct 164 ms 22208 KB Output is correct
65 Correct 123 ms 22056 KB Output is correct
66 Correct 142 ms 22204 KB Output is correct
67 Correct 116 ms 17556 KB Output is correct
68 Correct 143 ms 21052 KB Output is correct
69 Correct 166 ms 22180 KB Output is correct
70 Correct 168 ms 22240 KB Output is correct
71 Correct 104 ms 19316 KB Output is correct
72 Correct 126 ms 21728 KB Output is correct
73 Correct 158 ms 20616 KB Output is correct
74 Correct 162 ms 19784 KB Output is correct
75 Correct 171 ms 21432 KB Output is correct
76 Correct 122 ms 19360 KB Output is correct
77 Correct 148 ms 20412 KB Output is correct
78 Correct 171 ms 21488 KB Output is correct
79 Correct 61 ms 10952 KB Output is correct
80 Correct 57 ms 10656 KB Output is correct
81 Correct 139 ms 21464 KB Output is correct
82 Correct 109 ms 18744 KB Output is correct
83 Correct 157 ms 21544 KB Output is correct
84 Correct 154 ms 21456 KB Output is correct
85 Correct 138 ms 20088 KB Output is correct
86 Correct 166 ms 22864 KB Output is correct
87 Correct 178 ms 21316 KB Output is correct
88 Correct 189 ms 22852 KB Output is correct
89 Correct 110 ms 18540 KB Output is correct
90 Correct 168 ms 22748 KB Output is correct
91 Correct 127 ms 18372 KB Output is correct
92 Correct 126 ms 18344 KB Output is correct
93 Correct 166 ms 22852 KB Output is correct
94 Correct 167 ms 22724 KB Output is correct
95 Correct 188 ms 21696 KB Output is correct
96 Correct 172 ms 22728 KB Output is correct
97 Correct 165 ms 22760 KB Output is correct
98 Correct 133 ms 18936 KB Output is correct
99 Correct 133 ms 22624 KB Output is correct
100 Correct 118 ms 20340 KB Output is correct
101 Correct 155 ms 22868 KB Output is correct
102 Correct 137 ms 22212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 7 ms 6860 KB Output is correct
2 Correct 9 ms 7096 KB Output is correct
3 Correct 9 ms 6976 KB Output is correct
4 Correct 9 ms 7104 KB Output is correct
5 Correct 7 ms 6596 KB Output is correct
6 Correct 7 ms 6604 KB Output is correct
7 Correct 9 ms 7116 KB Output is correct
8 Correct 9 ms 7116 KB Output is correct
9 Correct 9 ms 7104 KB Output is correct
10 Correct 9 ms 7116 KB Output is correct
11 Correct 9 ms 7116 KB Output is correct
12 Correct 9 ms 7108 KB Output is correct
13 Correct 7 ms 6980 KB Output is correct
14 Correct 9 ms 7116 KB Output is correct
15 Correct 8 ms 6988 KB Output is correct
16 Correct 9 ms 7100 KB Output is correct
17 Correct 8 ms 6980 KB Output is correct
18 Correct 9 ms 7116 KB Output is correct
19 Correct 9 ms 6844 KB Output is correct
20 Correct 12 ms 6988 KB Output is correct
21 Correct 9 ms 6980 KB Output is correct
22 Correct 10 ms 7124 KB Output is correct
23 Correct 8 ms 6980 KB Output is correct
24 Correct 13 ms 7028 KB Output is correct
25 Correct 7 ms 6600 KB Output is correct
26 Correct 8 ms 6604 KB Output is correct
27 Correct 9 ms 7020 KB Output is correct
28 Correct 10 ms 7116 KB Output is correct
29 Correct 9 ms 7104 KB Output is correct
30 Correct 10 ms 7108 KB Output is correct
31 Correct 9 ms 7112 KB Output is correct
32 Correct 14 ms 7116 KB Output is correct
33 Correct 9 ms 6988 KB Output is correct
34 Correct 10 ms 7116 KB Output is correct
35 Correct 9 ms 6988 KB Output is correct
36 Correct 10 ms 7120 KB Output is correct
37 Correct 8 ms 6860 KB Output is correct
38 Correct 8 ms 6980 KB Output is correct
39 Correct 110 ms 20132 KB Output is correct
40 Correct 118 ms 20108 KB Output is correct
41 Correct 116 ms 20136 KB Output is correct
42 Correct 122 ms 21316 KB Output is correct
43 Correct 122 ms 21468 KB Output is correct
44 Correct 123 ms 21316 KB Output is correct
45 Correct 50 ms 11588 KB Output is correct
46 Correct 53 ms 11604 KB Output is correct
47 Correct 114 ms 21564 KB Output is correct
48 Correct 116 ms 21312 KB Output is correct
49 Correct 120 ms 21444 KB Output is correct
50 Correct 124 ms 21316 KB Output is correct
51 Correct 107 ms 18144 KB Output is correct
52 Correct 113 ms 21820 KB Output is correct
53 Correct 122 ms 18672 KB Output is correct
54 Correct 128 ms 21808 KB Output is correct
55 Correct 712 ms 57356 KB Output is correct
56 Correct 578 ms 53676 KB Output is correct
57 Correct 790 ms 68424 KB Output is correct
58 Correct 655 ms 61068 KB Output is correct
59 Correct 664 ms 52712 KB Output is correct
60 Correct 933 ms 68268 KB Output is correct
61 Correct 210 ms 28804 KB Output is correct
62 Correct 210 ms 28996 KB Output is correct
63 Correct 851 ms 69348 KB Output is correct
64 Correct 878 ms 69228 KB Output is correct
65 Correct 808 ms 68216 KB Output is correct
66 Correct 796 ms 68128 KB Output is correct
67 Correct 783 ms 68204 KB Output is correct
68 Correct 813 ms 68164 KB Output is correct
69 Correct 815 ms 68220 KB Output is correct
70 Correct 815 ms 68160 KB Output is correct
71 Correct 815 ms 68164 KB Output is correct
72 Correct 797 ms 68096 KB Output is correct
73 Correct 795 ms 68228 KB Output is correct
74 Correct 818 ms 68204 KB Output is correct
75 Correct 827 ms 68252 KB Output is correct
76 Correct 808 ms 68036 KB Output is correct
77 Correct 819 ms 68148 KB Output is correct
78 Correct 807 ms 68148 KB Output is correct
79 Correct 565 ms 59560 KB Output is correct
80 Correct 605 ms 68156 KB Output is correct
81 Correct 655 ms 65552 KB Output is correct
82 Correct 138 ms 20776 KB Output is correct
83 Correct 135 ms 20020 KB Output is correct
84 Correct 47 ms 10944 KB Output is correct
85 Correct 54 ms 11532 KB Output is correct
86 Correct 172 ms 22360 KB Output is correct
87 Correct 179 ms 22252 KB Output is correct
88 Correct 164 ms 22216 KB Output is correct
89 Correct 163 ms 22212 KB Output is correct
90 Correct 161 ms 22256 KB Output is correct
91 Correct 164 ms 22208 KB Output is correct
92 Correct 123 ms 22056 KB Output is correct
93 Correct 142 ms 22204 KB Output is correct
94 Correct 116 ms 17556 KB Output is correct
95 Correct 143 ms 21052 KB Output is correct
96 Correct 166 ms 22180 KB Output is correct
97 Correct 168 ms 22240 KB Output is correct
98 Correct 104 ms 19316 KB Output is correct
99 Correct 126 ms 21728 KB Output is correct
100 Correct 158 ms 20616 KB Output is correct
101 Correct 162 ms 19784 KB Output is correct
102 Correct 171 ms 21432 KB Output is correct
103 Correct 122 ms 19360 KB Output is correct
104 Correct 148 ms 20412 KB Output is correct
105 Correct 171 ms 21488 KB Output is correct
106 Correct 61 ms 10952 KB Output is correct
107 Correct 57 ms 10656 KB Output is correct
108 Correct 139 ms 21464 KB Output is correct
109 Correct 109 ms 18744 KB Output is correct
110 Correct 157 ms 21544 KB Output is correct
111 Correct 154 ms 21456 KB Output is correct
112 Correct 138 ms 20088 KB Output is correct
113 Correct 166 ms 22864 KB Output is correct
114 Correct 178 ms 21316 KB Output is correct
115 Correct 189 ms 22852 KB Output is correct
116 Correct 110 ms 18540 KB Output is correct
117 Correct 168 ms 22748 KB Output is correct
118 Correct 127 ms 18372 KB Output is correct
119 Correct 126 ms 18344 KB Output is correct
120 Correct 166 ms 22852 KB Output is correct
121 Correct 167 ms 22724 KB Output is correct
122 Correct 188 ms 21696 KB Output is correct
123 Correct 172 ms 22728 KB Output is correct
124 Correct 165 ms 22760 KB Output is correct
125 Correct 133 ms 18936 KB Output is correct
126 Correct 133 ms 22624 KB Output is correct
127 Correct 118 ms 20340 KB Output is correct
128 Correct 155 ms 22868 KB Output is correct
129 Correct 137 ms 22212 KB Output is correct
130 Correct 784 ms 68284 KB Output is correct
131 Correct 553 ms 52776 KB Output is correct
132 Correct 794 ms 68932 KB Output is correct
133 Correct 839 ms 66640 KB Output is correct
134 Correct 753 ms 63956 KB Output is correct
135 Correct 886 ms 69112 KB Output is correct
136 Correct 866 ms 70224 KB Output is correct
137 Correct 864 ms 70268 KB Output is correct
138 Correct 806 ms 68808 KB Output is correct
139 Correct 810 ms 68788 KB Output is correct
140 Correct 805 ms 68808 KB Output is correct
141 Correct 799 ms 68776 KB Output is correct
142 Correct 821 ms 68756 KB Output is correct
143 Correct 818 ms 68680 KB Output is correct
144 Correct 820 ms 68868 KB Output is correct
145 Correct 838 ms 68828 KB Output is correct
146 Correct 812 ms 68848 KB Output is correct
147 Correct 826 ms 68764 KB Output is correct
148 Correct 824 ms 68620 KB Output is correct
149 Correct 842 ms 68728 KB Output is correct
150 Correct 553 ms 68420 KB Output is correct
151 Correct 601 ms 68804 KB Output is correct
152 Correct 598 ms 68788 KB Output is correct
153 Correct 577 ms 66372 KB Output is correct