답안 #1067131

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1067131 2024-08-20T11:48:28 Z AdamGS 송신탑 (IOI22_towers) C++17
100 / 100
1420 ms 33256 KB
#include "towers.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
const ll INF=1e18+7;
const int LIM=1e5+7;
ll T[LIM], jaki[LIM], n;
vector<int>trma[4*LIM];
ll trmi[4*LIM], N=1;
set<pair<ll,ll>>S, P;
vector<pair<ll,ll>>V;
void dodaj(int x) {
	auto it=S.lower_bound({x, -1}); ++it;
	auto a=*it;
	P.insert({abs(T[x]-T[a.st]), x});
}
void usun(int x) {
	auto it=S.lower_bound({x, -1}); ++it;
	auto a=*it;
	P.erase({abs(T[x]-T[a.st]), x});
}
int ile(int v, int x) {
	if(trma[v].size()==0) return 0;
	if(trma[v].back()<=x) return 0;
	int po=0, ko=trma[v].size()-1;
	while(po<ko) {
		int sr=(po+ko)/2;
		if(trma[v][sr]<=x) po=sr+1; else ko=sr;
	}
	return trma[v].size()-po;
}
int licz(int l, int r, int x) {
	l+=N; r+=N;
	int ans=ile(l, x);
	if(l!=r) ans+=ile(r, x);
	while(l/2!=r/2) {
		if(l%2==0) ans+=ile(l+1, x);
		if(r%2==1) ans+=ile(r-1, x);
		l/=2; r/=2;
	}
	return ans;
}
int cntma(int l, int r) {
	l+=N; r+=N;
	int ans=max(trma[l].back(), trma[r].back());
	while(l/2!=r/2) {
		if(l%2==0) ans=max(ans, trma[l+1].back());
		if(r%2==1) ans=max(ans, trma[r-1].back());
		l/=2; r/=2;
	}
	return ans;
}
int cntmi(int l, int r) {
	l+=N; r+=N;
	ll ans=min(trmi[l], trmi[r]);
	while(l/2!=r/2) {
		if(l%2==0) ans=min(ans, trmi[l+1]);
		if(r%2==1) ans=min(ans, trmi[r-1]);
		l/=2; r/=2;
	}
	return ans;
}
int znajdzp(int l, int r, int x) {
	int po=l, ko=r;
	while(po<ko) {
		int sr=(po+ko)/2;
		if(cntma(l, sr)<=x) po=sr+1; else ko=sr;
	}
	return po;
}
int znajdzs(int l, int r, int x) {
	int po=l, ko=r;
	while(po<ko) {
		int sr=(po+ko+1)/2;
		if(cntma(sr, r)<=x) ko=sr-1; else po=sr;
	}
	return po;
}
void init(int _n, vector<int>_H) {
	n=_n;
	while(N<n+2) N*=2;
	rep(i, 2*N) trmi[i]=-INF;
	rep(i, n) T[i+1]=_H[i];
	T[0]=T[n+1]=INF;
	int akt=2;
	jaki[0]=jaki[n+1]=1;
	rep(i, n) if((T[i]<T[i+1] && T[i+1]>T[i+2]) || (T[i]>T[i+1] && T[i+1]<T[i+2])) {
		jaki[i+1]=akt;
		akt^=3;
	}
	rep(i, n+2) if(jaki[i]) S.insert({i, jaki[i]});
	rep(i, n+2) if(!jaki[i]) trma[N+i].pb(0);
	auto it=S.begin();
	while(true) {
		auto it2=it; ++it2;
		if(it2==S.end()) break;
		auto a=*it;
		dodaj(a.st);
		++it;
	}
	V.pb({0, S.size()/2});
	while(P.size()>2) {
		auto a=*P.begin();
		usun(a.nd);
		trma[N+a.nd].pb(V.size());
		auto it=S.lower_bound({a.nd, -1});
		++it;
		auto b=*it;
		trma[N+b.st].pb(V.size());
		usun(b.st);
		--it; --it;
		b=*it;
		usun(b.st);
		++it;
		S.erase(it);
		it=S.lower_bound({a.nd, -1});
		S.erase(it);
		it=S.lower_bound({a.nd, -1});
		--it;
		b=*it;
		dodaj(b.st);
		V.pb({a.st, S.size()/2});
	}
	rep(i, n+2) if(trma[N+i].size()==0) trma[N+i].pb(V.size()+10);
	rep(i, n+2) trmi[N+i]=T[i];
	for(int i=N-1; i; --i) {
		trmi[i]=min(trmi[2*i], trmi[2*i+1]);
		for(auto j : trma[2*i]) trma[i].pb(j);
		for(auto j : trma[2*i+1]) trma[i].pb(j);
		sort(all(trma[i]));
	}
}
int max_towers(int l, int r, int d) {
	++l; ++r;
	int po=0, ko=V.size()-1;
	while(po<ko) {
		int sr=(po+ko+1)/2;
		if(V[sr].st<d) po=sr; else ko=sr-1;
	}
	int x=licz(l, r, po);
	if(x==0) return 1;
	int a=znajdzp(l, r, po), b=znajdzs(l, r, po);
	if(jaki[a]==2) ++x;
	x/=2;
	if(jaki[a]==1 && l<a) {
		if(cntmi(l, a-1)<=T[a]-d) ++x;
	}
	if(jaki[b]==1 && b<r) {
		if(cntmi(b+1, r)<=T[b]-d) ++x;
	}
	return max(x, 1);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 410 ms 19532 KB Output is correct
2 Correct 789 ms 26320 KB Output is correct
3 Correct 724 ms 26368 KB Output is correct
4 Correct 741 ms 25556 KB Output is correct
5 Correct 596 ms 26508 KB Output is correct
6 Correct 660 ms 26620 KB Output is correct
7 Correct 731 ms 26572 KB Output is correct
8 Correct 2 ms 10584 KB Output is correct
9 Correct 2 ms 10840 KB Output is correct
10 Correct 3 ms 10840 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 10580 KB Output is correct
2 Correct 4 ms 10840 KB Output is correct
3 Correct 3 ms 10840 KB Output is correct
4 Correct 5 ms 11096 KB Output is correct
5 Correct 4 ms 11096 KB Output is correct
6 Correct 4 ms 11096 KB Output is correct
7 Correct 4 ms 11096 KB Output is correct
8 Correct 2 ms 10840 KB Output is correct
9 Correct 2 ms 10840 KB Output is correct
10 Correct 2 ms 10840 KB Output is correct
11 Correct 2 ms 10848 KB Output is correct
12 Correct 2 ms 10584 KB Output is correct
13 Correct 2 ms 10840 KB Output is correct
14 Correct 2 ms 10932 KB Output is correct
15 Correct 4 ms 10840 KB Output is correct
16 Correct 5 ms 11096 KB Output is correct
17 Correct 5 ms 11096 KB Output is correct
18 Correct 2 ms 10840 KB Output is correct
19 Correct 2 ms 11004 KB Output is correct
20 Correct 4 ms 10840 KB Output is correct
21 Correct 4 ms 11096 KB Output is correct
22 Correct 4 ms 11096 KB Output is correct
23 Correct 3 ms 10840 KB Output is correct
24 Correct 2 ms 11000 KB Output is correct
25 Correct 2 ms 10840 KB Output is correct
26 Correct 3 ms 10840 KB Output is correct
27 Correct 3 ms 10928 KB Output is correct
28 Correct 4 ms 11092 KB Output is correct
29 Correct 5 ms 11096 KB Output is correct
30 Correct 4 ms 11096 KB Output is correct
31 Correct 4 ms 11096 KB Output is correct
32 Correct 2 ms 10840 KB Output is correct
33 Correct 2 ms 10840 KB Output is correct
34 Correct 3 ms 10840 KB Output is correct
35 Correct 2 ms 10840 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 10580 KB Output is correct
2 Correct 4 ms 10840 KB Output is correct
3 Correct 3 ms 10840 KB Output is correct
4 Correct 5 ms 11096 KB Output is correct
5 Correct 4 ms 11096 KB Output is correct
6 Correct 4 ms 11096 KB Output is correct
7 Correct 4 ms 11096 KB Output is correct
8 Correct 2 ms 10840 KB Output is correct
9 Correct 2 ms 10840 KB Output is correct
10 Correct 2 ms 10840 KB Output is correct
11 Correct 2 ms 10848 KB Output is correct
12 Correct 2 ms 10584 KB Output is correct
13 Correct 2 ms 10840 KB Output is correct
14 Correct 2 ms 10932 KB Output is correct
15 Correct 4 ms 10840 KB Output is correct
16 Correct 5 ms 11096 KB Output is correct
17 Correct 5 ms 11096 KB Output is correct
18 Correct 2 ms 10840 KB Output is correct
19 Correct 2 ms 11004 KB Output is correct
20 Correct 4 ms 10840 KB Output is correct
21 Correct 4 ms 11096 KB Output is correct
22 Correct 4 ms 11096 KB Output is correct
23 Correct 3 ms 10840 KB Output is correct
24 Correct 2 ms 11000 KB Output is correct
25 Correct 2 ms 10840 KB Output is correct
26 Correct 3 ms 10840 KB Output is correct
27 Correct 3 ms 10928 KB Output is correct
28 Correct 4 ms 11092 KB Output is correct
29 Correct 5 ms 11096 KB Output is correct
30 Correct 4 ms 11096 KB Output is correct
31 Correct 4 ms 11096 KB Output is correct
32 Correct 2 ms 10840 KB Output is correct
33 Correct 2 ms 10840 KB Output is correct
34 Correct 3 ms 10840 KB Output is correct
35 Correct 2 ms 10840 KB Output is correct
36 Correct 97 ms 23752 KB Output is correct
37 Correct 158 ms 28612 KB Output is correct
38 Correct 152 ms 28592 KB Output is correct
39 Correct 238 ms 32968 KB Output is correct
40 Correct 223 ms 32968 KB Output is correct
41 Correct 242 ms 33108 KB Output is correct
42 Correct 231 ms 33224 KB Output is correct
43 Correct 44 ms 26572 KB Output is correct
44 Correct 36 ms 26580 KB Output is correct
45 Correct 36 ms 26568 KB Output is correct
46 Correct 36 ms 26508 KB Output is correct
47 Correct 156 ms 28612 KB Output is correct
48 Correct 239 ms 33012 KB Output is correct
49 Correct 229 ms 33200 KB Output is correct
50 Correct 34 ms 26572 KB Output is correct
51 Correct 34 ms 26580 KB Output is correct
52 Correct 153 ms 28592 KB Output is correct
53 Correct 241 ms 33012 KB Output is correct
54 Correct 245 ms 33196 KB Output is correct
55 Correct 35 ms 26568 KB Output is correct
56 Correct 35 ms 26568 KB Output is correct
57 Correct 148 ms 29236 KB Output is correct
58 Correct 155 ms 28580 KB Output is correct
59 Correct 192 ms 28612 KB Output is correct
60 Correct 244 ms 33224 KB Output is correct
61 Correct 284 ms 33156 KB Output is correct
62 Correct 262 ms 32968 KB Output is correct
63 Correct 258 ms 33224 KB Output is correct
64 Correct 35 ms 26624 KB Output is correct
65 Correct 46 ms 26568 KB Output is correct
66 Correct 44 ms 26680 KB Output is correct
67 Correct 38 ms 26580 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1032 ms 28356 KB Output is correct
2 Correct 1232 ms 28612 KB Output is correct
3 Correct 1219 ms 28612 KB Output is correct
4 Correct 1316 ms 33208 KB Output is correct
5 Correct 1310 ms 33224 KB Output is correct
6 Correct 1236 ms 33220 KB Output is correct
7 Correct 1293 ms 33076 KB Output is correct
8 Correct 690 ms 26596 KB Output is correct
9 Correct 745 ms 26640 KB Output is correct
10 Correct 962 ms 26572 KB Output is correct
11 Correct 1002 ms 26588 KB Output is correct
12 Correct 747 ms 26572 KB Output is correct
13 Correct 667 ms 26496 KB Output is correct
14 Correct 2 ms 10584 KB Output is correct
15 Correct 3 ms 10880 KB Output is correct
16 Correct 2 ms 10840 KB Output is correct
17 Correct 179 ms 28596 KB Output is correct
18 Correct 234 ms 33032 KB Output is correct
19 Correct 232 ms 32972 KB Output is correct
20 Correct 35 ms 26580 KB Output is correct
21 Correct 37 ms 26572 KB Output is correct
22 Correct 156 ms 28660 KB Output is correct
23 Correct 267 ms 33148 KB Output is correct
24 Correct 245 ms 32968 KB Output is correct
25 Correct 35 ms 26528 KB Output is correct
26 Correct 37 ms 26580 KB Output is correct
27 Correct 4 ms 10836 KB Output is correct
28 Correct 5 ms 11096 KB Output is correct
29 Correct 4 ms 10980 KB Output is correct
30 Correct 3 ms 10840 KB Output is correct
31 Correct 2 ms 10840 KB Output is correct
32 Correct 3 ms 10840 KB Output is correct
33 Correct 4 ms 11096 KB Output is correct
34 Correct 4 ms 10944 KB Output is correct
35 Correct 2 ms 10840 KB Output is correct
36 Correct 3 ms 10840 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 279 ms 16984 KB Output is correct
2 Correct 1051 ms 28612 KB Output is correct
3 Correct 1022 ms 28388 KB Output is correct
4 Correct 1154 ms 33088 KB Output is correct
5 Correct 1164 ms 33220 KB Output is correct
6 Correct 1183 ms 33180 KB Output is correct
7 Correct 1122 ms 33224 KB Output is correct
8 Correct 763 ms 26580 KB Output is correct
9 Correct 760 ms 26580 KB Output is correct
10 Correct 806 ms 26828 KB Output is correct
11 Correct 777 ms 26572 KB Output is correct
12 Correct 153 ms 28524 KB Output is correct
13 Correct 242 ms 32984 KB Output is correct
14 Correct 230 ms 33216 KB Output is correct
15 Correct 35 ms 26572 KB Output is correct
16 Correct 34 ms 26556 KB Output is correct
17 Correct 145 ms 29408 KB Output is correct
18 Correct 168 ms 28656 KB Output is correct
19 Correct 151 ms 28612 KB Output is correct
20 Correct 228 ms 33180 KB Output is correct
21 Correct 235 ms 33224 KB Output is correct
22 Correct 223 ms 33224 KB Output is correct
23 Correct 241 ms 33068 KB Output is correct
24 Correct 45 ms 26572 KB Output is correct
25 Correct 34 ms 26572 KB Output is correct
26 Correct 35 ms 26648 KB Output is correct
27 Correct 43 ms 26580 KB Output is correct
28 Correct 3 ms 10840 KB Output is correct
29 Correct 5 ms 11096 KB Output is correct
30 Correct 4 ms 11148 KB Output is correct
31 Correct 2 ms 10840 KB Output is correct
32 Correct 3 ms 10840 KB Output is correct
33 Correct 3 ms 10840 KB Output is correct
34 Correct 3 ms 10840 KB Output is correct
35 Correct 3 ms 10840 KB Output is correct
36 Correct 4 ms 11096 KB Output is correct
37 Correct 4 ms 11096 KB Output is correct
38 Correct 4 ms 10936 KB Output is correct
39 Correct 4 ms 11004 KB Output is correct
40 Correct 3 ms 10840 KB Output is correct
41 Correct 2 ms 10840 KB Output is correct
42 Correct 3 ms 10840 KB Output is correct
43 Correct 2 ms 10840 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 10580 KB Output is correct
2 Correct 4 ms 10840 KB Output is correct
3 Correct 3 ms 10840 KB Output is correct
4 Correct 5 ms 11096 KB Output is correct
5 Correct 4 ms 11096 KB Output is correct
6 Correct 4 ms 11096 KB Output is correct
7 Correct 4 ms 11096 KB Output is correct
8 Correct 2 ms 10840 KB Output is correct
9 Correct 2 ms 10840 KB Output is correct
10 Correct 2 ms 10840 KB Output is correct
11 Correct 2 ms 10848 KB Output is correct
12 Correct 2 ms 10584 KB Output is correct
13 Correct 2 ms 10840 KB Output is correct
14 Correct 2 ms 10932 KB Output is correct
15 Correct 4 ms 10840 KB Output is correct
16 Correct 5 ms 11096 KB Output is correct
17 Correct 5 ms 11096 KB Output is correct
18 Correct 2 ms 10840 KB Output is correct
19 Correct 2 ms 11004 KB Output is correct
20 Correct 4 ms 10840 KB Output is correct
21 Correct 4 ms 11096 KB Output is correct
22 Correct 4 ms 11096 KB Output is correct
23 Correct 3 ms 10840 KB Output is correct
24 Correct 2 ms 11000 KB Output is correct
25 Correct 2 ms 10840 KB Output is correct
26 Correct 3 ms 10840 KB Output is correct
27 Correct 3 ms 10928 KB Output is correct
28 Correct 4 ms 11092 KB Output is correct
29 Correct 5 ms 11096 KB Output is correct
30 Correct 4 ms 11096 KB Output is correct
31 Correct 4 ms 11096 KB Output is correct
32 Correct 2 ms 10840 KB Output is correct
33 Correct 2 ms 10840 KB Output is correct
34 Correct 3 ms 10840 KB Output is correct
35 Correct 2 ms 10840 KB Output is correct
36 Correct 97 ms 23752 KB Output is correct
37 Correct 158 ms 28612 KB Output is correct
38 Correct 152 ms 28592 KB Output is correct
39 Correct 238 ms 32968 KB Output is correct
40 Correct 223 ms 32968 KB Output is correct
41 Correct 242 ms 33108 KB Output is correct
42 Correct 231 ms 33224 KB Output is correct
43 Correct 44 ms 26572 KB Output is correct
44 Correct 36 ms 26580 KB Output is correct
45 Correct 36 ms 26568 KB Output is correct
46 Correct 36 ms 26508 KB Output is correct
47 Correct 156 ms 28612 KB Output is correct
48 Correct 239 ms 33012 KB Output is correct
49 Correct 229 ms 33200 KB Output is correct
50 Correct 34 ms 26572 KB Output is correct
51 Correct 34 ms 26580 KB Output is correct
52 Correct 153 ms 28592 KB Output is correct
53 Correct 241 ms 33012 KB Output is correct
54 Correct 245 ms 33196 KB Output is correct
55 Correct 35 ms 26568 KB Output is correct
56 Correct 35 ms 26568 KB Output is correct
57 Correct 148 ms 29236 KB Output is correct
58 Correct 155 ms 28580 KB Output is correct
59 Correct 192 ms 28612 KB Output is correct
60 Correct 244 ms 33224 KB Output is correct
61 Correct 284 ms 33156 KB Output is correct
62 Correct 262 ms 32968 KB Output is correct
63 Correct 258 ms 33224 KB Output is correct
64 Correct 35 ms 26624 KB Output is correct
65 Correct 46 ms 26568 KB Output is correct
66 Correct 44 ms 26680 KB Output is correct
67 Correct 38 ms 26580 KB Output is correct
68 Correct 1032 ms 28356 KB Output is correct
69 Correct 1232 ms 28612 KB Output is correct
70 Correct 1219 ms 28612 KB Output is correct
71 Correct 1316 ms 33208 KB Output is correct
72 Correct 1310 ms 33224 KB Output is correct
73 Correct 1236 ms 33220 KB Output is correct
74 Correct 1293 ms 33076 KB Output is correct
75 Correct 690 ms 26596 KB Output is correct
76 Correct 745 ms 26640 KB Output is correct
77 Correct 962 ms 26572 KB Output is correct
78 Correct 1002 ms 26588 KB Output is correct
79 Correct 747 ms 26572 KB Output is correct
80 Correct 667 ms 26496 KB Output is correct
81 Correct 2 ms 10584 KB Output is correct
82 Correct 3 ms 10880 KB Output is correct
83 Correct 2 ms 10840 KB Output is correct
84 Correct 179 ms 28596 KB Output is correct
85 Correct 234 ms 33032 KB Output is correct
86 Correct 232 ms 32972 KB Output is correct
87 Correct 35 ms 26580 KB Output is correct
88 Correct 37 ms 26572 KB Output is correct
89 Correct 156 ms 28660 KB Output is correct
90 Correct 267 ms 33148 KB Output is correct
91 Correct 245 ms 32968 KB Output is correct
92 Correct 35 ms 26528 KB Output is correct
93 Correct 37 ms 26580 KB Output is correct
94 Correct 4 ms 10836 KB Output is correct
95 Correct 5 ms 11096 KB Output is correct
96 Correct 4 ms 10980 KB Output is correct
97 Correct 3 ms 10840 KB Output is correct
98 Correct 2 ms 10840 KB Output is correct
99 Correct 3 ms 10840 KB Output is correct
100 Correct 4 ms 11096 KB Output is correct
101 Correct 4 ms 10944 KB Output is correct
102 Correct 2 ms 10840 KB Output is correct
103 Correct 3 ms 10840 KB Output is correct
104 Correct 1078 ms 28060 KB Output is correct
105 Correct 1271 ms 28624 KB Output is correct
106 Correct 1280 ms 28612 KB Output is correct
107 Correct 1297 ms 33220 KB Output is correct
108 Correct 1314 ms 32968 KB Output is correct
109 Correct 1331 ms 33224 KB Output is correct
110 Correct 1270 ms 33256 KB Output is correct
111 Correct 731 ms 26452 KB Output is correct
112 Correct 683 ms 26572 KB Output is correct
113 Correct 830 ms 26616 KB Output is correct
114 Correct 870 ms 26580 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 410 ms 19532 KB Output is correct
2 Correct 789 ms 26320 KB Output is correct
3 Correct 724 ms 26368 KB Output is correct
4 Correct 741 ms 25556 KB Output is correct
5 Correct 596 ms 26508 KB Output is correct
6 Correct 660 ms 26620 KB Output is correct
7 Correct 731 ms 26572 KB Output is correct
8 Correct 2 ms 10584 KB Output is correct
9 Correct 2 ms 10840 KB Output is correct
10 Correct 3 ms 10840 KB Output is correct
11 Correct 2 ms 10580 KB Output is correct
12 Correct 4 ms 10840 KB Output is correct
13 Correct 3 ms 10840 KB Output is correct
14 Correct 5 ms 11096 KB Output is correct
15 Correct 4 ms 11096 KB Output is correct
16 Correct 4 ms 11096 KB Output is correct
17 Correct 4 ms 11096 KB Output is correct
18 Correct 2 ms 10840 KB Output is correct
19 Correct 2 ms 10840 KB Output is correct
20 Correct 2 ms 10840 KB Output is correct
21 Correct 2 ms 10848 KB Output is correct
22 Correct 2 ms 10584 KB Output is correct
23 Correct 2 ms 10840 KB Output is correct
24 Correct 2 ms 10932 KB Output is correct
25 Correct 4 ms 10840 KB Output is correct
26 Correct 5 ms 11096 KB Output is correct
27 Correct 5 ms 11096 KB Output is correct
28 Correct 2 ms 10840 KB Output is correct
29 Correct 2 ms 11004 KB Output is correct
30 Correct 4 ms 10840 KB Output is correct
31 Correct 4 ms 11096 KB Output is correct
32 Correct 4 ms 11096 KB Output is correct
33 Correct 3 ms 10840 KB Output is correct
34 Correct 2 ms 11000 KB Output is correct
35 Correct 2 ms 10840 KB Output is correct
36 Correct 3 ms 10840 KB Output is correct
37 Correct 3 ms 10928 KB Output is correct
38 Correct 4 ms 11092 KB Output is correct
39 Correct 5 ms 11096 KB Output is correct
40 Correct 4 ms 11096 KB Output is correct
41 Correct 4 ms 11096 KB Output is correct
42 Correct 2 ms 10840 KB Output is correct
43 Correct 2 ms 10840 KB Output is correct
44 Correct 3 ms 10840 KB Output is correct
45 Correct 2 ms 10840 KB Output is correct
46 Correct 97 ms 23752 KB Output is correct
47 Correct 158 ms 28612 KB Output is correct
48 Correct 152 ms 28592 KB Output is correct
49 Correct 238 ms 32968 KB Output is correct
50 Correct 223 ms 32968 KB Output is correct
51 Correct 242 ms 33108 KB Output is correct
52 Correct 231 ms 33224 KB Output is correct
53 Correct 44 ms 26572 KB Output is correct
54 Correct 36 ms 26580 KB Output is correct
55 Correct 36 ms 26568 KB Output is correct
56 Correct 36 ms 26508 KB Output is correct
57 Correct 156 ms 28612 KB Output is correct
58 Correct 239 ms 33012 KB Output is correct
59 Correct 229 ms 33200 KB Output is correct
60 Correct 34 ms 26572 KB Output is correct
61 Correct 34 ms 26580 KB Output is correct
62 Correct 153 ms 28592 KB Output is correct
63 Correct 241 ms 33012 KB Output is correct
64 Correct 245 ms 33196 KB Output is correct
65 Correct 35 ms 26568 KB Output is correct
66 Correct 35 ms 26568 KB Output is correct
67 Correct 148 ms 29236 KB Output is correct
68 Correct 155 ms 28580 KB Output is correct
69 Correct 192 ms 28612 KB Output is correct
70 Correct 244 ms 33224 KB Output is correct
71 Correct 284 ms 33156 KB Output is correct
72 Correct 262 ms 32968 KB Output is correct
73 Correct 258 ms 33224 KB Output is correct
74 Correct 35 ms 26624 KB Output is correct
75 Correct 46 ms 26568 KB Output is correct
76 Correct 44 ms 26680 KB Output is correct
77 Correct 38 ms 26580 KB Output is correct
78 Correct 1032 ms 28356 KB Output is correct
79 Correct 1232 ms 28612 KB Output is correct
80 Correct 1219 ms 28612 KB Output is correct
81 Correct 1316 ms 33208 KB Output is correct
82 Correct 1310 ms 33224 KB Output is correct
83 Correct 1236 ms 33220 KB Output is correct
84 Correct 1293 ms 33076 KB Output is correct
85 Correct 690 ms 26596 KB Output is correct
86 Correct 745 ms 26640 KB Output is correct
87 Correct 962 ms 26572 KB Output is correct
88 Correct 1002 ms 26588 KB Output is correct
89 Correct 747 ms 26572 KB Output is correct
90 Correct 667 ms 26496 KB Output is correct
91 Correct 2 ms 10584 KB Output is correct
92 Correct 3 ms 10880 KB Output is correct
93 Correct 2 ms 10840 KB Output is correct
94 Correct 179 ms 28596 KB Output is correct
95 Correct 234 ms 33032 KB Output is correct
96 Correct 232 ms 32972 KB Output is correct
97 Correct 35 ms 26580 KB Output is correct
98 Correct 37 ms 26572 KB Output is correct
99 Correct 156 ms 28660 KB Output is correct
100 Correct 267 ms 33148 KB Output is correct
101 Correct 245 ms 32968 KB Output is correct
102 Correct 35 ms 26528 KB Output is correct
103 Correct 37 ms 26580 KB Output is correct
104 Correct 4 ms 10836 KB Output is correct
105 Correct 5 ms 11096 KB Output is correct
106 Correct 4 ms 10980 KB Output is correct
107 Correct 3 ms 10840 KB Output is correct
108 Correct 2 ms 10840 KB Output is correct
109 Correct 3 ms 10840 KB Output is correct
110 Correct 4 ms 11096 KB Output is correct
111 Correct 4 ms 10944 KB Output is correct
112 Correct 2 ms 10840 KB Output is correct
113 Correct 3 ms 10840 KB Output is correct
114 Correct 279 ms 16984 KB Output is correct
115 Correct 1051 ms 28612 KB Output is correct
116 Correct 1022 ms 28388 KB Output is correct
117 Correct 1154 ms 33088 KB Output is correct
118 Correct 1164 ms 33220 KB Output is correct
119 Correct 1183 ms 33180 KB Output is correct
120 Correct 1122 ms 33224 KB Output is correct
121 Correct 763 ms 26580 KB Output is correct
122 Correct 760 ms 26580 KB Output is correct
123 Correct 806 ms 26828 KB Output is correct
124 Correct 777 ms 26572 KB Output is correct
125 Correct 153 ms 28524 KB Output is correct
126 Correct 242 ms 32984 KB Output is correct
127 Correct 230 ms 33216 KB Output is correct
128 Correct 35 ms 26572 KB Output is correct
129 Correct 34 ms 26556 KB Output is correct
130 Correct 145 ms 29408 KB Output is correct
131 Correct 168 ms 28656 KB Output is correct
132 Correct 151 ms 28612 KB Output is correct
133 Correct 228 ms 33180 KB Output is correct
134 Correct 235 ms 33224 KB Output is correct
135 Correct 223 ms 33224 KB Output is correct
136 Correct 241 ms 33068 KB Output is correct
137 Correct 45 ms 26572 KB Output is correct
138 Correct 34 ms 26572 KB Output is correct
139 Correct 35 ms 26648 KB Output is correct
140 Correct 43 ms 26580 KB Output is correct
141 Correct 3 ms 10840 KB Output is correct
142 Correct 5 ms 11096 KB Output is correct
143 Correct 4 ms 11148 KB Output is correct
144 Correct 2 ms 10840 KB Output is correct
145 Correct 3 ms 10840 KB Output is correct
146 Correct 3 ms 10840 KB Output is correct
147 Correct 3 ms 10840 KB Output is correct
148 Correct 3 ms 10840 KB Output is correct
149 Correct 4 ms 11096 KB Output is correct
150 Correct 4 ms 11096 KB Output is correct
151 Correct 4 ms 10936 KB Output is correct
152 Correct 4 ms 11004 KB Output is correct
153 Correct 3 ms 10840 KB Output is correct
154 Correct 2 ms 10840 KB Output is correct
155 Correct 3 ms 10840 KB Output is correct
156 Correct 2 ms 10840 KB Output is correct
157 Correct 1078 ms 28060 KB Output is correct
158 Correct 1271 ms 28624 KB Output is correct
159 Correct 1280 ms 28612 KB Output is correct
160 Correct 1297 ms 33220 KB Output is correct
161 Correct 1314 ms 32968 KB Output is correct
162 Correct 1331 ms 33224 KB Output is correct
163 Correct 1270 ms 33256 KB Output is correct
164 Correct 731 ms 26452 KB Output is correct
165 Correct 683 ms 26572 KB Output is correct
166 Correct 830 ms 26616 KB Output is correct
167 Correct 870 ms 26580 KB Output is correct
168 Correct 2 ms 10584 KB Output is correct
169 Correct 723 ms 18768 KB Output is correct
170 Correct 1324 ms 28620 KB Output is correct
171 Correct 1336 ms 28492 KB Output is correct
172 Correct 1405 ms 33120 KB Output is correct
173 Correct 1386 ms 33228 KB Output is correct
174 Correct 1420 ms 33228 KB Output is correct
175 Correct 1387 ms 33152 KB Output is correct
176 Correct 719 ms 26456 KB Output is correct
177 Correct 724 ms 26572 KB Output is correct
178 Correct 936 ms 26572 KB Output is correct
179 Correct 874 ms 26728 KB Output is correct