/**
____ ____ ____ ____ ____ ____
||l |||e |||i |||n |||a |||d ||
||__|||__|||__|||__|||__|||__||
|/__\|/__\|/__\|/__\|/__\|/__\|
**/
#include<bits/stdc++.h>
#define endl '\n'
using namespace std;
typedef long long ll;
const ll maxn = 250010;
const ll inf = 1e17;
void speed()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
}
struct segment_tree_modified
{
pair < ll, ll > lazy[4 * maxn];
ll tree[4 * maxn];
pair < ll, ll > merge_lazy(pair < ll, ll > p1, pair < ll, ll > p2)
{
if (p1.second > p2.first)
{
return {p1.first, p1.second - p2.first + p2.second};
}
else
{
return {p1.first - p1.second + p2.first, p2.second};
}
}
void push_lazy(ll root, ll left, ll right)
{
if (left == right)
{
tree[root] = max((ll)(0), tree[root] - lazy[root].first) + lazy[root].second;
}
else
{
lazy[root * 2] = merge_lazy(lazy[root * 2], lazy[root]);
lazy[root * 2 + 1] = merge_lazy(lazy[root * 2 + 1], lazy[root]);
}
lazy[root] = {0, 0};
}
void range_update(ll root, ll left, ll right, ll qleft, ll qright,
pair < ll, ll > val)
{
push_lazy(root, left, right);
if (left > qright || right < qleft)
return;
if (left >= qleft && right <= qright)
{
lazy[root] = val;
push_lazy(root, left, right);
return;
}
ll mid = (left + right) / 2;
range_update(root * 2, left, mid, qleft, qright, val);
range_update(root * 2 + 1, mid + 1, right, qleft, qright, val);
}
ll query(ll root, ll left, ll right, ll idx)
{
///cout << left << " - " << right << " " << lazy[root].first << " " << lazy[root].second << endl;
push_lazy(root, left, right);
if (left == right)
return tree[root];
ll mid = (left + right) /2;
if (idx <= mid)
return query(root * 2, left, mid, idx);
return query(root * 2 + 1, mid + 1, right, idx);
}
};
struct node
{
ll minx, min_idx;
node()
{
minx = inf;
}
};
node merge_nodes(node nd1, node nd2)
{
if (nd1.minx < nd2.minx)
return nd1;
return nd2;
}
struct segment_tree
{
ll lazy[4 * maxn];
node tree[4 * maxn];
void push_lazy(ll root, ll left, ll right)
{
tree[root].minx += lazy[root];
if (left == right)
tree[root].min_idx = left;
if (left != right)
{
lazy[root * 2] += lazy[root];
lazy[root * 2 + 1] += lazy[root];
}
lazy[root] = 0;
}
void range_update(ll root, ll left, ll right,
ll qleft, ll qright, ll val)
{
push_lazy(root, left, right);
if (left > qright || right < qleft)
return;
if (left >= qleft && right <= qright)
{
lazy[root] += val;
push_lazy(root, left, right);
return;
}
ll mid = (left + right) / 2;
range_update(root * 2, left, mid, qleft, qright, val);
range_update(root * 2 + 1, mid + 1, right, qleft, qright, val);
tree[root] = merge_nodes(tree[root * 2], tree[root * 2 + 1]);
}
void poll_update(ll root, ll left, ll right, ll idx, ll val)
{
push_lazy(root, left, right);
if (left == right)
{
tree[root].minx = val;
tree[root].min_idx = left;
return;
}
ll mid = (left + right) / 2;
if (idx <= mid)
poll_update(root * 2, left, mid, idx, val);
else
poll_update(root * 2 + 1, mid + 1, right, idx, val);
push_lazy(root * 2, left, mid);
push_lazy(root * 2 + 1, mid + 1, right);
tree[root] = merge_nodes(tree[root * 2], tree[root * 2 + 1]);
}
node query(ll root, ll left, ll right, ll idx)
{
push_lazy(root, left, right);
if (left == right)
return tree[root];
ll mid = (left + right) / 2;
if (idx <= mid)
return query(root * 2, left, mid, idx);
return query(root * 2 + 1, mid + 1, right, idx);
}
};
struct add_query
{
ll l, r, c;
ll k;
add_query(ll _l, ll _r, ll _c, ll _k)
{
l = _l;
r = _r;
c = _c;
k = _k;
}
};
segment_tree_modified real_val, add_only;
segment_tree st;
ll n, m, q, ans[maxn], ptr[maxn], tf[maxn];
vector < pair < ll, ll > > ask[maxn];
void solve()
{
cin >> n >> m >> q;
vector < add_query > vq;
for (ll i = 1; i <= q; i ++)
{
ll type;
cin >> type;
if (type == 1)
{
ll l, r, c;
ll k;
cin >> l >> r >> c >> k;
add_query aq(l, r, c, k);
vq.push_back(aq);
real_val.range_update(1, 1, n, l, r, {0, k});
add_only.range_update(1, 1, n, l, r, {0, k});
}
else if (type == 2)
{
ll l, r;
ll k;
cin >> l >> r >> k;
real_val.range_update(1, 1, n, l, r, {k, 0});
}
else
{
ll a;
ll b;
tf[i] = 1;
cin >> a >> b;
ll val1 = real_val.query(1, 1, n, a);
ll val2 = add_only.query(1,1,n, a);
if (val1 >= b)
{
ll idx = val2 - val1 + b;
///cout << val1 << " - " << val2 << " - " << b << " - " << idx << endl;
ask[a].push_back({idx, i});
}
}
}
for (ll i = 1; i <= n; i ++)
sort(ask[i].begin(), ask[i].end());
for (ll i = 1; i <= n; i ++)
{
ll val = inf;
if (!ask[i].empty())
val = ask[i][0].first;
st.poll_update(1, 1, n, i, val);
}
for (ll i = 0; i < vq.size(); i ++)
{
add_query aq = vq[i];
st.range_update(1, 1, n, aq.l, aq.r, - aq.k);
while(true)
{
st.push_lazy(1, 1, n);
node nd = st.tree[1];
if (nd.minx > 0)
break;
///cout << aq.l << " - " << aq.r << " - " << aq.c << " - " << endl;
///cout << nd.minx << " " << nd.min_idx << " " << st.query(1, 1, n, 978).minx << " " << ans[39] << endl;
ll pos = nd.min_idx;
ans[ask[pos][ptr[pos]].second] = aq.c;
///cout << ask[pos][ptr[pos]].second << endl;
ll val = inf;
if (ptr[pos] != ((ll)ask[pos].size() - 1))
{
val = ask[pos][ptr[pos] + 1].first
- ask[pos][ptr[pos]].first;
///cout << "HERE " << val << endl;
}
st.poll_update(1, 1, n, nd.min_idx, val + nd.minx);
ptr[pos] ++;
}
}
for (ll i = 1; i <= q; i ++)
if (tf[i])
cout << ans[i] << endl;
}
int main()
{
speed();
solve();
return 0;
}
/**
*/
Compilation message
foodcourt.cpp: In function 'void solve()':
foodcourt.cpp:258:22: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::vector<add_query>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
258 | for (ll i = 0; i < vq.size(); i ++)
| ~~^~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
31 ms |
53324 KB |
Output is correct |
2 |
Correct |
28 ms |
53324 KB |
Output is correct |
3 |
Correct |
29 ms |
53352 KB |
Output is correct |
4 |
Correct |
25 ms |
53372 KB |
Output is correct |
5 |
Correct |
22 ms |
53292 KB |
Output is correct |
6 |
Correct |
22 ms |
53252 KB |
Output is correct |
7 |
Correct |
22 ms |
53324 KB |
Output is correct |
8 |
Correct |
24 ms |
53324 KB |
Output is correct |
9 |
Correct |
24 ms |
53316 KB |
Output is correct |
10 |
Correct |
24 ms |
53324 KB |
Output is correct |
11 |
Correct |
25 ms |
53324 KB |
Output is correct |
12 |
Correct |
33 ms |
53368 KB |
Output is correct |
13 |
Correct |
29 ms |
53340 KB |
Output is correct |
14 |
Correct |
25 ms |
53324 KB |
Output is correct |
15 |
Correct |
25 ms |
53332 KB |
Output is correct |
16 |
Correct |
23 ms |
53348 KB |
Output is correct |
17 |
Correct |
25 ms |
53332 KB |
Output is correct |
18 |
Correct |
24 ms |
53372 KB |
Output is correct |
19 |
Correct |
23 ms |
53380 KB |
Output is correct |
20 |
Correct |
24 ms |
53452 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
31 ms |
53324 KB |
Output is correct |
2 |
Correct |
28 ms |
53324 KB |
Output is correct |
3 |
Correct |
29 ms |
53352 KB |
Output is correct |
4 |
Correct |
25 ms |
53372 KB |
Output is correct |
5 |
Correct |
22 ms |
53292 KB |
Output is correct |
6 |
Correct |
22 ms |
53252 KB |
Output is correct |
7 |
Correct |
22 ms |
53324 KB |
Output is correct |
8 |
Correct |
24 ms |
53324 KB |
Output is correct |
9 |
Correct |
24 ms |
53316 KB |
Output is correct |
10 |
Correct |
24 ms |
53324 KB |
Output is correct |
11 |
Correct |
25 ms |
53324 KB |
Output is correct |
12 |
Correct |
33 ms |
53368 KB |
Output is correct |
13 |
Correct |
29 ms |
53340 KB |
Output is correct |
14 |
Correct |
25 ms |
53324 KB |
Output is correct |
15 |
Correct |
25 ms |
53332 KB |
Output is correct |
16 |
Correct |
23 ms |
53348 KB |
Output is correct |
17 |
Correct |
25 ms |
53332 KB |
Output is correct |
18 |
Correct |
24 ms |
53372 KB |
Output is correct |
19 |
Correct |
23 ms |
53380 KB |
Output is correct |
20 |
Correct |
24 ms |
53452 KB |
Output is correct |
21 |
Correct |
22 ms |
53336 KB |
Output is correct |
22 |
Correct |
27 ms |
53316 KB |
Output is correct |
23 |
Correct |
23 ms |
53432 KB |
Output is correct |
24 |
Correct |
25 ms |
53456 KB |
Output is correct |
25 |
Correct |
24 ms |
53228 KB |
Output is correct |
26 |
Correct |
28 ms |
53192 KB |
Output is correct |
27 |
Correct |
25 ms |
53320 KB |
Output is correct |
28 |
Correct |
24 ms |
53380 KB |
Output is correct |
29 |
Correct |
23 ms |
53380 KB |
Output is correct |
30 |
Correct |
23 ms |
53312 KB |
Output is correct |
31 |
Correct |
23 ms |
53324 KB |
Output is correct |
32 |
Correct |
22 ms |
53452 KB |
Output is correct |
33 |
Correct |
21 ms |
53340 KB |
Output is correct |
34 |
Correct |
26 ms |
53336 KB |
Output is correct |
35 |
Correct |
28 ms |
53380 KB |
Output is correct |
36 |
Correct |
23 ms |
53320 KB |
Output is correct |
37 |
Correct |
28 ms |
53340 KB |
Output is correct |
38 |
Correct |
24 ms |
53384 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
94 ms |
57152 KB |
Output is correct |
2 |
Correct |
99 ms |
57432 KB |
Output is correct |
3 |
Correct |
99 ms |
57168 KB |
Output is correct |
4 |
Correct |
119 ms |
57152 KB |
Output is correct |
5 |
Correct |
118 ms |
57760 KB |
Output is correct |
6 |
Correct |
110 ms |
57516 KB |
Output is correct |
7 |
Correct |
37 ms |
54984 KB |
Output is correct |
8 |
Correct |
44 ms |
54968 KB |
Output is correct |
9 |
Correct |
129 ms |
57880 KB |
Output is correct |
10 |
Correct |
107 ms |
57208 KB |
Output is correct |
11 |
Correct |
100 ms |
57548 KB |
Output is correct |
12 |
Correct |
98 ms |
57132 KB |
Output is correct |
13 |
Correct |
104 ms |
58192 KB |
Output is correct |
14 |
Correct |
110 ms |
58484 KB |
Output is correct |
15 |
Correct |
117 ms |
58852 KB |
Output is correct |
16 |
Correct |
121 ms |
58932 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
661 ms |
72960 KB |
Output is correct |
2 |
Correct |
520 ms |
71020 KB |
Output is correct |
3 |
Correct |
718 ms |
73756 KB |
Output is correct |
4 |
Correct |
606 ms |
72056 KB |
Output is correct |
5 |
Correct |
526 ms |
71824 KB |
Output is correct |
6 |
Correct |
773 ms |
74584 KB |
Output is correct |
7 |
Correct |
98 ms |
61736 KB |
Output is correct |
8 |
Correct |
105 ms |
61384 KB |
Output is correct |
9 |
Correct |
822 ms |
75824 KB |
Output is correct |
10 |
Correct |
816 ms |
75780 KB |
Output is correct |
11 |
Correct |
751 ms |
73732 KB |
Output is correct |
12 |
Correct |
703 ms |
73640 KB |
Output is correct |
13 |
Correct |
638 ms |
73568 KB |
Output is correct |
14 |
Correct |
670 ms |
73556 KB |
Output is correct |
15 |
Correct |
726 ms |
73604 KB |
Output is correct |
16 |
Correct |
678 ms |
73540 KB |
Output is correct |
17 |
Correct |
638 ms |
73632 KB |
Output is correct |
18 |
Correct |
623 ms |
73636 KB |
Output is correct |
19 |
Correct |
653 ms |
73904 KB |
Output is correct |
20 |
Correct |
714 ms |
73636 KB |
Output is correct |
21 |
Correct |
660 ms |
73652 KB |
Output is correct |
22 |
Correct |
659 ms |
73572 KB |
Output is correct |
23 |
Correct |
663 ms |
73632 KB |
Output is correct |
24 |
Correct |
655 ms |
73680 KB |
Output is correct |
25 |
Correct |
509 ms |
73188 KB |
Output is correct |
26 |
Correct |
529 ms |
73664 KB |
Output is correct |
27 |
Correct |
521 ms |
73496 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
31 ms |
53324 KB |
Output is correct |
2 |
Correct |
28 ms |
53324 KB |
Output is correct |
3 |
Correct |
29 ms |
53352 KB |
Output is correct |
4 |
Correct |
25 ms |
53372 KB |
Output is correct |
5 |
Correct |
22 ms |
53292 KB |
Output is correct |
6 |
Correct |
22 ms |
53252 KB |
Output is correct |
7 |
Correct |
22 ms |
53324 KB |
Output is correct |
8 |
Correct |
24 ms |
53324 KB |
Output is correct |
9 |
Correct |
24 ms |
53316 KB |
Output is correct |
10 |
Correct |
24 ms |
53324 KB |
Output is correct |
11 |
Correct |
25 ms |
53324 KB |
Output is correct |
12 |
Correct |
33 ms |
53368 KB |
Output is correct |
13 |
Correct |
29 ms |
53340 KB |
Output is correct |
14 |
Correct |
25 ms |
53324 KB |
Output is correct |
15 |
Correct |
25 ms |
53332 KB |
Output is correct |
16 |
Correct |
23 ms |
53348 KB |
Output is correct |
17 |
Correct |
25 ms |
53332 KB |
Output is correct |
18 |
Correct |
24 ms |
53372 KB |
Output is correct |
19 |
Correct |
23 ms |
53380 KB |
Output is correct |
20 |
Correct |
24 ms |
53452 KB |
Output is correct |
21 |
Correct |
94 ms |
57152 KB |
Output is correct |
22 |
Correct |
99 ms |
57432 KB |
Output is correct |
23 |
Correct |
99 ms |
57168 KB |
Output is correct |
24 |
Correct |
119 ms |
57152 KB |
Output is correct |
25 |
Correct |
118 ms |
57760 KB |
Output is correct |
26 |
Correct |
110 ms |
57516 KB |
Output is correct |
27 |
Correct |
37 ms |
54984 KB |
Output is correct |
28 |
Correct |
44 ms |
54968 KB |
Output is correct |
29 |
Correct |
129 ms |
57880 KB |
Output is correct |
30 |
Correct |
107 ms |
57208 KB |
Output is correct |
31 |
Correct |
100 ms |
57548 KB |
Output is correct |
32 |
Correct |
98 ms |
57132 KB |
Output is correct |
33 |
Correct |
104 ms |
58192 KB |
Output is correct |
34 |
Correct |
110 ms |
58484 KB |
Output is correct |
35 |
Correct |
117 ms |
58852 KB |
Output is correct |
36 |
Correct |
121 ms |
58932 KB |
Output is correct |
37 |
Correct |
132 ms |
58160 KB |
Output is correct |
38 |
Correct |
152 ms |
58084 KB |
Output is correct |
39 |
Correct |
35 ms |
55004 KB |
Output is correct |
40 |
Correct |
53 ms |
55112 KB |
Output is correct |
41 |
Correct |
172 ms |
58424 KB |
Output is correct |
42 |
Correct |
146 ms |
58432 KB |
Output is correct |
43 |
Correct |
141 ms |
58384 KB |
Output is correct |
44 |
Correct |
159 ms |
58520 KB |
Output is correct |
45 |
Correct |
165 ms |
58428 KB |
Output is correct |
46 |
Correct |
158 ms |
58420 KB |
Output is correct |
47 |
Correct |
81 ms |
58388 KB |
Output is correct |
48 |
Correct |
133 ms |
58572 KB |
Output is correct |
49 |
Correct |
106 ms |
57608 KB |
Output is correct |
50 |
Correct |
156 ms |
58080 KB |
Output is correct |
51 |
Correct |
136 ms |
58328 KB |
Output is correct |
52 |
Correct |
139 ms |
58412 KB |
Output is correct |
53 |
Correct |
99 ms |
58264 KB |
Output is correct |
54 |
Correct |
136 ms |
58852 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
154 ms |
58804 KB |
Output is correct |
2 |
Correct |
172 ms |
60556 KB |
Output is correct |
3 |
Correct |
186 ms |
60748 KB |
Output is correct |
4 |
Correct |
142 ms |
59300 KB |
Output is correct |
5 |
Correct |
153 ms |
60108 KB |
Output is correct |
6 |
Correct |
194 ms |
60700 KB |
Output is correct |
7 |
Correct |
42 ms |
57032 KB |
Output is correct |
8 |
Correct |
46 ms |
56596 KB |
Output is correct |
9 |
Correct |
104 ms |
60556 KB |
Output is correct |
10 |
Correct |
133 ms |
59248 KB |
Output is correct |
11 |
Correct |
158 ms |
60728 KB |
Output is correct |
12 |
Correct |
158 ms |
60692 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
31 ms |
53324 KB |
Output is correct |
2 |
Correct |
28 ms |
53324 KB |
Output is correct |
3 |
Correct |
29 ms |
53352 KB |
Output is correct |
4 |
Correct |
25 ms |
53372 KB |
Output is correct |
5 |
Correct |
22 ms |
53292 KB |
Output is correct |
6 |
Correct |
22 ms |
53252 KB |
Output is correct |
7 |
Correct |
22 ms |
53324 KB |
Output is correct |
8 |
Correct |
24 ms |
53324 KB |
Output is correct |
9 |
Correct |
24 ms |
53316 KB |
Output is correct |
10 |
Correct |
24 ms |
53324 KB |
Output is correct |
11 |
Correct |
25 ms |
53324 KB |
Output is correct |
12 |
Correct |
33 ms |
53368 KB |
Output is correct |
13 |
Correct |
29 ms |
53340 KB |
Output is correct |
14 |
Correct |
25 ms |
53324 KB |
Output is correct |
15 |
Correct |
25 ms |
53332 KB |
Output is correct |
16 |
Correct |
23 ms |
53348 KB |
Output is correct |
17 |
Correct |
25 ms |
53332 KB |
Output is correct |
18 |
Correct |
24 ms |
53372 KB |
Output is correct |
19 |
Correct |
23 ms |
53380 KB |
Output is correct |
20 |
Correct |
24 ms |
53452 KB |
Output is correct |
21 |
Correct |
22 ms |
53336 KB |
Output is correct |
22 |
Correct |
27 ms |
53316 KB |
Output is correct |
23 |
Correct |
23 ms |
53432 KB |
Output is correct |
24 |
Correct |
25 ms |
53456 KB |
Output is correct |
25 |
Correct |
24 ms |
53228 KB |
Output is correct |
26 |
Correct |
28 ms |
53192 KB |
Output is correct |
27 |
Correct |
25 ms |
53320 KB |
Output is correct |
28 |
Correct |
24 ms |
53380 KB |
Output is correct |
29 |
Correct |
23 ms |
53380 KB |
Output is correct |
30 |
Correct |
23 ms |
53312 KB |
Output is correct |
31 |
Correct |
23 ms |
53324 KB |
Output is correct |
32 |
Correct |
22 ms |
53452 KB |
Output is correct |
33 |
Correct |
21 ms |
53340 KB |
Output is correct |
34 |
Correct |
26 ms |
53336 KB |
Output is correct |
35 |
Correct |
28 ms |
53380 KB |
Output is correct |
36 |
Correct |
23 ms |
53320 KB |
Output is correct |
37 |
Correct |
28 ms |
53340 KB |
Output is correct |
38 |
Correct |
24 ms |
53384 KB |
Output is correct |
39 |
Correct |
94 ms |
57152 KB |
Output is correct |
40 |
Correct |
99 ms |
57432 KB |
Output is correct |
41 |
Correct |
99 ms |
57168 KB |
Output is correct |
42 |
Correct |
119 ms |
57152 KB |
Output is correct |
43 |
Correct |
118 ms |
57760 KB |
Output is correct |
44 |
Correct |
110 ms |
57516 KB |
Output is correct |
45 |
Correct |
37 ms |
54984 KB |
Output is correct |
46 |
Correct |
44 ms |
54968 KB |
Output is correct |
47 |
Correct |
129 ms |
57880 KB |
Output is correct |
48 |
Correct |
107 ms |
57208 KB |
Output is correct |
49 |
Correct |
100 ms |
57548 KB |
Output is correct |
50 |
Correct |
98 ms |
57132 KB |
Output is correct |
51 |
Correct |
104 ms |
58192 KB |
Output is correct |
52 |
Correct |
110 ms |
58484 KB |
Output is correct |
53 |
Correct |
117 ms |
58852 KB |
Output is correct |
54 |
Correct |
121 ms |
58932 KB |
Output is correct |
55 |
Correct |
132 ms |
58160 KB |
Output is correct |
56 |
Correct |
152 ms |
58084 KB |
Output is correct |
57 |
Correct |
35 ms |
55004 KB |
Output is correct |
58 |
Correct |
53 ms |
55112 KB |
Output is correct |
59 |
Correct |
172 ms |
58424 KB |
Output is correct |
60 |
Correct |
146 ms |
58432 KB |
Output is correct |
61 |
Correct |
141 ms |
58384 KB |
Output is correct |
62 |
Correct |
159 ms |
58520 KB |
Output is correct |
63 |
Correct |
165 ms |
58428 KB |
Output is correct |
64 |
Correct |
158 ms |
58420 KB |
Output is correct |
65 |
Correct |
81 ms |
58388 KB |
Output is correct |
66 |
Correct |
133 ms |
58572 KB |
Output is correct |
67 |
Correct |
106 ms |
57608 KB |
Output is correct |
68 |
Correct |
156 ms |
58080 KB |
Output is correct |
69 |
Correct |
136 ms |
58328 KB |
Output is correct |
70 |
Correct |
139 ms |
58412 KB |
Output is correct |
71 |
Correct |
99 ms |
58264 KB |
Output is correct |
72 |
Correct |
136 ms |
58852 KB |
Output is correct |
73 |
Correct |
154 ms |
58804 KB |
Output is correct |
74 |
Correct |
172 ms |
60556 KB |
Output is correct |
75 |
Correct |
186 ms |
60748 KB |
Output is correct |
76 |
Correct |
142 ms |
59300 KB |
Output is correct |
77 |
Correct |
153 ms |
60108 KB |
Output is correct |
78 |
Correct |
194 ms |
60700 KB |
Output is correct |
79 |
Correct |
42 ms |
57032 KB |
Output is correct |
80 |
Correct |
46 ms |
56596 KB |
Output is correct |
81 |
Correct |
104 ms |
60556 KB |
Output is correct |
82 |
Correct |
133 ms |
59248 KB |
Output is correct |
83 |
Correct |
158 ms |
60728 KB |
Output is correct |
84 |
Correct |
158 ms |
60692 KB |
Output is correct |
85 |
Correct |
138 ms |
59616 KB |
Output is correct |
86 |
Correct |
153 ms |
60048 KB |
Output is correct |
87 |
Correct |
160 ms |
59864 KB |
Output is correct |
88 |
Correct |
163 ms |
60376 KB |
Output is correct |
89 |
Correct |
100 ms |
58728 KB |
Output is correct |
90 |
Correct |
149 ms |
60044 KB |
Output is correct |
91 |
Correct |
133 ms |
59116 KB |
Output is correct |
92 |
Correct |
127 ms |
58968 KB |
Output is correct |
93 |
Correct |
173 ms |
60028 KB |
Output is correct |
94 |
Correct |
189 ms |
60016 KB |
Output is correct |
95 |
Correct |
147 ms |
60024 KB |
Output is correct |
96 |
Correct |
173 ms |
60024 KB |
Output is correct |
97 |
Correct |
149 ms |
60016 KB |
Output is correct |
98 |
Correct |
131 ms |
59316 KB |
Output is correct |
99 |
Correct |
95 ms |
59876 KB |
Output is correct |
100 |
Correct |
117 ms |
59336 KB |
Output is correct |
101 |
Correct |
137 ms |
59928 KB |
Output is correct |
102 |
Correct |
126 ms |
59944 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
31 ms |
53324 KB |
Output is correct |
2 |
Correct |
28 ms |
53324 KB |
Output is correct |
3 |
Correct |
29 ms |
53352 KB |
Output is correct |
4 |
Correct |
25 ms |
53372 KB |
Output is correct |
5 |
Correct |
22 ms |
53292 KB |
Output is correct |
6 |
Correct |
22 ms |
53252 KB |
Output is correct |
7 |
Correct |
22 ms |
53324 KB |
Output is correct |
8 |
Correct |
24 ms |
53324 KB |
Output is correct |
9 |
Correct |
24 ms |
53316 KB |
Output is correct |
10 |
Correct |
24 ms |
53324 KB |
Output is correct |
11 |
Correct |
25 ms |
53324 KB |
Output is correct |
12 |
Correct |
33 ms |
53368 KB |
Output is correct |
13 |
Correct |
29 ms |
53340 KB |
Output is correct |
14 |
Correct |
25 ms |
53324 KB |
Output is correct |
15 |
Correct |
25 ms |
53332 KB |
Output is correct |
16 |
Correct |
23 ms |
53348 KB |
Output is correct |
17 |
Correct |
25 ms |
53332 KB |
Output is correct |
18 |
Correct |
24 ms |
53372 KB |
Output is correct |
19 |
Correct |
23 ms |
53380 KB |
Output is correct |
20 |
Correct |
24 ms |
53452 KB |
Output is correct |
21 |
Correct |
22 ms |
53336 KB |
Output is correct |
22 |
Correct |
27 ms |
53316 KB |
Output is correct |
23 |
Correct |
23 ms |
53432 KB |
Output is correct |
24 |
Correct |
25 ms |
53456 KB |
Output is correct |
25 |
Correct |
24 ms |
53228 KB |
Output is correct |
26 |
Correct |
28 ms |
53192 KB |
Output is correct |
27 |
Correct |
25 ms |
53320 KB |
Output is correct |
28 |
Correct |
24 ms |
53380 KB |
Output is correct |
29 |
Correct |
23 ms |
53380 KB |
Output is correct |
30 |
Correct |
23 ms |
53312 KB |
Output is correct |
31 |
Correct |
23 ms |
53324 KB |
Output is correct |
32 |
Correct |
22 ms |
53452 KB |
Output is correct |
33 |
Correct |
21 ms |
53340 KB |
Output is correct |
34 |
Correct |
26 ms |
53336 KB |
Output is correct |
35 |
Correct |
28 ms |
53380 KB |
Output is correct |
36 |
Correct |
23 ms |
53320 KB |
Output is correct |
37 |
Correct |
28 ms |
53340 KB |
Output is correct |
38 |
Correct |
24 ms |
53384 KB |
Output is correct |
39 |
Correct |
94 ms |
57152 KB |
Output is correct |
40 |
Correct |
99 ms |
57432 KB |
Output is correct |
41 |
Correct |
99 ms |
57168 KB |
Output is correct |
42 |
Correct |
119 ms |
57152 KB |
Output is correct |
43 |
Correct |
118 ms |
57760 KB |
Output is correct |
44 |
Correct |
110 ms |
57516 KB |
Output is correct |
45 |
Correct |
37 ms |
54984 KB |
Output is correct |
46 |
Correct |
44 ms |
54968 KB |
Output is correct |
47 |
Correct |
129 ms |
57880 KB |
Output is correct |
48 |
Correct |
107 ms |
57208 KB |
Output is correct |
49 |
Correct |
100 ms |
57548 KB |
Output is correct |
50 |
Correct |
98 ms |
57132 KB |
Output is correct |
51 |
Correct |
104 ms |
58192 KB |
Output is correct |
52 |
Correct |
110 ms |
58484 KB |
Output is correct |
53 |
Correct |
117 ms |
58852 KB |
Output is correct |
54 |
Correct |
121 ms |
58932 KB |
Output is correct |
55 |
Correct |
661 ms |
72960 KB |
Output is correct |
56 |
Correct |
520 ms |
71020 KB |
Output is correct |
57 |
Correct |
718 ms |
73756 KB |
Output is correct |
58 |
Correct |
606 ms |
72056 KB |
Output is correct |
59 |
Correct |
526 ms |
71824 KB |
Output is correct |
60 |
Correct |
773 ms |
74584 KB |
Output is correct |
61 |
Correct |
98 ms |
61736 KB |
Output is correct |
62 |
Correct |
105 ms |
61384 KB |
Output is correct |
63 |
Correct |
822 ms |
75824 KB |
Output is correct |
64 |
Correct |
816 ms |
75780 KB |
Output is correct |
65 |
Correct |
751 ms |
73732 KB |
Output is correct |
66 |
Correct |
703 ms |
73640 KB |
Output is correct |
67 |
Correct |
638 ms |
73568 KB |
Output is correct |
68 |
Correct |
670 ms |
73556 KB |
Output is correct |
69 |
Correct |
726 ms |
73604 KB |
Output is correct |
70 |
Correct |
678 ms |
73540 KB |
Output is correct |
71 |
Correct |
638 ms |
73632 KB |
Output is correct |
72 |
Correct |
623 ms |
73636 KB |
Output is correct |
73 |
Correct |
653 ms |
73904 KB |
Output is correct |
74 |
Correct |
714 ms |
73636 KB |
Output is correct |
75 |
Correct |
660 ms |
73652 KB |
Output is correct |
76 |
Correct |
659 ms |
73572 KB |
Output is correct |
77 |
Correct |
663 ms |
73632 KB |
Output is correct |
78 |
Correct |
655 ms |
73680 KB |
Output is correct |
79 |
Correct |
509 ms |
73188 KB |
Output is correct |
80 |
Correct |
529 ms |
73664 KB |
Output is correct |
81 |
Correct |
521 ms |
73496 KB |
Output is correct |
82 |
Correct |
132 ms |
58160 KB |
Output is correct |
83 |
Correct |
152 ms |
58084 KB |
Output is correct |
84 |
Correct |
35 ms |
55004 KB |
Output is correct |
85 |
Correct |
53 ms |
55112 KB |
Output is correct |
86 |
Correct |
172 ms |
58424 KB |
Output is correct |
87 |
Correct |
146 ms |
58432 KB |
Output is correct |
88 |
Correct |
141 ms |
58384 KB |
Output is correct |
89 |
Correct |
159 ms |
58520 KB |
Output is correct |
90 |
Correct |
165 ms |
58428 KB |
Output is correct |
91 |
Correct |
158 ms |
58420 KB |
Output is correct |
92 |
Correct |
81 ms |
58388 KB |
Output is correct |
93 |
Correct |
133 ms |
58572 KB |
Output is correct |
94 |
Correct |
106 ms |
57608 KB |
Output is correct |
95 |
Correct |
156 ms |
58080 KB |
Output is correct |
96 |
Correct |
136 ms |
58328 KB |
Output is correct |
97 |
Correct |
139 ms |
58412 KB |
Output is correct |
98 |
Correct |
99 ms |
58264 KB |
Output is correct |
99 |
Correct |
136 ms |
58852 KB |
Output is correct |
100 |
Correct |
154 ms |
58804 KB |
Output is correct |
101 |
Correct |
172 ms |
60556 KB |
Output is correct |
102 |
Correct |
186 ms |
60748 KB |
Output is correct |
103 |
Correct |
142 ms |
59300 KB |
Output is correct |
104 |
Correct |
153 ms |
60108 KB |
Output is correct |
105 |
Correct |
194 ms |
60700 KB |
Output is correct |
106 |
Correct |
42 ms |
57032 KB |
Output is correct |
107 |
Correct |
46 ms |
56596 KB |
Output is correct |
108 |
Correct |
104 ms |
60556 KB |
Output is correct |
109 |
Correct |
133 ms |
59248 KB |
Output is correct |
110 |
Correct |
158 ms |
60728 KB |
Output is correct |
111 |
Correct |
158 ms |
60692 KB |
Output is correct |
112 |
Correct |
138 ms |
59616 KB |
Output is correct |
113 |
Correct |
153 ms |
60048 KB |
Output is correct |
114 |
Correct |
160 ms |
59864 KB |
Output is correct |
115 |
Correct |
163 ms |
60376 KB |
Output is correct |
116 |
Correct |
100 ms |
58728 KB |
Output is correct |
117 |
Correct |
149 ms |
60044 KB |
Output is correct |
118 |
Correct |
133 ms |
59116 KB |
Output is correct |
119 |
Correct |
127 ms |
58968 KB |
Output is correct |
120 |
Correct |
173 ms |
60028 KB |
Output is correct |
121 |
Correct |
189 ms |
60016 KB |
Output is correct |
122 |
Correct |
147 ms |
60024 KB |
Output is correct |
123 |
Correct |
173 ms |
60024 KB |
Output is correct |
124 |
Correct |
149 ms |
60016 KB |
Output is correct |
125 |
Correct |
131 ms |
59316 KB |
Output is correct |
126 |
Correct |
95 ms |
59876 KB |
Output is correct |
127 |
Correct |
117 ms |
59336 KB |
Output is correct |
128 |
Correct |
137 ms |
59928 KB |
Output is correct |
129 |
Correct |
126 ms |
59944 KB |
Output is correct |
130 |
Correct |
691 ms |
80240 KB |
Output is correct |
131 |
Correct |
502 ms |
75680 KB |
Output is correct |
132 |
Correct |
673 ms |
80236 KB |
Output is correct |
133 |
Correct |
766 ms |
80752 KB |
Output is correct |
134 |
Correct |
643 ms |
79088 KB |
Output is correct |
135 |
Correct |
757 ms |
81524 KB |
Output is correct |
136 |
Correct |
794 ms |
82844 KB |
Output is correct |
137 |
Correct |
793 ms |
82872 KB |
Output is correct |
138 |
Correct |
686 ms |
80392 KB |
Output is correct |
139 |
Correct |
722 ms |
80404 KB |
Output is correct |
140 |
Correct |
674 ms |
80200 KB |
Output is correct |
141 |
Correct |
786 ms |
80340 KB |
Output is correct |
142 |
Correct |
729 ms |
80304 KB |
Output is correct |
143 |
Correct |
710 ms |
80212 KB |
Output is correct |
144 |
Correct |
693 ms |
80476 KB |
Output is correct |
145 |
Correct |
679 ms |
80384 KB |
Output is correct |
146 |
Correct |
700 ms |
80264 KB |
Output is correct |
147 |
Correct |
680 ms |
80344 KB |
Output is correct |
148 |
Correct |
682 ms |
80372 KB |
Output is correct |
149 |
Correct |
707 ms |
80288 KB |
Output is correct |
150 |
Correct |
279 ms |
79624 KB |
Output is correct |
151 |
Correct |
545 ms |
80140 KB |
Output is correct |
152 |
Correct |
581 ms |
80176 KB |
Output is correct |
153 |
Correct |
509 ms |
80104 KB |
Output is correct |