답안 #553874

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
553874 2022-04-27T08:28:31 Z amunduzbaev Fish 2 (JOI22_fish2) C++17
100 / 100
2938 ms 36996 KB
#include "bits/stdc++.h"
using namespace std;

#define int long long
#define ar array

const int N = 1e5 + 5;
const int inf = 1e9;

struct ST{
	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], p[x<<1] += p[x];
		tree[x<<1|1][0] += p[x], p[x<<1|1] += p[x];
		p[x] = 0;
	}
	
	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);
		if(tree[x<<1][0] == tree[x<<1|1][0]) tree[x] = {tree[x<<1][0], tree[x<<1][1] + tree[x<<1|1][1]};
		else 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 {N, N};
		if(lx >= l && rx <= r){
			return tree[x];
		}
		push(x, lx, rx);
		int m = (lx + rx) >> 1;
		auto L = get(l, r, lx, m, x<<1), R = get(l, r, m+1, rx, x<<1|1);
		if(L[0] == R[0]) return {L[0], L[1] + R[1]};
		else return min(L, R);
	}
	
	void build(int lx = 0, int rx = N, int x = 1){
		tree[x][1] = rx - lx + 1;
		if(lx == rx) return;
		int m = (lx + rx) >> 1;
		build(lx, m, x<<1);
		build(m+1, rx, x<<1|1);
	}
}tree;

struct ST2{
	int tree[N<<2];
	void sett(int i, int v, int lx = 0, int rx = N, int x = 1){
		if(lx == rx) {
			tree[x] = v; 
			return;
		} int m = (lx + rx) >> 1;
		if(i <= m) sett(i, v, lx, m, x<<1);
		else sett(i, v, m+1, rx, x<<1|1);
		tree[x] = max(tree[x<<1], tree[x<<1|1]);
	}
	
	int get_l(int l, int r, int v, int lx = 0, int rx = N, int x = 1){
		if(lx > r || rx < l) return -1;
		if(lx >= l && rx <= r){
			if(tree[x] >= v){
				if(lx == rx) return lx;
				int m = (lx + rx) >> 1;
				if(tree[x<<1] >= v) return get_l(l, r, v, lx, m, x<<1);
				else return get_l(l, r, v, m+1, rx, x<<1|1);
			} else return -1;
		} int m = (lx + rx) >> 1;
		int res = get_l(l, r, v, lx, m, x<<1);
		if(~res) return res;
		return get_l(l, r, v, m+1, rx, x<<1|1);
	}
	
	int get_r(int l, int r, int v, int lx = 0, int rx = N, int x = 1){
		if(lx > r || rx < l) return -1;
		if(lx >= l && rx <= r){
			if(tree[x] >= v){
				if(lx == rx) return lx;
				int m = (lx + rx) >> 1;
				if(tree[x<<1|1] >= v) return get_r(l, r, v, m+1, rx, x<<1|1);
				else return get_r(l, r, v, lx, m, x<<1);
			} else return -1;
		} int m = (lx + rx) >> 1;
		int res = get_r(l, r, v, m+1, rx, x<<1|1);
		if(~res) return res;
		return get_r(l, r, v, lx, m, x<<1);
	}
}tt;

struct BIT{
	int tree[N];
	void add(int i, int v){ i++;
		for(;i<N;i+=(i&-i)) tree[i] += v;
	}
	
	int f(int i){ i++;
		int r = 0;
		for(;i>0;i-=(i&-i)) r += tree[i];
		return r;
	}
}pre;

int a[N], pref[N];
set<int> R[N], L[N];

signed main(){
	ios::sync_with_stdio(0); cin.tie(0);
	
	tree.build();
	int n; cin>>n;
	for(int i=1;i<=n;i++){
		cin>>a[i];
		pre.add(i, a[i]);
	}
	a[0] = a[n+1] = inf * N;
	a[n+2] = a[n+1] + 1;
	for(int i=0;i<N;i++){
		tt.sett(i, a[i]);
	}
	set<ar<int, 2>> ss;
	
	auto del = [&](int l, int r){
		tree.add(l, r, -1);
		R[r].erase(l);
		L[l].erase(r);
		ss.erase({l, r});
	};
	
	auto add = [&](int l, int r){
		tree.add(l, r, 1);
		R[r].insert(l);
		L[l].insert(r);
		ss.insert({l, r});
	};
	
	auto check = [&](int l, int r){
		if(a[r+1] > pre.f(r) - pre.f(l-1) && a[l-1] > pre.f(r) - pre.f(l-1)){
			add(l, r);
			return true;
		} return false;
	};
	
	auto par = [&](int i, int d){
		if(d){
			return tt.get_l(i, N, a[i] + 1);
		} else {
			return tt.get_r(0, i, a[i] + 1);
		}
	};
	auto p2 = [&](int i, int d){
		if(d){
			return tt.get_l(i, N, a[i] * 2);
		} else {
			return tt.get_r(0, i, a[i] * 2);
		}
	};
	
	for(int i=1;i<=n;i++){
		int j = par(i, 1);
		int mx = i;
		while(j-1<=n-(i == 1)){
			// cout<<"here"<<endl;
			check(i, j-1);
			int P = p2(mx, 1);
			if(P == j){
				mx = j;
				j = par(j, 1);
			} else {
				mx = j, j = P;
			}
		}
	}
	
	// for(auto x : ss){
	// 	cout<<x[0]<<" "<<x[1]<<"\n";
	// }
	// cout<<"\n";
	
	int q; cin>>q;
	while(q--){
		//for(auto x : ss){
		//	cout<<x[0]<<" "<<x[1]<<"\n";
		//} cout<<"\n";
		
		int t; cin>>t;
		if(t == 1){
			int i, v; cin>>i>>v;
			vector<ar<int, 2>> er;
			{
				int j = par(i, 1);
				int mx = i;
				while(j-1<=n-(i == 1)){
					for(auto x : R[j-1]){
						if(i < x) break;
						er.push_back({x, j-1});
					}
					int P = p2(mx, 1);
					if(P == j){
						mx = j;
						j = par(j, 1);
					} else {
						mx = j, j = P;
					}
				}
			}
			
			for(auto x : R[i-1]){
				er.push_back({x, i-1});
			}
			
			for(auto x : L[i+1]){
				er.push_back({i+1, x});
			}
			
			for(auto x : er) del(x[0], x[1]);
			tt.sett(i, v);
			pre.add(i, -a[i] + v);
			a[i] = v;
			
			int l = par(i, 0), r = par(i, 1);
			int mx = i;
			while(1 <= l || r <= n){
				check(l+1, r-1);
				if(a[l] <= a[r]){
					int P = p2(mx, 0);
					if(P == l){
						mx = l;
						l = par(l, 0);
					} else {
						mx = l, l = P;
					}
				} else {
					int P = p2(mx, 1);
					if(P == r){
						mx = r;
						r = par(r, 1);
					} else {
						mx = r, r = P;
					}
				}
			}
			{
				int j = par(i + 1, 1);
				int mx = i + 1;
				while(j-1<=n){
					check(i+1, j-1);
					int P = p2(mx, 1);
					if(P == j){
						mx = j, j = par(j, 1);
					} else {
						mx = j, j = P;
					}
				}
			}
			
			{
				int j = par(i - 1, 0);
				int mx = i - 1;
				while(0 <= j){
					check(j+1, i-1);
					int P = p2(mx, 0);
					if(P == j){
						mx = j, j = par(j, 0);
					} else {
						mx = j, j = P;
					}
				}
			}
			
		} else {
			int l, r; cin>>l>>r;
			int L = l, R = r;
			{
				int j=par(l, 1), mx = l;
				while(j<=r){
					if(pre.f(j-1) - pre.f(l-1) < a[j]) L = j;
					int P = p2(mx, 1);
					if(P == j){
						mx = j;
						j = par(j, 1);
					} else {
						mx = j, j = P;
					}
				}
			}
			
			{
				int j=par(r, 0), mx = r;
				while(l <= j){
					if(pre.f(r)- pre.f(j) < a[j]) R = j;
					int P = p2(mx, 0);
					if(P == j){
						mx = j;
						j = par(j, 0);
					} else {
						mx = j, j = P;
					}
				}
			}
			// cout<<L<<" "<<R<<"\n";
			cout<<tree.get(L, R)[1]<<"\n";
		}
	}
}

/*

10
2 3 5 10 1 3 4 9 5 2
5
1 10 5
1 4 1000000000
1 8 20
1 4 8
2 1 10

5
6 4 2 2 6
2
2 1 5 
2 1 3

*/
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 15956 KB Output is correct
2 Correct 14 ms 15956 KB Output is correct
3 Correct 15 ms 16004 KB Output is correct
4 Correct 15 ms 15852 KB Output is correct
5 Correct 26 ms 16016 KB Output is correct
6 Correct 20 ms 16020 KB Output is correct
7 Correct 23 ms 16020 KB Output is correct
8 Correct 20 ms 16016 KB Output is correct
9 Correct 18 ms 16060 KB Output is correct
10 Correct 16 ms 15956 KB Output is correct
11 Correct 16 ms 15932 KB Output is correct
12 Correct 17 ms 16140 KB Output is correct
13 Correct 17 ms 16016 KB Output is correct
14 Correct 18 ms 15956 KB Output is correct
15 Correct 18 ms 15972 KB Output is correct
16 Correct 18 ms 16012 KB Output is correct
17 Correct 19 ms 16044 KB Output is correct
18 Correct 16 ms 16032 KB Output is correct
19 Correct 17 ms 16016 KB Output is correct
20 Correct 18 ms 16036 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 15 ms 15956 KB Output is correct
2 Correct 402 ms 33376 KB Output is correct
3 Correct 483 ms 31664 KB Output is correct
4 Correct 403 ms 33556 KB Output is correct
5 Correct 463 ms 31928 KB Output is correct
6 Correct 122 ms 27212 KB Output is correct
7 Correct 251 ms 23576 KB Output is correct
8 Correct 124 ms 27168 KB Output is correct
9 Correct 236 ms 23696 KB Output is correct
10 Correct 285 ms 26284 KB Output is correct
11 Correct 325 ms 25620 KB Output is correct
12 Correct 156 ms 25808 KB Output is correct
13 Correct 148 ms 25772 KB Output is correct
14 Correct 154 ms 30576 KB Output is correct
15 Correct 156 ms 30368 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 15956 KB Output is correct
2 Correct 14 ms 15956 KB Output is correct
3 Correct 15 ms 16004 KB Output is correct
4 Correct 15 ms 15852 KB Output is correct
5 Correct 26 ms 16016 KB Output is correct
6 Correct 20 ms 16020 KB Output is correct
7 Correct 23 ms 16020 KB Output is correct
8 Correct 20 ms 16016 KB Output is correct
9 Correct 18 ms 16060 KB Output is correct
10 Correct 16 ms 15956 KB Output is correct
11 Correct 16 ms 15932 KB Output is correct
12 Correct 17 ms 16140 KB Output is correct
13 Correct 17 ms 16016 KB Output is correct
14 Correct 18 ms 15956 KB Output is correct
15 Correct 18 ms 15972 KB Output is correct
16 Correct 18 ms 16012 KB Output is correct
17 Correct 19 ms 16044 KB Output is correct
18 Correct 16 ms 16032 KB Output is correct
19 Correct 17 ms 16016 KB Output is correct
20 Correct 18 ms 16036 KB Output is correct
21 Correct 15 ms 15956 KB Output is correct
22 Correct 402 ms 33376 KB Output is correct
23 Correct 483 ms 31664 KB Output is correct
24 Correct 403 ms 33556 KB Output is correct
25 Correct 463 ms 31928 KB Output is correct
26 Correct 122 ms 27212 KB Output is correct
27 Correct 251 ms 23576 KB Output is correct
28 Correct 124 ms 27168 KB Output is correct
29 Correct 236 ms 23696 KB Output is correct
30 Correct 285 ms 26284 KB Output is correct
31 Correct 325 ms 25620 KB Output is correct
32 Correct 156 ms 25808 KB Output is correct
33 Correct 148 ms 25772 KB Output is correct
34 Correct 154 ms 30576 KB Output is correct
35 Correct 156 ms 30368 KB Output is correct
36 Correct 424 ms 35288 KB Output is correct
37 Correct 484 ms 32140 KB Output is correct
38 Correct 475 ms 30504 KB Output is correct
39 Correct 436 ms 35108 KB Output is correct
40 Correct 474 ms 30412 KB Output is correct
41 Correct 125 ms 27256 KB Output is correct
42 Correct 128 ms 27196 KB Output is correct
43 Correct 246 ms 23820 KB Output is correct
44 Correct 266 ms 23656 KB Output is correct
45 Correct 317 ms 27528 KB Output is correct
46 Correct 285 ms 26268 KB Output is correct
47 Correct 333 ms 22780 KB Output is correct
48 Correct 145 ms 25848 KB Output is correct
49 Correct 150 ms 25824 KB Output is correct
50 Correct 165 ms 30432 KB Output is correct
51 Correct 162 ms 30436 KB Output is correct
52 Correct 159 ms 30636 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 15 ms 15956 KB Output is correct
2 Correct 402 ms 33376 KB Output is correct
3 Correct 483 ms 31664 KB Output is correct
4 Correct 403 ms 33556 KB Output is correct
5 Correct 463 ms 31928 KB Output is correct
6 Correct 122 ms 27212 KB Output is correct
7 Correct 251 ms 23576 KB Output is correct
8 Correct 124 ms 27168 KB Output is correct
9 Correct 236 ms 23696 KB Output is correct
10 Correct 285 ms 26284 KB Output is correct
11 Correct 325 ms 25620 KB Output is correct
12 Correct 156 ms 25808 KB Output is correct
13 Correct 148 ms 25772 KB Output is correct
14 Correct 154 ms 30576 KB Output is correct
15 Correct 156 ms 30368 KB Output is correct
16 Correct 17 ms 15876 KB Output is correct
17 Correct 1045 ms 32828 KB Output is correct
18 Correct 882 ms 36112 KB Output is correct
19 Correct 1022 ms 33616 KB Output is correct
20 Correct 1053 ms 33416 KB Output is correct
21 Correct 987 ms 33148 KB Output is correct
22 Correct 858 ms 36304 KB Output is correct
23 Correct 951 ms 32716 KB Output is correct
24 Correct 1096 ms 34132 KB Output is correct
25 Correct 1010 ms 33700 KB Output is correct
26 Correct 1121 ms 34136 KB Output is correct
27 Correct 325 ms 27956 KB Output is correct
28 Correct 335 ms 27980 KB Output is correct
29 Correct 329 ms 27952 KB Output is correct
30 Correct 859 ms 25000 KB Output is correct
31 Correct 857 ms 24908 KB Output is correct
32 Correct 1122 ms 27164 KB Output is correct
33 Correct 677 ms 27300 KB Output is correct
34 Correct 1110 ms 26112 KB Output is correct
35 Correct 804 ms 24524 KB Output is correct
36 Correct 910 ms 28152 KB Output is correct
37 Correct 356 ms 27040 KB Output is correct
38 Correct 336 ms 26920 KB Output is correct
39 Correct 435 ms 31752 KB Output is correct
40 Correct 390 ms 31552 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 15 ms 15956 KB Output is correct
2 Correct 402 ms 33376 KB Output is correct
3 Correct 483 ms 31664 KB Output is correct
4 Correct 403 ms 33556 KB Output is correct
5 Correct 463 ms 31928 KB Output is correct
6 Correct 122 ms 27212 KB Output is correct
7 Correct 251 ms 23576 KB Output is correct
8 Correct 124 ms 27168 KB Output is correct
9 Correct 236 ms 23696 KB Output is correct
10 Correct 285 ms 26284 KB Output is correct
11 Correct 325 ms 25620 KB Output is correct
12 Correct 156 ms 25808 KB Output is correct
13 Correct 148 ms 25772 KB Output is correct
14 Correct 154 ms 30576 KB Output is correct
15 Correct 156 ms 30368 KB Output is correct
16 Correct 14 ms 15956 KB Output is correct
17 Correct 2938 ms 34764 KB Output is correct
18 Correct 1781 ms 35084 KB Output is correct
19 Correct 2417 ms 33052 KB Output is correct
20 Correct 1530 ms 35364 KB Output is correct
21 Correct 2625 ms 34616 KB Output is correct
22 Correct 1793 ms 35028 KB Output is correct
23 Correct 2555 ms 33360 KB Output is correct
24 Correct 1744 ms 35288 KB Output is correct
25 Correct 2371 ms 32924 KB Output is correct
26 Correct 586 ms 28964 KB Output is correct
27 Correct 768 ms 29160 KB Output is correct
28 Correct 1099 ms 31208 KB Output is correct
29 Correct 642 ms 28944 KB Output is correct
30 Correct 752 ms 29008 KB Output is correct
31 Correct 1214 ms 31132 KB Output is correct
32 Correct 1553 ms 32376 KB Output is correct
33 Correct 900 ms 26896 KB Output is correct
34 Correct 1425 ms 34028 KB Output is correct
35 Correct 865 ms 27652 KB Output is correct
36 Correct 1326 ms 31940 KB Output is correct
37 Correct 1127 ms 30808 KB Output is correct
38 Correct 784 ms 30156 KB Output is correct
39 Correct 786 ms 32324 KB Output is correct
40 Correct 486 ms 32188 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 14 ms 15956 KB Output is correct
2 Correct 14 ms 15956 KB Output is correct
3 Correct 15 ms 16004 KB Output is correct
4 Correct 15 ms 15852 KB Output is correct
5 Correct 26 ms 16016 KB Output is correct
6 Correct 20 ms 16020 KB Output is correct
7 Correct 23 ms 16020 KB Output is correct
8 Correct 20 ms 16016 KB Output is correct
9 Correct 18 ms 16060 KB Output is correct
10 Correct 16 ms 15956 KB Output is correct
11 Correct 16 ms 15932 KB Output is correct
12 Correct 17 ms 16140 KB Output is correct
13 Correct 17 ms 16016 KB Output is correct
14 Correct 18 ms 15956 KB Output is correct
15 Correct 18 ms 15972 KB Output is correct
16 Correct 18 ms 16012 KB Output is correct
17 Correct 19 ms 16044 KB Output is correct
18 Correct 16 ms 16032 KB Output is correct
19 Correct 17 ms 16016 KB Output is correct
20 Correct 18 ms 16036 KB Output is correct
21 Correct 15 ms 15956 KB Output is correct
22 Correct 402 ms 33376 KB Output is correct
23 Correct 483 ms 31664 KB Output is correct
24 Correct 403 ms 33556 KB Output is correct
25 Correct 463 ms 31928 KB Output is correct
26 Correct 122 ms 27212 KB Output is correct
27 Correct 251 ms 23576 KB Output is correct
28 Correct 124 ms 27168 KB Output is correct
29 Correct 236 ms 23696 KB Output is correct
30 Correct 285 ms 26284 KB Output is correct
31 Correct 325 ms 25620 KB Output is correct
32 Correct 156 ms 25808 KB Output is correct
33 Correct 148 ms 25772 KB Output is correct
34 Correct 154 ms 30576 KB Output is correct
35 Correct 156 ms 30368 KB Output is correct
36 Correct 424 ms 35288 KB Output is correct
37 Correct 484 ms 32140 KB Output is correct
38 Correct 475 ms 30504 KB Output is correct
39 Correct 436 ms 35108 KB Output is correct
40 Correct 474 ms 30412 KB Output is correct
41 Correct 125 ms 27256 KB Output is correct
42 Correct 128 ms 27196 KB Output is correct
43 Correct 246 ms 23820 KB Output is correct
44 Correct 266 ms 23656 KB Output is correct
45 Correct 317 ms 27528 KB Output is correct
46 Correct 285 ms 26268 KB Output is correct
47 Correct 333 ms 22780 KB Output is correct
48 Correct 145 ms 25848 KB Output is correct
49 Correct 150 ms 25824 KB Output is correct
50 Correct 165 ms 30432 KB Output is correct
51 Correct 162 ms 30436 KB Output is correct
52 Correct 159 ms 30636 KB Output is correct
53 Correct 17 ms 15876 KB Output is correct
54 Correct 1045 ms 32828 KB Output is correct
55 Correct 882 ms 36112 KB Output is correct
56 Correct 1022 ms 33616 KB Output is correct
57 Correct 1053 ms 33416 KB Output is correct
58 Correct 987 ms 33148 KB Output is correct
59 Correct 858 ms 36304 KB Output is correct
60 Correct 951 ms 32716 KB Output is correct
61 Correct 1096 ms 34132 KB Output is correct
62 Correct 1010 ms 33700 KB Output is correct
63 Correct 1121 ms 34136 KB Output is correct
64 Correct 325 ms 27956 KB Output is correct
65 Correct 335 ms 27980 KB Output is correct
66 Correct 329 ms 27952 KB Output is correct
67 Correct 859 ms 25000 KB Output is correct
68 Correct 857 ms 24908 KB Output is correct
69 Correct 1122 ms 27164 KB Output is correct
70 Correct 677 ms 27300 KB Output is correct
71 Correct 1110 ms 26112 KB Output is correct
72 Correct 804 ms 24524 KB Output is correct
73 Correct 910 ms 28152 KB Output is correct
74 Correct 356 ms 27040 KB Output is correct
75 Correct 336 ms 26920 KB Output is correct
76 Correct 435 ms 31752 KB Output is correct
77 Correct 390 ms 31552 KB Output is correct
78 Correct 14 ms 15956 KB Output is correct
79 Correct 2938 ms 34764 KB Output is correct
80 Correct 1781 ms 35084 KB Output is correct
81 Correct 2417 ms 33052 KB Output is correct
82 Correct 1530 ms 35364 KB Output is correct
83 Correct 2625 ms 34616 KB Output is correct
84 Correct 1793 ms 35028 KB Output is correct
85 Correct 2555 ms 33360 KB Output is correct
86 Correct 1744 ms 35288 KB Output is correct
87 Correct 2371 ms 32924 KB Output is correct
88 Correct 586 ms 28964 KB Output is correct
89 Correct 768 ms 29160 KB Output is correct
90 Correct 1099 ms 31208 KB Output is correct
91 Correct 642 ms 28944 KB Output is correct
92 Correct 752 ms 29008 KB Output is correct
93 Correct 1214 ms 31132 KB Output is correct
94 Correct 1553 ms 32376 KB Output is correct
95 Correct 900 ms 26896 KB Output is correct
96 Correct 1425 ms 34028 KB Output is correct
97 Correct 865 ms 27652 KB Output is correct
98 Correct 1326 ms 31940 KB Output is correct
99 Correct 1127 ms 30808 KB Output is correct
100 Correct 784 ms 30156 KB Output is correct
101 Correct 786 ms 32324 KB Output is correct
102 Correct 486 ms 32188 KB Output is correct
103 Correct 2893 ms 32124 KB Output is correct
104 Correct 1660 ms 36996 KB Output is correct
105 Correct 1426 ms 32644 KB Output is correct
106 Correct 1151 ms 35324 KB Output is correct
107 Correct 2566 ms 33032 KB Output is correct
108 Correct 1690 ms 34600 KB Output is correct
109 Correct 1558 ms 33280 KB Output is correct
110 Correct 1359 ms 35400 KB Output is correct
111 Correct 1406 ms 34468 KB Output is correct
112 Correct 1155 ms 35036 KB Output is correct
113 Correct 677 ms 29060 KB Output is correct
114 Correct 390 ms 27352 KB Output is correct
115 Correct 1293 ms 31016 KB Output is correct
116 Correct 999 ms 29272 KB Output is correct
117 Correct 440 ms 29240 KB Output is correct
118 Correct 799 ms 26692 KB Output is correct
119 Correct 752 ms 27300 KB Output is correct
120 Correct 1231 ms 31156 KB Output is correct
121 Correct 923 ms 28808 KB Output is correct
122 Correct 1615 ms 32444 KB Output is correct
123 Correct 979 ms 24140 KB Output is correct
124 Correct 1036 ms 30132 KB Output is correct
125 Correct 845 ms 23336 KB Output is correct
126 Correct 990 ms 27556 KB Output is correct
127 Correct 1152 ms 29404 KB Output is correct
128 Correct 565 ms 28592 KB Output is correct
129 Correct 837 ms 32624 KB Output is correct
130 Correct 561 ms 32244 KB Output is correct