#ifdef Home
#define _GLIBCXX_DEBUG
#endif // Home
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const int N = 1<<18;
ll sum[N<<1], mn[N<<1];
void update(int pos, int val, int x, int lx, int rx) {
if(lx + 1 == rx) {
sum[x] += val;
mn[x] = sum[x];
return;
}
int m = (lx + rx) / 2;
pos < m ?
update(pos, val, x * 2 + 1, lx, m) :
update(pos, val, x * 2 + 2, m, rx) ;
sum[x] = sum[x * 2 + 1] + sum[x * 2 + 2];
mn[x] = min(mn[x * 2 + 1], sum[x * 2 + 1] + mn[x * 2 + 2]);
}
pair < ll, ll > get(int pos, int x, int lx, int rx) {
if(pos < lx) {
return {0, 0};
}
if(rx <= pos + 1) {
return {mn[x], sum[x]};
}
int m = (lx + rx) / 2;
pair < ll, ll > L = get(pos, x * 2 + 1, lx, m);
pair < ll, ll > R = get(pos, x * 2 + 2, m, rx);
return {min(L.first, R.first + L.second), L.second + R.second};
}
ll get(int pos) {
pair < ll, ll > X = get(pos, 0, 0, N);
return X.second + (X.first < 0 ? -X.first : 0ll);
}
ll tree[N];
void update(int x, ll val) {
for(; x < N; tree[x] += val, x += -x&x);
}
ll Sum(int x) {
ll ans = 0;
for(; x; ans += tree[x], x ^= -x&x);
return ans;
}
int find(ll k) {
int l = 0, r = N, m;
for(; l + 1 < r;) {
m = (l + r) / 2;
(Sum(m) < k ? l : r) = m;
}
return r;
}
int Query[N];
queue < pair < int, int > > Time[N];
queue < pair < int, ll > > Service[N];
main() {
#ifdef Home
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif // Home
ios_base::sync_with_stdio(0);
cin.tie(0);
ll n, m, q, t, l, r, c, k;
cin >> n >> m >> q;
for(int i = 1; i <= q; ++ i) {
cin >> t;
Query[i] = 0;
if(t == 1) {
cin >> l >> r >> c >> k;
Query[i] = -c;
Time[l].push({i, k});
Time[r + 1].push({i, -k});
} else if(t == 2) {
cin >> l >> r >> k;
Time[l].push({i, -k});
Time[r + 1].push({i, k});
} else {
cin >> c >> k;
Service[c].push({i, k});
}
}
for(int i = 1; i <= n; ++ i) {
for(; !Time[i].empty(); Time[i].pop()) {
update(Time[i].front().first, Time[i].front().second, 0, 0, N);
if(Query[Time[i].front().first]) {
update(Time[i].front().first, Time[i].front().second);
}
}
for(; !Service[i].empty(); Service[i].pop()) {
ll ans = 0, cnt = get(Service[i].front().first);
if(cnt >= Service[i].front().second) {
cnt = Service[i].front().second + Sum(Service[i].front().first) - cnt;
ans = -Query[find(cnt)];
}
Query[Service[i].front().first] = ans + 1;
}
}
for(int i = 1; i <= q; ++ i) {
if(Query[i] > 0) {
cout << -- Query[i] << '\n';
}
}
}
Compilation message
foodcourt.cpp:73:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
73 | main() {
| ^~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
194 ms |
353424 KB |
Output is correct |
2 |
Correct |
179 ms |
353504 KB |
Output is correct |
3 |
Correct |
211 ms |
353468 KB |
Output is correct |
4 |
Correct |
173 ms |
353424 KB |
Output is correct |
5 |
Correct |
182 ms |
353484 KB |
Output is correct |
6 |
Correct |
183 ms |
353472 KB |
Output is correct |
7 |
Correct |
178 ms |
353424 KB |
Output is correct |
8 |
Correct |
175 ms |
353388 KB |
Output is correct |
9 |
Correct |
174 ms |
353392 KB |
Output is correct |
10 |
Correct |
193 ms |
353516 KB |
Output is correct |
11 |
Correct |
175 ms |
353420 KB |
Output is correct |
12 |
Correct |
180 ms |
353504 KB |
Output is correct |
13 |
Correct |
184 ms |
353492 KB |
Output is correct |
14 |
Correct |
182 ms |
353404 KB |
Output is correct |
15 |
Correct |
175 ms |
353436 KB |
Output is correct |
16 |
Correct |
214 ms |
353456 KB |
Output is correct |
17 |
Correct |
179 ms |
353476 KB |
Output is correct |
18 |
Correct |
173 ms |
353460 KB |
Output is correct |
19 |
Correct |
173 ms |
353468 KB |
Output is correct |
20 |
Correct |
191 ms |
353500 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
194 ms |
353424 KB |
Output is correct |
2 |
Correct |
179 ms |
353504 KB |
Output is correct |
3 |
Correct |
211 ms |
353468 KB |
Output is correct |
4 |
Correct |
173 ms |
353424 KB |
Output is correct |
5 |
Correct |
182 ms |
353484 KB |
Output is correct |
6 |
Correct |
183 ms |
353472 KB |
Output is correct |
7 |
Correct |
178 ms |
353424 KB |
Output is correct |
8 |
Correct |
175 ms |
353388 KB |
Output is correct |
9 |
Correct |
174 ms |
353392 KB |
Output is correct |
10 |
Correct |
193 ms |
353516 KB |
Output is correct |
11 |
Correct |
175 ms |
353420 KB |
Output is correct |
12 |
Correct |
180 ms |
353504 KB |
Output is correct |
13 |
Correct |
184 ms |
353492 KB |
Output is correct |
14 |
Correct |
182 ms |
353404 KB |
Output is correct |
15 |
Correct |
175 ms |
353436 KB |
Output is correct |
16 |
Correct |
214 ms |
353456 KB |
Output is correct |
17 |
Correct |
179 ms |
353476 KB |
Output is correct |
18 |
Correct |
173 ms |
353460 KB |
Output is correct |
19 |
Correct |
173 ms |
353468 KB |
Output is correct |
20 |
Correct |
191 ms |
353500 KB |
Output is correct |
21 |
Correct |
197 ms |
353508 KB |
Output is correct |
22 |
Correct |
204 ms |
353440 KB |
Output is correct |
23 |
Correct |
180 ms |
353412 KB |
Output is correct |
24 |
Correct |
182 ms |
353500 KB |
Output is correct |
25 |
Correct |
186 ms |
353508 KB |
Output is correct |
26 |
Correct |
174 ms |
353496 KB |
Output is correct |
27 |
Correct |
178 ms |
353496 KB |
Output is correct |
28 |
Correct |
178 ms |
353508 KB |
Output is correct |
29 |
Correct |
177 ms |
353484 KB |
Output is correct |
30 |
Correct |
182 ms |
353464 KB |
Output is correct |
31 |
Correct |
183 ms |
353488 KB |
Output is correct |
32 |
Correct |
173 ms |
353456 KB |
Output is correct |
33 |
Correct |
174 ms |
353412 KB |
Output is correct |
34 |
Correct |
185 ms |
353464 KB |
Output is correct |
35 |
Correct |
179 ms |
353504 KB |
Output is correct |
36 |
Correct |
174 ms |
353524 KB |
Output is correct |
37 |
Correct |
175 ms |
353376 KB |
Output is correct |
38 |
Correct |
209 ms |
353488 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
269 ms |
357324 KB |
Output is correct |
2 |
Correct |
232 ms |
357512 KB |
Output is correct |
3 |
Correct |
272 ms |
357372 KB |
Output is correct |
4 |
Correct |
230 ms |
357384 KB |
Output is correct |
5 |
Correct |
241 ms |
357428 KB |
Output is correct |
6 |
Correct |
228 ms |
357332 KB |
Output is correct |
7 |
Correct |
216 ms |
357760 KB |
Output is correct |
8 |
Correct |
217 ms |
357840 KB |
Output is correct |
9 |
Correct |
230 ms |
357280 KB |
Output is correct |
10 |
Correct |
232 ms |
357356 KB |
Output is correct |
11 |
Correct |
237 ms |
357404 KB |
Output is correct |
12 |
Correct |
230 ms |
357352 KB |
Output is correct |
13 |
Correct |
228 ms |
356796 KB |
Output is correct |
14 |
Correct |
231 ms |
357300 KB |
Output is correct |
15 |
Correct |
227 ms |
357420 KB |
Output is correct |
16 |
Correct |
230 ms |
357396 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
445 ms |
368860 KB |
Output is correct |
2 |
Correct |
365 ms |
365540 KB |
Output is correct |
3 |
Correct |
461 ms |
370148 KB |
Output is correct |
4 |
Correct |
409 ms |
365624 KB |
Output is correct |
5 |
Correct |
404 ms |
365876 KB |
Output is correct |
6 |
Correct |
470 ms |
370396 KB |
Output is correct |
7 |
Correct |
292 ms |
372428 KB |
Output is correct |
8 |
Correct |
302 ms |
372368 KB |
Output is correct |
9 |
Correct |
460 ms |
370380 KB |
Output is correct |
10 |
Correct |
464 ms |
370276 KB |
Output is correct |
11 |
Correct |
465 ms |
369348 KB |
Output is correct |
12 |
Correct |
476 ms |
370312 KB |
Output is correct |
13 |
Correct |
461 ms |
369416 KB |
Output is correct |
14 |
Correct |
527 ms |
370260 KB |
Output is correct |
15 |
Correct |
527 ms |
370208 KB |
Output is correct |
16 |
Correct |
499 ms |
370124 KB |
Output is correct |
17 |
Correct |
512 ms |
370264 KB |
Output is correct |
18 |
Correct |
502 ms |
369752 KB |
Output is correct |
19 |
Correct |
470 ms |
370268 KB |
Output is correct |
20 |
Correct |
532 ms |
369872 KB |
Output is correct |
21 |
Correct |
477 ms |
370224 KB |
Output is correct |
22 |
Correct |
493 ms |
370128 KB |
Output is correct |
23 |
Correct |
473 ms |
370212 KB |
Output is correct |
24 |
Correct |
472 ms |
370136 KB |
Output is correct |
25 |
Correct |
414 ms |
371260 KB |
Output is correct |
26 |
Correct |
419 ms |
371540 KB |
Output is correct |
27 |
Correct |
416 ms |
369888 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
194 ms |
353424 KB |
Output is correct |
2 |
Correct |
179 ms |
353504 KB |
Output is correct |
3 |
Correct |
211 ms |
353468 KB |
Output is correct |
4 |
Correct |
173 ms |
353424 KB |
Output is correct |
5 |
Correct |
182 ms |
353484 KB |
Output is correct |
6 |
Correct |
183 ms |
353472 KB |
Output is correct |
7 |
Correct |
178 ms |
353424 KB |
Output is correct |
8 |
Correct |
175 ms |
353388 KB |
Output is correct |
9 |
Correct |
174 ms |
353392 KB |
Output is correct |
10 |
Correct |
193 ms |
353516 KB |
Output is correct |
11 |
Correct |
175 ms |
353420 KB |
Output is correct |
12 |
Correct |
180 ms |
353504 KB |
Output is correct |
13 |
Correct |
184 ms |
353492 KB |
Output is correct |
14 |
Correct |
182 ms |
353404 KB |
Output is correct |
15 |
Correct |
175 ms |
353436 KB |
Output is correct |
16 |
Correct |
214 ms |
353456 KB |
Output is correct |
17 |
Correct |
179 ms |
353476 KB |
Output is correct |
18 |
Correct |
173 ms |
353460 KB |
Output is correct |
19 |
Correct |
173 ms |
353468 KB |
Output is correct |
20 |
Correct |
191 ms |
353500 KB |
Output is correct |
21 |
Correct |
269 ms |
357324 KB |
Output is correct |
22 |
Correct |
232 ms |
357512 KB |
Output is correct |
23 |
Correct |
272 ms |
357372 KB |
Output is correct |
24 |
Correct |
230 ms |
357384 KB |
Output is correct |
25 |
Correct |
241 ms |
357428 KB |
Output is correct |
26 |
Correct |
228 ms |
357332 KB |
Output is correct |
27 |
Correct |
216 ms |
357760 KB |
Output is correct |
28 |
Correct |
217 ms |
357840 KB |
Output is correct |
29 |
Correct |
230 ms |
357280 KB |
Output is correct |
30 |
Correct |
232 ms |
357356 KB |
Output is correct |
31 |
Correct |
237 ms |
357404 KB |
Output is correct |
32 |
Correct |
230 ms |
357352 KB |
Output is correct |
33 |
Correct |
228 ms |
356796 KB |
Output is correct |
34 |
Correct |
231 ms |
357300 KB |
Output is correct |
35 |
Correct |
227 ms |
357420 KB |
Output is correct |
36 |
Correct |
230 ms |
357396 KB |
Output is correct |
37 |
Correct |
222 ms |
356888 KB |
Output is correct |
38 |
Correct |
229 ms |
356556 KB |
Output is correct |
39 |
Correct |
212 ms |
357064 KB |
Output is correct |
40 |
Correct |
214 ms |
357580 KB |
Output is correct |
41 |
Correct |
247 ms |
357048 KB |
Output is correct |
42 |
Correct |
236 ms |
357312 KB |
Output is correct |
43 |
Correct |
243 ms |
357256 KB |
Output is correct |
44 |
Correct |
232 ms |
357148 KB |
Output is correct |
45 |
Correct |
240 ms |
357216 KB |
Output is correct |
46 |
Correct |
231 ms |
357268 KB |
Output is correct |
47 |
Correct |
229 ms |
357804 KB |
Output is correct |
48 |
Correct |
239 ms |
357548 KB |
Output is correct |
49 |
Correct |
211 ms |
356084 KB |
Output is correct |
50 |
Correct |
222 ms |
356712 KB |
Output is correct |
51 |
Correct |
236 ms |
357252 KB |
Output is correct |
52 |
Correct |
246 ms |
357196 KB |
Output is correct |
53 |
Correct |
220 ms |
356572 KB |
Output is correct |
54 |
Correct |
235 ms |
357452 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
230 ms |
357440 KB |
Output is correct |
2 |
Correct |
233 ms |
357828 KB |
Output is correct |
3 |
Correct |
233 ms |
357836 KB |
Output is correct |
4 |
Correct |
266 ms |
356584 KB |
Output is correct |
5 |
Correct |
227 ms |
357276 KB |
Output is correct |
6 |
Correct |
236 ms |
357892 KB |
Output is correct |
7 |
Correct |
225 ms |
358132 KB |
Output is correct |
8 |
Correct |
219 ms |
357688 KB |
Output is correct |
9 |
Correct |
244 ms |
358408 KB |
Output is correct |
10 |
Correct |
212 ms |
356472 KB |
Output is correct |
11 |
Correct |
224 ms |
357824 KB |
Output is correct |
12 |
Correct |
224 ms |
357940 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
194 ms |
353424 KB |
Output is correct |
2 |
Correct |
179 ms |
353504 KB |
Output is correct |
3 |
Correct |
211 ms |
353468 KB |
Output is correct |
4 |
Correct |
173 ms |
353424 KB |
Output is correct |
5 |
Correct |
182 ms |
353484 KB |
Output is correct |
6 |
Correct |
183 ms |
353472 KB |
Output is correct |
7 |
Correct |
178 ms |
353424 KB |
Output is correct |
8 |
Correct |
175 ms |
353388 KB |
Output is correct |
9 |
Correct |
174 ms |
353392 KB |
Output is correct |
10 |
Correct |
193 ms |
353516 KB |
Output is correct |
11 |
Correct |
175 ms |
353420 KB |
Output is correct |
12 |
Correct |
180 ms |
353504 KB |
Output is correct |
13 |
Correct |
184 ms |
353492 KB |
Output is correct |
14 |
Correct |
182 ms |
353404 KB |
Output is correct |
15 |
Correct |
175 ms |
353436 KB |
Output is correct |
16 |
Correct |
214 ms |
353456 KB |
Output is correct |
17 |
Correct |
179 ms |
353476 KB |
Output is correct |
18 |
Correct |
173 ms |
353460 KB |
Output is correct |
19 |
Correct |
173 ms |
353468 KB |
Output is correct |
20 |
Correct |
191 ms |
353500 KB |
Output is correct |
21 |
Correct |
197 ms |
353508 KB |
Output is correct |
22 |
Correct |
204 ms |
353440 KB |
Output is correct |
23 |
Correct |
180 ms |
353412 KB |
Output is correct |
24 |
Correct |
182 ms |
353500 KB |
Output is correct |
25 |
Correct |
186 ms |
353508 KB |
Output is correct |
26 |
Correct |
174 ms |
353496 KB |
Output is correct |
27 |
Correct |
178 ms |
353496 KB |
Output is correct |
28 |
Correct |
178 ms |
353508 KB |
Output is correct |
29 |
Correct |
177 ms |
353484 KB |
Output is correct |
30 |
Correct |
182 ms |
353464 KB |
Output is correct |
31 |
Correct |
183 ms |
353488 KB |
Output is correct |
32 |
Correct |
173 ms |
353456 KB |
Output is correct |
33 |
Correct |
174 ms |
353412 KB |
Output is correct |
34 |
Correct |
185 ms |
353464 KB |
Output is correct |
35 |
Correct |
179 ms |
353504 KB |
Output is correct |
36 |
Correct |
174 ms |
353524 KB |
Output is correct |
37 |
Correct |
175 ms |
353376 KB |
Output is correct |
38 |
Correct |
209 ms |
353488 KB |
Output is correct |
39 |
Correct |
269 ms |
357324 KB |
Output is correct |
40 |
Correct |
232 ms |
357512 KB |
Output is correct |
41 |
Correct |
272 ms |
357372 KB |
Output is correct |
42 |
Correct |
230 ms |
357384 KB |
Output is correct |
43 |
Correct |
241 ms |
357428 KB |
Output is correct |
44 |
Correct |
228 ms |
357332 KB |
Output is correct |
45 |
Correct |
216 ms |
357760 KB |
Output is correct |
46 |
Correct |
217 ms |
357840 KB |
Output is correct |
47 |
Correct |
230 ms |
357280 KB |
Output is correct |
48 |
Correct |
232 ms |
357356 KB |
Output is correct |
49 |
Correct |
237 ms |
357404 KB |
Output is correct |
50 |
Correct |
230 ms |
357352 KB |
Output is correct |
51 |
Correct |
228 ms |
356796 KB |
Output is correct |
52 |
Correct |
231 ms |
357300 KB |
Output is correct |
53 |
Correct |
227 ms |
357420 KB |
Output is correct |
54 |
Correct |
230 ms |
357396 KB |
Output is correct |
55 |
Correct |
222 ms |
356888 KB |
Output is correct |
56 |
Correct |
229 ms |
356556 KB |
Output is correct |
57 |
Correct |
212 ms |
357064 KB |
Output is correct |
58 |
Correct |
214 ms |
357580 KB |
Output is correct |
59 |
Correct |
247 ms |
357048 KB |
Output is correct |
60 |
Correct |
236 ms |
357312 KB |
Output is correct |
61 |
Correct |
243 ms |
357256 KB |
Output is correct |
62 |
Correct |
232 ms |
357148 KB |
Output is correct |
63 |
Correct |
240 ms |
357216 KB |
Output is correct |
64 |
Correct |
231 ms |
357268 KB |
Output is correct |
65 |
Correct |
229 ms |
357804 KB |
Output is correct |
66 |
Correct |
239 ms |
357548 KB |
Output is correct |
67 |
Correct |
211 ms |
356084 KB |
Output is correct |
68 |
Correct |
222 ms |
356712 KB |
Output is correct |
69 |
Correct |
236 ms |
357252 KB |
Output is correct |
70 |
Correct |
246 ms |
357196 KB |
Output is correct |
71 |
Correct |
220 ms |
356572 KB |
Output is correct |
72 |
Correct |
235 ms |
357452 KB |
Output is correct |
73 |
Correct |
230 ms |
357440 KB |
Output is correct |
74 |
Correct |
233 ms |
357828 KB |
Output is correct |
75 |
Correct |
233 ms |
357836 KB |
Output is correct |
76 |
Correct |
266 ms |
356584 KB |
Output is correct |
77 |
Correct |
227 ms |
357276 KB |
Output is correct |
78 |
Correct |
236 ms |
357892 KB |
Output is correct |
79 |
Correct |
225 ms |
358132 KB |
Output is correct |
80 |
Correct |
219 ms |
357688 KB |
Output is correct |
81 |
Correct |
244 ms |
358408 KB |
Output is correct |
82 |
Correct |
212 ms |
356472 KB |
Output is correct |
83 |
Correct |
224 ms |
357824 KB |
Output is correct |
84 |
Correct |
224 ms |
357940 KB |
Output is correct |
85 |
Correct |
229 ms |
357300 KB |
Output is correct |
86 |
Correct |
239 ms |
357736 KB |
Output is correct |
87 |
Correct |
231 ms |
357284 KB |
Output is correct |
88 |
Correct |
236 ms |
357852 KB |
Output is correct |
89 |
Correct |
212 ms |
356120 KB |
Output is correct |
90 |
Correct |
232 ms |
357852 KB |
Output is correct |
91 |
Correct |
227 ms |
356960 KB |
Output is correct |
92 |
Correct |
223 ms |
356840 KB |
Output is correct |
93 |
Correct |
239 ms |
357812 KB |
Output is correct |
94 |
Correct |
243 ms |
357748 KB |
Output is correct |
95 |
Correct |
247 ms |
357736 KB |
Output is correct |
96 |
Correct |
233 ms |
357800 KB |
Output is correct |
97 |
Correct |
235 ms |
357712 KB |
Output is correct |
98 |
Correct |
227 ms |
357160 KB |
Output is correct |
99 |
Correct |
228 ms |
358328 KB |
Output is correct |
100 |
Correct |
241 ms |
357188 KB |
Output is correct |
101 |
Correct |
246 ms |
358100 KB |
Output is correct |
102 |
Correct |
227 ms |
357772 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
194 ms |
353424 KB |
Output is correct |
2 |
Correct |
179 ms |
353504 KB |
Output is correct |
3 |
Correct |
211 ms |
353468 KB |
Output is correct |
4 |
Correct |
173 ms |
353424 KB |
Output is correct |
5 |
Correct |
182 ms |
353484 KB |
Output is correct |
6 |
Correct |
183 ms |
353472 KB |
Output is correct |
7 |
Correct |
178 ms |
353424 KB |
Output is correct |
8 |
Correct |
175 ms |
353388 KB |
Output is correct |
9 |
Correct |
174 ms |
353392 KB |
Output is correct |
10 |
Correct |
193 ms |
353516 KB |
Output is correct |
11 |
Correct |
175 ms |
353420 KB |
Output is correct |
12 |
Correct |
180 ms |
353504 KB |
Output is correct |
13 |
Correct |
184 ms |
353492 KB |
Output is correct |
14 |
Correct |
182 ms |
353404 KB |
Output is correct |
15 |
Correct |
175 ms |
353436 KB |
Output is correct |
16 |
Correct |
214 ms |
353456 KB |
Output is correct |
17 |
Correct |
179 ms |
353476 KB |
Output is correct |
18 |
Correct |
173 ms |
353460 KB |
Output is correct |
19 |
Correct |
173 ms |
353468 KB |
Output is correct |
20 |
Correct |
191 ms |
353500 KB |
Output is correct |
21 |
Correct |
197 ms |
353508 KB |
Output is correct |
22 |
Correct |
204 ms |
353440 KB |
Output is correct |
23 |
Correct |
180 ms |
353412 KB |
Output is correct |
24 |
Correct |
182 ms |
353500 KB |
Output is correct |
25 |
Correct |
186 ms |
353508 KB |
Output is correct |
26 |
Correct |
174 ms |
353496 KB |
Output is correct |
27 |
Correct |
178 ms |
353496 KB |
Output is correct |
28 |
Correct |
178 ms |
353508 KB |
Output is correct |
29 |
Correct |
177 ms |
353484 KB |
Output is correct |
30 |
Correct |
182 ms |
353464 KB |
Output is correct |
31 |
Correct |
183 ms |
353488 KB |
Output is correct |
32 |
Correct |
173 ms |
353456 KB |
Output is correct |
33 |
Correct |
174 ms |
353412 KB |
Output is correct |
34 |
Correct |
185 ms |
353464 KB |
Output is correct |
35 |
Correct |
179 ms |
353504 KB |
Output is correct |
36 |
Correct |
174 ms |
353524 KB |
Output is correct |
37 |
Correct |
175 ms |
353376 KB |
Output is correct |
38 |
Correct |
209 ms |
353488 KB |
Output is correct |
39 |
Correct |
269 ms |
357324 KB |
Output is correct |
40 |
Correct |
232 ms |
357512 KB |
Output is correct |
41 |
Correct |
272 ms |
357372 KB |
Output is correct |
42 |
Correct |
230 ms |
357384 KB |
Output is correct |
43 |
Correct |
241 ms |
357428 KB |
Output is correct |
44 |
Correct |
228 ms |
357332 KB |
Output is correct |
45 |
Correct |
216 ms |
357760 KB |
Output is correct |
46 |
Correct |
217 ms |
357840 KB |
Output is correct |
47 |
Correct |
230 ms |
357280 KB |
Output is correct |
48 |
Correct |
232 ms |
357356 KB |
Output is correct |
49 |
Correct |
237 ms |
357404 KB |
Output is correct |
50 |
Correct |
230 ms |
357352 KB |
Output is correct |
51 |
Correct |
228 ms |
356796 KB |
Output is correct |
52 |
Correct |
231 ms |
357300 KB |
Output is correct |
53 |
Correct |
227 ms |
357420 KB |
Output is correct |
54 |
Correct |
230 ms |
357396 KB |
Output is correct |
55 |
Correct |
445 ms |
368860 KB |
Output is correct |
56 |
Correct |
365 ms |
365540 KB |
Output is correct |
57 |
Correct |
461 ms |
370148 KB |
Output is correct |
58 |
Correct |
409 ms |
365624 KB |
Output is correct |
59 |
Correct |
404 ms |
365876 KB |
Output is correct |
60 |
Correct |
470 ms |
370396 KB |
Output is correct |
61 |
Correct |
292 ms |
372428 KB |
Output is correct |
62 |
Correct |
302 ms |
372368 KB |
Output is correct |
63 |
Correct |
460 ms |
370380 KB |
Output is correct |
64 |
Correct |
464 ms |
370276 KB |
Output is correct |
65 |
Correct |
465 ms |
369348 KB |
Output is correct |
66 |
Correct |
476 ms |
370312 KB |
Output is correct |
67 |
Correct |
461 ms |
369416 KB |
Output is correct |
68 |
Correct |
527 ms |
370260 KB |
Output is correct |
69 |
Correct |
527 ms |
370208 KB |
Output is correct |
70 |
Correct |
499 ms |
370124 KB |
Output is correct |
71 |
Correct |
512 ms |
370264 KB |
Output is correct |
72 |
Correct |
502 ms |
369752 KB |
Output is correct |
73 |
Correct |
470 ms |
370268 KB |
Output is correct |
74 |
Correct |
532 ms |
369872 KB |
Output is correct |
75 |
Correct |
477 ms |
370224 KB |
Output is correct |
76 |
Correct |
493 ms |
370128 KB |
Output is correct |
77 |
Correct |
473 ms |
370212 KB |
Output is correct |
78 |
Correct |
472 ms |
370136 KB |
Output is correct |
79 |
Correct |
414 ms |
371260 KB |
Output is correct |
80 |
Correct |
419 ms |
371540 KB |
Output is correct |
81 |
Correct |
416 ms |
369888 KB |
Output is correct |
82 |
Correct |
222 ms |
356888 KB |
Output is correct |
83 |
Correct |
229 ms |
356556 KB |
Output is correct |
84 |
Correct |
212 ms |
357064 KB |
Output is correct |
85 |
Correct |
214 ms |
357580 KB |
Output is correct |
86 |
Correct |
247 ms |
357048 KB |
Output is correct |
87 |
Correct |
236 ms |
357312 KB |
Output is correct |
88 |
Correct |
243 ms |
357256 KB |
Output is correct |
89 |
Correct |
232 ms |
357148 KB |
Output is correct |
90 |
Correct |
240 ms |
357216 KB |
Output is correct |
91 |
Correct |
231 ms |
357268 KB |
Output is correct |
92 |
Correct |
229 ms |
357804 KB |
Output is correct |
93 |
Correct |
239 ms |
357548 KB |
Output is correct |
94 |
Correct |
211 ms |
356084 KB |
Output is correct |
95 |
Correct |
222 ms |
356712 KB |
Output is correct |
96 |
Correct |
236 ms |
357252 KB |
Output is correct |
97 |
Correct |
246 ms |
357196 KB |
Output is correct |
98 |
Correct |
220 ms |
356572 KB |
Output is correct |
99 |
Correct |
235 ms |
357452 KB |
Output is correct |
100 |
Correct |
230 ms |
357440 KB |
Output is correct |
101 |
Correct |
233 ms |
357828 KB |
Output is correct |
102 |
Correct |
233 ms |
357836 KB |
Output is correct |
103 |
Correct |
266 ms |
356584 KB |
Output is correct |
104 |
Correct |
227 ms |
357276 KB |
Output is correct |
105 |
Correct |
236 ms |
357892 KB |
Output is correct |
106 |
Correct |
225 ms |
358132 KB |
Output is correct |
107 |
Correct |
219 ms |
357688 KB |
Output is correct |
108 |
Correct |
244 ms |
358408 KB |
Output is correct |
109 |
Correct |
212 ms |
356472 KB |
Output is correct |
110 |
Correct |
224 ms |
357824 KB |
Output is correct |
111 |
Correct |
224 ms |
357940 KB |
Output is correct |
112 |
Correct |
229 ms |
357300 KB |
Output is correct |
113 |
Correct |
239 ms |
357736 KB |
Output is correct |
114 |
Correct |
231 ms |
357284 KB |
Output is correct |
115 |
Correct |
236 ms |
357852 KB |
Output is correct |
116 |
Correct |
212 ms |
356120 KB |
Output is correct |
117 |
Correct |
232 ms |
357852 KB |
Output is correct |
118 |
Correct |
227 ms |
356960 KB |
Output is correct |
119 |
Correct |
223 ms |
356840 KB |
Output is correct |
120 |
Correct |
239 ms |
357812 KB |
Output is correct |
121 |
Correct |
243 ms |
357748 KB |
Output is correct |
122 |
Correct |
247 ms |
357736 KB |
Output is correct |
123 |
Correct |
233 ms |
357800 KB |
Output is correct |
124 |
Correct |
235 ms |
357712 KB |
Output is correct |
125 |
Correct |
227 ms |
357160 KB |
Output is correct |
126 |
Correct |
228 ms |
358328 KB |
Output is correct |
127 |
Correct |
241 ms |
357188 KB |
Output is correct |
128 |
Correct |
246 ms |
358100 KB |
Output is correct |
129 |
Correct |
227 ms |
357772 KB |
Output is correct |
130 |
Correct |
467 ms |
370732 KB |
Output is correct |
131 |
Correct |
374 ms |
365952 KB |
Output is correct |
132 |
Correct |
457 ms |
370700 KB |
Output is correct |
133 |
Correct |
458 ms |
370276 KB |
Output is correct |
134 |
Correct |
412 ms |
368332 KB |
Output is correct |
135 |
Correct |
467 ms |
371128 KB |
Output is correct |
136 |
Correct |
467 ms |
371276 KB |
Output is correct |
137 |
Correct |
455 ms |
371308 KB |
Output is correct |
138 |
Correct |
462 ms |
369900 KB |
Output is correct |
139 |
Correct |
455 ms |
370860 KB |
Output is correct |
140 |
Correct |
462 ms |
370280 KB |
Output is correct |
141 |
Correct |
467 ms |
370784 KB |
Output is correct |
142 |
Correct |
467 ms |
370800 KB |
Output is correct |
143 |
Correct |
470 ms |
370764 KB |
Output is correct |
144 |
Correct |
466 ms |
370324 KB |
Output is correct |
145 |
Correct |
472 ms |
370764 KB |
Output is correct |
146 |
Correct |
469 ms |
370540 KB |
Output is correct |
147 |
Correct |
468 ms |
370696 KB |
Output is correct |
148 |
Correct |
475 ms |
370740 KB |
Output is correct |
149 |
Correct |
458 ms |
370740 KB |
Output is correct |
150 |
Correct |
357 ms |
372748 KB |
Output is correct |
151 |
Correct |
418 ms |
372128 KB |
Output is correct |
152 |
Correct |
419 ms |
372232 KB |
Output is correct |
153 |
Correct |
414 ms |
370720 KB |
Output is correct |