#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ld long double
#define pb push_back
#define fi first
#define se second
#define debug(x) cout << #x << " => " << x << "\n";
const long long mod = 1e9 + 7;
int n, m, q;
struct Query {
int t;
int l, r, k, c, a, b;
} query[250005];
int itr;
pair <int,int> idx[250005];
vector <pair<int,int>> idxs[250005];
pair <int,int> a[250005];
int iitr;
int ans[250005];
struct SegTree {
int tree[1000005], lazy[1000005][2];
void push(int idx, int l, int r) {
tree[idx] += lazy[idx][0];
tree[idx] = max(tree[idx], lazy[idx][1]);
if(l != r) {
lazy[idx * 2][0] += lazy[idx][0];
lazy[idx * 2][1] += lazy[idx][0];
lazy[idx * 2][1] = max(lazy[idx * 2][1], lazy[idx][1]);
lazy[idx * 2 + 1][0] += lazy[idx][0];
lazy[idx * 2 + 1][1] += lazy[idx][0];
lazy[idx * 2 + 1][1] = max(lazy[idx * 2 + 1][1], lazy[idx][1]);
}
lazy[idx][0] = 0;
lazy[idx][1] = 0;
}
void add(int idx, int l, int r, int x, int y, int v) {
push(idx, l, r);
if(l > r || l > y || r < x) return;
int mid = (l + r) / 2;
if(l >= x && r <= y) {
lazy[idx][0] += v;
push(idx, l, r);
return;
}
add(idx * 2, l, mid, x, y, v);
add(idx * 2 + 1, mid + 1, r, x, y, v);
tree[idx] = max(tree[idx * 2], tree[idx * 2 + 1]);
}
void maks(int idx, int l, int r, int x, int y, int v) {
push(idx, l, r);
if(l > r || l > y || r < x) return;
int mid = (l + r) / 2;
if(l >= x && r <= y) {
lazy[idx][1] = max(lazy[idx][1], v);
push(idx, l, r);
return;
}
maks(idx * 2, l, mid, x, y, v);
maks(idx * 2 + 1, mid + 1, r, x, y, v);
tree[idx] = max(tree[idx * 2], tree[idx * 2 + 1]);
}
int query(int idx, int l, int r, int x) {
push(idx, l, r);
if(l == r) return tree[idx];
int mid = (l + r) / 2;
if(x <= mid) return query(idx * 2, l, mid, x);
else return query(idx * 2 + 1, mid + 1, r, x);
}
} cur, tot;
struct SegTree2 {
int tree[1000005], lazy[1000005];
void push(int idx, int l, int r) {
if(lazy[idx] != 0) {
tree[idx] += lazy[idx];
if(l != r) {
lazy[idx * 2] += lazy[idx];
lazy[idx * 2 + 1] += lazy[idx];
}
lazy[idx] = 0;
}
}
void add(int idx, int l, int r, int x, int y, int v) {
push(idx, l, r);
if(l > r || l > y || r < x) return;
if(l >= x && r <= y) {
lazy[idx] += v;
push(idx, l, r);
return;
}
int mid = (l + r) / 2;
add(idx * 2, l, mid, x, y, v);
add(idx * 2 + 1, mid + 1, r, x, y, v);
tree[idx] = min(tree[idx * 2], tree[idx * 2 + 1]);
}
int query(int idx, int l, int r) {
push(idx, l, r);
if(tree[idx] > 0) return -1;
if(l == r) {tree[idx] = 1e18; return l;}
int mid = (l + r) / 2;
push(idx * 2, l, mid);
push(idx * 2 + 1, mid + 1, r);
int res = -1;
if(tree[idx * 2] <= 0) res = query(idx * 2, l, mid);
else res = query(idx * 2 + 1, mid + 1, r);
tree[idx] = min(tree[idx * 2], tree[idx * 2 + 1]);
push(idx, l, r);
return res;
}
int val(int idx, int l, int r, int x) {
push(idx, l, r);
if(l == r) return tree[idx];
int mid = (l + r) / 2;
if(x <= mid) return val(idx * 2, l, mid, x);
else return val(idx * 2 + 1, mid + 1, r, x);
}
} group;
void solve () {
cin >> n >> m >> q;
for(int i = 1; i <= q; i++) {
cin >> query[i].t;
if(query[i].t == 1) {
cin >> query[i].l >> query[i].r >> query[i].c >> query[i].k;
cur.add(1, 1, n, query[i].l, query[i].r, query[i].k);
cur.maks(1, 1, n, query[i].l, query[i].r, 0);
tot.add(1, 1, n, query[i].l, query[i].r, query[i].k);
}
else if(query[i].t == 2) {
cin >> query[i].l >> query[i].r >> query[i].k;
cur.add(1, 1, n, query[i].l, query[i].r, -query[i].k);
cur.maks(1, 1, n, query[i].l, query[i].r, 0);
}
else {
cin >> query[i].a >> query[i].b;
int Total = tot.query(1, 1, n, query[i].a);
int Cur = cur.query(1, 1, n, query[i].a);
if(query[i].b <= Cur) idx[++itr] = {Total - Cur + query[i].b, query[i].a};
else idx[++itr] = {-1, query[i].a};
}
}
// for(int i = 1; i <= itr; i++)
// cout << idx[i].fi << "\n";
for(int i = 1; i <= itr; i++)
idxs[idx[i].se].pb({idx[i].fi, i});
for(int i = 1; i <= n; i++) {
sort(idxs[i].begin(), idxs[i].end());
for(auto j : idxs[i]) a[++iitr] = j;
}
assert(itr == iitr);
for(int i = 1; i <= itr; i++) {
group.add(1, 1, itr, i, i, a[i].fi);
}
for(int i = 1; i <= q; i++) {
if(query[i].t == 1) {
int nl, nr, le = n + 1, ri = 0;
nl = 1, nr = itr;
while(nl <= nr) {
int mid = (nl + nr) / 2;
if(idx[a[mid].se].se >= query[i].l) nr = mid - 1, le = mid;
else nl = mid + 1;
}
nl = 1, nr = itr;
while(nl <= nr) {
int mid = (nl + nr) / 2;
if(idx[a[mid].se].se <= query[i].r) nl = mid + 1, ri = mid;
else nr = mid - 1;
}
if(le <= ri) group.add(1, 1, itr, le, ri, -query[i].k);
while (true) {
int aqua = group.query(1, 1, itr);
if(aqua == -1) break;
ans[a[aqua].se] = query[i].c;
}
}
}
for(int i = 1; i <= itr; i++)
if(idx[i].fi == -1) ans[i] = 0;
for(int i = 1; i <= itr; i++)
cout << ans[i] << "\n";
}
signed main () {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
solve ();
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
6612 KB |
Output is correct |
2 |
Correct |
6 ms |
6612 KB |
Output is correct |
3 |
Correct |
6 ms |
6604 KB |
Output is correct |
4 |
Correct |
6 ms |
6612 KB |
Output is correct |
5 |
Correct |
4 ms |
6356 KB |
Output is correct |
6 |
Correct |
6 ms |
6356 KB |
Output is correct |
7 |
Correct |
6 ms |
6612 KB |
Output is correct |
8 |
Correct |
6 ms |
6612 KB |
Output is correct |
9 |
Correct |
9 ms |
6612 KB |
Output is correct |
10 |
Correct |
8 ms |
6612 KB |
Output is correct |
11 |
Correct |
10 ms |
6608 KB |
Output is correct |
12 |
Correct |
8 ms |
6664 KB |
Output is correct |
13 |
Correct |
6 ms |
6612 KB |
Output is correct |
14 |
Correct |
6 ms |
6640 KB |
Output is correct |
15 |
Correct |
5 ms |
6604 KB |
Output is correct |
16 |
Correct |
6 ms |
6608 KB |
Output is correct |
17 |
Correct |
7 ms |
6608 KB |
Output is correct |
18 |
Correct |
7 ms |
6612 KB |
Output is correct |
19 |
Correct |
6 ms |
6612 KB |
Output is correct |
20 |
Correct |
8 ms |
6612 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
6612 KB |
Output is correct |
2 |
Correct |
6 ms |
6612 KB |
Output is correct |
3 |
Correct |
6 ms |
6604 KB |
Output is correct |
4 |
Correct |
6 ms |
6612 KB |
Output is correct |
5 |
Correct |
4 ms |
6356 KB |
Output is correct |
6 |
Correct |
6 ms |
6356 KB |
Output is correct |
7 |
Correct |
6 ms |
6612 KB |
Output is correct |
8 |
Correct |
6 ms |
6612 KB |
Output is correct |
9 |
Correct |
9 ms |
6612 KB |
Output is correct |
10 |
Correct |
8 ms |
6612 KB |
Output is correct |
11 |
Correct |
10 ms |
6608 KB |
Output is correct |
12 |
Correct |
8 ms |
6664 KB |
Output is correct |
13 |
Correct |
6 ms |
6612 KB |
Output is correct |
14 |
Correct |
6 ms |
6640 KB |
Output is correct |
15 |
Correct |
5 ms |
6604 KB |
Output is correct |
16 |
Correct |
6 ms |
6608 KB |
Output is correct |
17 |
Correct |
7 ms |
6608 KB |
Output is correct |
18 |
Correct |
7 ms |
6612 KB |
Output is correct |
19 |
Correct |
6 ms |
6612 KB |
Output is correct |
20 |
Correct |
8 ms |
6612 KB |
Output is correct |
21 |
Correct |
7 ms |
6612 KB |
Output is correct |
22 |
Correct |
7 ms |
6612 KB |
Output is correct |
23 |
Correct |
8 ms |
6616 KB |
Output is correct |
24 |
Correct |
9 ms |
6612 KB |
Output is correct |
25 |
Correct |
5 ms |
6356 KB |
Output is correct |
26 |
Correct |
5 ms |
6356 KB |
Output is correct |
27 |
Correct |
7 ms |
6608 KB |
Output is correct |
28 |
Correct |
8 ms |
6604 KB |
Output is correct |
29 |
Correct |
7 ms |
6612 KB |
Output is correct |
30 |
Correct |
7 ms |
6612 KB |
Output is correct |
31 |
Correct |
7 ms |
6608 KB |
Output is correct |
32 |
Correct |
7 ms |
6612 KB |
Output is correct |
33 |
Correct |
5 ms |
6612 KB |
Output is correct |
34 |
Correct |
5 ms |
6612 KB |
Output is correct |
35 |
Correct |
6 ms |
6608 KB |
Output is correct |
36 |
Correct |
7 ms |
6612 KB |
Output is correct |
37 |
Correct |
6 ms |
6500 KB |
Output is correct |
38 |
Correct |
7 ms |
6608 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
132 ms |
19660 KB |
Output is correct |
2 |
Correct |
135 ms |
18788 KB |
Output is correct |
3 |
Correct |
122 ms |
19648 KB |
Output is correct |
4 |
Correct |
144 ms |
19644 KB |
Output is correct |
5 |
Correct |
137 ms |
18860 KB |
Output is correct |
6 |
Correct |
144 ms |
18748 KB |
Output is correct |
7 |
Correct |
41 ms |
12528 KB |
Output is correct |
8 |
Correct |
34 ms |
12628 KB |
Output is correct |
9 |
Correct |
133 ms |
19464 KB |
Output is correct |
10 |
Correct |
141 ms |
18848 KB |
Output is correct |
11 |
Correct |
126 ms |
18916 KB |
Output is correct |
12 |
Correct |
150 ms |
18840 KB |
Output is correct |
13 |
Correct |
103 ms |
18896 KB |
Output is correct |
14 |
Correct |
117 ms |
19528 KB |
Output is correct |
15 |
Correct |
121 ms |
18352 KB |
Output is correct |
16 |
Correct |
151 ms |
18428 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
687 ms |
58376 KB |
Output is correct |
2 |
Correct |
544 ms |
51648 KB |
Output is correct |
3 |
Correct |
846 ms |
60620 KB |
Output is correct |
4 |
Correct |
633 ms |
50404 KB |
Output is correct |
5 |
Correct |
631 ms |
50820 KB |
Output is correct |
6 |
Correct |
902 ms |
57176 KB |
Output is correct |
7 |
Correct |
126 ms |
33032 KB |
Output is correct |
8 |
Correct |
148 ms |
32920 KB |
Output is correct |
9 |
Correct |
877 ms |
63256 KB |
Output is correct |
10 |
Correct |
933 ms |
63144 KB |
Output is correct |
11 |
Correct |
836 ms |
57164 KB |
Output is correct |
12 |
Correct |
837 ms |
57060 KB |
Output is correct |
13 |
Correct |
784 ms |
57048 KB |
Output is correct |
14 |
Correct |
801 ms |
57096 KB |
Output is correct |
15 |
Correct |
782 ms |
57136 KB |
Output is correct |
16 |
Correct |
784 ms |
56972 KB |
Output is correct |
17 |
Correct |
786 ms |
56968 KB |
Output is correct |
18 |
Correct |
841 ms |
57096 KB |
Output is correct |
19 |
Correct |
829 ms |
57148 KB |
Output is correct |
20 |
Correct |
840 ms |
57032 KB |
Output is correct |
21 |
Correct |
785 ms |
57028 KB |
Output is correct |
22 |
Correct |
794 ms |
57012 KB |
Output is correct |
23 |
Correct |
885 ms |
57164 KB |
Output is correct |
24 |
Correct |
848 ms |
57044 KB |
Output is correct |
25 |
Correct |
585 ms |
59652 KB |
Output is correct |
26 |
Correct |
609 ms |
60184 KB |
Output is correct |
27 |
Correct |
586 ms |
55328 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
6612 KB |
Output is correct |
2 |
Correct |
6 ms |
6612 KB |
Output is correct |
3 |
Correct |
6 ms |
6604 KB |
Output is correct |
4 |
Correct |
6 ms |
6612 KB |
Output is correct |
5 |
Correct |
4 ms |
6356 KB |
Output is correct |
6 |
Correct |
6 ms |
6356 KB |
Output is correct |
7 |
Correct |
6 ms |
6612 KB |
Output is correct |
8 |
Correct |
6 ms |
6612 KB |
Output is correct |
9 |
Correct |
9 ms |
6612 KB |
Output is correct |
10 |
Correct |
8 ms |
6612 KB |
Output is correct |
11 |
Correct |
10 ms |
6608 KB |
Output is correct |
12 |
Correct |
8 ms |
6664 KB |
Output is correct |
13 |
Correct |
6 ms |
6612 KB |
Output is correct |
14 |
Correct |
6 ms |
6640 KB |
Output is correct |
15 |
Correct |
5 ms |
6604 KB |
Output is correct |
16 |
Correct |
6 ms |
6608 KB |
Output is correct |
17 |
Correct |
7 ms |
6608 KB |
Output is correct |
18 |
Correct |
7 ms |
6612 KB |
Output is correct |
19 |
Correct |
6 ms |
6612 KB |
Output is correct |
20 |
Correct |
8 ms |
6612 KB |
Output is correct |
21 |
Correct |
132 ms |
19660 KB |
Output is correct |
22 |
Correct |
135 ms |
18788 KB |
Output is correct |
23 |
Correct |
122 ms |
19648 KB |
Output is correct |
24 |
Correct |
144 ms |
19644 KB |
Output is correct |
25 |
Correct |
137 ms |
18860 KB |
Output is correct |
26 |
Correct |
144 ms |
18748 KB |
Output is correct |
27 |
Correct |
41 ms |
12528 KB |
Output is correct |
28 |
Correct |
34 ms |
12628 KB |
Output is correct |
29 |
Correct |
133 ms |
19464 KB |
Output is correct |
30 |
Correct |
141 ms |
18848 KB |
Output is correct |
31 |
Correct |
126 ms |
18916 KB |
Output is correct |
32 |
Correct |
150 ms |
18840 KB |
Output is correct |
33 |
Correct |
103 ms |
18896 KB |
Output is correct |
34 |
Correct |
117 ms |
19528 KB |
Output is correct |
35 |
Correct |
121 ms |
18352 KB |
Output is correct |
36 |
Correct |
151 ms |
18428 KB |
Output is correct |
37 |
Correct |
153 ms |
18984 KB |
Output is correct |
38 |
Correct |
133 ms |
17544 KB |
Output is correct |
39 |
Correct |
23 ms |
11140 KB |
Output is correct |
40 |
Correct |
31 ms |
11688 KB |
Output is correct |
41 |
Correct |
167 ms |
18744 KB |
Output is correct |
42 |
Correct |
174 ms |
18676 KB |
Output is correct |
43 |
Correct |
154 ms |
18720 KB |
Output is correct |
44 |
Correct |
151 ms |
18684 KB |
Output is correct |
45 |
Correct |
182 ms |
18696 KB |
Output is correct |
46 |
Correct |
147 ms |
18744 KB |
Output is correct |
47 |
Correct |
49 ms |
19460 KB |
Output is correct |
48 |
Correct |
130 ms |
19544 KB |
Output is correct |
49 |
Correct |
127 ms |
16856 KB |
Output is correct |
50 |
Correct |
138 ms |
17652 KB |
Output is correct |
51 |
Correct |
154 ms |
18576 KB |
Output is correct |
52 |
Correct |
170 ms |
18536 KB |
Output is correct |
53 |
Correct |
101 ms |
16932 KB |
Output is correct |
54 |
Correct |
134 ms |
18448 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
169 ms |
20116 KB |
Output is correct |
2 |
Correct |
206 ms |
20860 KB |
Output is correct |
3 |
Correct |
157 ms |
20916 KB |
Output is correct |
4 |
Correct |
134 ms |
18728 KB |
Output is correct |
5 |
Correct |
164 ms |
20012 KB |
Output is correct |
6 |
Correct |
158 ms |
20908 KB |
Output is correct |
7 |
Correct |
41 ms |
13400 KB |
Output is correct |
8 |
Correct |
42 ms |
12980 KB |
Output is correct |
9 |
Correct |
71 ms |
20808 KB |
Output is correct |
10 |
Correct |
102 ms |
18524 KB |
Output is correct |
11 |
Correct |
141 ms |
20944 KB |
Output is correct |
12 |
Correct |
166 ms |
20876 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
6612 KB |
Output is correct |
2 |
Correct |
6 ms |
6612 KB |
Output is correct |
3 |
Correct |
6 ms |
6604 KB |
Output is correct |
4 |
Correct |
6 ms |
6612 KB |
Output is correct |
5 |
Correct |
4 ms |
6356 KB |
Output is correct |
6 |
Correct |
6 ms |
6356 KB |
Output is correct |
7 |
Correct |
6 ms |
6612 KB |
Output is correct |
8 |
Correct |
6 ms |
6612 KB |
Output is correct |
9 |
Correct |
9 ms |
6612 KB |
Output is correct |
10 |
Correct |
8 ms |
6612 KB |
Output is correct |
11 |
Correct |
10 ms |
6608 KB |
Output is correct |
12 |
Correct |
8 ms |
6664 KB |
Output is correct |
13 |
Correct |
6 ms |
6612 KB |
Output is correct |
14 |
Correct |
6 ms |
6640 KB |
Output is correct |
15 |
Correct |
5 ms |
6604 KB |
Output is correct |
16 |
Correct |
6 ms |
6608 KB |
Output is correct |
17 |
Correct |
7 ms |
6608 KB |
Output is correct |
18 |
Correct |
7 ms |
6612 KB |
Output is correct |
19 |
Correct |
6 ms |
6612 KB |
Output is correct |
20 |
Correct |
8 ms |
6612 KB |
Output is correct |
21 |
Correct |
7 ms |
6612 KB |
Output is correct |
22 |
Correct |
7 ms |
6612 KB |
Output is correct |
23 |
Correct |
8 ms |
6616 KB |
Output is correct |
24 |
Correct |
9 ms |
6612 KB |
Output is correct |
25 |
Correct |
5 ms |
6356 KB |
Output is correct |
26 |
Correct |
5 ms |
6356 KB |
Output is correct |
27 |
Correct |
7 ms |
6608 KB |
Output is correct |
28 |
Correct |
8 ms |
6604 KB |
Output is correct |
29 |
Correct |
7 ms |
6612 KB |
Output is correct |
30 |
Correct |
7 ms |
6612 KB |
Output is correct |
31 |
Correct |
7 ms |
6608 KB |
Output is correct |
32 |
Correct |
7 ms |
6612 KB |
Output is correct |
33 |
Correct |
5 ms |
6612 KB |
Output is correct |
34 |
Correct |
5 ms |
6612 KB |
Output is correct |
35 |
Correct |
6 ms |
6608 KB |
Output is correct |
36 |
Correct |
7 ms |
6612 KB |
Output is correct |
37 |
Correct |
6 ms |
6500 KB |
Output is correct |
38 |
Correct |
7 ms |
6608 KB |
Output is correct |
39 |
Correct |
132 ms |
19660 KB |
Output is correct |
40 |
Correct |
135 ms |
18788 KB |
Output is correct |
41 |
Correct |
122 ms |
19648 KB |
Output is correct |
42 |
Correct |
144 ms |
19644 KB |
Output is correct |
43 |
Correct |
137 ms |
18860 KB |
Output is correct |
44 |
Correct |
144 ms |
18748 KB |
Output is correct |
45 |
Correct |
41 ms |
12528 KB |
Output is correct |
46 |
Correct |
34 ms |
12628 KB |
Output is correct |
47 |
Correct |
133 ms |
19464 KB |
Output is correct |
48 |
Correct |
141 ms |
18848 KB |
Output is correct |
49 |
Correct |
126 ms |
18916 KB |
Output is correct |
50 |
Correct |
150 ms |
18840 KB |
Output is correct |
51 |
Correct |
103 ms |
18896 KB |
Output is correct |
52 |
Correct |
117 ms |
19528 KB |
Output is correct |
53 |
Correct |
121 ms |
18352 KB |
Output is correct |
54 |
Correct |
151 ms |
18428 KB |
Output is correct |
55 |
Correct |
153 ms |
18984 KB |
Output is correct |
56 |
Correct |
133 ms |
17544 KB |
Output is correct |
57 |
Correct |
23 ms |
11140 KB |
Output is correct |
58 |
Correct |
31 ms |
11688 KB |
Output is correct |
59 |
Correct |
167 ms |
18744 KB |
Output is correct |
60 |
Correct |
174 ms |
18676 KB |
Output is correct |
61 |
Correct |
154 ms |
18720 KB |
Output is correct |
62 |
Correct |
151 ms |
18684 KB |
Output is correct |
63 |
Correct |
182 ms |
18696 KB |
Output is correct |
64 |
Correct |
147 ms |
18744 KB |
Output is correct |
65 |
Correct |
49 ms |
19460 KB |
Output is correct |
66 |
Correct |
130 ms |
19544 KB |
Output is correct |
67 |
Correct |
127 ms |
16856 KB |
Output is correct |
68 |
Correct |
138 ms |
17652 KB |
Output is correct |
69 |
Correct |
154 ms |
18576 KB |
Output is correct |
70 |
Correct |
170 ms |
18536 KB |
Output is correct |
71 |
Correct |
101 ms |
16932 KB |
Output is correct |
72 |
Correct |
134 ms |
18448 KB |
Output is correct |
73 |
Correct |
169 ms |
20116 KB |
Output is correct |
74 |
Correct |
206 ms |
20860 KB |
Output is correct |
75 |
Correct |
157 ms |
20916 KB |
Output is correct |
76 |
Correct |
134 ms |
18728 KB |
Output is correct |
77 |
Correct |
164 ms |
20012 KB |
Output is correct |
78 |
Correct |
158 ms |
20908 KB |
Output is correct |
79 |
Correct |
41 ms |
13400 KB |
Output is correct |
80 |
Correct |
42 ms |
12980 KB |
Output is correct |
81 |
Correct |
71 ms |
20808 KB |
Output is correct |
82 |
Correct |
102 ms |
18524 KB |
Output is correct |
83 |
Correct |
141 ms |
20944 KB |
Output is correct |
84 |
Correct |
166 ms |
20876 KB |
Output is correct |
85 |
Correct |
150 ms |
19596 KB |
Output is correct |
86 |
Correct |
175 ms |
20092 KB |
Output is correct |
87 |
Correct |
194 ms |
18484 KB |
Output is correct |
88 |
Correct |
180 ms |
19364 KB |
Output is correct |
89 |
Correct |
108 ms |
17236 KB |
Output is correct |
90 |
Correct |
161 ms |
19228 KB |
Output is correct |
91 |
Correct |
130 ms |
18120 KB |
Output is correct |
92 |
Correct |
130 ms |
17964 KB |
Output is correct |
93 |
Correct |
161 ms |
19208 KB |
Output is correct |
94 |
Correct |
167 ms |
19392 KB |
Output is correct |
95 |
Correct |
175 ms |
19092 KB |
Output is correct |
96 |
Correct |
162 ms |
19320 KB |
Output is correct |
97 |
Correct |
183 ms |
19184 KB |
Output is correct |
98 |
Correct |
163 ms |
18300 KB |
Output is correct |
99 |
Correct |
64 ms |
20020 KB |
Output is correct |
100 |
Correct |
127 ms |
18968 KB |
Output is correct |
101 |
Correct |
141 ms |
19968 KB |
Output is correct |
102 |
Correct |
125 ms |
18800 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
6612 KB |
Output is correct |
2 |
Correct |
6 ms |
6612 KB |
Output is correct |
3 |
Correct |
6 ms |
6604 KB |
Output is correct |
4 |
Correct |
6 ms |
6612 KB |
Output is correct |
5 |
Correct |
4 ms |
6356 KB |
Output is correct |
6 |
Correct |
6 ms |
6356 KB |
Output is correct |
7 |
Correct |
6 ms |
6612 KB |
Output is correct |
8 |
Correct |
6 ms |
6612 KB |
Output is correct |
9 |
Correct |
9 ms |
6612 KB |
Output is correct |
10 |
Correct |
8 ms |
6612 KB |
Output is correct |
11 |
Correct |
10 ms |
6608 KB |
Output is correct |
12 |
Correct |
8 ms |
6664 KB |
Output is correct |
13 |
Correct |
6 ms |
6612 KB |
Output is correct |
14 |
Correct |
6 ms |
6640 KB |
Output is correct |
15 |
Correct |
5 ms |
6604 KB |
Output is correct |
16 |
Correct |
6 ms |
6608 KB |
Output is correct |
17 |
Correct |
7 ms |
6608 KB |
Output is correct |
18 |
Correct |
7 ms |
6612 KB |
Output is correct |
19 |
Correct |
6 ms |
6612 KB |
Output is correct |
20 |
Correct |
8 ms |
6612 KB |
Output is correct |
21 |
Correct |
7 ms |
6612 KB |
Output is correct |
22 |
Correct |
7 ms |
6612 KB |
Output is correct |
23 |
Correct |
8 ms |
6616 KB |
Output is correct |
24 |
Correct |
9 ms |
6612 KB |
Output is correct |
25 |
Correct |
5 ms |
6356 KB |
Output is correct |
26 |
Correct |
5 ms |
6356 KB |
Output is correct |
27 |
Correct |
7 ms |
6608 KB |
Output is correct |
28 |
Correct |
8 ms |
6604 KB |
Output is correct |
29 |
Correct |
7 ms |
6612 KB |
Output is correct |
30 |
Correct |
7 ms |
6612 KB |
Output is correct |
31 |
Correct |
7 ms |
6608 KB |
Output is correct |
32 |
Correct |
7 ms |
6612 KB |
Output is correct |
33 |
Correct |
5 ms |
6612 KB |
Output is correct |
34 |
Correct |
5 ms |
6612 KB |
Output is correct |
35 |
Correct |
6 ms |
6608 KB |
Output is correct |
36 |
Correct |
7 ms |
6612 KB |
Output is correct |
37 |
Correct |
6 ms |
6500 KB |
Output is correct |
38 |
Correct |
7 ms |
6608 KB |
Output is correct |
39 |
Correct |
132 ms |
19660 KB |
Output is correct |
40 |
Correct |
135 ms |
18788 KB |
Output is correct |
41 |
Correct |
122 ms |
19648 KB |
Output is correct |
42 |
Correct |
144 ms |
19644 KB |
Output is correct |
43 |
Correct |
137 ms |
18860 KB |
Output is correct |
44 |
Correct |
144 ms |
18748 KB |
Output is correct |
45 |
Correct |
41 ms |
12528 KB |
Output is correct |
46 |
Correct |
34 ms |
12628 KB |
Output is correct |
47 |
Correct |
133 ms |
19464 KB |
Output is correct |
48 |
Correct |
141 ms |
18848 KB |
Output is correct |
49 |
Correct |
126 ms |
18916 KB |
Output is correct |
50 |
Correct |
150 ms |
18840 KB |
Output is correct |
51 |
Correct |
103 ms |
18896 KB |
Output is correct |
52 |
Correct |
117 ms |
19528 KB |
Output is correct |
53 |
Correct |
121 ms |
18352 KB |
Output is correct |
54 |
Correct |
151 ms |
18428 KB |
Output is correct |
55 |
Correct |
687 ms |
58376 KB |
Output is correct |
56 |
Correct |
544 ms |
51648 KB |
Output is correct |
57 |
Correct |
846 ms |
60620 KB |
Output is correct |
58 |
Correct |
633 ms |
50404 KB |
Output is correct |
59 |
Correct |
631 ms |
50820 KB |
Output is correct |
60 |
Correct |
902 ms |
57176 KB |
Output is correct |
61 |
Correct |
126 ms |
33032 KB |
Output is correct |
62 |
Correct |
148 ms |
32920 KB |
Output is correct |
63 |
Correct |
877 ms |
63256 KB |
Output is correct |
64 |
Correct |
933 ms |
63144 KB |
Output is correct |
65 |
Correct |
836 ms |
57164 KB |
Output is correct |
66 |
Correct |
837 ms |
57060 KB |
Output is correct |
67 |
Correct |
784 ms |
57048 KB |
Output is correct |
68 |
Correct |
801 ms |
57096 KB |
Output is correct |
69 |
Correct |
782 ms |
57136 KB |
Output is correct |
70 |
Correct |
784 ms |
56972 KB |
Output is correct |
71 |
Correct |
786 ms |
56968 KB |
Output is correct |
72 |
Correct |
841 ms |
57096 KB |
Output is correct |
73 |
Correct |
829 ms |
57148 KB |
Output is correct |
74 |
Correct |
840 ms |
57032 KB |
Output is correct |
75 |
Correct |
785 ms |
57028 KB |
Output is correct |
76 |
Correct |
794 ms |
57012 KB |
Output is correct |
77 |
Correct |
885 ms |
57164 KB |
Output is correct |
78 |
Correct |
848 ms |
57044 KB |
Output is correct |
79 |
Correct |
585 ms |
59652 KB |
Output is correct |
80 |
Correct |
609 ms |
60184 KB |
Output is correct |
81 |
Correct |
586 ms |
55328 KB |
Output is correct |
82 |
Correct |
153 ms |
18984 KB |
Output is correct |
83 |
Correct |
133 ms |
17544 KB |
Output is correct |
84 |
Correct |
23 ms |
11140 KB |
Output is correct |
85 |
Correct |
31 ms |
11688 KB |
Output is correct |
86 |
Correct |
167 ms |
18744 KB |
Output is correct |
87 |
Correct |
174 ms |
18676 KB |
Output is correct |
88 |
Correct |
154 ms |
18720 KB |
Output is correct |
89 |
Correct |
151 ms |
18684 KB |
Output is correct |
90 |
Correct |
182 ms |
18696 KB |
Output is correct |
91 |
Correct |
147 ms |
18744 KB |
Output is correct |
92 |
Correct |
49 ms |
19460 KB |
Output is correct |
93 |
Correct |
130 ms |
19544 KB |
Output is correct |
94 |
Correct |
127 ms |
16856 KB |
Output is correct |
95 |
Correct |
138 ms |
17652 KB |
Output is correct |
96 |
Correct |
154 ms |
18576 KB |
Output is correct |
97 |
Correct |
170 ms |
18536 KB |
Output is correct |
98 |
Correct |
101 ms |
16932 KB |
Output is correct |
99 |
Correct |
134 ms |
18448 KB |
Output is correct |
100 |
Correct |
169 ms |
20116 KB |
Output is correct |
101 |
Correct |
206 ms |
20860 KB |
Output is correct |
102 |
Correct |
157 ms |
20916 KB |
Output is correct |
103 |
Correct |
134 ms |
18728 KB |
Output is correct |
104 |
Correct |
164 ms |
20012 KB |
Output is correct |
105 |
Correct |
158 ms |
20908 KB |
Output is correct |
106 |
Correct |
41 ms |
13400 KB |
Output is correct |
107 |
Correct |
42 ms |
12980 KB |
Output is correct |
108 |
Correct |
71 ms |
20808 KB |
Output is correct |
109 |
Correct |
102 ms |
18524 KB |
Output is correct |
110 |
Correct |
141 ms |
20944 KB |
Output is correct |
111 |
Correct |
166 ms |
20876 KB |
Output is correct |
112 |
Correct |
150 ms |
19596 KB |
Output is correct |
113 |
Correct |
175 ms |
20092 KB |
Output is correct |
114 |
Correct |
194 ms |
18484 KB |
Output is correct |
115 |
Correct |
180 ms |
19364 KB |
Output is correct |
116 |
Correct |
108 ms |
17236 KB |
Output is correct |
117 |
Correct |
161 ms |
19228 KB |
Output is correct |
118 |
Correct |
130 ms |
18120 KB |
Output is correct |
119 |
Correct |
130 ms |
17964 KB |
Output is correct |
120 |
Correct |
161 ms |
19208 KB |
Output is correct |
121 |
Correct |
167 ms |
19392 KB |
Output is correct |
122 |
Correct |
175 ms |
19092 KB |
Output is correct |
123 |
Correct |
162 ms |
19320 KB |
Output is correct |
124 |
Correct |
183 ms |
19184 KB |
Output is correct |
125 |
Correct |
163 ms |
18300 KB |
Output is correct |
126 |
Correct |
64 ms |
20020 KB |
Output is correct |
127 |
Correct |
127 ms |
18968 KB |
Output is correct |
128 |
Correct |
141 ms |
19968 KB |
Output is correct |
129 |
Correct |
125 ms |
18800 KB |
Output is correct |
130 |
Correct |
780 ms |
61064 KB |
Output is correct |
131 |
Correct |
660 ms |
51884 KB |
Output is correct |
132 |
Correct |
773 ms |
60940 KB |
Output is correct |
133 |
Correct |
890 ms |
56780 KB |
Output is correct |
134 |
Correct |
759 ms |
54188 KB |
Output is correct |
135 |
Correct |
958 ms |
58068 KB |
Output is correct |
136 |
Correct |
894 ms |
64056 KB |
Output is correct |
137 |
Correct |
915 ms |
64072 KB |
Output is correct |
138 |
Correct |
803 ms |
57760 KB |
Output is correct |
139 |
Correct |
793 ms |
57716 KB |
Output is correct |
140 |
Correct |
826 ms |
57676 KB |
Output is correct |
141 |
Correct |
785 ms |
57700 KB |
Output is correct |
142 |
Correct |
818 ms |
57616 KB |
Output is correct |
143 |
Correct |
834 ms |
57660 KB |
Output is correct |
144 |
Correct |
902 ms |
57692 KB |
Output is correct |
145 |
Correct |
790 ms |
57732 KB |
Output is correct |
146 |
Correct |
792 ms |
57632 KB |
Output is correct |
147 |
Correct |
784 ms |
57632 KB |
Output is correct |
148 |
Correct |
805 ms |
57668 KB |
Output is correct |
149 |
Correct |
805 ms |
57596 KB |
Output is correct |
150 |
Correct |
267 ms |
60388 KB |
Output is correct |
151 |
Correct |
616 ms |
60732 KB |
Output is correct |
152 |
Correct |
642 ms |
60744 KB |
Output is correct |
153 |
Correct |
598 ms |
56296 KB |
Output is correct |