/*
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimize("unroll-loops")
*/
#include <bits/stdc++.h>
#define int long long
using namespace std;
#define all(x) x.begin(), x.end()
#define len(x) ll(x.size())
#define eb emplace_back
#define PI acos(-1.0)
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define MIN(v) *min_element(all(v))
#define MAX(v) *max_element(all(v))
#define BIT(x, i) (1 & ((x) >> (i)))
#define MASK(x) (1LL << (x))
#define task "tnc"
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
typedef long long ll;
typedef long double ld;
const ll INF = 1e18;
const int maxn = 1e6 + 5;
const int mod = 1e9 + 7;
const int mo = 998244353;
using pi = pair<ll, ll>;
using vi = vector<ll>;
using pii = pair<pair<ll, ll>, ll>;
mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());
int n, m, q;
vector<pair<int, int>> d[maxn];
int pref[maxn];
vector<pair<int, int>> G[maxn];
struct seg
{
pair<int, int> st[maxn * 4];
int lazy[maxn * 4];
int st1[maxn * 4];
void push(int id)
{
st[id * 2].fi += lazy[id];
st[id * 2 + 1].fi += lazy[id];
lazy[id * 2] += lazy[id];
lazy[id * 2 + 1] += lazy[id];
lazy[id] = 0;
}
void build(int id, int l, int r)
{
st1[id] = 0;
if (l == r)
{
st[id].se = l;
return;
}
int mid = (l + r) / 2;
build(id * 2, l, mid);
build(id * 2 + 1, mid + 1, r);
st[id] = min(st[id * 2], st[id * 2 + 1]);
}
void update(int id, int l, int r, int u, int v, int val)
{
if (r < u || v < l)
{
return;
}
if (u <= l && r <= v)
{
st[id].fi += val;
lazy[id] += val;
return;
}
int mid = (l + r) / 2;
push(id);
update(id * 2, l, mid, u, v, val);
update(id * 2 + 1, mid + 1, r, u, v, val);
st[id] = min(st[id * 2], st[id * 2 + 1]);
}
pair<int, int> get(int id, int l, int r, int u, int v)
{
if (r < u || v < l)
{
return {INF, 0};
}
if (u <= l && r <= v)
{
return st[id];
}
int mid = (l + r) / 2;
push(id);
return min(get(id * 2, l, mid, u, v), get(id * 2 + 1, mid + 1, r, u, v));
}
void push1(int id)
{
st1[id * 2] += lazy[id];
st1[id * 2 + 1] += lazy[id];
lazy[id * 2] += lazy[id];
lazy[id * 2 + 1] += lazy[id];
lazy[id] = 0;
}
void upd(int id, int l, int r, int u, int v, int val)
{
if (r < u || v < l)
{
return;
}
if (u <= l && r <= v)
{
st1[id] += val;
lazy[id] += val;
return;
}
int mid = (l + r) / 2;
push1(id);
upd(id * 2, l, mid, u, v, val);
upd(id * 2 + 1, mid + 1, r, u, v, val);
st1[id] = max(st1[id * 2], st1[id * 2 + 1]);
}
int getval(int id, int l, int r, int u)
{
if (l == r)
{
return st1[id];
}
int mid = (l + r) / 2;
push1(id);
if (u <= mid)
{
return getval(id * 2, l, mid, u);
}
else
return getval(id * 2 + 1, mid + 1, r, u);
}
int get1(int id, int l, int r, int u, int val, int p)
{
if (r < u || val > st1[id] - p)
{
return -1;
}
int mid = (l + r) / 2;
if (l == r)
{
return l;
}
push1(id);
int x = get1(id * 2, l, mid, u, val, p);
if (x != -1)
{
return x;
}
return get1(id * 2 + 1, mid + 1, r, u, val, p);
}
} A, B;
int bit[maxn];
void upd(int id, int val)
{
for (id; id <= q; id += id & (-id))
{
bit[id] += val;
}
}
int get(int id)
{
int res = 0;
for (id; id >= 1; id -= id & (-id))
{
res += bit[id];
}
return res;
}
vector<pair<int, int>> era[maxn];
int pref1[maxn];
int que[maxn];
int ans[maxn];
signed main()
{
cin.tie(0), cout.tie(0)->sync_with_stdio(0);
cin >> n >> m >> q;
for (int i = 1; i <= q; i++)
{
int t;
cin >> t;
if (t == 1)
{
int l, r, c, k;
cin >> l >> r >> c >> k;
que[i] = c;
d[l].pb({i, k});
d[r + 1].pb({i, -k});
}
else if (t == 2)
{
int l, r, k;
cin >> l >> r >> k;
era[l].pb({i, k});
era[r + 1].pb({i, -k});
}
else if (t == 3)
{
int a, b;
cin >> a >> b;
G[a].pb({i, b});
}
ans[i] = -1;
}
A.build(1, 0, q);
B.build(1, 0, q);
for (int i = 1; i <= n; i++)
{
for (auto v : d[i])
{
A.update(1, 0, q, v.fi, q, v.se);
B.upd(1, 0, q, v.fi, q, v.se);
}
for (auto v : era[i])
{
A.update(1, 0, q, v.fi, q, -v.se);
upd(v.fi, v.se);
}
for (auto v : G[i])
{
pair<int, int> s = A.get(1, 0, q, 0, v.fi);
int k = B.getval(1, 0, q, s.se);
int num_era = get(v.fi) - get(s.se);
int d = B.get1(1, 0, q, s.se, num_era + v.se, k);
if (d >= v.fi)
{
ans[v.fi] = 0;
}
else
{
ans[v.fi] = que[d];
}
}
}
for (int i = 1; i <= q; i++)
{
if (ans[i] == -1)
continue;
cout << ans[i] << "\n";
}
}
Compilation message
foodcourt.cpp: In function 'void upd(long long int, long long int)':
foodcourt.cpp:162:10: warning: statement has no effect [-Wunused-value]
162 | for (id; id <= q; id += id & (-id))
| ^~
foodcourt.cpp: In function 'long long int get(long long int)':
foodcourt.cpp:170:10: warning: statement has no effect [-Wunused-value]
170 | for (id; id >= 1; id -= id & (-id))
| ^~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
68 ms |
196296 KB |
Output is correct |
2 |
Correct |
70 ms |
196304 KB |
Output is correct |
3 |
Correct |
77 ms |
196208 KB |
Output is correct |
4 |
Correct |
70 ms |
196320 KB |
Output is correct |
5 |
Correct |
67 ms |
196336 KB |
Output is correct |
6 |
Correct |
70 ms |
196344 KB |
Output is correct |
7 |
Correct |
68 ms |
196372 KB |
Output is correct |
8 |
Correct |
67 ms |
196348 KB |
Output is correct |
9 |
Correct |
68 ms |
196368 KB |
Output is correct |
10 |
Correct |
68 ms |
196360 KB |
Output is correct |
11 |
Correct |
67 ms |
196360 KB |
Output is correct |
12 |
Correct |
67 ms |
196264 KB |
Output is correct |
13 |
Correct |
67 ms |
196320 KB |
Output is correct |
14 |
Correct |
71 ms |
196380 KB |
Output is correct |
15 |
Correct |
69 ms |
196320 KB |
Output is correct |
16 |
Correct |
69 ms |
196308 KB |
Output is correct |
17 |
Correct |
68 ms |
196344 KB |
Output is correct |
18 |
Correct |
68 ms |
196272 KB |
Output is correct |
19 |
Correct |
70 ms |
196256 KB |
Output is correct |
20 |
Correct |
68 ms |
196324 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
68 ms |
196296 KB |
Output is correct |
2 |
Correct |
70 ms |
196304 KB |
Output is correct |
3 |
Correct |
77 ms |
196208 KB |
Output is correct |
4 |
Correct |
70 ms |
196320 KB |
Output is correct |
5 |
Correct |
67 ms |
196336 KB |
Output is correct |
6 |
Correct |
70 ms |
196344 KB |
Output is correct |
7 |
Correct |
68 ms |
196372 KB |
Output is correct |
8 |
Correct |
67 ms |
196348 KB |
Output is correct |
9 |
Correct |
68 ms |
196368 KB |
Output is correct |
10 |
Correct |
68 ms |
196360 KB |
Output is correct |
11 |
Correct |
67 ms |
196360 KB |
Output is correct |
12 |
Correct |
67 ms |
196264 KB |
Output is correct |
13 |
Correct |
67 ms |
196320 KB |
Output is correct |
14 |
Correct |
71 ms |
196380 KB |
Output is correct |
15 |
Correct |
69 ms |
196320 KB |
Output is correct |
16 |
Correct |
69 ms |
196308 KB |
Output is correct |
17 |
Correct |
68 ms |
196344 KB |
Output is correct |
18 |
Correct |
68 ms |
196272 KB |
Output is correct |
19 |
Correct |
70 ms |
196256 KB |
Output is correct |
20 |
Correct |
68 ms |
196324 KB |
Output is correct |
21 |
Correct |
68 ms |
196308 KB |
Output is correct |
22 |
Correct |
68 ms |
196284 KB |
Output is correct |
23 |
Correct |
68 ms |
196328 KB |
Output is correct |
24 |
Correct |
67 ms |
196300 KB |
Output is correct |
25 |
Correct |
68 ms |
196356 KB |
Output is correct |
26 |
Correct |
69 ms |
196260 KB |
Output is correct |
27 |
Correct |
68 ms |
196300 KB |
Output is correct |
28 |
Correct |
69 ms |
196316 KB |
Output is correct |
29 |
Correct |
68 ms |
196304 KB |
Output is correct |
30 |
Correct |
69 ms |
196364 KB |
Output is correct |
31 |
Correct |
69 ms |
196360 KB |
Output is correct |
32 |
Correct |
68 ms |
196332 KB |
Output is correct |
33 |
Correct |
69 ms |
196388 KB |
Output is correct |
34 |
Correct |
68 ms |
196300 KB |
Output is correct |
35 |
Correct |
68 ms |
196296 KB |
Output is correct |
36 |
Correct |
70 ms |
196328 KB |
Output is correct |
37 |
Correct |
69 ms |
196324 KB |
Output is correct |
38 |
Correct |
70 ms |
196268 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
134 ms |
205952 KB |
Output is correct |
2 |
Correct |
145 ms |
206096 KB |
Output is correct |
3 |
Correct |
133 ms |
205940 KB |
Output is correct |
4 |
Correct |
139 ms |
205928 KB |
Output is correct |
5 |
Correct |
135 ms |
206084 KB |
Output is correct |
6 |
Correct |
136 ms |
206048 KB |
Output is correct |
7 |
Correct |
98 ms |
204128 KB |
Output is correct |
8 |
Correct |
115 ms |
204284 KB |
Output is correct |
9 |
Correct |
138 ms |
205668 KB |
Output is correct |
10 |
Correct |
140 ms |
206100 KB |
Output is correct |
11 |
Correct |
135 ms |
205976 KB |
Output is correct |
12 |
Correct |
148 ms |
206176 KB |
Output is correct |
13 |
Correct |
126 ms |
205080 KB |
Output is correct |
14 |
Correct |
200 ms |
205780 KB |
Output is correct |
15 |
Correct |
143 ms |
205984 KB |
Output is correct |
16 |
Correct |
162 ms |
206136 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
440 ms |
234028 KB |
Output is correct |
2 |
Correct |
398 ms |
229704 KB |
Output is correct |
3 |
Correct |
492 ms |
236088 KB |
Output is correct |
4 |
Correct |
406 ms |
230052 KB |
Output is correct |
5 |
Correct |
379 ms |
230272 KB |
Output is correct |
6 |
Correct |
526 ms |
236720 KB |
Output is correct |
7 |
Correct |
217 ms |
229320 KB |
Output is correct |
8 |
Correct |
236 ms |
229540 KB |
Output is correct |
9 |
Correct |
511 ms |
234880 KB |
Output is correct |
10 |
Correct |
503 ms |
234996 KB |
Output is correct |
11 |
Correct |
470 ms |
232792 KB |
Output is correct |
12 |
Correct |
544 ms |
236632 KB |
Output is correct |
13 |
Correct |
498 ms |
233104 KB |
Output is correct |
14 |
Correct |
564 ms |
236620 KB |
Output is correct |
15 |
Correct |
530 ms |
236544 KB |
Output is correct |
16 |
Correct |
504 ms |
236424 KB |
Output is correct |
17 |
Correct |
506 ms |
236420 KB |
Output is correct |
18 |
Correct |
486 ms |
234732 KB |
Output is correct |
19 |
Correct |
518 ms |
236604 KB |
Output is correct |
20 |
Correct |
500 ms |
235144 KB |
Output is correct |
21 |
Correct |
517 ms |
236572 KB |
Output is correct |
22 |
Correct |
587 ms |
236552 KB |
Output is correct |
23 |
Correct |
529 ms |
236564 KB |
Output is correct |
24 |
Correct |
519 ms |
236492 KB |
Output is correct |
25 |
Correct |
424 ms |
235096 KB |
Output is correct |
26 |
Correct |
435 ms |
235660 KB |
Output is correct |
27 |
Correct |
444 ms |
235468 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
68 ms |
196296 KB |
Output is correct |
2 |
Correct |
70 ms |
196304 KB |
Output is correct |
3 |
Correct |
77 ms |
196208 KB |
Output is correct |
4 |
Correct |
70 ms |
196320 KB |
Output is correct |
5 |
Correct |
67 ms |
196336 KB |
Output is correct |
6 |
Correct |
70 ms |
196344 KB |
Output is correct |
7 |
Correct |
68 ms |
196372 KB |
Output is correct |
8 |
Correct |
67 ms |
196348 KB |
Output is correct |
9 |
Correct |
68 ms |
196368 KB |
Output is correct |
10 |
Correct |
68 ms |
196360 KB |
Output is correct |
11 |
Correct |
67 ms |
196360 KB |
Output is correct |
12 |
Correct |
67 ms |
196264 KB |
Output is correct |
13 |
Correct |
67 ms |
196320 KB |
Output is correct |
14 |
Correct |
71 ms |
196380 KB |
Output is correct |
15 |
Correct |
69 ms |
196320 KB |
Output is correct |
16 |
Correct |
69 ms |
196308 KB |
Output is correct |
17 |
Correct |
68 ms |
196344 KB |
Output is correct |
18 |
Correct |
68 ms |
196272 KB |
Output is correct |
19 |
Correct |
70 ms |
196256 KB |
Output is correct |
20 |
Correct |
68 ms |
196324 KB |
Output is correct |
21 |
Correct |
134 ms |
205952 KB |
Output is correct |
22 |
Correct |
145 ms |
206096 KB |
Output is correct |
23 |
Correct |
133 ms |
205940 KB |
Output is correct |
24 |
Correct |
139 ms |
205928 KB |
Output is correct |
25 |
Correct |
135 ms |
206084 KB |
Output is correct |
26 |
Correct |
136 ms |
206048 KB |
Output is correct |
27 |
Correct |
98 ms |
204128 KB |
Output is correct |
28 |
Correct |
115 ms |
204284 KB |
Output is correct |
29 |
Correct |
138 ms |
205668 KB |
Output is correct |
30 |
Correct |
140 ms |
206100 KB |
Output is correct |
31 |
Correct |
135 ms |
205976 KB |
Output is correct |
32 |
Correct |
148 ms |
206176 KB |
Output is correct |
33 |
Correct |
126 ms |
205080 KB |
Output is correct |
34 |
Correct |
200 ms |
205780 KB |
Output is correct |
35 |
Correct |
143 ms |
205984 KB |
Output is correct |
36 |
Correct |
162 ms |
206136 KB |
Output is correct |
37 |
Correct |
138 ms |
205180 KB |
Output is correct |
38 |
Correct |
153 ms |
204812 KB |
Output is correct |
39 |
Correct |
101 ms |
203664 KB |
Output is correct |
40 |
Correct |
109 ms |
204016 KB |
Output is correct |
41 |
Correct |
143 ms |
204984 KB |
Output is correct |
42 |
Correct |
143 ms |
205940 KB |
Output is correct |
43 |
Correct |
149 ms |
205992 KB |
Output is correct |
44 |
Correct |
149 ms |
205472 KB |
Output is correct |
45 |
Correct |
148 ms |
206000 KB |
Output is correct |
46 |
Correct |
166 ms |
206020 KB |
Output is correct |
47 |
Correct |
115 ms |
204616 KB |
Output is correct |
48 |
Correct |
139 ms |
205632 KB |
Output is correct |
49 |
Correct |
128 ms |
204264 KB |
Output is correct |
50 |
Correct |
154 ms |
205300 KB |
Output is correct |
51 |
Correct |
156 ms |
205988 KB |
Output is correct |
52 |
Correct |
147 ms |
206028 KB |
Output is correct |
53 |
Correct |
130 ms |
204792 KB |
Output is correct |
54 |
Correct |
149 ms |
206204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
138 ms |
204952 KB |
Output is correct |
2 |
Correct |
147 ms |
205532 KB |
Output is correct |
3 |
Correct |
147 ms |
205636 KB |
Output is correct |
4 |
Correct |
124 ms |
203988 KB |
Output is correct |
5 |
Correct |
135 ms |
204900 KB |
Output is correct |
6 |
Correct |
149 ms |
205604 KB |
Output is correct |
7 |
Correct |
108 ms |
203792 KB |
Output is correct |
8 |
Correct |
117 ms |
203592 KB |
Output is correct |
9 |
Correct |
122 ms |
204752 KB |
Output is correct |
10 |
Correct |
116 ms |
203900 KB |
Output is correct |
11 |
Correct |
135 ms |
205224 KB |
Output is correct |
12 |
Correct |
145 ms |
205260 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
68 ms |
196296 KB |
Output is correct |
2 |
Correct |
70 ms |
196304 KB |
Output is correct |
3 |
Correct |
77 ms |
196208 KB |
Output is correct |
4 |
Correct |
70 ms |
196320 KB |
Output is correct |
5 |
Correct |
67 ms |
196336 KB |
Output is correct |
6 |
Correct |
70 ms |
196344 KB |
Output is correct |
7 |
Correct |
68 ms |
196372 KB |
Output is correct |
8 |
Correct |
67 ms |
196348 KB |
Output is correct |
9 |
Correct |
68 ms |
196368 KB |
Output is correct |
10 |
Correct |
68 ms |
196360 KB |
Output is correct |
11 |
Correct |
67 ms |
196360 KB |
Output is correct |
12 |
Correct |
67 ms |
196264 KB |
Output is correct |
13 |
Correct |
67 ms |
196320 KB |
Output is correct |
14 |
Correct |
71 ms |
196380 KB |
Output is correct |
15 |
Correct |
69 ms |
196320 KB |
Output is correct |
16 |
Correct |
69 ms |
196308 KB |
Output is correct |
17 |
Correct |
68 ms |
196344 KB |
Output is correct |
18 |
Correct |
68 ms |
196272 KB |
Output is correct |
19 |
Correct |
70 ms |
196256 KB |
Output is correct |
20 |
Correct |
68 ms |
196324 KB |
Output is correct |
21 |
Correct |
68 ms |
196308 KB |
Output is correct |
22 |
Correct |
68 ms |
196284 KB |
Output is correct |
23 |
Correct |
68 ms |
196328 KB |
Output is correct |
24 |
Correct |
67 ms |
196300 KB |
Output is correct |
25 |
Correct |
68 ms |
196356 KB |
Output is correct |
26 |
Correct |
69 ms |
196260 KB |
Output is correct |
27 |
Correct |
68 ms |
196300 KB |
Output is correct |
28 |
Correct |
69 ms |
196316 KB |
Output is correct |
29 |
Correct |
68 ms |
196304 KB |
Output is correct |
30 |
Correct |
69 ms |
196364 KB |
Output is correct |
31 |
Correct |
69 ms |
196360 KB |
Output is correct |
32 |
Correct |
68 ms |
196332 KB |
Output is correct |
33 |
Correct |
69 ms |
196388 KB |
Output is correct |
34 |
Correct |
68 ms |
196300 KB |
Output is correct |
35 |
Correct |
68 ms |
196296 KB |
Output is correct |
36 |
Correct |
70 ms |
196328 KB |
Output is correct |
37 |
Correct |
69 ms |
196324 KB |
Output is correct |
38 |
Correct |
70 ms |
196268 KB |
Output is correct |
39 |
Correct |
134 ms |
205952 KB |
Output is correct |
40 |
Correct |
145 ms |
206096 KB |
Output is correct |
41 |
Correct |
133 ms |
205940 KB |
Output is correct |
42 |
Correct |
139 ms |
205928 KB |
Output is correct |
43 |
Correct |
135 ms |
206084 KB |
Output is correct |
44 |
Correct |
136 ms |
206048 KB |
Output is correct |
45 |
Correct |
98 ms |
204128 KB |
Output is correct |
46 |
Correct |
115 ms |
204284 KB |
Output is correct |
47 |
Correct |
138 ms |
205668 KB |
Output is correct |
48 |
Correct |
140 ms |
206100 KB |
Output is correct |
49 |
Correct |
135 ms |
205976 KB |
Output is correct |
50 |
Correct |
148 ms |
206176 KB |
Output is correct |
51 |
Correct |
126 ms |
205080 KB |
Output is correct |
52 |
Correct |
200 ms |
205780 KB |
Output is correct |
53 |
Correct |
143 ms |
205984 KB |
Output is correct |
54 |
Correct |
162 ms |
206136 KB |
Output is correct |
55 |
Correct |
138 ms |
205180 KB |
Output is correct |
56 |
Correct |
153 ms |
204812 KB |
Output is correct |
57 |
Correct |
101 ms |
203664 KB |
Output is correct |
58 |
Correct |
109 ms |
204016 KB |
Output is correct |
59 |
Correct |
143 ms |
204984 KB |
Output is correct |
60 |
Correct |
143 ms |
205940 KB |
Output is correct |
61 |
Correct |
149 ms |
205992 KB |
Output is correct |
62 |
Correct |
149 ms |
205472 KB |
Output is correct |
63 |
Correct |
148 ms |
206000 KB |
Output is correct |
64 |
Correct |
166 ms |
206020 KB |
Output is correct |
65 |
Correct |
115 ms |
204616 KB |
Output is correct |
66 |
Correct |
139 ms |
205632 KB |
Output is correct |
67 |
Correct |
128 ms |
204264 KB |
Output is correct |
68 |
Correct |
154 ms |
205300 KB |
Output is correct |
69 |
Correct |
156 ms |
205988 KB |
Output is correct |
70 |
Correct |
147 ms |
206028 KB |
Output is correct |
71 |
Correct |
130 ms |
204792 KB |
Output is correct |
72 |
Correct |
149 ms |
206204 KB |
Output is correct |
73 |
Correct |
138 ms |
204952 KB |
Output is correct |
74 |
Correct |
147 ms |
205532 KB |
Output is correct |
75 |
Correct |
147 ms |
205636 KB |
Output is correct |
76 |
Correct |
124 ms |
203988 KB |
Output is correct |
77 |
Correct |
135 ms |
204900 KB |
Output is correct |
78 |
Correct |
149 ms |
205604 KB |
Output is correct |
79 |
Correct |
108 ms |
203792 KB |
Output is correct |
80 |
Correct |
117 ms |
203592 KB |
Output is correct |
81 |
Correct |
122 ms |
204752 KB |
Output is correct |
82 |
Correct |
116 ms |
203900 KB |
Output is correct |
83 |
Correct |
135 ms |
205224 KB |
Output is correct |
84 |
Correct |
145 ms |
205260 KB |
Output is correct |
85 |
Correct |
139 ms |
205708 KB |
Output is correct |
86 |
Correct |
146 ms |
206372 KB |
Output is correct |
87 |
Correct |
139 ms |
205776 KB |
Output is correct |
88 |
Correct |
185 ms |
206508 KB |
Output is correct |
89 |
Correct |
125 ms |
203616 KB |
Output is correct |
90 |
Correct |
153 ms |
206416 KB |
Output is correct |
91 |
Correct |
136 ms |
205276 KB |
Output is correct |
92 |
Correct |
150 ms |
205000 KB |
Output is correct |
93 |
Correct |
150 ms |
206424 KB |
Output is correct |
94 |
Correct |
151 ms |
206004 KB |
Output is correct |
95 |
Correct |
148 ms |
206236 KB |
Output is correct |
96 |
Correct |
155 ms |
206584 KB |
Output is correct |
97 |
Correct |
151 ms |
206508 KB |
Output is correct |
98 |
Correct |
140 ms |
205552 KB |
Output is correct |
99 |
Correct |
127 ms |
205208 KB |
Output is correct |
100 |
Correct |
125 ms |
205132 KB |
Output is correct |
101 |
Correct |
141 ms |
206172 KB |
Output is correct |
102 |
Correct |
138 ms |
206308 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
68 ms |
196296 KB |
Output is correct |
2 |
Correct |
70 ms |
196304 KB |
Output is correct |
3 |
Correct |
77 ms |
196208 KB |
Output is correct |
4 |
Correct |
70 ms |
196320 KB |
Output is correct |
5 |
Correct |
67 ms |
196336 KB |
Output is correct |
6 |
Correct |
70 ms |
196344 KB |
Output is correct |
7 |
Correct |
68 ms |
196372 KB |
Output is correct |
8 |
Correct |
67 ms |
196348 KB |
Output is correct |
9 |
Correct |
68 ms |
196368 KB |
Output is correct |
10 |
Correct |
68 ms |
196360 KB |
Output is correct |
11 |
Correct |
67 ms |
196360 KB |
Output is correct |
12 |
Correct |
67 ms |
196264 KB |
Output is correct |
13 |
Correct |
67 ms |
196320 KB |
Output is correct |
14 |
Correct |
71 ms |
196380 KB |
Output is correct |
15 |
Correct |
69 ms |
196320 KB |
Output is correct |
16 |
Correct |
69 ms |
196308 KB |
Output is correct |
17 |
Correct |
68 ms |
196344 KB |
Output is correct |
18 |
Correct |
68 ms |
196272 KB |
Output is correct |
19 |
Correct |
70 ms |
196256 KB |
Output is correct |
20 |
Correct |
68 ms |
196324 KB |
Output is correct |
21 |
Correct |
68 ms |
196308 KB |
Output is correct |
22 |
Correct |
68 ms |
196284 KB |
Output is correct |
23 |
Correct |
68 ms |
196328 KB |
Output is correct |
24 |
Correct |
67 ms |
196300 KB |
Output is correct |
25 |
Correct |
68 ms |
196356 KB |
Output is correct |
26 |
Correct |
69 ms |
196260 KB |
Output is correct |
27 |
Correct |
68 ms |
196300 KB |
Output is correct |
28 |
Correct |
69 ms |
196316 KB |
Output is correct |
29 |
Correct |
68 ms |
196304 KB |
Output is correct |
30 |
Correct |
69 ms |
196364 KB |
Output is correct |
31 |
Correct |
69 ms |
196360 KB |
Output is correct |
32 |
Correct |
68 ms |
196332 KB |
Output is correct |
33 |
Correct |
69 ms |
196388 KB |
Output is correct |
34 |
Correct |
68 ms |
196300 KB |
Output is correct |
35 |
Correct |
68 ms |
196296 KB |
Output is correct |
36 |
Correct |
70 ms |
196328 KB |
Output is correct |
37 |
Correct |
69 ms |
196324 KB |
Output is correct |
38 |
Correct |
70 ms |
196268 KB |
Output is correct |
39 |
Correct |
134 ms |
205952 KB |
Output is correct |
40 |
Correct |
145 ms |
206096 KB |
Output is correct |
41 |
Correct |
133 ms |
205940 KB |
Output is correct |
42 |
Correct |
139 ms |
205928 KB |
Output is correct |
43 |
Correct |
135 ms |
206084 KB |
Output is correct |
44 |
Correct |
136 ms |
206048 KB |
Output is correct |
45 |
Correct |
98 ms |
204128 KB |
Output is correct |
46 |
Correct |
115 ms |
204284 KB |
Output is correct |
47 |
Correct |
138 ms |
205668 KB |
Output is correct |
48 |
Correct |
140 ms |
206100 KB |
Output is correct |
49 |
Correct |
135 ms |
205976 KB |
Output is correct |
50 |
Correct |
148 ms |
206176 KB |
Output is correct |
51 |
Correct |
126 ms |
205080 KB |
Output is correct |
52 |
Correct |
200 ms |
205780 KB |
Output is correct |
53 |
Correct |
143 ms |
205984 KB |
Output is correct |
54 |
Correct |
162 ms |
206136 KB |
Output is correct |
55 |
Correct |
440 ms |
234028 KB |
Output is correct |
56 |
Correct |
398 ms |
229704 KB |
Output is correct |
57 |
Correct |
492 ms |
236088 KB |
Output is correct |
58 |
Correct |
406 ms |
230052 KB |
Output is correct |
59 |
Correct |
379 ms |
230272 KB |
Output is correct |
60 |
Correct |
526 ms |
236720 KB |
Output is correct |
61 |
Correct |
217 ms |
229320 KB |
Output is correct |
62 |
Correct |
236 ms |
229540 KB |
Output is correct |
63 |
Correct |
511 ms |
234880 KB |
Output is correct |
64 |
Correct |
503 ms |
234996 KB |
Output is correct |
65 |
Correct |
470 ms |
232792 KB |
Output is correct |
66 |
Correct |
544 ms |
236632 KB |
Output is correct |
67 |
Correct |
498 ms |
233104 KB |
Output is correct |
68 |
Correct |
564 ms |
236620 KB |
Output is correct |
69 |
Correct |
530 ms |
236544 KB |
Output is correct |
70 |
Correct |
504 ms |
236424 KB |
Output is correct |
71 |
Correct |
506 ms |
236420 KB |
Output is correct |
72 |
Correct |
486 ms |
234732 KB |
Output is correct |
73 |
Correct |
518 ms |
236604 KB |
Output is correct |
74 |
Correct |
500 ms |
235144 KB |
Output is correct |
75 |
Correct |
517 ms |
236572 KB |
Output is correct |
76 |
Correct |
587 ms |
236552 KB |
Output is correct |
77 |
Correct |
529 ms |
236564 KB |
Output is correct |
78 |
Correct |
519 ms |
236492 KB |
Output is correct |
79 |
Correct |
424 ms |
235096 KB |
Output is correct |
80 |
Correct |
435 ms |
235660 KB |
Output is correct |
81 |
Correct |
444 ms |
235468 KB |
Output is correct |
82 |
Correct |
138 ms |
205180 KB |
Output is correct |
83 |
Correct |
153 ms |
204812 KB |
Output is correct |
84 |
Correct |
101 ms |
203664 KB |
Output is correct |
85 |
Correct |
109 ms |
204016 KB |
Output is correct |
86 |
Correct |
143 ms |
204984 KB |
Output is correct |
87 |
Correct |
143 ms |
205940 KB |
Output is correct |
88 |
Correct |
149 ms |
205992 KB |
Output is correct |
89 |
Correct |
149 ms |
205472 KB |
Output is correct |
90 |
Correct |
148 ms |
206000 KB |
Output is correct |
91 |
Correct |
166 ms |
206020 KB |
Output is correct |
92 |
Correct |
115 ms |
204616 KB |
Output is correct |
93 |
Correct |
139 ms |
205632 KB |
Output is correct |
94 |
Correct |
128 ms |
204264 KB |
Output is correct |
95 |
Correct |
154 ms |
205300 KB |
Output is correct |
96 |
Correct |
156 ms |
205988 KB |
Output is correct |
97 |
Correct |
147 ms |
206028 KB |
Output is correct |
98 |
Correct |
130 ms |
204792 KB |
Output is correct |
99 |
Correct |
149 ms |
206204 KB |
Output is correct |
100 |
Correct |
138 ms |
204952 KB |
Output is correct |
101 |
Correct |
147 ms |
205532 KB |
Output is correct |
102 |
Correct |
147 ms |
205636 KB |
Output is correct |
103 |
Correct |
124 ms |
203988 KB |
Output is correct |
104 |
Correct |
135 ms |
204900 KB |
Output is correct |
105 |
Correct |
149 ms |
205604 KB |
Output is correct |
106 |
Correct |
108 ms |
203792 KB |
Output is correct |
107 |
Correct |
117 ms |
203592 KB |
Output is correct |
108 |
Correct |
122 ms |
204752 KB |
Output is correct |
109 |
Correct |
116 ms |
203900 KB |
Output is correct |
110 |
Correct |
135 ms |
205224 KB |
Output is correct |
111 |
Correct |
145 ms |
205260 KB |
Output is correct |
112 |
Correct |
139 ms |
205708 KB |
Output is correct |
113 |
Correct |
146 ms |
206372 KB |
Output is correct |
114 |
Correct |
139 ms |
205776 KB |
Output is correct |
115 |
Correct |
185 ms |
206508 KB |
Output is correct |
116 |
Correct |
125 ms |
203616 KB |
Output is correct |
117 |
Correct |
153 ms |
206416 KB |
Output is correct |
118 |
Correct |
136 ms |
205276 KB |
Output is correct |
119 |
Correct |
150 ms |
205000 KB |
Output is correct |
120 |
Correct |
150 ms |
206424 KB |
Output is correct |
121 |
Correct |
151 ms |
206004 KB |
Output is correct |
122 |
Correct |
148 ms |
206236 KB |
Output is correct |
123 |
Correct |
155 ms |
206584 KB |
Output is correct |
124 |
Correct |
151 ms |
206508 KB |
Output is correct |
125 |
Correct |
140 ms |
205552 KB |
Output is correct |
126 |
Correct |
127 ms |
205208 KB |
Output is correct |
127 |
Correct |
125 ms |
205132 KB |
Output is correct |
128 |
Correct |
141 ms |
206172 KB |
Output is correct |
129 |
Correct |
138 ms |
206308 KB |
Output is correct |
130 |
Correct |
564 ms |
236680 KB |
Output is correct |
131 |
Correct |
404 ms |
230052 KB |
Output is correct |
132 |
Correct |
524 ms |
236624 KB |
Output is correct |
133 |
Correct |
517 ms |
236312 KB |
Output is correct |
134 |
Correct |
446 ms |
233744 KB |
Output is correct |
135 |
Correct |
523 ms |
237400 KB |
Output is correct |
136 |
Correct |
496 ms |
235824 KB |
Output is correct |
137 |
Correct |
494 ms |
235852 KB |
Output is correct |
138 |
Correct |
502 ms |
233388 KB |
Output is correct |
139 |
Correct |
508 ms |
237208 KB |
Output is correct |
140 |
Correct |
491 ms |
234500 KB |
Output is correct |
141 |
Correct |
569 ms |
237152 KB |
Output is correct |
142 |
Correct |
541 ms |
237224 KB |
Output is correct |
143 |
Correct |
528 ms |
237084 KB |
Output is correct |
144 |
Correct |
507 ms |
235228 KB |
Output is correct |
145 |
Correct |
511 ms |
237160 KB |
Output is correct |
146 |
Correct |
564 ms |
236048 KB |
Output is correct |
147 |
Correct |
528 ms |
237108 KB |
Output is correct |
148 |
Correct |
546 ms |
237236 KB |
Output is correct |
149 |
Correct |
518 ms |
237108 KB |
Output is correct |
150 |
Correct |
299 ms |
232072 KB |
Output is correct |
151 |
Correct |
448 ms |
236124 KB |
Output is correct |
152 |
Correct |
458 ms |
236156 KB |
Output is correct |
153 |
Correct |
417 ms |
236320 KB |
Output is correct |