#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool mnto(T& a, T b) {return a > b ? a = b, 1 : 0;}
template <class T>
inline bool mxto(T& a, T b) {return a < b ? a = b, 1: 0;}
#define REP(i, s, e) for (int i = s; i < e; i++)
#define RREP(i, s, e) for (int i = s; i >= e; i--)
typedef long long ll;
typedef long double ld;
#define MP make_pair
#define FI first
#define SE second
typedef pair<int, int> ii;
typedef pair<ll, ll> pll;
#define MT make_tuple
typedef tuple<int, int, int> iii;
#define ALL(_a) _a.begin(), _a.end()
#define pb push_back
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<ii> vii;
#ifdef DEBUG
#define debug(args...) _debug(args)
void _debug(const char* format, ...) {
va_list args;
va_start(args, format);
vprintf(format, args);
va_end(args);
}
#else
#define debug(args...)
#endif
#define INF 1000000005
#define LINF 1000000000000000005
#define MOD 1000000007
#define MAXN 300005
struct event {
int v, i, t;
};
struct query {
ll v;
int i;
};
int n, m, q;
vector<event> events[MAXN];
vector<query> queries[MAXN];
int grp[MAXN], ans[MAXN];
namespace st {
#define MLR int mid = lo + hi >> 1; int lc = u * 2, rc = u * 2 + 1
ll mn[MAXN * 4], lazy[MAXN * 4];
void propo(int u, int lo, int hi) {
if (lazy[u] == 0 || lo == hi) return;
MLR;
lazy[lc] += lazy[u];
lazy[rc] += lazy[u];
mn[lc] += lazy[u];
mn[rc] += lazy[u];
lazy[u] = 0;
}
void incre(int s, int e, int x, int u = 1, int lo = 0, int hi = q) {
if (lo >= s && hi <= e) {
lazy[u] += x;
mn[u] += x;
return;
}
propo(u, lo, hi);
MLR;
if (s <= mid) {
incre(s, e, x, lc, lo, mid);
}
if (e > mid) {
incre(s, e, x, rc, mid + 1, hi);
}
mn[u] = min(mn[lc], mn[rc]);
}
ll qmn(int s, int e, int u = 1, int lo = 0, int hi = q) {
if (lo >= s && hi <= e) {
return mn[u];
}
propo(u, lo, hi);
MLR;
if (e <= mid) {
return qmn(s, e, lc, lo, mid);
} else if (s > mid) {
return qmn(s, e, rc, mid + 1, hi);
} else {
return min(qmn(s, e, lc, lo, mid), qmn(s, e, rc, mid + 1, hi));
}
}
}
namespace fw {
ll v[MAXN];
void incre(int i, int x) {
for (; i <= q; i += i & -i) v[i] += x;
}
ll qsm(int i) {
ll res = 0;
for (; i > 0; i -= i & -i) res += v[i];
return res;
}
int get(ll x) {
int id = 0;
RREP (k, 25, 0) {
id ^= (1 << k);
if (id > q || v[id] >= x) {
id ^= (1 << k);
} else {
x -= v[id];
}
}
id++;
return id;
}
}
int main() {
scanf("%d%d%d", &n, &m, &q);
memset(ans, -1, sizeof ans);
REP (i, 1, q + 1) {
int t; scanf("%d", &t);
if (t == 1) {
int l, r, c, k; scanf("%d%d%d%d", &l, &r, &c, &k);
events[l].pb({k, i, 0});
events[r + 1].pb({-k, i, 0});
grp[i] = c;
} else if (t == 2) {
int l, r, k; scanf("%d%d%d", &l, &r, &k);
events[l].pb({-k, i, 1});
events[r + 1].pb({k, i, 1});
} else {
int a; ll b; scanf("%d%lld", &a, &b);
queries[a].pb({b, i});
}
}
REP (i, 1, n + 1) {
debug("%d:\n", i);
for (event &e : events[i]) {
auto [v, i, t] = e;
st::incre(i, q, v);
debug(" st: %d to %d + %d\n", i, q, v);
if (!t) {
fw::incre(i, v);
debug(" fw: %d + %d\n", i, v);
}
}
for (query q : queries[i]) {
auto [v, i] = q;
debug(" %d %d\n", v, i);
ll rem = st::qmn(i, i) - st::qmn(0, i);
ll tot = fw::qsm(i);
ll rmv = tot - rem;
debug(" %lld %lld %lld\n", rem, tot, rmv);
v += rmv;
if (v > tot) {
ans[i] = 0;
} else {
int id = fw::get(v);
ans[i] = grp[id];
}
}
}
REP (i, 1, q + 1) {
if (ans[i] == -1) continue;
printf("%d\n", ans[i]);
}
return 0;
}
Compilation message
foodcourt.cpp: In function 'void st::propo(int, int, int)':
foodcourt.cpp:56:26: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
56 | #define MLR int mid = lo + hi >> 1; int lc = u * 2, rc = u * 2 + 1
| ~~~^~~~
foodcourt.cpp:60:3: note: in expansion of macro 'MLR'
60 | MLR;
| ^~~
foodcourt.cpp:56:17: warning: unused variable 'mid' [-Wunused-variable]
56 | #define MLR int mid = lo + hi >> 1; int lc = u * 2, rc = u * 2 + 1
| ^~~
foodcourt.cpp:60:3: note: in expansion of macro 'MLR'
60 | MLR;
| ^~~
foodcourt.cpp: In function 'void st::incre(int, int, int, int, int, int)':
foodcourt.cpp:56:26: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
56 | #define MLR int mid = lo + hi >> 1; int lc = u * 2, rc = u * 2 + 1
| ~~~^~~~
foodcourt.cpp:74:3: note: in expansion of macro 'MLR'
74 | MLR;
| ^~~
foodcourt.cpp: In function 'll st::qmn(int, int, int, int, int)':
foodcourt.cpp:56:26: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
56 | #define MLR int mid = lo + hi >> 1; int lc = u * 2, rc = u * 2 + 1
| ~~~^~~~
foodcourt.cpp:88:3: note: in expansion of macro 'MLR'
88 | MLR;
| ^~~
foodcourt.cpp: In function 'int main()':
foodcourt.cpp:125:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
125 | scanf("%d%d%d", &n, &m, &q);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:128:15: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
128 | int t; scanf("%d", &t);
| ~~~~~^~~~~~~~~~
foodcourt.cpp:130:25: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
130 | int l, r, c, k; scanf("%d%d%d%d", &l, &r, &c, &k);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:135:22: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
135 | int l, r, k; scanf("%d%d%d", &l, &r, &k);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:139:22: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
139 | int a; ll b; scanf("%d%lld", &a, &b);
| ~~~~~^~~~~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
15692 KB |
Output is correct |
2 |
Correct |
13 ms |
15736 KB |
Output is correct |
3 |
Correct |
12 ms |
15688 KB |
Output is correct |
4 |
Correct |
12 ms |
15700 KB |
Output is correct |
5 |
Correct |
12 ms |
15692 KB |
Output is correct |
6 |
Correct |
12 ms |
15684 KB |
Output is correct |
7 |
Correct |
13 ms |
15692 KB |
Output is correct |
8 |
Correct |
13 ms |
15660 KB |
Output is correct |
9 |
Correct |
13 ms |
15692 KB |
Output is correct |
10 |
Correct |
13 ms |
15692 KB |
Output is correct |
11 |
Correct |
14 ms |
15692 KB |
Output is correct |
12 |
Correct |
12 ms |
15692 KB |
Output is correct |
13 |
Correct |
11 ms |
15680 KB |
Output is correct |
14 |
Correct |
12 ms |
15820 KB |
Output is correct |
15 |
Correct |
11 ms |
15628 KB |
Output is correct |
16 |
Correct |
12 ms |
15684 KB |
Output is correct |
17 |
Correct |
12 ms |
15680 KB |
Output is correct |
18 |
Correct |
13 ms |
15692 KB |
Output is correct |
19 |
Correct |
15 ms |
15672 KB |
Output is correct |
20 |
Correct |
13 ms |
15692 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
15692 KB |
Output is correct |
2 |
Correct |
13 ms |
15736 KB |
Output is correct |
3 |
Correct |
12 ms |
15688 KB |
Output is correct |
4 |
Correct |
12 ms |
15700 KB |
Output is correct |
5 |
Correct |
12 ms |
15692 KB |
Output is correct |
6 |
Correct |
12 ms |
15684 KB |
Output is correct |
7 |
Correct |
13 ms |
15692 KB |
Output is correct |
8 |
Correct |
13 ms |
15660 KB |
Output is correct |
9 |
Correct |
13 ms |
15692 KB |
Output is correct |
10 |
Correct |
13 ms |
15692 KB |
Output is correct |
11 |
Correct |
14 ms |
15692 KB |
Output is correct |
12 |
Correct |
12 ms |
15692 KB |
Output is correct |
13 |
Correct |
11 ms |
15680 KB |
Output is correct |
14 |
Correct |
12 ms |
15820 KB |
Output is correct |
15 |
Correct |
11 ms |
15628 KB |
Output is correct |
16 |
Correct |
12 ms |
15684 KB |
Output is correct |
17 |
Correct |
12 ms |
15680 KB |
Output is correct |
18 |
Correct |
13 ms |
15692 KB |
Output is correct |
19 |
Correct |
15 ms |
15672 KB |
Output is correct |
20 |
Correct |
13 ms |
15692 KB |
Output is correct |
21 |
Correct |
15 ms |
15784 KB |
Output is correct |
22 |
Correct |
14 ms |
15760 KB |
Output is correct |
23 |
Correct |
14 ms |
15756 KB |
Output is correct |
24 |
Correct |
13 ms |
15692 KB |
Output is correct |
25 |
Correct |
12 ms |
15688 KB |
Output is correct |
26 |
Correct |
11 ms |
15692 KB |
Output is correct |
27 |
Correct |
13 ms |
15680 KB |
Output is correct |
28 |
Correct |
15 ms |
15788 KB |
Output is correct |
29 |
Correct |
13 ms |
15796 KB |
Output is correct |
30 |
Correct |
14 ms |
15808 KB |
Output is correct |
31 |
Correct |
12 ms |
15692 KB |
Output is correct |
32 |
Correct |
13 ms |
15692 KB |
Output is correct |
33 |
Correct |
12 ms |
15688 KB |
Output is correct |
34 |
Correct |
12 ms |
15764 KB |
Output is correct |
35 |
Correct |
13 ms |
15756 KB |
Output is correct |
36 |
Correct |
12 ms |
15808 KB |
Output is correct |
37 |
Correct |
17 ms |
15680 KB |
Output is correct |
38 |
Correct |
13 ms |
15772 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
108 ms |
20852 KB |
Output is correct |
2 |
Correct |
137 ms |
20876 KB |
Output is correct |
3 |
Correct |
121 ms |
20852 KB |
Output is correct |
4 |
Correct |
105 ms |
20820 KB |
Output is correct |
5 |
Correct |
103 ms |
20892 KB |
Output is correct |
6 |
Correct |
103 ms |
20824 KB |
Output is correct |
7 |
Correct |
70 ms |
19816 KB |
Output is correct |
8 |
Correct |
59 ms |
19732 KB |
Output is correct |
9 |
Correct |
113 ms |
20692 KB |
Output is correct |
10 |
Correct |
103 ms |
20804 KB |
Output is correct |
11 |
Correct |
99 ms |
20832 KB |
Output is correct |
12 |
Correct |
138 ms |
20872 KB |
Output is correct |
13 |
Correct |
99 ms |
20420 KB |
Output is correct |
14 |
Correct |
99 ms |
20840 KB |
Output is correct |
15 |
Correct |
100 ms |
20824 KB |
Output is correct |
16 |
Correct |
105 ms |
20936 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
558 ms |
35296 KB |
Output is correct |
2 |
Correct |
389 ms |
33092 KB |
Output is correct |
3 |
Correct |
619 ms |
36348 KB |
Output is correct |
4 |
Correct |
420 ms |
33208 KB |
Output is correct |
5 |
Correct |
437 ms |
33080 KB |
Output is correct |
6 |
Correct |
598 ms |
42564 KB |
Output is correct |
7 |
Correct |
212 ms |
36492 KB |
Output is correct |
8 |
Correct |
226 ms |
36580 KB |
Output is correct |
9 |
Correct |
641 ms |
42072 KB |
Output is correct |
10 |
Correct |
626 ms |
42080 KB |
Output is correct |
11 |
Correct |
638 ms |
41040 KB |
Output is correct |
12 |
Correct |
582 ms |
42564 KB |
Output is correct |
13 |
Correct |
556 ms |
41260 KB |
Output is correct |
14 |
Correct |
586 ms |
42568 KB |
Output is correct |
15 |
Correct |
619 ms |
42476 KB |
Output is correct |
16 |
Correct |
587 ms |
42448 KB |
Output is correct |
17 |
Correct |
550 ms |
42420 KB |
Output is correct |
18 |
Correct |
635 ms |
41824 KB |
Output is correct |
19 |
Correct |
668 ms |
42516 KB |
Output is correct |
20 |
Correct |
571 ms |
42028 KB |
Output is correct |
21 |
Correct |
582 ms |
42468 KB |
Output is correct |
22 |
Correct |
595 ms |
42480 KB |
Output is correct |
23 |
Correct |
573 ms |
42480 KB |
Output is correct |
24 |
Correct |
570 ms |
42436 KB |
Output is correct |
25 |
Correct |
463 ms |
41340 KB |
Output is correct |
26 |
Correct |
455 ms |
41796 KB |
Output is correct |
27 |
Correct |
444 ms |
41760 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
15692 KB |
Output is correct |
2 |
Correct |
13 ms |
15736 KB |
Output is correct |
3 |
Correct |
12 ms |
15688 KB |
Output is correct |
4 |
Correct |
12 ms |
15700 KB |
Output is correct |
5 |
Correct |
12 ms |
15692 KB |
Output is correct |
6 |
Correct |
12 ms |
15684 KB |
Output is correct |
7 |
Correct |
13 ms |
15692 KB |
Output is correct |
8 |
Correct |
13 ms |
15660 KB |
Output is correct |
9 |
Correct |
13 ms |
15692 KB |
Output is correct |
10 |
Correct |
13 ms |
15692 KB |
Output is correct |
11 |
Correct |
14 ms |
15692 KB |
Output is correct |
12 |
Correct |
12 ms |
15692 KB |
Output is correct |
13 |
Correct |
11 ms |
15680 KB |
Output is correct |
14 |
Correct |
12 ms |
15820 KB |
Output is correct |
15 |
Correct |
11 ms |
15628 KB |
Output is correct |
16 |
Correct |
12 ms |
15684 KB |
Output is correct |
17 |
Correct |
12 ms |
15680 KB |
Output is correct |
18 |
Correct |
13 ms |
15692 KB |
Output is correct |
19 |
Correct |
15 ms |
15672 KB |
Output is correct |
20 |
Correct |
13 ms |
15692 KB |
Output is correct |
21 |
Correct |
108 ms |
20852 KB |
Output is correct |
22 |
Correct |
137 ms |
20876 KB |
Output is correct |
23 |
Correct |
121 ms |
20852 KB |
Output is correct |
24 |
Correct |
105 ms |
20820 KB |
Output is correct |
25 |
Correct |
103 ms |
20892 KB |
Output is correct |
26 |
Correct |
103 ms |
20824 KB |
Output is correct |
27 |
Correct |
70 ms |
19816 KB |
Output is correct |
28 |
Correct |
59 ms |
19732 KB |
Output is correct |
29 |
Correct |
113 ms |
20692 KB |
Output is correct |
30 |
Correct |
103 ms |
20804 KB |
Output is correct |
31 |
Correct |
99 ms |
20832 KB |
Output is correct |
32 |
Correct |
138 ms |
20872 KB |
Output is correct |
33 |
Correct |
99 ms |
20420 KB |
Output is correct |
34 |
Correct |
99 ms |
20840 KB |
Output is correct |
35 |
Correct |
100 ms |
20824 KB |
Output is correct |
36 |
Correct |
105 ms |
20936 KB |
Output is correct |
37 |
Correct |
99 ms |
21456 KB |
Output is correct |
38 |
Correct |
85 ms |
21156 KB |
Output is correct |
39 |
Correct |
49 ms |
20276 KB |
Output is correct |
40 |
Correct |
60 ms |
20344 KB |
Output is correct |
41 |
Correct |
122 ms |
21612 KB |
Output is correct |
42 |
Correct |
115 ms |
21952 KB |
Output is correct |
43 |
Correct |
115 ms |
21952 KB |
Output is correct |
44 |
Correct |
105 ms |
21872 KB |
Output is correct |
45 |
Correct |
103 ms |
21972 KB |
Output is correct |
46 |
Correct |
107 ms |
21952 KB |
Output is correct |
47 |
Correct |
68 ms |
21036 KB |
Output is correct |
48 |
Correct |
89 ms |
21848 KB |
Output is correct |
49 |
Correct |
75 ms |
20712 KB |
Output is correct |
50 |
Correct |
91 ms |
21316 KB |
Output is correct |
51 |
Correct |
115 ms |
21956 KB |
Output is correct |
52 |
Correct |
111 ms |
21992 KB |
Output is correct |
53 |
Correct |
82 ms |
21240 KB |
Output is correct |
54 |
Correct |
113 ms |
22232 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
104 ms |
20592 KB |
Output is correct |
2 |
Correct |
109 ms |
20804 KB |
Output is correct |
3 |
Correct |
112 ms |
20808 KB |
Output is correct |
4 |
Correct |
77 ms |
21132 KB |
Output is correct |
5 |
Correct |
94 ms |
21828 KB |
Output is correct |
6 |
Correct |
122 ms |
22440 KB |
Output is correct |
7 |
Correct |
59 ms |
21104 KB |
Output is correct |
8 |
Correct |
62 ms |
20656 KB |
Output is correct |
9 |
Correct |
77 ms |
21696 KB |
Output is correct |
10 |
Correct |
72 ms |
20772 KB |
Output is correct |
11 |
Correct |
111 ms |
22084 KB |
Output is correct |
12 |
Correct |
102 ms |
22088 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
15692 KB |
Output is correct |
2 |
Correct |
13 ms |
15736 KB |
Output is correct |
3 |
Correct |
12 ms |
15688 KB |
Output is correct |
4 |
Correct |
12 ms |
15700 KB |
Output is correct |
5 |
Correct |
12 ms |
15692 KB |
Output is correct |
6 |
Correct |
12 ms |
15684 KB |
Output is correct |
7 |
Correct |
13 ms |
15692 KB |
Output is correct |
8 |
Correct |
13 ms |
15660 KB |
Output is correct |
9 |
Correct |
13 ms |
15692 KB |
Output is correct |
10 |
Correct |
13 ms |
15692 KB |
Output is correct |
11 |
Correct |
14 ms |
15692 KB |
Output is correct |
12 |
Correct |
12 ms |
15692 KB |
Output is correct |
13 |
Correct |
11 ms |
15680 KB |
Output is correct |
14 |
Correct |
12 ms |
15820 KB |
Output is correct |
15 |
Correct |
11 ms |
15628 KB |
Output is correct |
16 |
Correct |
12 ms |
15684 KB |
Output is correct |
17 |
Correct |
12 ms |
15680 KB |
Output is correct |
18 |
Correct |
13 ms |
15692 KB |
Output is correct |
19 |
Correct |
15 ms |
15672 KB |
Output is correct |
20 |
Correct |
13 ms |
15692 KB |
Output is correct |
21 |
Correct |
15 ms |
15784 KB |
Output is correct |
22 |
Correct |
14 ms |
15760 KB |
Output is correct |
23 |
Correct |
14 ms |
15756 KB |
Output is correct |
24 |
Correct |
13 ms |
15692 KB |
Output is correct |
25 |
Correct |
12 ms |
15688 KB |
Output is correct |
26 |
Correct |
11 ms |
15692 KB |
Output is correct |
27 |
Correct |
13 ms |
15680 KB |
Output is correct |
28 |
Correct |
15 ms |
15788 KB |
Output is correct |
29 |
Correct |
13 ms |
15796 KB |
Output is correct |
30 |
Correct |
14 ms |
15808 KB |
Output is correct |
31 |
Correct |
12 ms |
15692 KB |
Output is correct |
32 |
Correct |
13 ms |
15692 KB |
Output is correct |
33 |
Correct |
12 ms |
15688 KB |
Output is correct |
34 |
Correct |
12 ms |
15764 KB |
Output is correct |
35 |
Correct |
13 ms |
15756 KB |
Output is correct |
36 |
Correct |
12 ms |
15808 KB |
Output is correct |
37 |
Correct |
17 ms |
15680 KB |
Output is correct |
38 |
Correct |
13 ms |
15772 KB |
Output is correct |
39 |
Correct |
108 ms |
20852 KB |
Output is correct |
40 |
Correct |
137 ms |
20876 KB |
Output is correct |
41 |
Correct |
121 ms |
20852 KB |
Output is correct |
42 |
Correct |
105 ms |
20820 KB |
Output is correct |
43 |
Correct |
103 ms |
20892 KB |
Output is correct |
44 |
Correct |
103 ms |
20824 KB |
Output is correct |
45 |
Correct |
70 ms |
19816 KB |
Output is correct |
46 |
Correct |
59 ms |
19732 KB |
Output is correct |
47 |
Correct |
113 ms |
20692 KB |
Output is correct |
48 |
Correct |
103 ms |
20804 KB |
Output is correct |
49 |
Correct |
99 ms |
20832 KB |
Output is correct |
50 |
Correct |
138 ms |
20872 KB |
Output is correct |
51 |
Correct |
99 ms |
20420 KB |
Output is correct |
52 |
Correct |
99 ms |
20840 KB |
Output is correct |
53 |
Correct |
100 ms |
20824 KB |
Output is correct |
54 |
Correct |
105 ms |
20936 KB |
Output is correct |
55 |
Correct |
99 ms |
21456 KB |
Output is correct |
56 |
Correct |
85 ms |
21156 KB |
Output is correct |
57 |
Correct |
49 ms |
20276 KB |
Output is correct |
58 |
Correct |
60 ms |
20344 KB |
Output is correct |
59 |
Correct |
122 ms |
21612 KB |
Output is correct |
60 |
Correct |
115 ms |
21952 KB |
Output is correct |
61 |
Correct |
115 ms |
21952 KB |
Output is correct |
62 |
Correct |
105 ms |
21872 KB |
Output is correct |
63 |
Correct |
103 ms |
21972 KB |
Output is correct |
64 |
Correct |
107 ms |
21952 KB |
Output is correct |
65 |
Correct |
68 ms |
21036 KB |
Output is correct |
66 |
Correct |
89 ms |
21848 KB |
Output is correct |
67 |
Correct |
75 ms |
20712 KB |
Output is correct |
68 |
Correct |
91 ms |
21316 KB |
Output is correct |
69 |
Correct |
115 ms |
21956 KB |
Output is correct |
70 |
Correct |
111 ms |
21992 KB |
Output is correct |
71 |
Correct |
82 ms |
21240 KB |
Output is correct |
72 |
Correct |
113 ms |
22232 KB |
Output is correct |
73 |
Correct |
104 ms |
20592 KB |
Output is correct |
74 |
Correct |
109 ms |
20804 KB |
Output is correct |
75 |
Correct |
112 ms |
20808 KB |
Output is correct |
76 |
Correct |
77 ms |
21132 KB |
Output is correct |
77 |
Correct |
94 ms |
21828 KB |
Output is correct |
78 |
Correct |
122 ms |
22440 KB |
Output is correct |
79 |
Correct |
59 ms |
21104 KB |
Output is correct |
80 |
Correct |
62 ms |
20656 KB |
Output is correct |
81 |
Correct |
77 ms |
21696 KB |
Output is correct |
82 |
Correct |
72 ms |
20772 KB |
Output is correct |
83 |
Correct |
111 ms |
22084 KB |
Output is correct |
84 |
Correct |
102 ms |
22088 KB |
Output is correct |
85 |
Correct |
107 ms |
21960 KB |
Output is correct |
86 |
Correct |
112 ms |
22460 KB |
Output is correct |
87 |
Correct |
96 ms |
21996 KB |
Output is correct |
88 |
Correct |
118 ms |
22640 KB |
Output is correct |
89 |
Correct |
72 ms |
20676 KB |
Output is correct |
90 |
Correct |
146 ms |
22472 KB |
Output is correct |
91 |
Correct |
87 ms |
21572 KB |
Output is correct |
92 |
Correct |
83 ms |
21380 KB |
Output is correct |
93 |
Correct |
113 ms |
22520 KB |
Output is correct |
94 |
Correct |
119 ms |
22340 KB |
Output is correct |
95 |
Correct |
106 ms |
22340 KB |
Output is correct |
96 |
Correct |
111 ms |
22468 KB |
Output is correct |
97 |
Correct |
112 ms |
22472 KB |
Output is correct |
98 |
Correct |
95 ms |
21704 KB |
Output is correct |
99 |
Correct |
73 ms |
21480 KB |
Output is correct |
100 |
Correct |
81 ms |
21276 KB |
Output is correct |
101 |
Correct |
96 ms |
22336 KB |
Output is correct |
102 |
Correct |
121 ms |
22532 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
15692 KB |
Output is correct |
2 |
Correct |
13 ms |
15736 KB |
Output is correct |
3 |
Correct |
12 ms |
15688 KB |
Output is correct |
4 |
Correct |
12 ms |
15700 KB |
Output is correct |
5 |
Correct |
12 ms |
15692 KB |
Output is correct |
6 |
Correct |
12 ms |
15684 KB |
Output is correct |
7 |
Correct |
13 ms |
15692 KB |
Output is correct |
8 |
Correct |
13 ms |
15660 KB |
Output is correct |
9 |
Correct |
13 ms |
15692 KB |
Output is correct |
10 |
Correct |
13 ms |
15692 KB |
Output is correct |
11 |
Correct |
14 ms |
15692 KB |
Output is correct |
12 |
Correct |
12 ms |
15692 KB |
Output is correct |
13 |
Correct |
11 ms |
15680 KB |
Output is correct |
14 |
Correct |
12 ms |
15820 KB |
Output is correct |
15 |
Correct |
11 ms |
15628 KB |
Output is correct |
16 |
Correct |
12 ms |
15684 KB |
Output is correct |
17 |
Correct |
12 ms |
15680 KB |
Output is correct |
18 |
Correct |
13 ms |
15692 KB |
Output is correct |
19 |
Correct |
15 ms |
15672 KB |
Output is correct |
20 |
Correct |
13 ms |
15692 KB |
Output is correct |
21 |
Correct |
15 ms |
15784 KB |
Output is correct |
22 |
Correct |
14 ms |
15760 KB |
Output is correct |
23 |
Correct |
14 ms |
15756 KB |
Output is correct |
24 |
Correct |
13 ms |
15692 KB |
Output is correct |
25 |
Correct |
12 ms |
15688 KB |
Output is correct |
26 |
Correct |
11 ms |
15692 KB |
Output is correct |
27 |
Correct |
13 ms |
15680 KB |
Output is correct |
28 |
Correct |
15 ms |
15788 KB |
Output is correct |
29 |
Correct |
13 ms |
15796 KB |
Output is correct |
30 |
Correct |
14 ms |
15808 KB |
Output is correct |
31 |
Correct |
12 ms |
15692 KB |
Output is correct |
32 |
Correct |
13 ms |
15692 KB |
Output is correct |
33 |
Correct |
12 ms |
15688 KB |
Output is correct |
34 |
Correct |
12 ms |
15764 KB |
Output is correct |
35 |
Correct |
13 ms |
15756 KB |
Output is correct |
36 |
Correct |
12 ms |
15808 KB |
Output is correct |
37 |
Correct |
17 ms |
15680 KB |
Output is correct |
38 |
Correct |
13 ms |
15772 KB |
Output is correct |
39 |
Correct |
108 ms |
20852 KB |
Output is correct |
40 |
Correct |
137 ms |
20876 KB |
Output is correct |
41 |
Correct |
121 ms |
20852 KB |
Output is correct |
42 |
Correct |
105 ms |
20820 KB |
Output is correct |
43 |
Correct |
103 ms |
20892 KB |
Output is correct |
44 |
Correct |
103 ms |
20824 KB |
Output is correct |
45 |
Correct |
70 ms |
19816 KB |
Output is correct |
46 |
Correct |
59 ms |
19732 KB |
Output is correct |
47 |
Correct |
113 ms |
20692 KB |
Output is correct |
48 |
Correct |
103 ms |
20804 KB |
Output is correct |
49 |
Correct |
99 ms |
20832 KB |
Output is correct |
50 |
Correct |
138 ms |
20872 KB |
Output is correct |
51 |
Correct |
99 ms |
20420 KB |
Output is correct |
52 |
Correct |
99 ms |
20840 KB |
Output is correct |
53 |
Correct |
100 ms |
20824 KB |
Output is correct |
54 |
Correct |
105 ms |
20936 KB |
Output is correct |
55 |
Correct |
558 ms |
35296 KB |
Output is correct |
56 |
Correct |
389 ms |
33092 KB |
Output is correct |
57 |
Correct |
619 ms |
36348 KB |
Output is correct |
58 |
Correct |
420 ms |
33208 KB |
Output is correct |
59 |
Correct |
437 ms |
33080 KB |
Output is correct |
60 |
Correct |
598 ms |
42564 KB |
Output is correct |
61 |
Correct |
212 ms |
36492 KB |
Output is correct |
62 |
Correct |
226 ms |
36580 KB |
Output is correct |
63 |
Correct |
641 ms |
42072 KB |
Output is correct |
64 |
Correct |
626 ms |
42080 KB |
Output is correct |
65 |
Correct |
638 ms |
41040 KB |
Output is correct |
66 |
Correct |
582 ms |
42564 KB |
Output is correct |
67 |
Correct |
556 ms |
41260 KB |
Output is correct |
68 |
Correct |
586 ms |
42568 KB |
Output is correct |
69 |
Correct |
619 ms |
42476 KB |
Output is correct |
70 |
Correct |
587 ms |
42448 KB |
Output is correct |
71 |
Correct |
550 ms |
42420 KB |
Output is correct |
72 |
Correct |
635 ms |
41824 KB |
Output is correct |
73 |
Correct |
668 ms |
42516 KB |
Output is correct |
74 |
Correct |
571 ms |
42028 KB |
Output is correct |
75 |
Correct |
582 ms |
42468 KB |
Output is correct |
76 |
Correct |
595 ms |
42480 KB |
Output is correct |
77 |
Correct |
573 ms |
42480 KB |
Output is correct |
78 |
Correct |
570 ms |
42436 KB |
Output is correct |
79 |
Correct |
463 ms |
41340 KB |
Output is correct |
80 |
Correct |
455 ms |
41796 KB |
Output is correct |
81 |
Correct |
444 ms |
41760 KB |
Output is correct |
82 |
Correct |
99 ms |
21456 KB |
Output is correct |
83 |
Correct |
85 ms |
21156 KB |
Output is correct |
84 |
Correct |
49 ms |
20276 KB |
Output is correct |
85 |
Correct |
60 ms |
20344 KB |
Output is correct |
86 |
Correct |
122 ms |
21612 KB |
Output is correct |
87 |
Correct |
115 ms |
21952 KB |
Output is correct |
88 |
Correct |
115 ms |
21952 KB |
Output is correct |
89 |
Correct |
105 ms |
21872 KB |
Output is correct |
90 |
Correct |
103 ms |
21972 KB |
Output is correct |
91 |
Correct |
107 ms |
21952 KB |
Output is correct |
92 |
Correct |
68 ms |
21036 KB |
Output is correct |
93 |
Correct |
89 ms |
21848 KB |
Output is correct |
94 |
Correct |
75 ms |
20712 KB |
Output is correct |
95 |
Correct |
91 ms |
21316 KB |
Output is correct |
96 |
Correct |
115 ms |
21956 KB |
Output is correct |
97 |
Correct |
111 ms |
21992 KB |
Output is correct |
98 |
Correct |
82 ms |
21240 KB |
Output is correct |
99 |
Correct |
113 ms |
22232 KB |
Output is correct |
100 |
Correct |
104 ms |
20592 KB |
Output is correct |
101 |
Correct |
109 ms |
20804 KB |
Output is correct |
102 |
Correct |
112 ms |
20808 KB |
Output is correct |
103 |
Correct |
77 ms |
21132 KB |
Output is correct |
104 |
Correct |
94 ms |
21828 KB |
Output is correct |
105 |
Correct |
122 ms |
22440 KB |
Output is correct |
106 |
Correct |
59 ms |
21104 KB |
Output is correct |
107 |
Correct |
62 ms |
20656 KB |
Output is correct |
108 |
Correct |
77 ms |
21696 KB |
Output is correct |
109 |
Correct |
72 ms |
20772 KB |
Output is correct |
110 |
Correct |
111 ms |
22084 KB |
Output is correct |
111 |
Correct |
102 ms |
22088 KB |
Output is correct |
112 |
Correct |
107 ms |
21960 KB |
Output is correct |
113 |
Correct |
112 ms |
22460 KB |
Output is correct |
114 |
Correct |
96 ms |
21996 KB |
Output is correct |
115 |
Correct |
118 ms |
22640 KB |
Output is correct |
116 |
Correct |
72 ms |
20676 KB |
Output is correct |
117 |
Correct |
146 ms |
22472 KB |
Output is correct |
118 |
Correct |
87 ms |
21572 KB |
Output is correct |
119 |
Correct |
83 ms |
21380 KB |
Output is correct |
120 |
Correct |
113 ms |
22520 KB |
Output is correct |
121 |
Correct |
119 ms |
22340 KB |
Output is correct |
122 |
Correct |
106 ms |
22340 KB |
Output is correct |
123 |
Correct |
111 ms |
22468 KB |
Output is correct |
124 |
Correct |
112 ms |
22472 KB |
Output is correct |
125 |
Correct |
95 ms |
21704 KB |
Output is correct |
126 |
Correct |
73 ms |
21480 KB |
Output is correct |
127 |
Correct |
81 ms |
21276 KB |
Output is correct |
128 |
Correct |
96 ms |
22336 KB |
Output is correct |
129 |
Correct |
121 ms |
22532 KB |
Output is correct |
130 |
Correct |
586 ms |
42948 KB |
Output is correct |
131 |
Correct |
414 ms |
37644 KB |
Output is correct |
132 |
Correct |
580 ms |
42860 KB |
Output is correct |
133 |
Correct |
560 ms |
42696 KB |
Output is correct |
134 |
Correct |
488 ms |
40532 KB |
Output is correct |
135 |
Correct |
594 ms |
43460 KB |
Output is correct |
136 |
Correct |
579 ms |
43136 KB |
Output is correct |
137 |
Correct |
575 ms |
43072 KB |
Output is correct |
138 |
Correct |
575 ms |
41700 KB |
Output is correct |
139 |
Correct |
561 ms |
43232 KB |
Output is correct |
140 |
Correct |
562 ms |
42052 KB |
Output is correct |
141 |
Correct |
587 ms |
43096 KB |
Output is correct |
142 |
Correct |
573 ms |
43180 KB |
Output is correct |
143 |
Correct |
574 ms |
43012 KB |
Output is correct |
144 |
Correct |
606 ms |
42380 KB |
Output is correct |
145 |
Correct |
570 ms |
43168 KB |
Output is correct |
146 |
Correct |
548 ms |
42732 KB |
Output is correct |
147 |
Correct |
540 ms |
43044 KB |
Output is correct |
148 |
Correct |
589 ms |
43160 KB |
Output is correct |
149 |
Correct |
573 ms |
43220 KB |
Output is correct |
150 |
Correct |
291 ms |
39124 KB |
Output is correct |
151 |
Correct |
451 ms |
42444 KB |
Output is correct |
152 |
Correct |
458 ms |
42568 KB |
Output is correct |
153 |
Correct |
440 ms |
42648 KB |
Output is correct |