// #pragma GCC target("avx2")
// #pragma GCC optimize("O3")
// #include <x86intrin.h>
#include <bits/stdc++.h>
#include <chrono>
#include <random>
// @author: Vlapos
namespace operators
{
template <typename T1, typename T2>
std::istream &operator>>(std::istream &in, std::pair<T1, T2> &x)
{
in >> x.first >> x.second;
return in;
}
template <typename T1, typename T2>
std::ostream &operator<<(std::ostream &out, std::pair<T1, T2> x)
{
out << x.first << " " << x.second;
return out;
}
template <typename T1>
std::istream &operator>>(std::istream &in, std::vector<T1> &x)
{
for (auto &i : x)
in >> i;
return in;
}
template <typename T1>
std::ostream &operator<<(std::ostream &out, std::vector<T1> &x)
{
for (auto &i : x)
out << i << " ";
return out;
}
template <typename T1>
std::ostream &operator<<(std::ostream &out, std::set<T1> &x)
{
for (auto &i : x)
out << i << " ";
return out;
}
}
// name spaces
using namespace std;
using namespace operators;
// end of name spaces
// defines
#define ll long long
#define ull unsigned long long
#define pb push_back
#define mp make_pair
#define pii pair<int, int>
#define pll pair<ll, ll>
#define f first
#define s second
#define uint unsigned int
#define all(vc) vc.begin(), vc.end()
// end of defines
// usefull stuff
void boost()
{
ios_base ::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
}
inline int getbit(int &x, int &bt) { return (x >> bt) & 1; }
const int dx4[4] = {-1, 0, 0, 1};
const int dy4[4] = {0, -1, 1, 0};
const int dx8[8] = {-1, -1, -1, 0, 0, 1, 1, 1};
const int dy8[8] = {-1, -0, 1, -1, 1, -1, 0, 1};
const ll INF = (1e17) + 500;
const int BIG = (1e9) * 2 + 100;
const int MAXN = (1e5) + 5;
const int MOD7 = (1e9) + 7;
const int MOD9 = (1e9) + 9;
const uint MODFFT = 998244353;
#define int ll
struct segTree
{
struct Node
{
int mx = 0, op = 0;
};
vector<Node> tree;
int sz = 0;
void init(int n)
{
sz = 1;
while (sz < n)
sz *= 2;
tree.resize(2 * sz);
}
void upd(int v, int val)
{
tree[v].op += val;
tree[v].mx += val;
}
void push(int v, int lv, int rv)
{
if (rv - lv == 1 or tree[v].op == 0)
return;
upd(v * 2 + 1, tree[v].op);
upd(v * 2 + 2, tree[v].op);
tree[v].op = 0;
}
void updSeg(int l, int r, int val, int v, int lv, int rv)
{
push(v, lv, rv);
if (l <= lv and rv <= r)
{
upd(v, val);
return;
}
if (rv <= l or r <= lv)
return;
int m = (lv + rv) >> 1;
updSeg(l, r, val, v * 2 + 1, lv, m);
updSeg(l, r, val, v * 2 + 2, m, rv);
tree[v].mx = max(tree[v * 2 + 1].mx, tree[v * 2 + 2].mx);
}
void updSeg(int l, int r, int val)
{
updSeg(l, r, val, 0, 0, sz);
}
int getPos(int pos, int v, int lv, int rv)
{
push(v, lv, rv);
if (rv - lv == 1)
return tree[v].mx;
int m = (lv + rv) >> 1;
if (pos < m)
return getPos(pos, v * 2 + 1, lv, m);
return getPos(pos, v * 2 + 2, m, rv);
}
int getPos(int pos)
{
return getPos(pos, 0, 0, sz);
}
int getGoodPos(int v, int lv, int rv)
{
push(v, lv, rv);
if (rv - lv == 1)
return lv;
int m = (lv + rv) >> 1;
if (tree[v * 2 + 1].mx >= 0)
return getGoodPos(v * 2 + 1, lv, m);
return getGoodPos(v * 2 + 2, m, rv);
}
int getGoodPos()
{
return getGoodPos(0, 0, sz);
}
};
struct segTreeBF
{
struct Node
{
int add = 0, del = 0;
};
vector<Node> tree;
int sz = 0;
void init(int n)
{
sz = 1;
while (sz < n)
sz *= 2;
tree.resize(2 * sz);
}
void upd(int v, int val)
{
if (tree[v].add + val >= 0)
tree[v].add = tree[v].add + val;
else
{
tree[v].del += tree[v].add + val;
tree[v].add = 0;
}
}
void push(int v, int lv, int rv)
{
if (rv - lv == 1 or (tree[v].add == 0 and tree[v].del == 0))
return;
upd(v * 2 + 1, tree[v].del);
upd(v * 2 + 1, tree[v].add);
upd(v * 2 + 2, tree[v].del);
upd(v * 2 + 2, tree[v].add);
tree[v].add = tree[v].del = 0;
}
void updSeg(int l, int r, int val, int v, int lv, int rv)
{
push(v, lv, rv);
if (l <= lv and rv <= r)
{
upd(v, val);
return;
}
if (rv <= l or r <= lv)
return;
int m = (lv + rv) >> 1;
updSeg(l, r, val, v * 2 + 1, lv, m);
updSeg(l, r, val, v * 2 + 2, m, rv);
}
void updSeg(int l, int r, int val)
{
updSeg(l, r, val, 0, 0, sz);
}
int getPos(int pos, int v, int lv, int rv)
{
push(v, lv, rv);
if (rv - lv == 1)
{
return tree[v].add;
}
int m = (lv + rv) >> 1;
if (pos < m)
return getPos(pos, v * 2 + 1, lv, m);
return getPos(pos, v * 2 + 2, m, rv);
}
int getPos(int pos)
{
return getPos(pos, 0, 0, sz);
}
};
struct test
{
void solve(int testcase)
{
boost();
int n, m, q;
cin >> n >> m >> q;
int cntA = 0;
vector<vector<pair<int, int>>> ops(n);
vector<pair<pii, pii>> updates;
segTreeBF bf1, bf2;
vector<int> ans;
bf1.init(n);
bf2.init(n);
for (int i = 0; i < q; ++i)
{
int tp;
cin >> tp;
if (tp == 1)
{
int l, r, c, k;
cin >> l >> r >> c >> k;
--l;
updates.pb({{l, r}, {c, k}});
bf1.updSeg(l, r, k);
bf2.updSeg(l, r, k);
}
else if (tp == 2)
{
int l, r, k;
cin >> l >> r >> k;
--l;
bf2.updSeg(l, r, -k);
}
else
{
int p, val;
cin >> p >> val;
--p;
int cntLeave = bf1.getPos(p) - bf2.getPos(p);
ans.pb(0);
if (bf2.getPos(p) >= val)
ops[p].pb({cntLeave + val, cntA});
cntA++;
}
}
for (int i = 0; i < n; ++i)
ops[i].pb({INF, BIG});
segTree res;
res.init(n + 1);
vector<int> prev(n + 1);
for (int i = 0; i < n; ++i)
{
sort(all(ops[i]));
reverse(all(ops[i]));
int val = ops[i].back().f;
res.updSeg(i, i + 1, -val);
prev[i] = -val;
}
for (auto [seg, vals] : updates)
{
res.updSeg(seg.f, seg.s, vals.s);
int p = res.getGoodPos();
while (p < n)
{
ans[ops[p].back().s] = vals.f;
ops[p].pop_back();
int val = ops[p].back().f;
res.updSeg(p, p + 1, -prev[p] - val);
prev[p] = -val;
p = res.getGoodPos();
}
}
for (auto el : ans)
cout << el << '\n';
}
};
main()
{
boost();
int q = 1;
// cin >> q;
for (int i = 0; i < q; i++)
{
test t;
t.solve(i);
}
return 0;
}
//[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]//
// //
// Coded by Der_Vlἀpos //
// //
//[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]//
Compilation message
foodcourt.cpp:340:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
340 | main()
| ^~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
604 KB |
Output is correct |
2 |
Correct |
3 ms |
672 KB |
Output is correct |
3 |
Correct |
2 ms |
604 KB |
Output is correct |
4 |
Correct |
3 ms |
604 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
3 ms |
604 KB |
Output is correct |
8 |
Correct |
3 ms |
684 KB |
Output is correct |
9 |
Correct |
4 ms |
856 KB |
Output is correct |
10 |
Correct |
3 ms |
600 KB |
Output is correct |
11 |
Correct |
4 ms |
604 KB |
Output is correct |
12 |
Correct |
4 ms |
612 KB |
Output is correct |
13 |
Correct |
2 ms |
616 KB |
Output is correct |
14 |
Correct |
2 ms |
616 KB |
Output is correct |
15 |
Correct |
3 ms |
616 KB |
Output is correct |
16 |
Correct |
2 ms |
616 KB |
Output is correct |
17 |
Correct |
2 ms |
616 KB |
Output is correct |
18 |
Correct |
3 ms |
616 KB |
Output is correct |
19 |
Correct |
2 ms |
612 KB |
Output is correct |
20 |
Correct |
2 ms |
616 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
604 KB |
Output is correct |
2 |
Correct |
3 ms |
672 KB |
Output is correct |
3 |
Correct |
2 ms |
604 KB |
Output is correct |
4 |
Correct |
3 ms |
604 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
3 ms |
604 KB |
Output is correct |
8 |
Correct |
3 ms |
684 KB |
Output is correct |
9 |
Correct |
4 ms |
856 KB |
Output is correct |
10 |
Correct |
3 ms |
600 KB |
Output is correct |
11 |
Correct |
4 ms |
604 KB |
Output is correct |
12 |
Correct |
4 ms |
612 KB |
Output is correct |
13 |
Correct |
2 ms |
616 KB |
Output is correct |
14 |
Correct |
2 ms |
616 KB |
Output is correct |
15 |
Correct |
3 ms |
616 KB |
Output is correct |
16 |
Correct |
2 ms |
616 KB |
Output is correct |
17 |
Correct |
2 ms |
616 KB |
Output is correct |
18 |
Correct |
3 ms |
616 KB |
Output is correct |
19 |
Correct |
2 ms |
612 KB |
Output is correct |
20 |
Correct |
2 ms |
616 KB |
Output is correct |
21 |
Correct |
3 ms |
604 KB |
Output is correct |
22 |
Correct |
3 ms |
604 KB |
Output is correct |
23 |
Correct |
4 ms |
604 KB |
Output is correct |
24 |
Correct |
3 ms |
604 KB |
Output is correct |
25 |
Correct |
1 ms |
520 KB |
Output is correct |
26 |
Correct |
1 ms |
348 KB |
Output is correct |
27 |
Correct |
2 ms |
600 KB |
Output is correct |
28 |
Correct |
3 ms |
604 KB |
Output is correct |
29 |
Correct |
3 ms |
604 KB |
Output is correct |
30 |
Correct |
3 ms |
604 KB |
Output is correct |
31 |
Correct |
3 ms |
604 KB |
Output is correct |
32 |
Correct |
3 ms |
604 KB |
Output is correct |
33 |
Correct |
3 ms |
604 KB |
Output is correct |
34 |
Correct |
2 ms |
604 KB |
Output is correct |
35 |
Correct |
3 ms |
604 KB |
Output is correct |
36 |
Correct |
2 ms |
604 KB |
Output is correct |
37 |
Correct |
2 ms |
604 KB |
Output is correct |
38 |
Correct |
2 ms |
604 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
68 ms |
11492 KB |
Output is correct |
2 |
Correct |
73 ms |
11712 KB |
Output is correct |
3 |
Correct |
67 ms |
11472 KB |
Output is correct |
4 |
Correct |
84 ms |
11332 KB |
Output is correct |
5 |
Correct |
75 ms |
11864 KB |
Output is correct |
6 |
Correct |
75 ms |
11784 KB |
Output is correct |
7 |
Correct |
14 ms |
1748 KB |
Output is correct |
8 |
Correct |
15 ms |
1808 KB |
Output is correct |
9 |
Correct |
67 ms |
11456 KB |
Output is correct |
10 |
Correct |
79 ms |
11728 KB |
Output is correct |
11 |
Correct |
78 ms |
11532 KB |
Output is correct |
12 |
Correct |
77 ms |
11788 KB |
Output is correct |
13 |
Correct |
62 ms |
10504 KB |
Output is correct |
14 |
Correct |
80 ms |
12032 KB |
Output is correct |
15 |
Correct |
73 ms |
11156 KB |
Output is correct |
16 |
Correct |
82 ms |
12500 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
442 ms |
43848 KB |
Output is correct |
2 |
Correct |
404 ms |
40348 KB |
Output is correct |
3 |
Correct |
511 ms |
45444 KB |
Output is correct |
4 |
Correct |
437 ms |
45280 KB |
Output is correct |
5 |
Correct |
384 ms |
41052 KB |
Output is correct |
6 |
Correct |
574 ms |
45880 KB |
Output is correct |
7 |
Correct |
64 ms |
7620 KB |
Output is correct |
8 |
Correct |
66 ms |
6820 KB |
Output is correct |
9 |
Correct |
510 ms |
47012 KB |
Output is correct |
10 |
Correct |
526 ms |
47008 KB |
Output is correct |
11 |
Correct |
461 ms |
44920 KB |
Output is correct |
12 |
Correct |
497 ms |
44944 KB |
Output is correct |
13 |
Correct |
472 ms |
46024 KB |
Output is correct |
14 |
Correct |
489 ms |
44824 KB |
Output is correct |
15 |
Correct |
512 ms |
45592 KB |
Output is correct |
16 |
Correct |
528 ms |
44760 KB |
Output is correct |
17 |
Correct |
562 ms |
44900 KB |
Output is correct |
18 |
Correct |
492 ms |
45724 KB |
Output is correct |
19 |
Correct |
522 ms |
44884 KB |
Output is correct |
20 |
Correct |
477 ms |
45652 KB |
Output is correct |
21 |
Correct |
507 ms |
44828 KB |
Output is correct |
22 |
Correct |
542 ms |
45156 KB |
Output is correct |
23 |
Correct |
491 ms |
44912 KB |
Output is correct |
24 |
Correct |
494 ms |
44936 KB |
Output is correct |
25 |
Correct |
383 ms |
41404 KB |
Output is correct |
26 |
Correct |
421 ms |
45480 KB |
Output is correct |
27 |
Correct |
363 ms |
47636 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
604 KB |
Output is correct |
2 |
Correct |
3 ms |
672 KB |
Output is correct |
3 |
Correct |
2 ms |
604 KB |
Output is correct |
4 |
Correct |
3 ms |
604 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
3 ms |
604 KB |
Output is correct |
8 |
Correct |
3 ms |
684 KB |
Output is correct |
9 |
Correct |
4 ms |
856 KB |
Output is correct |
10 |
Correct |
3 ms |
600 KB |
Output is correct |
11 |
Correct |
4 ms |
604 KB |
Output is correct |
12 |
Correct |
4 ms |
612 KB |
Output is correct |
13 |
Correct |
2 ms |
616 KB |
Output is correct |
14 |
Correct |
2 ms |
616 KB |
Output is correct |
15 |
Correct |
3 ms |
616 KB |
Output is correct |
16 |
Correct |
2 ms |
616 KB |
Output is correct |
17 |
Correct |
2 ms |
616 KB |
Output is correct |
18 |
Correct |
3 ms |
616 KB |
Output is correct |
19 |
Correct |
2 ms |
612 KB |
Output is correct |
20 |
Correct |
2 ms |
616 KB |
Output is correct |
21 |
Correct |
68 ms |
11492 KB |
Output is correct |
22 |
Correct |
73 ms |
11712 KB |
Output is correct |
23 |
Correct |
67 ms |
11472 KB |
Output is correct |
24 |
Correct |
84 ms |
11332 KB |
Output is correct |
25 |
Correct |
75 ms |
11864 KB |
Output is correct |
26 |
Correct |
75 ms |
11784 KB |
Output is correct |
27 |
Correct |
14 ms |
1748 KB |
Output is correct |
28 |
Correct |
15 ms |
1808 KB |
Output is correct |
29 |
Correct |
67 ms |
11456 KB |
Output is correct |
30 |
Correct |
79 ms |
11728 KB |
Output is correct |
31 |
Correct |
78 ms |
11532 KB |
Output is correct |
32 |
Correct |
77 ms |
11788 KB |
Output is correct |
33 |
Correct |
62 ms |
10504 KB |
Output is correct |
34 |
Correct |
80 ms |
12032 KB |
Output is correct |
35 |
Correct |
73 ms |
11156 KB |
Output is correct |
36 |
Correct |
82 ms |
12500 KB |
Output is correct |
37 |
Correct |
89 ms |
11292 KB |
Output is correct |
38 |
Correct |
83 ms |
11400 KB |
Output is correct |
39 |
Correct |
12 ms |
1860 KB |
Output is correct |
40 |
Correct |
15 ms |
1660 KB |
Output is correct |
41 |
Correct |
86 ms |
11828 KB |
Output is correct |
42 |
Correct |
96 ms |
11796 KB |
Output is correct |
43 |
Correct |
99 ms |
11812 KB |
Output is correct |
44 |
Correct |
95 ms |
11624 KB |
Output is correct |
45 |
Correct |
96 ms |
11812 KB |
Output is correct |
46 |
Correct |
105 ms |
11880 KB |
Output is correct |
47 |
Correct |
58 ms |
11696 KB |
Output is correct |
48 |
Correct |
90 ms |
11716 KB |
Output is correct |
49 |
Correct |
69 ms |
10024 KB |
Output is correct |
50 |
Correct |
86 ms |
11368 KB |
Output is correct |
51 |
Correct |
104 ms |
11624 KB |
Output is correct |
52 |
Correct |
100 ms |
11812 KB |
Output is correct |
53 |
Correct |
63 ms |
11476 KB |
Output is correct |
54 |
Correct |
80 ms |
12260 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
88 ms |
11976 KB |
Output is correct |
2 |
Correct |
94 ms |
11732 KB |
Output is correct |
3 |
Correct |
100 ms |
12488 KB |
Output is correct |
4 |
Correct |
79 ms |
11652 KB |
Output is correct |
5 |
Correct |
87 ms |
11896 KB |
Output is correct |
6 |
Correct |
99 ms |
12356 KB |
Output is correct |
7 |
Correct |
18 ms |
2256 KB |
Output is correct |
8 |
Correct |
17 ms |
2256 KB |
Output is correct |
9 |
Correct |
80 ms |
12424 KB |
Output is correct |
10 |
Correct |
70 ms |
11384 KB |
Output is correct |
11 |
Correct |
101 ms |
12396 KB |
Output is correct |
12 |
Correct |
93 ms |
12344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
604 KB |
Output is correct |
2 |
Correct |
3 ms |
672 KB |
Output is correct |
3 |
Correct |
2 ms |
604 KB |
Output is correct |
4 |
Correct |
3 ms |
604 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
3 ms |
604 KB |
Output is correct |
8 |
Correct |
3 ms |
684 KB |
Output is correct |
9 |
Correct |
4 ms |
856 KB |
Output is correct |
10 |
Correct |
3 ms |
600 KB |
Output is correct |
11 |
Correct |
4 ms |
604 KB |
Output is correct |
12 |
Correct |
4 ms |
612 KB |
Output is correct |
13 |
Correct |
2 ms |
616 KB |
Output is correct |
14 |
Correct |
2 ms |
616 KB |
Output is correct |
15 |
Correct |
3 ms |
616 KB |
Output is correct |
16 |
Correct |
2 ms |
616 KB |
Output is correct |
17 |
Correct |
2 ms |
616 KB |
Output is correct |
18 |
Correct |
3 ms |
616 KB |
Output is correct |
19 |
Correct |
2 ms |
612 KB |
Output is correct |
20 |
Correct |
2 ms |
616 KB |
Output is correct |
21 |
Correct |
3 ms |
604 KB |
Output is correct |
22 |
Correct |
3 ms |
604 KB |
Output is correct |
23 |
Correct |
4 ms |
604 KB |
Output is correct |
24 |
Correct |
3 ms |
604 KB |
Output is correct |
25 |
Correct |
1 ms |
520 KB |
Output is correct |
26 |
Correct |
1 ms |
348 KB |
Output is correct |
27 |
Correct |
2 ms |
600 KB |
Output is correct |
28 |
Correct |
3 ms |
604 KB |
Output is correct |
29 |
Correct |
3 ms |
604 KB |
Output is correct |
30 |
Correct |
3 ms |
604 KB |
Output is correct |
31 |
Correct |
3 ms |
604 KB |
Output is correct |
32 |
Correct |
3 ms |
604 KB |
Output is correct |
33 |
Correct |
3 ms |
604 KB |
Output is correct |
34 |
Correct |
2 ms |
604 KB |
Output is correct |
35 |
Correct |
3 ms |
604 KB |
Output is correct |
36 |
Correct |
2 ms |
604 KB |
Output is correct |
37 |
Correct |
2 ms |
604 KB |
Output is correct |
38 |
Correct |
2 ms |
604 KB |
Output is correct |
39 |
Correct |
68 ms |
11492 KB |
Output is correct |
40 |
Correct |
73 ms |
11712 KB |
Output is correct |
41 |
Correct |
67 ms |
11472 KB |
Output is correct |
42 |
Correct |
84 ms |
11332 KB |
Output is correct |
43 |
Correct |
75 ms |
11864 KB |
Output is correct |
44 |
Correct |
75 ms |
11784 KB |
Output is correct |
45 |
Correct |
14 ms |
1748 KB |
Output is correct |
46 |
Correct |
15 ms |
1808 KB |
Output is correct |
47 |
Correct |
67 ms |
11456 KB |
Output is correct |
48 |
Correct |
79 ms |
11728 KB |
Output is correct |
49 |
Correct |
78 ms |
11532 KB |
Output is correct |
50 |
Correct |
77 ms |
11788 KB |
Output is correct |
51 |
Correct |
62 ms |
10504 KB |
Output is correct |
52 |
Correct |
80 ms |
12032 KB |
Output is correct |
53 |
Correct |
73 ms |
11156 KB |
Output is correct |
54 |
Correct |
82 ms |
12500 KB |
Output is correct |
55 |
Correct |
89 ms |
11292 KB |
Output is correct |
56 |
Correct |
83 ms |
11400 KB |
Output is correct |
57 |
Correct |
12 ms |
1860 KB |
Output is correct |
58 |
Correct |
15 ms |
1660 KB |
Output is correct |
59 |
Correct |
86 ms |
11828 KB |
Output is correct |
60 |
Correct |
96 ms |
11796 KB |
Output is correct |
61 |
Correct |
99 ms |
11812 KB |
Output is correct |
62 |
Correct |
95 ms |
11624 KB |
Output is correct |
63 |
Correct |
96 ms |
11812 KB |
Output is correct |
64 |
Correct |
105 ms |
11880 KB |
Output is correct |
65 |
Correct |
58 ms |
11696 KB |
Output is correct |
66 |
Correct |
90 ms |
11716 KB |
Output is correct |
67 |
Correct |
69 ms |
10024 KB |
Output is correct |
68 |
Correct |
86 ms |
11368 KB |
Output is correct |
69 |
Correct |
104 ms |
11624 KB |
Output is correct |
70 |
Correct |
100 ms |
11812 KB |
Output is correct |
71 |
Correct |
63 ms |
11476 KB |
Output is correct |
72 |
Correct |
80 ms |
12260 KB |
Output is correct |
73 |
Correct |
88 ms |
11976 KB |
Output is correct |
74 |
Correct |
94 ms |
11732 KB |
Output is correct |
75 |
Correct |
100 ms |
12488 KB |
Output is correct |
76 |
Correct |
79 ms |
11652 KB |
Output is correct |
77 |
Correct |
87 ms |
11896 KB |
Output is correct |
78 |
Correct |
99 ms |
12356 KB |
Output is correct |
79 |
Correct |
18 ms |
2256 KB |
Output is correct |
80 |
Correct |
17 ms |
2256 KB |
Output is correct |
81 |
Correct |
80 ms |
12424 KB |
Output is correct |
82 |
Correct |
70 ms |
11384 KB |
Output is correct |
83 |
Correct |
101 ms |
12396 KB |
Output is correct |
84 |
Correct |
93 ms |
12344 KB |
Output is correct |
85 |
Correct |
89 ms |
10808 KB |
Output is correct |
86 |
Correct |
104 ms |
11872 KB |
Output is correct |
87 |
Correct |
94 ms |
11564 KB |
Output is correct |
88 |
Correct |
104 ms |
12068 KB |
Output is correct |
89 |
Correct |
64 ms |
10508 KB |
Output is correct |
90 |
Correct |
95 ms |
11696 KB |
Output is correct |
91 |
Correct |
85 ms |
10460 KB |
Output is correct |
92 |
Correct |
77 ms |
10124 KB |
Output is correct |
93 |
Correct |
104 ms |
11616 KB |
Output is correct |
94 |
Correct |
100 ms |
11816 KB |
Output is correct |
95 |
Correct |
95 ms |
11368 KB |
Output is correct |
96 |
Correct |
104 ms |
11692 KB |
Output is correct |
97 |
Correct |
102 ms |
11816 KB |
Output is correct |
98 |
Correct |
84 ms |
10432 KB |
Output is correct |
99 |
Correct |
61 ms |
11836 KB |
Output is correct |
100 |
Correct |
77 ms |
11080 KB |
Output is correct |
101 |
Correct |
94 ms |
11780 KB |
Output is correct |
102 |
Correct |
80 ms |
12276 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
604 KB |
Output is correct |
2 |
Correct |
3 ms |
672 KB |
Output is correct |
3 |
Correct |
2 ms |
604 KB |
Output is correct |
4 |
Correct |
3 ms |
604 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
3 ms |
604 KB |
Output is correct |
8 |
Correct |
3 ms |
684 KB |
Output is correct |
9 |
Correct |
4 ms |
856 KB |
Output is correct |
10 |
Correct |
3 ms |
600 KB |
Output is correct |
11 |
Correct |
4 ms |
604 KB |
Output is correct |
12 |
Correct |
4 ms |
612 KB |
Output is correct |
13 |
Correct |
2 ms |
616 KB |
Output is correct |
14 |
Correct |
2 ms |
616 KB |
Output is correct |
15 |
Correct |
3 ms |
616 KB |
Output is correct |
16 |
Correct |
2 ms |
616 KB |
Output is correct |
17 |
Correct |
2 ms |
616 KB |
Output is correct |
18 |
Correct |
3 ms |
616 KB |
Output is correct |
19 |
Correct |
2 ms |
612 KB |
Output is correct |
20 |
Correct |
2 ms |
616 KB |
Output is correct |
21 |
Correct |
3 ms |
604 KB |
Output is correct |
22 |
Correct |
3 ms |
604 KB |
Output is correct |
23 |
Correct |
4 ms |
604 KB |
Output is correct |
24 |
Correct |
3 ms |
604 KB |
Output is correct |
25 |
Correct |
1 ms |
520 KB |
Output is correct |
26 |
Correct |
1 ms |
348 KB |
Output is correct |
27 |
Correct |
2 ms |
600 KB |
Output is correct |
28 |
Correct |
3 ms |
604 KB |
Output is correct |
29 |
Correct |
3 ms |
604 KB |
Output is correct |
30 |
Correct |
3 ms |
604 KB |
Output is correct |
31 |
Correct |
3 ms |
604 KB |
Output is correct |
32 |
Correct |
3 ms |
604 KB |
Output is correct |
33 |
Correct |
3 ms |
604 KB |
Output is correct |
34 |
Correct |
2 ms |
604 KB |
Output is correct |
35 |
Correct |
3 ms |
604 KB |
Output is correct |
36 |
Correct |
2 ms |
604 KB |
Output is correct |
37 |
Correct |
2 ms |
604 KB |
Output is correct |
38 |
Correct |
2 ms |
604 KB |
Output is correct |
39 |
Correct |
68 ms |
11492 KB |
Output is correct |
40 |
Correct |
73 ms |
11712 KB |
Output is correct |
41 |
Correct |
67 ms |
11472 KB |
Output is correct |
42 |
Correct |
84 ms |
11332 KB |
Output is correct |
43 |
Correct |
75 ms |
11864 KB |
Output is correct |
44 |
Correct |
75 ms |
11784 KB |
Output is correct |
45 |
Correct |
14 ms |
1748 KB |
Output is correct |
46 |
Correct |
15 ms |
1808 KB |
Output is correct |
47 |
Correct |
67 ms |
11456 KB |
Output is correct |
48 |
Correct |
79 ms |
11728 KB |
Output is correct |
49 |
Correct |
78 ms |
11532 KB |
Output is correct |
50 |
Correct |
77 ms |
11788 KB |
Output is correct |
51 |
Correct |
62 ms |
10504 KB |
Output is correct |
52 |
Correct |
80 ms |
12032 KB |
Output is correct |
53 |
Correct |
73 ms |
11156 KB |
Output is correct |
54 |
Correct |
82 ms |
12500 KB |
Output is correct |
55 |
Correct |
442 ms |
43848 KB |
Output is correct |
56 |
Correct |
404 ms |
40348 KB |
Output is correct |
57 |
Correct |
511 ms |
45444 KB |
Output is correct |
58 |
Correct |
437 ms |
45280 KB |
Output is correct |
59 |
Correct |
384 ms |
41052 KB |
Output is correct |
60 |
Correct |
574 ms |
45880 KB |
Output is correct |
61 |
Correct |
64 ms |
7620 KB |
Output is correct |
62 |
Correct |
66 ms |
6820 KB |
Output is correct |
63 |
Correct |
510 ms |
47012 KB |
Output is correct |
64 |
Correct |
526 ms |
47008 KB |
Output is correct |
65 |
Correct |
461 ms |
44920 KB |
Output is correct |
66 |
Correct |
497 ms |
44944 KB |
Output is correct |
67 |
Correct |
472 ms |
46024 KB |
Output is correct |
68 |
Correct |
489 ms |
44824 KB |
Output is correct |
69 |
Correct |
512 ms |
45592 KB |
Output is correct |
70 |
Correct |
528 ms |
44760 KB |
Output is correct |
71 |
Correct |
562 ms |
44900 KB |
Output is correct |
72 |
Correct |
492 ms |
45724 KB |
Output is correct |
73 |
Correct |
522 ms |
44884 KB |
Output is correct |
74 |
Correct |
477 ms |
45652 KB |
Output is correct |
75 |
Correct |
507 ms |
44828 KB |
Output is correct |
76 |
Correct |
542 ms |
45156 KB |
Output is correct |
77 |
Correct |
491 ms |
44912 KB |
Output is correct |
78 |
Correct |
494 ms |
44936 KB |
Output is correct |
79 |
Correct |
383 ms |
41404 KB |
Output is correct |
80 |
Correct |
421 ms |
45480 KB |
Output is correct |
81 |
Correct |
363 ms |
47636 KB |
Output is correct |
82 |
Correct |
89 ms |
11292 KB |
Output is correct |
83 |
Correct |
83 ms |
11400 KB |
Output is correct |
84 |
Correct |
12 ms |
1860 KB |
Output is correct |
85 |
Correct |
15 ms |
1660 KB |
Output is correct |
86 |
Correct |
86 ms |
11828 KB |
Output is correct |
87 |
Correct |
96 ms |
11796 KB |
Output is correct |
88 |
Correct |
99 ms |
11812 KB |
Output is correct |
89 |
Correct |
95 ms |
11624 KB |
Output is correct |
90 |
Correct |
96 ms |
11812 KB |
Output is correct |
91 |
Correct |
105 ms |
11880 KB |
Output is correct |
92 |
Correct |
58 ms |
11696 KB |
Output is correct |
93 |
Correct |
90 ms |
11716 KB |
Output is correct |
94 |
Correct |
69 ms |
10024 KB |
Output is correct |
95 |
Correct |
86 ms |
11368 KB |
Output is correct |
96 |
Correct |
104 ms |
11624 KB |
Output is correct |
97 |
Correct |
100 ms |
11812 KB |
Output is correct |
98 |
Correct |
63 ms |
11476 KB |
Output is correct |
99 |
Correct |
80 ms |
12260 KB |
Output is correct |
100 |
Correct |
88 ms |
11976 KB |
Output is correct |
101 |
Correct |
94 ms |
11732 KB |
Output is correct |
102 |
Correct |
100 ms |
12488 KB |
Output is correct |
103 |
Correct |
79 ms |
11652 KB |
Output is correct |
104 |
Correct |
87 ms |
11896 KB |
Output is correct |
105 |
Correct |
99 ms |
12356 KB |
Output is correct |
106 |
Correct |
18 ms |
2256 KB |
Output is correct |
107 |
Correct |
17 ms |
2256 KB |
Output is correct |
108 |
Correct |
80 ms |
12424 KB |
Output is correct |
109 |
Correct |
70 ms |
11384 KB |
Output is correct |
110 |
Correct |
101 ms |
12396 KB |
Output is correct |
111 |
Correct |
93 ms |
12344 KB |
Output is correct |
112 |
Correct |
89 ms |
10808 KB |
Output is correct |
113 |
Correct |
104 ms |
11872 KB |
Output is correct |
114 |
Correct |
94 ms |
11564 KB |
Output is correct |
115 |
Correct |
104 ms |
12068 KB |
Output is correct |
116 |
Correct |
64 ms |
10508 KB |
Output is correct |
117 |
Correct |
95 ms |
11696 KB |
Output is correct |
118 |
Correct |
85 ms |
10460 KB |
Output is correct |
119 |
Correct |
77 ms |
10124 KB |
Output is correct |
120 |
Correct |
104 ms |
11616 KB |
Output is correct |
121 |
Correct |
100 ms |
11816 KB |
Output is correct |
122 |
Correct |
95 ms |
11368 KB |
Output is correct |
123 |
Correct |
104 ms |
11692 KB |
Output is correct |
124 |
Correct |
102 ms |
11816 KB |
Output is correct |
125 |
Correct |
84 ms |
10432 KB |
Output is correct |
126 |
Correct |
61 ms |
11836 KB |
Output is correct |
127 |
Correct |
77 ms |
11080 KB |
Output is correct |
128 |
Correct |
94 ms |
11780 KB |
Output is correct |
129 |
Correct |
80 ms |
12276 KB |
Output is correct |
130 |
Correct |
479 ms |
44832 KB |
Output is correct |
131 |
Correct |
331 ms |
40060 KB |
Output is correct |
132 |
Correct |
501 ms |
45756 KB |
Output is correct |
133 |
Correct |
477 ms |
45248 KB |
Output is correct |
134 |
Correct |
446 ms |
45100 KB |
Output is correct |
135 |
Correct |
548 ms |
46076 KB |
Output is correct |
136 |
Correct |
503 ms |
47540 KB |
Output is correct |
137 |
Correct |
516 ms |
47844 KB |
Output is correct |
138 |
Correct |
436 ms |
45956 KB |
Output is correct |
139 |
Correct |
448 ms |
45080 KB |
Output is correct |
140 |
Correct |
465 ms |
45820 KB |
Output is correct |
141 |
Correct |
472 ms |
45496 KB |
Output is correct |
142 |
Correct |
486 ms |
45852 KB |
Output is correct |
143 |
Correct |
499 ms |
45084 KB |
Output is correct |
144 |
Correct |
458 ms |
45340 KB |
Output is correct |
145 |
Correct |
503 ms |
45412 KB |
Output is correct |
146 |
Correct |
494 ms |
45872 KB |
Output is correct |
147 |
Correct |
464 ms |
45080 KB |
Output is correct |
148 |
Correct |
507 ms |
45080 KB |
Output is correct |
149 |
Correct |
524 ms |
46108 KB |
Output is correct |
150 |
Correct |
272 ms |
45236 KB |
Output is correct |
151 |
Correct |
419 ms |
45244 KB |
Output is correct |
152 |
Correct |
430 ms |
45248 KB |
Output is correct |
153 |
Correct |
374 ms |
47548 KB |
Output is correct |