Submission #314232

# Submission time Handle Problem Language Result Execution time Memory
314232 2020-10-19T07:35:07 Z tigicha Interval Collection (CCO20_day2problem2) C++14
25 / 25
4341 ms 285120 KB
#include<bits/stdc++.h>
using namespace std;
long long a, b, t, tree[4000035], tree1[4000035], tree2[4000035];
multiset <long long> st1, st2, s1[1000005], s2[1000005];
char c;
void update(long long p, long long l, long long r, long long k, bool x){
	if(k<l || r<k) return;
	if(l==r){
		if(x==1){
		       if(s2[k].empty()) tree2[p]=1e9;
		       else tree2[p]=*s2[k].begin();
		}
		else{
		       if(s1[k].empty()) tree1[p]=-1e9;
		       else tree1[p]=*s1[k].rbegin();
		}
		tree[p]=tree2[p]-tree1[p];
		return;
	}
	update(2*p, l, (l+r)/2, k, x);
	update(2*p+1, (l+r+1)/2, r, k, x);
	tree[p]=min(min(tree[2*p], tree[2*p+1]), tree2[2*p+1]-tree1[2*p]);
	tree1[p]=max(tree1[2*p], tree1[2*p+1]);
	tree2[p]=min(tree2[2*p], tree2[2*p+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;
	       tree1[i]=-1e9;
	       tree2[i]=1e9;
	}
	cin>>t;
	while(t--){
	       cin>>c>>a>>b;
		if(c=='A'){
			st1.insert(a);
			st2.insert(b);
			s1[b].insert(a);
			s2[a].insert(b);
			update(1, 1, 1e6+5, b, 0);
			update(1, 1, 1e6+5, a, 1);
		}
		else {
			st1.erase(st1.find(a));
			st2.erase(st2.find(b));
			s1[b].erase(s1[b].find(a));
			s2[a].erase(s2[a].find(b));
			update(1, 1, 1e6+5, b, 0);
			update(1, 1, 1e6+5, a, 1);
		}
		if(*(st1.rbegin())<=*(st2.begin())) cout<<*(s2[*(st1.rbegin())].begin())-*(s1[*(st2.begin())].rbegin())<<endl;
		else cout<<tree[1]<<endl;
	}
}
# Verdict Execution time Memory Grader output
1 Correct 114 ms 188280 KB Output is correct
2 Correct 117 ms 188152 KB Output is correct
3 Correct 118 ms 188152 KB Output is correct
4 Correct 118 ms 188152 KB Output is correct
5 Correct 118 ms 188280 KB Output is correct
6 Correct 119 ms 188152 KB Output is correct
7 Correct 117 ms 188152 KB Output is correct
8 Correct 120 ms 188152 KB Output is correct
9 Correct 119 ms 188280 KB Output is correct
10 Correct 119 ms 188212 KB Output is correct
11 Correct 119 ms 188192 KB Output is correct
12 Correct 121 ms 188280 KB Output is correct
13 Correct 121 ms 188280 KB Output is correct
14 Correct 119 ms 188284 KB Output is correct
15 Correct 119 ms 188316 KB Output is correct
16 Correct 119 ms 188408 KB Output is correct
17 Correct 119 ms 188408 KB Output is correct
18 Correct 118 ms 188280 KB Output is correct
19 Correct 118 ms 188152 KB Output is correct
20 Correct 120 ms 188152 KB Output is correct
21 Correct 118 ms 188344 KB Output is correct
22 Correct 118 ms 188152 KB Output is correct
23 Correct 130 ms 188152 KB Output is correct
24 Correct 119 ms 188152 KB Output is correct
25 Correct 119 ms 188280 KB Output is correct
26 Correct 119 ms 188200 KB Output is correct
27 Correct 118 ms 188284 KB Output is correct
28 Correct 120 ms 188236 KB Output is correct
29 Correct 123 ms 188408 KB Output is correct
30 Correct 120 ms 188312 KB Output is correct
31 Correct 120 ms 188280 KB Output is correct
32 Correct 120 ms 188280 KB Output is correct
33 Correct 117 ms 188256 KB Output is correct
34 Correct 118 ms 188152 KB Output is correct
35 Correct 118 ms 188152 KB Output is correct
36 Correct 118 ms 188152 KB Output is correct
37 Correct 117 ms 188152 KB Output is correct
38 Correct 117 ms 188152 KB Output is correct
39 Correct 119 ms 188152 KB Output is correct
40 Correct 120 ms 188152 KB Output is correct
41 Correct 119 ms 188280 KB Output is correct
42 Correct 118 ms 188152 KB Output is correct
43 Correct 118 ms 188152 KB Output is correct
44 Correct 118 ms 188252 KB Output is correct
45 Correct 118 ms 188352 KB Output is correct
46 Correct 120 ms 188156 KB Output is correct
47 Correct 117 ms 188152 KB Output is correct
48 Correct 119 ms 188196 KB Output is correct
49 Correct 116 ms 188196 KB Output is correct
50 Correct 119 ms 188280 KB Output is correct
51 Correct 117 ms 188232 KB Output is correct
52 Correct 118 ms 188280 KB Output is correct
53 Correct 117 ms 188280 KB Output is correct
54 Correct 118 ms 188280 KB Output is correct
55 Correct 119 ms 188280 KB Output is correct
56 Correct 118 ms 188280 KB Output is correct
57 Correct 119 ms 188280 KB Output is correct
58 Correct 119 ms 188280 KB Output is correct
59 Correct 119 ms 188272 KB Output is correct
60 Correct 118 ms 188280 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 114 ms 188280 KB Output is correct
2 Correct 117 ms 188152 KB Output is correct
3 Correct 118 ms 188152 KB Output is correct
4 Correct 118 ms 188152 KB Output is correct
5 Correct 118 ms 188280 KB Output is correct
6 Correct 119 ms 188152 KB Output is correct
7 Correct 117 ms 188152 KB Output is correct
8 Correct 120 ms 188152 KB Output is correct
9 Correct 119 ms 188280 KB Output is correct
10 Correct 119 ms 188212 KB Output is correct
11 Correct 119 ms 188192 KB Output is correct
12 Correct 121 ms 188280 KB Output is correct
13 Correct 121 ms 188280 KB Output is correct
14 Correct 119 ms 188284 KB Output is correct
15 Correct 119 ms 188316 KB Output is correct
16 Correct 119 ms 188408 KB Output is correct
17 Correct 119 ms 188408 KB Output is correct
18 Correct 118 ms 188280 KB Output is correct
19 Correct 118 ms 188152 KB Output is correct
20 Correct 120 ms 188152 KB Output is correct
21 Correct 118 ms 188344 KB Output is correct
22 Correct 118 ms 188152 KB Output is correct
23 Correct 130 ms 188152 KB Output is correct
24 Correct 119 ms 188152 KB Output is correct
25 Correct 119 ms 188280 KB Output is correct
26 Correct 119 ms 188200 KB Output is correct
27 Correct 118 ms 188284 KB Output is correct
28 Correct 120 ms 188236 KB Output is correct
29 Correct 123 ms 188408 KB Output is correct
30 Correct 120 ms 188312 KB Output is correct
31 Correct 120 ms 188280 KB Output is correct
32 Correct 120 ms 188280 KB Output is correct
33 Correct 117 ms 188256 KB Output is correct
34 Correct 118 ms 188152 KB Output is correct
35 Correct 118 ms 188152 KB Output is correct
36 Correct 118 ms 188152 KB Output is correct
37 Correct 117 ms 188152 KB Output is correct
38 Correct 117 ms 188152 KB Output is correct
39 Correct 119 ms 188152 KB Output is correct
40 Correct 120 ms 188152 KB Output is correct
41 Correct 119 ms 188280 KB Output is correct
42 Correct 118 ms 188152 KB Output is correct
43 Correct 118 ms 188152 KB Output is correct
44 Correct 118 ms 188252 KB Output is correct
45 Correct 118 ms 188352 KB Output is correct
46 Correct 120 ms 188156 KB Output is correct
47 Correct 117 ms 188152 KB Output is correct
48 Correct 119 ms 188196 KB Output is correct
49 Correct 116 ms 188196 KB Output is correct
50 Correct 119 ms 188280 KB Output is correct
51 Correct 117 ms 188232 KB Output is correct
52 Correct 118 ms 188280 KB Output is correct
53 Correct 117 ms 188280 KB Output is correct
54 Correct 118 ms 188280 KB Output is correct
55 Correct 119 ms 188280 KB Output is correct
56 Correct 118 ms 188280 KB Output is correct
57 Correct 119 ms 188280 KB Output is correct
58 Correct 119 ms 188280 KB Output is correct
59 Correct 119 ms 188272 KB Output is correct
60 Correct 118 ms 188280 KB Output is correct
61 Correct 116 ms 188152 KB Output is correct
62 Correct 116 ms 188280 KB Output is correct
63 Correct 118 ms 188152 KB Output is correct
64 Correct 187 ms 189560 KB Output is correct
65 Correct 177 ms 188736 KB Output is correct
66 Correct 172 ms 188536 KB Output is correct
67 Correct 166 ms 188504 KB Output is correct
68 Correct 185 ms 189560 KB Output is correct
69 Correct 177 ms 188668 KB Output is correct
70 Correct 180 ms 188588 KB Output is correct
71 Correct 168 ms 188536 KB Output is correct
72 Correct 189 ms 190200 KB Output is correct
73 Correct 189 ms 189912 KB Output is correct
74 Correct 183 ms 189816 KB Output is correct
75 Correct 184 ms 189944 KB Output is correct
76 Correct 191 ms 190712 KB Output is correct
77 Correct 192 ms 190712 KB Output is correct
78 Correct 201 ms 190840 KB Output is correct
79 Correct 190 ms 190712 KB Output is correct
80 Correct 183 ms 189560 KB Output is correct
81 Correct 175 ms 188664 KB Output is correct
82 Correct 174 ms 188536 KB Output is correct
83 Correct 164 ms 188408 KB Output is correct
84 Correct 187 ms 189560 KB Output is correct
85 Correct 179 ms 188664 KB Output is correct
86 Correct 176 ms 188536 KB Output is correct
87 Correct 170 ms 188536 KB Output is correct
88 Correct 189 ms 190328 KB Output is correct
89 Correct 187 ms 189816 KB Output is correct
90 Correct 186 ms 189816 KB Output is correct
91 Correct 186 ms 189948 KB Output is correct
92 Correct 191 ms 190744 KB Output is correct
93 Correct 188 ms 190712 KB Output is correct
94 Correct 188 ms 190968 KB Output is correct
95 Correct 186 ms 190712 KB Output is correct
96 Correct 167 ms 188408 KB Output is correct
97 Correct 167 ms 188408 KB Output is correct
98 Correct 163 ms 188408 KB Output is correct
99 Correct 164 ms 188408 KB Output is correct
100 Correct 169 ms 188536 KB Output is correct
101 Correct 172 ms 188408 KB Output is correct
102 Correct 169 ms 188536 KB Output is correct
103 Correct 167 ms 188408 KB Output is correct
104 Correct 184 ms 189560 KB Output is correct
105 Correct 176 ms 188664 KB Output is correct
106 Correct 169 ms 188536 KB Output is correct
107 Correct 166 ms 188664 KB Output is correct
108 Correct 183 ms 189560 KB Output is correct
109 Correct 177 ms 188664 KB Output is correct
110 Correct 173 ms 188536 KB Output is correct
111 Correct 169 ms 188408 KB Output is correct
112 Correct 168 ms 189560 KB Output is correct
113 Correct 172 ms 189560 KB Output is correct
114 Correct 167 ms 189560 KB Output is correct
115 Correct 169 ms 189560 KB Output is correct
116 Correct 168 ms 189688 KB Output is correct
117 Correct 170 ms 189560 KB Output is correct
118 Correct 163 ms 189524 KB Output is correct
119 Correct 168 ms 189560 KB Output is correct
120 Correct 167 ms 189564 KB Output is correct
121 Correct 173 ms 189560 KB Output is correct
122 Correct 170 ms 190712 KB Output is correct
123 Correct 168 ms 190712 KB Output is correct
124 Correct 161 ms 188664 KB Output is correct
125 Correct 157 ms 188540 KB Output is correct
126 Correct 157 ms 188536 KB Output is correct
127 Correct 167 ms 189048 KB Output is correct
128 Correct 159 ms 188492 KB Output is correct
129 Correct 160 ms 188536 KB Output is correct
130 Correct 179 ms 189048 KB Output is correct
131 Correct 161 ms 188536 KB Output is correct
132 Correct 162 ms 188408 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 114 ms 188280 KB Output is correct
2 Correct 117 ms 188152 KB Output is correct
3 Correct 118 ms 188152 KB Output is correct
4 Correct 118 ms 188152 KB Output is correct
5 Correct 118 ms 188280 KB Output is correct
6 Correct 119 ms 188152 KB Output is correct
7 Correct 117 ms 188152 KB Output is correct
8 Correct 120 ms 188152 KB Output is correct
9 Correct 119 ms 188280 KB Output is correct
10 Correct 119 ms 188212 KB Output is correct
11 Correct 119 ms 188192 KB Output is correct
12 Correct 121 ms 188280 KB Output is correct
13 Correct 121 ms 188280 KB Output is correct
14 Correct 119 ms 188284 KB Output is correct
15 Correct 119 ms 188316 KB Output is correct
16 Correct 119 ms 188408 KB Output is correct
17 Correct 119 ms 188408 KB Output is correct
18 Correct 118 ms 188280 KB Output is correct
19 Correct 118 ms 188152 KB Output is correct
20 Correct 120 ms 188152 KB Output is correct
21 Correct 118 ms 188344 KB Output is correct
22 Correct 118 ms 188152 KB Output is correct
23 Correct 130 ms 188152 KB Output is correct
24 Correct 119 ms 188152 KB Output is correct
25 Correct 119 ms 188280 KB Output is correct
26 Correct 119 ms 188200 KB Output is correct
27 Correct 118 ms 188284 KB Output is correct
28 Correct 120 ms 188236 KB Output is correct
29 Correct 123 ms 188408 KB Output is correct
30 Correct 120 ms 188312 KB Output is correct
31 Correct 120 ms 188280 KB Output is correct
32 Correct 120 ms 188280 KB Output is correct
33 Correct 117 ms 188256 KB Output is correct
34 Correct 118 ms 188152 KB Output is correct
35 Correct 118 ms 188152 KB Output is correct
36 Correct 118 ms 188152 KB Output is correct
37 Correct 117 ms 188152 KB Output is correct
38 Correct 117 ms 188152 KB Output is correct
39 Correct 119 ms 188152 KB Output is correct
40 Correct 120 ms 188152 KB Output is correct
41 Correct 119 ms 188280 KB Output is correct
42 Correct 118 ms 188152 KB Output is correct
43 Correct 118 ms 188152 KB Output is correct
44 Correct 118 ms 188252 KB Output is correct
45 Correct 118 ms 188352 KB Output is correct
46 Correct 120 ms 188156 KB Output is correct
47 Correct 117 ms 188152 KB Output is correct
48 Correct 119 ms 188196 KB Output is correct
49 Correct 116 ms 188196 KB Output is correct
50 Correct 119 ms 188280 KB Output is correct
51 Correct 117 ms 188232 KB Output is correct
52 Correct 118 ms 188280 KB Output is correct
53 Correct 117 ms 188280 KB Output is correct
54 Correct 118 ms 188280 KB Output is correct
55 Correct 119 ms 188280 KB Output is correct
56 Correct 118 ms 188280 KB Output is correct
57 Correct 119 ms 188280 KB Output is correct
58 Correct 119 ms 188280 KB Output is correct
59 Correct 119 ms 188272 KB Output is correct
60 Correct 118 ms 188280 KB Output is correct
61 Correct 116 ms 188152 KB Output is correct
62 Correct 116 ms 188280 KB Output is correct
63 Correct 118 ms 188152 KB Output is correct
64 Correct 187 ms 189560 KB Output is correct
65 Correct 177 ms 188736 KB Output is correct
66 Correct 172 ms 188536 KB Output is correct
67 Correct 166 ms 188504 KB Output is correct
68 Correct 185 ms 189560 KB Output is correct
69 Correct 177 ms 188668 KB Output is correct
70 Correct 180 ms 188588 KB Output is correct
71 Correct 168 ms 188536 KB Output is correct
72 Correct 189 ms 190200 KB Output is correct
73 Correct 189 ms 189912 KB Output is correct
74 Correct 183 ms 189816 KB Output is correct
75 Correct 184 ms 189944 KB Output is correct
76 Correct 191 ms 190712 KB Output is correct
77 Correct 192 ms 190712 KB Output is correct
78 Correct 201 ms 190840 KB Output is correct
79 Correct 190 ms 190712 KB Output is correct
80 Correct 183 ms 189560 KB Output is correct
81 Correct 175 ms 188664 KB Output is correct
82 Correct 174 ms 188536 KB Output is correct
83 Correct 164 ms 188408 KB Output is correct
84 Correct 187 ms 189560 KB Output is correct
85 Correct 179 ms 188664 KB Output is correct
86 Correct 176 ms 188536 KB Output is correct
87 Correct 170 ms 188536 KB Output is correct
88 Correct 189 ms 190328 KB Output is correct
89 Correct 187 ms 189816 KB Output is correct
90 Correct 186 ms 189816 KB Output is correct
91 Correct 186 ms 189948 KB Output is correct
92 Correct 191 ms 190744 KB Output is correct
93 Correct 188 ms 190712 KB Output is correct
94 Correct 188 ms 190968 KB Output is correct
95 Correct 186 ms 190712 KB Output is correct
96 Correct 167 ms 188408 KB Output is correct
97 Correct 167 ms 188408 KB Output is correct
98 Correct 163 ms 188408 KB Output is correct
99 Correct 164 ms 188408 KB Output is correct
100 Correct 169 ms 188536 KB Output is correct
101 Correct 172 ms 188408 KB Output is correct
102 Correct 169 ms 188536 KB Output is correct
103 Correct 167 ms 188408 KB Output is correct
104 Correct 184 ms 189560 KB Output is correct
105 Correct 176 ms 188664 KB Output is correct
106 Correct 169 ms 188536 KB Output is correct
107 Correct 166 ms 188664 KB Output is correct
108 Correct 183 ms 189560 KB Output is correct
109 Correct 177 ms 188664 KB Output is correct
110 Correct 173 ms 188536 KB Output is correct
111 Correct 169 ms 188408 KB Output is correct
112 Correct 168 ms 189560 KB Output is correct
113 Correct 172 ms 189560 KB Output is correct
114 Correct 167 ms 189560 KB Output is correct
115 Correct 169 ms 189560 KB Output is correct
116 Correct 168 ms 189688 KB Output is correct
117 Correct 170 ms 189560 KB Output is correct
118 Correct 163 ms 189524 KB Output is correct
119 Correct 168 ms 189560 KB Output is correct
120 Correct 167 ms 189564 KB Output is correct
121 Correct 173 ms 189560 KB Output is correct
122 Correct 170 ms 190712 KB Output is correct
123 Correct 168 ms 190712 KB Output is correct
124 Correct 161 ms 188664 KB Output is correct
125 Correct 157 ms 188540 KB Output is correct
126 Correct 157 ms 188536 KB Output is correct
127 Correct 167 ms 189048 KB Output is correct
128 Correct 159 ms 188492 KB Output is correct
129 Correct 160 ms 188536 KB Output is correct
130 Correct 179 ms 189048 KB Output is correct
131 Correct 161 ms 188536 KB Output is correct
132 Correct 162 ms 188408 KB Output is correct
133 Correct 473 ms 193656 KB Output is correct
134 Correct 396 ms 189944 KB Output is correct
135 Correct 365 ms 189156 KB Output is correct
136 Correct 328 ms 189304 KB Output is correct
137 Correct 442 ms 193696 KB Output is correct
138 Correct 404 ms 190200 KB Output is correct
139 Correct 377 ms 189176 KB Output is correct
140 Correct 358 ms 189048 KB Output is correct
141 Correct 467 ms 196600 KB Output is correct
142 Correct 450 ms 195064 KB Output is correct
143 Correct 453 ms 195080 KB Output is correct
144 Correct 454 ms 194800 KB Output is correct
145 Correct 468 ms 198660 KB Output is correct
146 Correct 467 ms 198484 KB Output is correct
147 Correct 473 ms 198520 KB Output is correct
148 Correct 473 ms 198648 KB Output is correct
149 Correct 452 ms 193784 KB Output is correct
150 Correct 395 ms 190200 KB Output is correct
151 Correct 366 ms 189304 KB Output is correct
152 Correct 329 ms 189176 KB Output is correct
153 Correct 440 ms 193912 KB Output is correct
154 Correct 400 ms 190072 KB Output is correct
155 Correct 369 ms 189432 KB Output is correct
156 Correct 350 ms 189176 KB Output is correct
157 Correct 458 ms 196728 KB Output is correct
158 Correct 444 ms 195064 KB Output is correct
159 Correct 442 ms 194808 KB Output is correct
160 Correct 439 ms 194680 KB Output is correct
161 Correct 501 ms 198412 KB Output is correct
162 Correct 486 ms 198520 KB Output is correct
163 Correct 471 ms 198520 KB Output is correct
164 Correct 495 ms 198496 KB Output is correct
165 Correct 329 ms 189164 KB Output is correct
166 Correct 329 ms 189176 KB Output is correct
167 Correct 337 ms 189248 KB Output is correct
168 Correct 365 ms 189304 KB Output is correct
169 Correct 373 ms 189304 KB Output is correct
170 Correct 365 ms 189328 KB Output is correct
171 Correct 344 ms 189304 KB Output is correct
172 Correct 334 ms 189308 KB Output is correct
173 Correct 440 ms 194040 KB Output is correct
174 Correct 389 ms 190072 KB Output is correct
175 Correct 368 ms 189304 KB Output is correct
176 Correct 334 ms 189304 KB Output is correct
177 Correct 437 ms 193784 KB Output is correct
178 Correct 386 ms 190072 KB Output is correct
179 Correct 361 ms 189304 KB Output is correct
180 Correct 326 ms 189180 KB Output is correct
181 Correct 328 ms 193784 KB Output is correct
182 Correct 358 ms 193784 KB Output is correct
183 Correct 316 ms 193788 KB Output is correct
184 Correct 348 ms 193784 KB Output is correct
185 Correct 335 ms 193912 KB Output is correct
186 Correct 366 ms 193784 KB Output is correct
187 Correct 319 ms 193848 KB Output is correct
188 Correct 344 ms 193784 KB Output is correct
189 Correct 333 ms 193784 KB Output is correct
190 Correct 360 ms 193784 KB Output is correct
191 Correct 325 ms 198392 KB Output is correct
192 Correct 334 ms 198392 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 938 ms 226932 KB Output is correct
2 Correct 958 ms 226892 KB Output is correct
3 Correct 1753 ms 264952 KB Output is correct
4 Correct 1820 ms 264952 KB Output is correct
5 Correct 2185 ms 283896 KB Output is correct
6 Correct 2212 ms 283896 KB Output is correct
7 Correct 2384 ms 192980 KB Output is correct
8 Correct 2021 ms 191016 KB Output is correct
9 Correct 1984 ms 190892 KB Output is correct
10 Correct 2545 ms 196096 KB Output is correct
11 Correct 2013 ms 191024 KB Output is correct
12 Correct 2017 ms 190712 KB Output is correct
13 Correct 2552 ms 197644 KB Output is correct
14 Correct 2033 ms 191196 KB Output is correct
15 Correct 1999 ms 190660 KB Output is correct
16 Correct 1980 ms 190992 KB Output is correct
17 Correct 1984 ms 190896 KB Output is correct
18 Correct 1991 ms 190688 KB Output is correct
19 Correct 2021 ms 190900 KB Output is correct
20 Correct 2001 ms 190872 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 114 ms 188280 KB Output is correct
2 Correct 117 ms 188152 KB Output is correct
3 Correct 118 ms 188152 KB Output is correct
4 Correct 118 ms 188152 KB Output is correct
5 Correct 118 ms 188280 KB Output is correct
6 Correct 119 ms 188152 KB Output is correct
7 Correct 117 ms 188152 KB Output is correct
8 Correct 120 ms 188152 KB Output is correct
9 Correct 119 ms 188280 KB Output is correct
10 Correct 119 ms 188212 KB Output is correct
11 Correct 119 ms 188192 KB Output is correct
12 Correct 121 ms 188280 KB Output is correct
13 Correct 121 ms 188280 KB Output is correct
14 Correct 119 ms 188284 KB Output is correct
15 Correct 119 ms 188316 KB Output is correct
16 Correct 119 ms 188408 KB Output is correct
17 Correct 119 ms 188408 KB Output is correct
18 Correct 118 ms 188280 KB Output is correct
19 Correct 118 ms 188152 KB Output is correct
20 Correct 120 ms 188152 KB Output is correct
21 Correct 118 ms 188344 KB Output is correct
22 Correct 118 ms 188152 KB Output is correct
23 Correct 130 ms 188152 KB Output is correct
24 Correct 119 ms 188152 KB Output is correct
25 Correct 119 ms 188280 KB Output is correct
26 Correct 119 ms 188200 KB Output is correct
27 Correct 118 ms 188284 KB Output is correct
28 Correct 120 ms 188236 KB Output is correct
29 Correct 123 ms 188408 KB Output is correct
30 Correct 120 ms 188312 KB Output is correct
31 Correct 120 ms 188280 KB Output is correct
32 Correct 120 ms 188280 KB Output is correct
33 Correct 117 ms 188256 KB Output is correct
34 Correct 118 ms 188152 KB Output is correct
35 Correct 118 ms 188152 KB Output is correct
36 Correct 118 ms 188152 KB Output is correct
37 Correct 117 ms 188152 KB Output is correct
38 Correct 117 ms 188152 KB Output is correct
39 Correct 119 ms 188152 KB Output is correct
40 Correct 120 ms 188152 KB Output is correct
41 Correct 119 ms 188280 KB Output is correct
42 Correct 118 ms 188152 KB Output is correct
43 Correct 118 ms 188152 KB Output is correct
44 Correct 118 ms 188252 KB Output is correct
45 Correct 118 ms 188352 KB Output is correct
46 Correct 120 ms 188156 KB Output is correct
47 Correct 117 ms 188152 KB Output is correct
48 Correct 119 ms 188196 KB Output is correct
49 Correct 116 ms 188196 KB Output is correct
50 Correct 119 ms 188280 KB Output is correct
51 Correct 117 ms 188232 KB Output is correct
52 Correct 118 ms 188280 KB Output is correct
53 Correct 117 ms 188280 KB Output is correct
54 Correct 118 ms 188280 KB Output is correct
55 Correct 119 ms 188280 KB Output is correct
56 Correct 118 ms 188280 KB Output is correct
57 Correct 119 ms 188280 KB Output is correct
58 Correct 119 ms 188280 KB Output is correct
59 Correct 119 ms 188272 KB Output is correct
60 Correct 118 ms 188280 KB Output is correct
61 Correct 116 ms 188152 KB Output is correct
62 Correct 116 ms 188280 KB Output is correct
63 Correct 118 ms 188152 KB Output is correct
64 Correct 187 ms 189560 KB Output is correct
65 Correct 177 ms 188736 KB Output is correct
66 Correct 172 ms 188536 KB Output is correct
67 Correct 166 ms 188504 KB Output is correct
68 Correct 185 ms 189560 KB Output is correct
69 Correct 177 ms 188668 KB Output is correct
70 Correct 180 ms 188588 KB Output is correct
71 Correct 168 ms 188536 KB Output is correct
72 Correct 189 ms 190200 KB Output is correct
73 Correct 189 ms 189912 KB Output is correct
74 Correct 183 ms 189816 KB Output is correct
75 Correct 184 ms 189944 KB Output is correct
76 Correct 191 ms 190712 KB Output is correct
77 Correct 192 ms 190712 KB Output is correct
78 Correct 201 ms 190840 KB Output is correct
79 Correct 190 ms 190712 KB Output is correct
80 Correct 183 ms 189560 KB Output is correct
81 Correct 175 ms 188664 KB Output is correct
82 Correct 174 ms 188536 KB Output is correct
83 Correct 164 ms 188408 KB Output is correct
84 Correct 187 ms 189560 KB Output is correct
85 Correct 179 ms 188664 KB Output is correct
86 Correct 176 ms 188536 KB Output is correct
87 Correct 170 ms 188536 KB Output is correct
88 Correct 189 ms 190328 KB Output is correct
89 Correct 187 ms 189816 KB Output is correct
90 Correct 186 ms 189816 KB Output is correct
91 Correct 186 ms 189948 KB Output is correct
92 Correct 191 ms 190744 KB Output is correct
93 Correct 188 ms 190712 KB Output is correct
94 Correct 188 ms 190968 KB Output is correct
95 Correct 186 ms 190712 KB Output is correct
96 Correct 167 ms 188408 KB Output is correct
97 Correct 167 ms 188408 KB Output is correct
98 Correct 163 ms 188408 KB Output is correct
99 Correct 164 ms 188408 KB Output is correct
100 Correct 169 ms 188536 KB Output is correct
101 Correct 172 ms 188408 KB Output is correct
102 Correct 169 ms 188536 KB Output is correct
103 Correct 167 ms 188408 KB Output is correct
104 Correct 184 ms 189560 KB Output is correct
105 Correct 176 ms 188664 KB Output is correct
106 Correct 169 ms 188536 KB Output is correct
107 Correct 166 ms 188664 KB Output is correct
108 Correct 183 ms 189560 KB Output is correct
109 Correct 177 ms 188664 KB Output is correct
110 Correct 173 ms 188536 KB Output is correct
111 Correct 169 ms 188408 KB Output is correct
112 Correct 168 ms 189560 KB Output is correct
113 Correct 172 ms 189560 KB Output is correct
114 Correct 167 ms 189560 KB Output is correct
115 Correct 169 ms 189560 KB Output is correct
116 Correct 168 ms 189688 KB Output is correct
117 Correct 170 ms 189560 KB Output is correct
118 Correct 163 ms 189524 KB Output is correct
119 Correct 168 ms 189560 KB Output is correct
120 Correct 167 ms 189564 KB Output is correct
121 Correct 173 ms 189560 KB Output is correct
122 Correct 170 ms 190712 KB Output is correct
123 Correct 168 ms 190712 KB Output is correct
124 Correct 161 ms 188664 KB Output is correct
125 Correct 157 ms 188540 KB Output is correct
126 Correct 157 ms 188536 KB Output is correct
127 Correct 167 ms 189048 KB Output is correct
128 Correct 159 ms 188492 KB Output is correct
129 Correct 160 ms 188536 KB Output is correct
130 Correct 179 ms 189048 KB Output is correct
131 Correct 161 ms 188536 KB Output is correct
132 Correct 162 ms 188408 KB Output is correct
133 Correct 473 ms 193656 KB Output is correct
134 Correct 396 ms 189944 KB Output is correct
135 Correct 365 ms 189156 KB Output is correct
136 Correct 328 ms 189304 KB Output is correct
137 Correct 442 ms 193696 KB Output is correct
138 Correct 404 ms 190200 KB Output is correct
139 Correct 377 ms 189176 KB Output is correct
140 Correct 358 ms 189048 KB Output is correct
141 Correct 467 ms 196600 KB Output is correct
142 Correct 450 ms 195064 KB Output is correct
143 Correct 453 ms 195080 KB Output is correct
144 Correct 454 ms 194800 KB Output is correct
145 Correct 468 ms 198660 KB Output is correct
146 Correct 467 ms 198484 KB Output is correct
147 Correct 473 ms 198520 KB Output is correct
148 Correct 473 ms 198648 KB Output is correct
149 Correct 452 ms 193784 KB Output is correct
150 Correct 395 ms 190200 KB Output is correct
151 Correct 366 ms 189304 KB Output is correct
152 Correct 329 ms 189176 KB Output is correct
153 Correct 440 ms 193912 KB Output is correct
154 Correct 400 ms 190072 KB Output is correct
155 Correct 369 ms 189432 KB Output is correct
156 Correct 350 ms 189176 KB Output is correct
157 Correct 458 ms 196728 KB Output is correct
158 Correct 444 ms 195064 KB Output is correct
159 Correct 442 ms 194808 KB Output is correct
160 Correct 439 ms 194680 KB Output is correct
161 Correct 501 ms 198412 KB Output is correct
162 Correct 486 ms 198520 KB Output is correct
163 Correct 471 ms 198520 KB Output is correct
164 Correct 495 ms 198496 KB Output is correct
165 Correct 329 ms 189164 KB Output is correct
166 Correct 329 ms 189176 KB Output is correct
167 Correct 337 ms 189248 KB Output is correct
168 Correct 365 ms 189304 KB Output is correct
169 Correct 373 ms 189304 KB Output is correct
170 Correct 365 ms 189328 KB Output is correct
171 Correct 344 ms 189304 KB Output is correct
172 Correct 334 ms 189308 KB Output is correct
173 Correct 440 ms 194040 KB Output is correct
174 Correct 389 ms 190072 KB Output is correct
175 Correct 368 ms 189304 KB Output is correct
176 Correct 334 ms 189304 KB Output is correct
177 Correct 437 ms 193784 KB Output is correct
178 Correct 386 ms 190072 KB Output is correct
179 Correct 361 ms 189304 KB Output is correct
180 Correct 326 ms 189180 KB Output is correct
181 Correct 328 ms 193784 KB Output is correct
182 Correct 358 ms 193784 KB Output is correct
183 Correct 316 ms 193788 KB Output is correct
184 Correct 348 ms 193784 KB Output is correct
185 Correct 335 ms 193912 KB Output is correct
186 Correct 366 ms 193784 KB Output is correct
187 Correct 319 ms 193848 KB Output is correct
188 Correct 344 ms 193784 KB Output is correct
189 Correct 333 ms 193784 KB Output is correct
190 Correct 360 ms 193784 KB Output is correct
191 Correct 325 ms 198392 KB Output is correct
192 Correct 334 ms 198392 KB Output is correct
193 Correct 938 ms 226932 KB Output is correct
194 Correct 958 ms 226892 KB Output is correct
195 Correct 1753 ms 264952 KB Output is correct
196 Correct 1820 ms 264952 KB Output is correct
197 Correct 2185 ms 283896 KB Output is correct
198 Correct 2212 ms 283896 KB Output is correct
199 Correct 2384 ms 192980 KB Output is correct
200 Correct 2021 ms 191016 KB Output is correct
201 Correct 1984 ms 190892 KB Output is correct
202 Correct 2545 ms 196096 KB Output is correct
203 Correct 2013 ms 191024 KB Output is correct
204 Correct 2017 ms 190712 KB Output is correct
205 Correct 2552 ms 197644 KB Output is correct
206 Correct 2033 ms 191196 KB Output is correct
207 Correct 1999 ms 190660 KB Output is correct
208 Correct 1980 ms 190992 KB Output is correct
209 Correct 1984 ms 190896 KB Output is correct
210 Correct 1991 ms 190688 KB Output is correct
211 Correct 2021 ms 190900 KB Output is correct
212 Correct 2001 ms 190872 KB Output is correct
213 Correct 4161 ms 238232 KB Output is correct
214 Correct 3773 ms 200840 KB Output is correct
215 Correct 3026 ms 192916 KB Output is correct
216 Correct 2404 ms 192348 KB Output is correct
217 Correct 4133 ms 238200 KB Output is correct
218 Correct 3684 ms 200960 KB Output is correct
219 Correct 3008 ms 193024 KB Output is correct
220 Correct 2531 ms 192232 KB Output is correct
221 Correct 4258 ms 266236 KB Output is correct
222 Correct 4191 ms 251460 KB Output is correct
223 Correct 4129 ms 247948 KB Output is correct
224 Correct 4151 ms 247556 KB Output is correct
225 Correct 4300 ms 285120 KB Output is correct
226 Correct 4340 ms 285068 KB Output is correct
227 Correct 4341 ms 285064 KB Output is correct
228 Correct 4294 ms 285080 KB Output is correct
229 Correct 4108 ms 237992 KB Output is correct
230 Correct 3692 ms 200480 KB Output is correct
231 Correct 3025 ms 193024 KB Output is correct
232 Correct 2380 ms 192332 KB Output is correct
233 Correct 4146 ms 238196 KB Output is correct
234 Correct 3692 ms 200680 KB Output is correct
235 Correct 3017 ms 193144 KB Output is correct
236 Correct 2509 ms 192120 KB Output is correct
237 Correct 4217 ms 266060 KB Output is correct
238 Correct 4168 ms 251084 KB Output is correct
239 Correct 4137 ms 248028 KB Output is correct
240 Correct 4169 ms 247300 KB Output is correct
241 Correct 4321 ms 284852 KB Output is correct
242 Correct 4293 ms 284832 KB Output is correct
243 Correct 4281 ms 284952 KB Output is correct
244 Correct 4284 ms 284624 KB Output is correct
245 Correct 2242 ms 192376 KB Output is correct
246 Correct 2197 ms 192452 KB Output is correct
247 Correct 2185 ms 192376 KB Output is correct
248 Correct 2161 ms 192376 KB Output is correct
249 Correct 2478 ms 192340 KB Output is correct
250 Correct 2512 ms 192192 KB Output is correct
251 Correct 2538 ms 192120 KB Output is correct
252 Correct 2322 ms 192428 KB Output is correct
253 Correct 4064 ms 238072 KB Output is correct
254 Correct 3508 ms 200784 KB Output is correct
255 Correct 2885 ms 192896 KB Output is correct
256 Correct 2370 ms 192444 KB Output is correct
257 Correct 3926 ms 238120 KB Output is correct
258 Correct 3430 ms 200800 KB Output is correct
259 Correct 2925 ms 193012 KB Output is correct
260 Correct 2362 ms 192604 KB Output is correct
261 Correct 2590 ms 239636 KB Output is correct
262 Correct 3191 ms 239540 KB Output is correct
263 Correct 2070 ms 239480 KB Output is correct
264 Correct 2686 ms 239352 KB Output is correct
265 Correct 2583 ms 239608 KB Output is correct
266 Correct 3223 ms 239672 KB Output is correct
267 Correct 2078 ms 239596 KB Output is correct
268 Correct 2658 ms 239388 KB Output is correct
269 Correct 2176 ms 283904 KB Output is correct
270 Correct 2234 ms 284024 KB Output is correct
271 Correct 2432 ms 193760 KB Output is correct
272 Correct 2012 ms 191096 KB Output is correct
273 Correct 2564 ms 197260 KB Output is correct
274 Correct 2033 ms 190980 KB Output is correct
275 Correct 2048 ms 239388 KB Output is correct