답안 #312140

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
312140 2020-10-12T13:04:24 Z wildturtle Interval Collection (CCO20_day2problem2) C++14
25 / 25
4280 ms 284720 KB
#include<bits/stdc++.h>
using namespace std;
long long a,b,t,tree[4000035],treeL[4000035],treeR[4000035];
multiset <long long> stl,str,msl[1000005],msr[1000005];
char ch;
#define tavi begin()
#define bolo rbegin()
void update(long long node,long long L,long long R,long long idx,long long mxare) {
	if(idx<L || R<idx) return;
	if(L==R) {
		if(mxare) { if(msr[idx].empty()) treeR[node]=1e9; else treeR[node]=*msr[idx].tavi; }
		else { if(msl[idx].empty()) treeL[node]=-1e9; else treeL[node]=*msl[idx].bolo; }
		tree[node]=treeR[node]-treeL[node];
		return;
	}
	update(2*node,L,(L+R)/2,idx,mxare);
	update(2*node+1,(L+R)/2+1,R,idx,mxare);
	tree[node]=min(min(tree[2*node],tree[2*node+1]),treeR[2*node+1]-treeL[2*node]);
	treeL[node]=max(treeL[2*node],treeL[2*node+1]);
	treeR[node]=min(treeR[2*node],treeR[2*node+1]);
}
int main() {
	std::ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
    for (long long i=1;i<=4000020;i++) {
        tree[i]=2*1e9; treeL[i]=-1e9; treeR[i]=1e9;
    }
	cin>>t;
	while(t--) {
		cin>>ch>>a>>b;
		if(ch=='A') {
			stl.insert(a);
			str.insert(b);
			msl[b].insert(a);
			msr[a].insert(b);
			update(1,1,1e6+5,b,0);
			update(1,1,1e6+5,a,1);
		}
		else {
			stl.erase(stl.find(a));
			str.erase(str.find(b));
			msl[b].erase(msl[b].find(a));
			msr[a].erase(msr[a].find(b));
			update(1,1,1e6+5,b,0);
			update(1,1,1e6+5,a,1);
		}
		if(*(stl.bolo)<=*(str.tavi)) cout<<*(msr[*(stl.bolo)].tavi)-*(msl[*(str.tavi)].bolo)<<endl;
		else cout<<tree[1]<<endl;
	}
}
# 결과 실행 시간 메모리 Grader output
1 Correct 115 ms 188280 KB Output is correct
2 Correct 116 ms 188280 KB Output is correct
3 Correct 115 ms 188152 KB Output is correct
4 Correct 117 ms 188152 KB Output is correct
5 Correct 115 ms 188280 KB Output is correct
6 Correct 119 ms 188144 KB Output is correct
7 Correct 120 ms 188280 KB Output is correct
8 Correct 116 ms 188152 KB Output is correct
9 Correct 116 ms 188280 KB Output is correct
10 Correct 118 ms 188280 KB Output is correct
11 Correct 117 ms 188280 KB Output is correct
12 Correct 115 ms 188280 KB Output is correct
13 Correct 117 ms 188280 KB Output is correct
14 Correct 116 ms 188268 KB Output is correct
15 Correct 117 ms 188408 KB Output is correct
16 Correct 120 ms 188280 KB Output is correct
17 Correct 118 ms 188280 KB Output is correct
18 Correct 117 ms 188152 KB Output is correct
19 Correct 115 ms 188152 KB Output is correct
20 Correct 118 ms 188152 KB Output is correct
21 Correct 117 ms 188280 KB Output is correct
22 Correct 115 ms 188152 KB Output is correct
23 Correct 117 ms 188280 KB Output is correct
24 Correct 115 ms 188152 KB Output is correct
25 Correct 118 ms 188280 KB Output is correct
26 Correct 119 ms 188280 KB Output is correct
27 Correct 117 ms 188280 KB Output is correct
28 Correct 115 ms 188288 KB Output is correct
29 Correct 117 ms 188272 KB Output is correct
30 Correct 116 ms 188280 KB Output is correct
31 Correct 116 ms 188280 KB Output is correct
32 Correct 116 ms 188280 KB Output is correct
33 Correct 116 ms 188152 KB Output is correct
34 Correct 116 ms 188152 KB Output is correct
35 Correct 115 ms 188152 KB Output is correct
36 Correct 115 ms 188152 KB Output is correct
37 Correct 117 ms 188152 KB Output is correct
38 Correct 116 ms 188152 KB Output is correct
39 Correct 116 ms 188220 KB Output is correct
40 Correct 118 ms 188152 KB Output is correct
41 Correct 119 ms 188284 KB Output is correct
42 Correct 121 ms 188152 KB Output is correct
43 Correct 114 ms 188176 KB Output is correct
44 Correct 114 ms 188152 KB Output is correct
45 Correct 119 ms 188280 KB Output is correct
46 Correct 114 ms 188152 KB Output is correct
47 Correct 116 ms 188152 KB Output is correct
48 Correct 116 ms 188200 KB Output is correct
49 Correct 115 ms 188280 KB Output is correct
50 Correct 116 ms 188368 KB Output is correct
51 Correct 115 ms 188280 KB Output is correct
52 Correct 114 ms 188280 KB Output is correct
53 Correct 114 ms 188280 KB Output is correct
54 Correct 117 ms 188408 KB Output is correct
55 Correct 116 ms 188280 KB Output is correct
56 Correct 116 ms 188280 KB Output is correct
57 Correct 115 ms 188280 KB Output is correct
58 Correct 116 ms 188280 KB Output is correct
59 Correct 117 ms 188372 KB Output is correct
60 Correct 116 ms 188288 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 115 ms 188280 KB Output is correct
2 Correct 116 ms 188280 KB Output is correct
3 Correct 115 ms 188152 KB Output is correct
4 Correct 117 ms 188152 KB Output is correct
5 Correct 115 ms 188280 KB Output is correct
6 Correct 119 ms 188144 KB Output is correct
7 Correct 120 ms 188280 KB Output is correct
8 Correct 116 ms 188152 KB Output is correct
9 Correct 116 ms 188280 KB Output is correct
10 Correct 118 ms 188280 KB Output is correct
11 Correct 117 ms 188280 KB Output is correct
12 Correct 115 ms 188280 KB Output is correct
13 Correct 117 ms 188280 KB Output is correct
14 Correct 116 ms 188268 KB Output is correct
15 Correct 117 ms 188408 KB Output is correct
16 Correct 120 ms 188280 KB Output is correct
17 Correct 118 ms 188280 KB Output is correct
18 Correct 117 ms 188152 KB Output is correct
19 Correct 115 ms 188152 KB Output is correct
20 Correct 118 ms 188152 KB Output is correct
21 Correct 117 ms 188280 KB Output is correct
22 Correct 115 ms 188152 KB Output is correct
23 Correct 117 ms 188280 KB Output is correct
24 Correct 115 ms 188152 KB Output is correct
25 Correct 118 ms 188280 KB Output is correct
26 Correct 119 ms 188280 KB Output is correct
27 Correct 117 ms 188280 KB Output is correct
28 Correct 115 ms 188288 KB Output is correct
29 Correct 117 ms 188272 KB Output is correct
30 Correct 116 ms 188280 KB Output is correct
31 Correct 116 ms 188280 KB Output is correct
32 Correct 116 ms 188280 KB Output is correct
33 Correct 116 ms 188152 KB Output is correct
34 Correct 116 ms 188152 KB Output is correct
35 Correct 115 ms 188152 KB Output is correct
36 Correct 115 ms 188152 KB Output is correct
37 Correct 117 ms 188152 KB Output is correct
38 Correct 116 ms 188152 KB Output is correct
39 Correct 116 ms 188220 KB Output is correct
40 Correct 118 ms 188152 KB Output is correct
41 Correct 119 ms 188284 KB Output is correct
42 Correct 121 ms 188152 KB Output is correct
43 Correct 114 ms 188176 KB Output is correct
44 Correct 114 ms 188152 KB Output is correct
45 Correct 119 ms 188280 KB Output is correct
46 Correct 114 ms 188152 KB Output is correct
47 Correct 116 ms 188152 KB Output is correct
48 Correct 116 ms 188200 KB Output is correct
49 Correct 115 ms 188280 KB Output is correct
50 Correct 116 ms 188368 KB Output is correct
51 Correct 115 ms 188280 KB Output is correct
52 Correct 114 ms 188280 KB Output is correct
53 Correct 114 ms 188280 KB Output is correct
54 Correct 117 ms 188408 KB Output is correct
55 Correct 116 ms 188280 KB Output is correct
56 Correct 116 ms 188280 KB Output is correct
57 Correct 115 ms 188280 KB Output is correct
58 Correct 116 ms 188280 KB Output is correct
59 Correct 117 ms 188372 KB Output is correct
60 Correct 116 ms 188288 KB Output is correct
61 Correct 114 ms 188224 KB Output is correct
62 Correct 114 ms 188152 KB Output is correct
63 Correct 115 ms 188152 KB Output is correct
64 Correct 184 ms 189432 KB Output is correct
65 Correct 178 ms 188536 KB Output is correct
66 Correct 168 ms 188436 KB Output is correct
67 Correct 161 ms 188280 KB Output is correct
68 Correct 183 ms 189432 KB Output is correct
69 Correct 177 ms 188536 KB Output is correct
70 Correct 172 ms 188280 KB Output is correct
71 Correct 167 ms 188284 KB Output is correct
72 Correct 183 ms 190072 KB Output is correct
73 Correct 186 ms 189692 KB Output is correct
74 Correct 181 ms 189688 KB Output is correct
75 Correct 181 ms 189560 KB Output is correct
76 Correct 188 ms 190584 KB Output is correct
77 Correct 184 ms 190456 KB Output is correct
78 Correct 184 ms 190456 KB Output is correct
79 Correct 186 ms 190456 KB Output is correct
80 Correct 180 ms 189432 KB Output is correct
81 Correct 174 ms 188536 KB Output is correct
82 Correct 168 ms 188284 KB Output is correct
83 Correct 160 ms 188280 KB Output is correct
84 Correct 180 ms 189404 KB Output is correct
85 Correct 175 ms 188536 KB Output is correct
86 Correct 170 ms 188280 KB Output is correct
87 Correct 168 ms 188408 KB Output is correct
88 Correct 182 ms 190072 KB Output is correct
89 Correct 179 ms 189688 KB Output is correct
90 Correct 180 ms 189560 KB Output is correct
91 Correct 179 ms 189560 KB Output is correct
92 Correct 183 ms 190456 KB Output is correct
93 Correct 182 ms 190456 KB Output is correct
94 Correct 183 ms 190456 KB Output is correct
95 Correct 184 ms 190460 KB Output is correct
96 Correct 162 ms 188272 KB Output is correct
97 Correct 160 ms 188280 KB Output is correct
98 Correct 161 ms 188280 KB Output is correct
99 Correct 163 ms 188244 KB Output is correct
100 Correct 176 ms 188356 KB Output is correct
101 Correct 166 ms 188280 KB Output is correct
102 Correct 168 ms 188280 KB Output is correct
103 Correct 160 ms 188280 KB Output is correct
104 Correct 178 ms 189432 KB Output is correct
105 Correct 173 ms 188536 KB Output is correct
106 Correct 168 ms 188300 KB Output is correct
107 Correct 164 ms 188280 KB Output is correct
108 Correct 178 ms 189432 KB Output is correct
109 Correct 171 ms 188536 KB Output is correct
110 Correct 167 ms 188408 KB Output is correct
111 Correct 187 ms 188300 KB Output is correct
112 Correct 163 ms 189432 KB Output is correct
113 Correct 167 ms 189432 KB Output is correct
114 Correct 159 ms 189432 KB Output is correct
115 Correct 163 ms 189432 KB Output is correct
116 Correct 163 ms 189436 KB Output is correct
117 Correct 167 ms 189432 KB Output is correct
118 Correct 163 ms 189432 KB Output is correct
119 Correct 177 ms 189432 KB Output is correct
120 Correct 164 ms 189432 KB Output is correct
121 Correct 169 ms 189432 KB Output is correct
122 Correct 172 ms 190456 KB Output is correct
123 Correct 173 ms 190668 KB Output is correct
124 Correct 166 ms 188512 KB Output is correct
125 Correct 154 ms 188412 KB Output is correct
126 Correct 156 ms 188536 KB Output is correct
127 Correct 162 ms 188796 KB Output is correct
128 Correct 157 ms 188408 KB Output is correct
129 Correct 158 ms 188280 KB Output is correct
130 Correct 161 ms 188836 KB Output is correct
131 Correct 157 ms 188408 KB Output is correct
132 Correct 153 ms 188280 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 115 ms 188280 KB Output is correct
2 Correct 116 ms 188280 KB Output is correct
3 Correct 115 ms 188152 KB Output is correct
4 Correct 117 ms 188152 KB Output is correct
5 Correct 115 ms 188280 KB Output is correct
6 Correct 119 ms 188144 KB Output is correct
7 Correct 120 ms 188280 KB Output is correct
8 Correct 116 ms 188152 KB Output is correct
9 Correct 116 ms 188280 KB Output is correct
10 Correct 118 ms 188280 KB Output is correct
11 Correct 117 ms 188280 KB Output is correct
12 Correct 115 ms 188280 KB Output is correct
13 Correct 117 ms 188280 KB Output is correct
14 Correct 116 ms 188268 KB Output is correct
15 Correct 117 ms 188408 KB Output is correct
16 Correct 120 ms 188280 KB Output is correct
17 Correct 118 ms 188280 KB Output is correct
18 Correct 117 ms 188152 KB Output is correct
19 Correct 115 ms 188152 KB Output is correct
20 Correct 118 ms 188152 KB Output is correct
21 Correct 117 ms 188280 KB Output is correct
22 Correct 115 ms 188152 KB Output is correct
23 Correct 117 ms 188280 KB Output is correct
24 Correct 115 ms 188152 KB Output is correct
25 Correct 118 ms 188280 KB Output is correct
26 Correct 119 ms 188280 KB Output is correct
27 Correct 117 ms 188280 KB Output is correct
28 Correct 115 ms 188288 KB Output is correct
29 Correct 117 ms 188272 KB Output is correct
30 Correct 116 ms 188280 KB Output is correct
31 Correct 116 ms 188280 KB Output is correct
32 Correct 116 ms 188280 KB Output is correct
33 Correct 116 ms 188152 KB Output is correct
34 Correct 116 ms 188152 KB Output is correct
35 Correct 115 ms 188152 KB Output is correct
36 Correct 115 ms 188152 KB Output is correct
37 Correct 117 ms 188152 KB Output is correct
38 Correct 116 ms 188152 KB Output is correct
39 Correct 116 ms 188220 KB Output is correct
40 Correct 118 ms 188152 KB Output is correct
41 Correct 119 ms 188284 KB Output is correct
42 Correct 121 ms 188152 KB Output is correct
43 Correct 114 ms 188176 KB Output is correct
44 Correct 114 ms 188152 KB Output is correct
45 Correct 119 ms 188280 KB Output is correct
46 Correct 114 ms 188152 KB Output is correct
47 Correct 116 ms 188152 KB Output is correct
48 Correct 116 ms 188200 KB Output is correct
49 Correct 115 ms 188280 KB Output is correct
50 Correct 116 ms 188368 KB Output is correct
51 Correct 115 ms 188280 KB Output is correct
52 Correct 114 ms 188280 KB Output is correct
53 Correct 114 ms 188280 KB Output is correct
54 Correct 117 ms 188408 KB Output is correct
55 Correct 116 ms 188280 KB Output is correct
56 Correct 116 ms 188280 KB Output is correct
57 Correct 115 ms 188280 KB Output is correct
58 Correct 116 ms 188280 KB Output is correct
59 Correct 117 ms 188372 KB Output is correct
60 Correct 116 ms 188288 KB Output is correct
61 Correct 114 ms 188224 KB Output is correct
62 Correct 114 ms 188152 KB Output is correct
63 Correct 115 ms 188152 KB Output is correct
64 Correct 184 ms 189432 KB Output is correct
65 Correct 178 ms 188536 KB Output is correct
66 Correct 168 ms 188436 KB Output is correct
67 Correct 161 ms 188280 KB Output is correct
68 Correct 183 ms 189432 KB Output is correct
69 Correct 177 ms 188536 KB Output is correct
70 Correct 172 ms 188280 KB Output is correct
71 Correct 167 ms 188284 KB Output is correct
72 Correct 183 ms 190072 KB Output is correct
73 Correct 186 ms 189692 KB Output is correct
74 Correct 181 ms 189688 KB Output is correct
75 Correct 181 ms 189560 KB Output is correct
76 Correct 188 ms 190584 KB Output is correct
77 Correct 184 ms 190456 KB Output is correct
78 Correct 184 ms 190456 KB Output is correct
79 Correct 186 ms 190456 KB Output is correct
80 Correct 180 ms 189432 KB Output is correct
81 Correct 174 ms 188536 KB Output is correct
82 Correct 168 ms 188284 KB Output is correct
83 Correct 160 ms 188280 KB Output is correct
84 Correct 180 ms 189404 KB Output is correct
85 Correct 175 ms 188536 KB Output is correct
86 Correct 170 ms 188280 KB Output is correct
87 Correct 168 ms 188408 KB Output is correct
88 Correct 182 ms 190072 KB Output is correct
89 Correct 179 ms 189688 KB Output is correct
90 Correct 180 ms 189560 KB Output is correct
91 Correct 179 ms 189560 KB Output is correct
92 Correct 183 ms 190456 KB Output is correct
93 Correct 182 ms 190456 KB Output is correct
94 Correct 183 ms 190456 KB Output is correct
95 Correct 184 ms 190460 KB Output is correct
96 Correct 162 ms 188272 KB Output is correct
97 Correct 160 ms 188280 KB Output is correct
98 Correct 161 ms 188280 KB Output is correct
99 Correct 163 ms 188244 KB Output is correct
100 Correct 176 ms 188356 KB Output is correct
101 Correct 166 ms 188280 KB Output is correct
102 Correct 168 ms 188280 KB Output is correct
103 Correct 160 ms 188280 KB Output is correct
104 Correct 178 ms 189432 KB Output is correct
105 Correct 173 ms 188536 KB Output is correct
106 Correct 168 ms 188300 KB Output is correct
107 Correct 164 ms 188280 KB Output is correct
108 Correct 178 ms 189432 KB Output is correct
109 Correct 171 ms 188536 KB Output is correct
110 Correct 167 ms 188408 KB Output is correct
111 Correct 187 ms 188300 KB Output is correct
112 Correct 163 ms 189432 KB Output is correct
113 Correct 167 ms 189432 KB Output is correct
114 Correct 159 ms 189432 KB Output is correct
115 Correct 163 ms 189432 KB Output is correct
116 Correct 163 ms 189436 KB Output is correct
117 Correct 167 ms 189432 KB Output is correct
118 Correct 163 ms 189432 KB Output is correct
119 Correct 177 ms 189432 KB Output is correct
120 Correct 164 ms 189432 KB Output is correct
121 Correct 169 ms 189432 KB Output is correct
122 Correct 172 ms 190456 KB Output is correct
123 Correct 173 ms 190668 KB Output is correct
124 Correct 166 ms 188512 KB Output is correct
125 Correct 154 ms 188412 KB Output is correct
126 Correct 156 ms 188536 KB Output is correct
127 Correct 162 ms 188796 KB Output is correct
128 Correct 157 ms 188408 KB Output is correct
129 Correct 158 ms 188280 KB Output is correct
130 Correct 161 ms 188836 KB Output is correct
131 Correct 157 ms 188408 KB Output is correct
132 Correct 153 ms 188280 KB Output is correct
133 Correct 428 ms 193144 KB Output is correct
134 Correct 386 ms 189432 KB Output is correct
135 Correct 356 ms 188664 KB Output is correct
136 Correct 324 ms 188668 KB Output is correct
137 Correct 435 ms 193228 KB Output is correct
138 Correct 383 ms 189560 KB Output is correct
139 Correct 358 ms 188664 KB Output is correct
140 Correct 346 ms 188792 KB Output is correct
141 Correct 441 ms 195960 KB Output is correct
142 Correct 434 ms 194424 KB Output is correct
143 Correct 424 ms 194168 KB Output is correct
144 Correct 422 ms 194160 KB Output is correct
145 Correct 447 ms 197880 KB Output is correct
146 Correct 455 ms 197880 KB Output is correct
147 Correct 448 ms 197880 KB Output is correct
148 Correct 446 ms 197880 KB Output is correct
149 Correct 423 ms 193272 KB Output is correct
150 Correct 380 ms 189432 KB Output is correct
151 Correct 354 ms 188664 KB Output is correct
152 Correct 314 ms 188664 KB Output is correct
153 Correct 430 ms 193268 KB Output is correct
154 Correct 386 ms 189560 KB Output is correct
155 Correct 355 ms 188664 KB Output is correct
156 Correct 337 ms 188536 KB Output is correct
157 Correct 440 ms 196000 KB Output is correct
158 Correct 437 ms 194552 KB Output is correct
159 Correct 436 ms 194168 KB Output is correct
160 Correct 416 ms 194168 KB Output is correct
161 Correct 458 ms 197880 KB Output is correct
162 Correct 447 ms 197752 KB Output is correct
163 Correct 459 ms 197880 KB Output is correct
164 Correct 452 ms 197852 KB Output is correct
165 Correct 317 ms 188568 KB Output is correct
166 Correct 318 ms 188536 KB Output is correct
167 Correct 315 ms 188536 KB Output is correct
168 Correct 316 ms 188672 KB Output is correct
169 Correct 345 ms 188664 KB Output is correct
170 Correct 334 ms 188544 KB Output is correct
171 Correct 339 ms 188536 KB Output is correct
172 Correct 320 ms 188664 KB Output is correct
173 Correct 422 ms 193144 KB Output is correct
174 Correct 394 ms 189488 KB Output is correct
175 Correct 352 ms 188664 KB Output is correct
176 Correct 317 ms 188664 KB Output is correct
177 Correct 417 ms 193144 KB Output is correct
178 Correct 384 ms 189432 KB Output is correct
179 Correct 353 ms 188664 KB Output is correct
180 Correct 320 ms 188664 KB Output is correct
181 Correct 322 ms 193272 KB Output is correct
182 Correct 354 ms 193272 KB Output is correct
183 Correct 316 ms 193320 KB Output is correct
184 Correct 341 ms 193272 KB Output is correct
185 Correct 329 ms 193224 KB Output is correct
186 Correct 356 ms 193144 KB Output is correct
187 Correct 317 ms 193144 KB Output is correct
188 Correct 338 ms 193184 KB Output is correct
189 Correct 326 ms 193272 KB Output is correct
190 Correct 355 ms 193400 KB Output is correct
191 Correct 330 ms 197880 KB Output is correct
192 Correct 330 ms 197752 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 947 ms 226296 KB Output is correct
2 Correct 975 ms 226192 KB Output is correct
3 Correct 1758 ms 264260 KB Output is correct
4 Correct 1775 ms 264184 KB Output is correct
5 Correct 2169 ms 283132 KB Output is correct
6 Correct 2237 ms 283128 KB Output is correct
7 Correct 2336 ms 192248 KB Output is correct
8 Correct 1998 ms 190360 KB Output is correct
9 Correct 1955 ms 190072 KB Output is correct
10 Correct 2496 ms 195284 KB Output is correct
11 Correct 2008 ms 190400 KB Output is correct
12 Correct 1972 ms 190072 KB Output is correct
13 Correct 2521 ms 196716 KB Output is correct
14 Correct 2016 ms 190564 KB Output is correct
15 Correct 1983 ms 190072 KB Output is correct
16 Correct 1955 ms 190152 KB Output is correct
17 Correct 1958 ms 190328 KB Output is correct
18 Correct 1969 ms 190280 KB Output is correct
19 Correct 1950 ms 190200 KB Output is correct
20 Correct 1945 ms 190228 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 115 ms 188280 KB Output is correct
2 Correct 116 ms 188280 KB Output is correct
3 Correct 115 ms 188152 KB Output is correct
4 Correct 117 ms 188152 KB Output is correct
5 Correct 115 ms 188280 KB Output is correct
6 Correct 119 ms 188144 KB Output is correct
7 Correct 120 ms 188280 KB Output is correct
8 Correct 116 ms 188152 KB Output is correct
9 Correct 116 ms 188280 KB Output is correct
10 Correct 118 ms 188280 KB Output is correct
11 Correct 117 ms 188280 KB Output is correct
12 Correct 115 ms 188280 KB Output is correct
13 Correct 117 ms 188280 KB Output is correct
14 Correct 116 ms 188268 KB Output is correct
15 Correct 117 ms 188408 KB Output is correct
16 Correct 120 ms 188280 KB Output is correct
17 Correct 118 ms 188280 KB Output is correct
18 Correct 117 ms 188152 KB Output is correct
19 Correct 115 ms 188152 KB Output is correct
20 Correct 118 ms 188152 KB Output is correct
21 Correct 117 ms 188280 KB Output is correct
22 Correct 115 ms 188152 KB Output is correct
23 Correct 117 ms 188280 KB Output is correct
24 Correct 115 ms 188152 KB Output is correct
25 Correct 118 ms 188280 KB Output is correct
26 Correct 119 ms 188280 KB Output is correct
27 Correct 117 ms 188280 KB Output is correct
28 Correct 115 ms 188288 KB Output is correct
29 Correct 117 ms 188272 KB Output is correct
30 Correct 116 ms 188280 KB Output is correct
31 Correct 116 ms 188280 KB Output is correct
32 Correct 116 ms 188280 KB Output is correct
33 Correct 116 ms 188152 KB Output is correct
34 Correct 116 ms 188152 KB Output is correct
35 Correct 115 ms 188152 KB Output is correct
36 Correct 115 ms 188152 KB Output is correct
37 Correct 117 ms 188152 KB Output is correct
38 Correct 116 ms 188152 KB Output is correct
39 Correct 116 ms 188220 KB Output is correct
40 Correct 118 ms 188152 KB Output is correct
41 Correct 119 ms 188284 KB Output is correct
42 Correct 121 ms 188152 KB Output is correct
43 Correct 114 ms 188176 KB Output is correct
44 Correct 114 ms 188152 KB Output is correct
45 Correct 119 ms 188280 KB Output is correct
46 Correct 114 ms 188152 KB Output is correct
47 Correct 116 ms 188152 KB Output is correct
48 Correct 116 ms 188200 KB Output is correct
49 Correct 115 ms 188280 KB Output is correct
50 Correct 116 ms 188368 KB Output is correct
51 Correct 115 ms 188280 KB Output is correct
52 Correct 114 ms 188280 KB Output is correct
53 Correct 114 ms 188280 KB Output is correct
54 Correct 117 ms 188408 KB Output is correct
55 Correct 116 ms 188280 KB Output is correct
56 Correct 116 ms 188280 KB Output is correct
57 Correct 115 ms 188280 KB Output is correct
58 Correct 116 ms 188280 KB Output is correct
59 Correct 117 ms 188372 KB Output is correct
60 Correct 116 ms 188288 KB Output is correct
61 Correct 114 ms 188224 KB Output is correct
62 Correct 114 ms 188152 KB Output is correct
63 Correct 115 ms 188152 KB Output is correct
64 Correct 184 ms 189432 KB Output is correct
65 Correct 178 ms 188536 KB Output is correct
66 Correct 168 ms 188436 KB Output is correct
67 Correct 161 ms 188280 KB Output is correct
68 Correct 183 ms 189432 KB Output is correct
69 Correct 177 ms 188536 KB Output is correct
70 Correct 172 ms 188280 KB Output is correct
71 Correct 167 ms 188284 KB Output is correct
72 Correct 183 ms 190072 KB Output is correct
73 Correct 186 ms 189692 KB Output is correct
74 Correct 181 ms 189688 KB Output is correct
75 Correct 181 ms 189560 KB Output is correct
76 Correct 188 ms 190584 KB Output is correct
77 Correct 184 ms 190456 KB Output is correct
78 Correct 184 ms 190456 KB Output is correct
79 Correct 186 ms 190456 KB Output is correct
80 Correct 180 ms 189432 KB Output is correct
81 Correct 174 ms 188536 KB Output is correct
82 Correct 168 ms 188284 KB Output is correct
83 Correct 160 ms 188280 KB Output is correct
84 Correct 180 ms 189404 KB Output is correct
85 Correct 175 ms 188536 KB Output is correct
86 Correct 170 ms 188280 KB Output is correct
87 Correct 168 ms 188408 KB Output is correct
88 Correct 182 ms 190072 KB Output is correct
89 Correct 179 ms 189688 KB Output is correct
90 Correct 180 ms 189560 KB Output is correct
91 Correct 179 ms 189560 KB Output is correct
92 Correct 183 ms 190456 KB Output is correct
93 Correct 182 ms 190456 KB Output is correct
94 Correct 183 ms 190456 KB Output is correct
95 Correct 184 ms 190460 KB Output is correct
96 Correct 162 ms 188272 KB Output is correct
97 Correct 160 ms 188280 KB Output is correct
98 Correct 161 ms 188280 KB Output is correct
99 Correct 163 ms 188244 KB Output is correct
100 Correct 176 ms 188356 KB Output is correct
101 Correct 166 ms 188280 KB Output is correct
102 Correct 168 ms 188280 KB Output is correct
103 Correct 160 ms 188280 KB Output is correct
104 Correct 178 ms 189432 KB Output is correct
105 Correct 173 ms 188536 KB Output is correct
106 Correct 168 ms 188300 KB Output is correct
107 Correct 164 ms 188280 KB Output is correct
108 Correct 178 ms 189432 KB Output is correct
109 Correct 171 ms 188536 KB Output is correct
110 Correct 167 ms 188408 KB Output is correct
111 Correct 187 ms 188300 KB Output is correct
112 Correct 163 ms 189432 KB Output is correct
113 Correct 167 ms 189432 KB Output is correct
114 Correct 159 ms 189432 KB Output is correct
115 Correct 163 ms 189432 KB Output is correct
116 Correct 163 ms 189436 KB Output is correct
117 Correct 167 ms 189432 KB Output is correct
118 Correct 163 ms 189432 KB Output is correct
119 Correct 177 ms 189432 KB Output is correct
120 Correct 164 ms 189432 KB Output is correct
121 Correct 169 ms 189432 KB Output is correct
122 Correct 172 ms 190456 KB Output is correct
123 Correct 173 ms 190668 KB Output is correct
124 Correct 166 ms 188512 KB Output is correct
125 Correct 154 ms 188412 KB Output is correct
126 Correct 156 ms 188536 KB Output is correct
127 Correct 162 ms 188796 KB Output is correct
128 Correct 157 ms 188408 KB Output is correct
129 Correct 158 ms 188280 KB Output is correct
130 Correct 161 ms 188836 KB Output is correct
131 Correct 157 ms 188408 KB Output is correct
132 Correct 153 ms 188280 KB Output is correct
133 Correct 428 ms 193144 KB Output is correct
134 Correct 386 ms 189432 KB Output is correct
135 Correct 356 ms 188664 KB Output is correct
136 Correct 324 ms 188668 KB Output is correct
137 Correct 435 ms 193228 KB Output is correct
138 Correct 383 ms 189560 KB Output is correct
139 Correct 358 ms 188664 KB Output is correct
140 Correct 346 ms 188792 KB Output is correct
141 Correct 441 ms 195960 KB Output is correct
142 Correct 434 ms 194424 KB Output is correct
143 Correct 424 ms 194168 KB Output is correct
144 Correct 422 ms 194160 KB Output is correct
145 Correct 447 ms 197880 KB Output is correct
146 Correct 455 ms 197880 KB Output is correct
147 Correct 448 ms 197880 KB Output is correct
148 Correct 446 ms 197880 KB Output is correct
149 Correct 423 ms 193272 KB Output is correct
150 Correct 380 ms 189432 KB Output is correct
151 Correct 354 ms 188664 KB Output is correct
152 Correct 314 ms 188664 KB Output is correct
153 Correct 430 ms 193268 KB Output is correct
154 Correct 386 ms 189560 KB Output is correct
155 Correct 355 ms 188664 KB Output is correct
156 Correct 337 ms 188536 KB Output is correct
157 Correct 440 ms 196000 KB Output is correct
158 Correct 437 ms 194552 KB Output is correct
159 Correct 436 ms 194168 KB Output is correct
160 Correct 416 ms 194168 KB Output is correct
161 Correct 458 ms 197880 KB Output is correct
162 Correct 447 ms 197752 KB Output is correct
163 Correct 459 ms 197880 KB Output is correct
164 Correct 452 ms 197852 KB Output is correct
165 Correct 317 ms 188568 KB Output is correct
166 Correct 318 ms 188536 KB Output is correct
167 Correct 315 ms 188536 KB Output is correct
168 Correct 316 ms 188672 KB Output is correct
169 Correct 345 ms 188664 KB Output is correct
170 Correct 334 ms 188544 KB Output is correct
171 Correct 339 ms 188536 KB Output is correct
172 Correct 320 ms 188664 KB Output is correct
173 Correct 422 ms 193144 KB Output is correct
174 Correct 394 ms 189488 KB Output is correct
175 Correct 352 ms 188664 KB Output is correct
176 Correct 317 ms 188664 KB Output is correct
177 Correct 417 ms 193144 KB Output is correct
178 Correct 384 ms 189432 KB Output is correct
179 Correct 353 ms 188664 KB Output is correct
180 Correct 320 ms 188664 KB Output is correct
181 Correct 322 ms 193272 KB Output is correct
182 Correct 354 ms 193272 KB Output is correct
183 Correct 316 ms 193320 KB Output is correct
184 Correct 341 ms 193272 KB Output is correct
185 Correct 329 ms 193224 KB Output is correct
186 Correct 356 ms 193144 KB Output is correct
187 Correct 317 ms 193144 KB Output is correct
188 Correct 338 ms 193184 KB Output is correct
189 Correct 326 ms 193272 KB Output is correct
190 Correct 355 ms 193400 KB Output is correct
191 Correct 330 ms 197880 KB Output is correct
192 Correct 330 ms 197752 KB Output is correct
193 Correct 947 ms 226296 KB Output is correct
194 Correct 975 ms 226192 KB Output is correct
195 Correct 1758 ms 264260 KB Output is correct
196 Correct 1775 ms 264184 KB Output is correct
197 Correct 2169 ms 283132 KB Output is correct
198 Correct 2237 ms 283128 KB Output is correct
199 Correct 2336 ms 192248 KB Output is correct
200 Correct 1998 ms 190360 KB Output is correct
201 Correct 1955 ms 190072 KB Output is correct
202 Correct 2496 ms 195284 KB Output is correct
203 Correct 2008 ms 190400 KB Output is correct
204 Correct 1972 ms 190072 KB Output is correct
205 Correct 2521 ms 196716 KB Output is correct
206 Correct 2016 ms 190564 KB Output is correct
207 Correct 1983 ms 190072 KB Output is correct
208 Correct 1955 ms 190152 KB Output is correct
209 Correct 1958 ms 190328 KB Output is correct
210 Correct 1969 ms 190280 KB Output is correct
211 Correct 1950 ms 190200 KB Output is correct
212 Correct 1945 ms 190228 KB Output is correct
213 Correct 4013 ms 237620 KB Output is correct
214 Correct 3549 ms 200248 KB Output is correct
215 Correct 2893 ms 192288 KB Output is correct
216 Correct 2332 ms 191864 KB Output is correct
217 Correct 4045 ms 237564 KB Output is correct
218 Correct 3559 ms 200364 KB Output is correct
219 Correct 2932 ms 192260 KB Output is correct
220 Correct 2523 ms 191616 KB Output is correct
221 Correct 4204 ms 265684 KB Output is correct
222 Correct 4109 ms 250748 KB Output is correct
223 Correct 4037 ms 247312 KB Output is correct
224 Correct 4058 ms 246916 KB Output is correct
225 Correct 4221 ms 284544 KB Output is correct
226 Correct 4214 ms 284720 KB Output is correct
227 Correct 4230 ms 284540 KB Output is correct
228 Correct 4280 ms 284620 KB Output is correct
229 Correct 4075 ms 237404 KB Output is correct
230 Correct 3637 ms 199992 KB Output is correct
231 Correct 2911 ms 192248 KB Output is correct
232 Correct 2358 ms 191584 KB Output is correct
233 Correct 4083 ms 237448 KB Output is correct
234 Correct 3591 ms 200328 KB Output is correct
235 Correct 2897 ms 192504 KB Output is correct
236 Correct 2457 ms 191640 KB Output is correct
237 Correct 4134 ms 265672 KB Output is correct
238 Correct 4133 ms 250580 KB Output is correct
239 Correct 4093 ms 247556 KB Output is correct
240 Correct 4048 ms 246776 KB Output is correct
241 Correct 4232 ms 284392 KB Output is correct
242 Correct 4256 ms 284428 KB Output is correct
243 Correct 4235 ms 284548 KB Output is correct
244 Correct 4218 ms 284148 KB Output is correct
245 Correct 2132 ms 191960 KB Output is correct
246 Correct 2140 ms 191748 KB Output is correct
247 Correct 2131 ms 191864 KB Output is correct
248 Correct 2146 ms 191864 KB Output is correct
249 Correct 2422 ms 191696 KB Output is correct
250 Correct 2458 ms 191736 KB Output is correct
251 Correct 2465 ms 191672 KB Output is correct
252 Correct 2290 ms 192068 KB Output is correct
253 Correct 3950 ms 237436 KB Output is correct
254 Correct 3448 ms 200328 KB Output is correct
255 Correct 2807 ms 192500 KB Output is correct
256 Correct 2337 ms 191940 KB Output is correct
257 Correct 3863 ms 237664 KB Output is correct
258 Correct 3410 ms 200604 KB Output is correct
259 Correct 2861 ms 192180 KB Output is correct
260 Correct 2365 ms 191748 KB Output is correct
261 Correct 2571 ms 238840 KB Output is correct
262 Correct 3145 ms 238772 KB Output is correct
263 Correct 2052 ms 238940 KB Output is correct
264 Correct 2632 ms 238968 KB Output is correct
265 Correct 2552 ms 238900 KB Output is correct
266 Correct 3167 ms 239256 KB Output is correct
267 Correct 2056 ms 238968 KB Output is correct
268 Correct 2669 ms 238888 KB Output is correct
269 Correct 2175 ms 283332 KB Output is correct
270 Correct 2200 ms 283256 KB Output is correct
271 Correct 2408 ms 193144 KB Output is correct
272 Correct 2005 ms 190584 KB Output is correct
273 Correct 2549 ms 196580 KB Output is correct
274 Correct 2019 ms 190584 KB Output is correct
275 Correct 2067 ms 241448 KB Output is correct