#include <bits/stdc++.h>
using namespace std;
#define int long long
struct SegmentTree {
int n;
vector<long long> a, b;
SegmentTree(int n) : n(n), a(4 * n, 0), b(4 * n, 0) {}
void apply(int idx, long long x, long long y) {
b[idx] = max(b[idx] + x, y);
a[idx] = a[idx] + x;
}
void down(int idx) {
apply(2 * idx + 1, a[idx], b[idx]);
apply(2 * idx + 2, a[idx], b[idx]);
a[idx] = b[idx] = 0;
}
void add(int ql, int qr, long long x, long long y) {
auto dfs = [&](auto self, int idx, int l, int r) {
if (r <= ql || qr <= l) return;
if (ql <= l && r <= qr) return apply(idx, x, y);
down(idx);
int m = (l + r) >> 1;
self(self, 2 * idx + 1, l, m);
self(self, 2 * idx + 2, m, r);
};
dfs(dfs, 0, 0, n);
}
long long get(int pos) {
int idx = 0, l = 0, r = n;
while (l + 1 < r) {
down(idx);
int m = (l + r) >> 1;
if (pos < m) {
idx = 2 * idx + 1;
r = m;
} else {
idx = 2 * idx + 2;
l = m;
}
}
return max(a[idx], b[idx]);
}
};
struct Fenwick {
int n;
vector<long long> bit;
Fenwick(int n) : n(n), bit(n + 1, 0) {}
void add(int i, long long delta) {
for (i++; i <= n; i += i & -i) {
bit[i] += delta;
}
}
void add(int ql, int qr, long long delta) {
add(ql, +delta);
add(qr, -delta);
}
long long get(int i) {
long long res = 0;
for (i++; i > 0; i -= i & -i) {
res += bit[i];
}
return res;
}
};
signed main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n, m, q;
cin >> n >> m >> q;
vector<int> type(q), l(q), r(q), c(q), k(q), a(q), b(q);
for (int i = 0; i < q; i++) {
cin >> type[i];
if (type[i] == 1) {
cin >> l[i] >> r[i] >> c[i] >> k[i];
l[i]--;
}
if (type[i] == 2) {
cin >> l[i] >> r[i] >> k[i];
l[i]--;
}
if (type[i] == 3) {
cin >> a[i] >> b[i];
a[i]--;
b[i]--;
}
}
SegmentTree seg(n);
Fenwick fen(n);
vector<vector<int>> inbox(q + 1);
for (int i = 0; i < q; i++) {
if (type[i] == 1) {
seg.add(l[i], r[i], k[i], 0);
fen.add(l[i], r[i], k[i]);
}
if (type[i] == 2) {
seg.add(l[i], r[i], -k[i], 0);
}
if (type[i] == 3) {
long long seg_get = seg.get(a[i]);
long long fen_get = fen.get(a[i]);
b[i] = fen_get - seg_get + b[i];
l[i] = 0, r[i] = q - 1;
inbox[(l[i] + r[i]) >> 1].push_back(i);
}
}
const int LOG = 18;
for (int ite = 0; ite < LOG; ite++) {
Fenwick fen(n);
vector<vector<int>> new_inbox(q + 1);
for (int m = 0; m < q; m++) {
if (type[m] == 1) {
fen.add(l[m], r[m], k[m]);
}
for (int i : inbox[m]) {
if (b[i] < fen.get(a[i])) {
r[i] = m;
} else {
l[i] = m + 1;
}
new_inbox[(l[i] + r[i]) >> 1].push_back(i);
}
}
inbox = new_inbox;
}
for (int i = 0; i < q; i++) {
if (type[i] == 3) {
if (l[i] > i) {
cout << 0 << '\n';
} else {
cout << c[l[i]] << '\n';
}
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
600 KB |
Output is correct |
2 |
Correct |
2 ms |
860 KB |
Output is correct |
3 |
Correct |
2 ms |
604 KB |
Output is correct |
4 |
Correct |
3 ms |
860 KB |
Output is correct |
5 |
Correct |
2 ms |
604 KB |
Output is correct |
6 |
Correct |
1 ms |
604 KB |
Output is correct |
7 |
Correct |
2 ms |
860 KB |
Output is correct |
8 |
Correct |
3 ms |
860 KB |
Output is correct |
9 |
Correct |
3 ms |
820 KB |
Output is correct |
10 |
Correct |
3 ms |
1112 KB |
Output is correct |
11 |
Correct |
3 ms |
860 KB |
Output is correct |
12 |
Correct |
3 ms |
860 KB |
Output is correct |
13 |
Correct |
2 ms |
604 KB |
Output is correct |
14 |
Correct |
3 ms |
860 KB |
Output is correct |
15 |
Correct |
3 ms |
604 KB |
Output is correct |
16 |
Correct |
2 ms |
860 KB |
Output is correct |
17 |
Correct |
2 ms |
604 KB |
Output is correct |
18 |
Correct |
3 ms |
856 KB |
Output is correct |
19 |
Correct |
2 ms |
604 KB |
Output is correct |
20 |
Correct |
2 ms |
860 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
600 KB |
Output is correct |
2 |
Correct |
2 ms |
860 KB |
Output is correct |
3 |
Correct |
2 ms |
604 KB |
Output is correct |
4 |
Correct |
3 ms |
860 KB |
Output is correct |
5 |
Correct |
2 ms |
604 KB |
Output is correct |
6 |
Correct |
1 ms |
604 KB |
Output is correct |
7 |
Correct |
2 ms |
860 KB |
Output is correct |
8 |
Correct |
3 ms |
860 KB |
Output is correct |
9 |
Correct |
3 ms |
820 KB |
Output is correct |
10 |
Correct |
3 ms |
1112 KB |
Output is correct |
11 |
Correct |
3 ms |
860 KB |
Output is correct |
12 |
Correct |
3 ms |
860 KB |
Output is correct |
13 |
Correct |
2 ms |
604 KB |
Output is correct |
14 |
Correct |
3 ms |
860 KB |
Output is correct |
15 |
Correct |
3 ms |
604 KB |
Output is correct |
16 |
Correct |
2 ms |
860 KB |
Output is correct |
17 |
Correct |
2 ms |
604 KB |
Output is correct |
18 |
Correct |
3 ms |
856 KB |
Output is correct |
19 |
Correct |
2 ms |
604 KB |
Output is correct |
20 |
Correct |
2 ms |
860 KB |
Output is correct |
21 |
Correct |
3 ms |
860 KB |
Output is correct |
22 |
Correct |
3 ms |
860 KB |
Output is correct |
23 |
Correct |
3 ms |
860 KB |
Output is correct |
24 |
Correct |
3 ms |
860 KB |
Output is correct |
25 |
Correct |
2 ms |
600 KB |
Output is correct |
26 |
Correct |
2 ms |
600 KB |
Output is correct |
27 |
Correct |
3 ms |
856 KB |
Output is correct |
28 |
Correct |
3 ms |
860 KB |
Output is correct |
29 |
Correct |
3 ms |
944 KB |
Output is correct |
30 |
Correct |
3 ms |
860 KB |
Output is correct |
31 |
Correct |
3 ms |
860 KB |
Output is correct |
32 |
Correct |
3 ms |
860 KB |
Output is correct |
33 |
Correct |
2 ms |
860 KB |
Output is correct |
34 |
Correct |
2 ms |
860 KB |
Output is correct |
35 |
Correct |
2 ms |
856 KB |
Output is correct |
36 |
Correct |
3 ms |
860 KB |
Output is correct |
37 |
Correct |
2 ms |
604 KB |
Output is correct |
38 |
Correct |
3 ms |
856 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
77 ms |
15752 KB |
Output is correct |
2 |
Correct |
82 ms |
14788 KB |
Output is correct |
3 |
Correct |
79 ms |
15800 KB |
Output is correct |
4 |
Correct |
79 ms |
15792 KB |
Output is correct |
5 |
Correct |
101 ms |
14964 KB |
Output is correct |
6 |
Correct |
86 ms |
14956 KB |
Output is correct |
7 |
Correct |
39 ms |
10116 KB |
Output is correct |
8 |
Correct |
43 ms |
10136 KB |
Output is correct |
9 |
Correct |
73 ms |
14744 KB |
Output is correct |
10 |
Correct |
78 ms |
14692 KB |
Output is correct |
11 |
Correct |
76 ms |
14692 KB |
Output is correct |
12 |
Correct |
75 ms |
14684 KB |
Output is correct |
13 |
Correct |
76 ms |
13048 KB |
Output is correct |
14 |
Correct |
86 ms |
15848 KB |
Output is correct |
15 |
Correct |
87 ms |
12300 KB |
Output is correct |
16 |
Correct |
90 ms |
14036 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
378 ms |
60916 KB |
Output is correct |
2 |
Correct |
301 ms |
50444 KB |
Output is correct |
3 |
Correct |
406 ms |
66800 KB |
Output is correct |
4 |
Correct |
380 ms |
51584 KB |
Output is correct |
5 |
Correct |
319 ms |
47396 KB |
Output is correct |
6 |
Correct |
472 ms |
64216 KB |
Output is correct |
7 |
Correct |
185 ms |
45796 KB |
Output is correct |
8 |
Correct |
196 ms |
45644 KB |
Output is correct |
9 |
Correct |
505 ms |
73568 KB |
Output is correct |
10 |
Correct |
497 ms |
73464 KB |
Output is correct |
11 |
Correct |
387 ms |
63104 KB |
Output is correct |
12 |
Correct |
424 ms |
63540 KB |
Output is correct |
13 |
Correct |
394 ms |
63300 KB |
Output is correct |
14 |
Correct |
435 ms |
63556 KB |
Output is correct |
15 |
Correct |
422 ms |
63616 KB |
Output is correct |
16 |
Correct |
409 ms |
63136 KB |
Output is correct |
17 |
Correct |
412 ms |
63648 KB |
Output is correct |
18 |
Correct |
410 ms |
63516 KB |
Output is correct |
19 |
Correct |
420 ms |
63656 KB |
Output is correct |
20 |
Correct |
393 ms |
63304 KB |
Output is correct |
21 |
Correct |
439 ms |
63552 KB |
Output is correct |
22 |
Correct |
418 ms |
63584 KB |
Output is correct |
23 |
Correct |
412 ms |
63552 KB |
Output is correct |
24 |
Correct |
421 ms |
63592 KB |
Output is correct |
25 |
Correct |
367 ms |
61696 KB |
Output is correct |
26 |
Correct |
388 ms |
66880 KB |
Output is correct |
27 |
Correct |
338 ms |
60096 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
600 KB |
Output is correct |
2 |
Correct |
2 ms |
860 KB |
Output is correct |
3 |
Correct |
2 ms |
604 KB |
Output is correct |
4 |
Correct |
3 ms |
860 KB |
Output is correct |
5 |
Correct |
2 ms |
604 KB |
Output is correct |
6 |
Correct |
1 ms |
604 KB |
Output is correct |
7 |
Correct |
2 ms |
860 KB |
Output is correct |
8 |
Correct |
3 ms |
860 KB |
Output is correct |
9 |
Correct |
3 ms |
820 KB |
Output is correct |
10 |
Correct |
3 ms |
1112 KB |
Output is correct |
11 |
Correct |
3 ms |
860 KB |
Output is correct |
12 |
Correct |
3 ms |
860 KB |
Output is correct |
13 |
Correct |
2 ms |
604 KB |
Output is correct |
14 |
Correct |
3 ms |
860 KB |
Output is correct |
15 |
Correct |
3 ms |
604 KB |
Output is correct |
16 |
Correct |
2 ms |
860 KB |
Output is correct |
17 |
Correct |
2 ms |
604 KB |
Output is correct |
18 |
Correct |
3 ms |
856 KB |
Output is correct |
19 |
Correct |
2 ms |
604 KB |
Output is correct |
20 |
Correct |
2 ms |
860 KB |
Output is correct |
21 |
Correct |
77 ms |
15752 KB |
Output is correct |
22 |
Correct |
82 ms |
14788 KB |
Output is correct |
23 |
Correct |
79 ms |
15800 KB |
Output is correct |
24 |
Correct |
79 ms |
15792 KB |
Output is correct |
25 |
Correct |
101 ms |
14964 KB |
Output is correct |
26 |
Correct |
86 ms |
14956 KB |
Output is correct |
27 |
Correct |
39 ms |
10116 KB |
Output is correct |
28 |
Correct |
43 ms |
10136 KB |
Output is correct |
29 |
Correct |
73 ms |
14744 KB |
Output is correct |
30 |
Correct |
78 ms |
14692 KB |
Output is correct |
31 |
Correct |
76 ms |
14692 KB |
Output is correct |
32 |
Correct |
75 ms |
14684 KB |
Output is correct |
33 |
Correct |
76 ms |
13048 KB |
Output is correct |
34 |
Correct |
86 ms |
15848 KB |
Output is correct |
35 |
Correct |
87 ms |
12300 KB |
Output is correct |
36 |
Correct |
90 ms |
14036 KB |
Output is correct |
37 |
Correct |
84 ms |
14384 KB |
Output is correct |
38 |
Correct |
75 ms |
12492 KB |
Output is correct |
39 |
Correct |
33 ms |
8316 KB |
Output is correct |
40 |
Correct |
39 ms |
9276 KB |
Output is correct |
41 |
Correct |
79 ms |
14900 KB |
Output is correct |
42 |
Correct |
85 ms |
14856 KB |
Output is correct |
43 |
Correct |
84 ms |
15068 KB |
Output is correct |
44 |
Correct |
83 ms |
14872 KB |
Output is correct |
45 |
Correct |
84 ms |
15060 KB |
Output is correct |
46 |
Correct |
86 ms |
15064 KB |
Output is correct |
47 |
Correct |
60 ms |
15920 KB |
Output is correct |
48 |
Correct |
88 ms |
15948 KB |
Output is correct |
49 |
Correct |
61 ms |
10436 KB |
Output is correct |
50 |
Correct |
71 ms |
13136 KB |
Output is correct |
51 |
Correct |
86 ms |
14552 KB |
Output is correct |
52 |
Correct |
85 ms |
14684 KB |
Output is correct |
53 |
Correct |
68 ms |
11352 KB |
Output is correct |
54 |
Correct |
89 ms |
13920 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
93 ms |
17536 KB |
Output is correct |
2 |
Correct |
113 ms |
18452 KB |
Output is correct |
3 |
Correct |
105 ms |
19092 KB |
Output is correct |
4 |
Correct |
73 ms |
14664 KB |
Output is correct |
5 |
Correct |
91 ms |
17172 KB |
Output is correct |
6 |
Correct |
104 ms |
19132 KB |
Output is correct |
7 |
Correct |
62 ms |
12348 KB |
Output is correct |
8 |
Correct |
51 ms |
11436 KB |
Output is correct |
9 |
Correct |
80 ms |
19128 KB |
Output is correct |
10 |
Correct |
73 ms |
14212 KB |
Output is correct |
11 |
Correct |
102 ms |
19176 KB |
Output is correct |
12 |
Correct |
100 ms |
19124 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
600 KB |
Output is correct |
2 |
Correct |
2 ms |
860 KB |
Output is correct |
3 |
Correct |
2 ms |
604 KB |
Output is correct |
4 |
Correct |
3 ms |
860 KB |
Output is correct |
5 |
Correct |
2 ms |
604 KB |
Output is correct |
6 |
Correct |
1 ms |
604 KB |
Output is correct |
7 |
Correct |
2 ms |
860 KB |
Output is correct |
8 |
Correct |
3 ms |
860 KB |
Output is correct |
9 |
Correct |
3 ms |
820 KB |
Output is correct |
10 |
Correct |
3 ms |
1112 KB |
Output is correct |
11 |
Correct |
3 ms |
860 KB |
Output is correct |
12 |
Correct |
3 ms |
860 KB |
Output is correct |
13 |
Correct |
2 ms |
604 KB |
Output is correct |
14 |
Correct |
3 ms |
860 KB |
Output is correct |
15 |
Correct |
3 ms |
604 KB |
Output is correct |
16 |
Correct |
2 ms |
860 KB |
Output is correct |
17 |
Correct |
2 ms |
604 KB |
Output is correct |
18 |
Correct |
3 ms |
856 KB |
Output is correct |
19 |
Correct |
2 ms |
604 KB |
Output is correct |
20 |
Correct |
2 ms |
860 KB |
Output is correct |
21 |
Correct |
3 ms |
860 KB |
Output is correct |
22 |
Correct |
3 ms |
860 KB |
Output is correct |
23 |
Correct |
3 ms |
860 KB |
Output is correct |
24 |
Correct |
3 ms |
860 KB |
Output is correct |
25 |
Correct |
2 ms |
600 KB |
Output is correct |
26 |
Correct |
2 ms |
600 KB |
Output is correct |
27 |
Correct |
3 ms |
856 KB |
Output is correct |
28 |
Correct |
3 ms |
860 KB |
Output is correct |
29 |
Correct |
3 ms |
944 KB |
Output is correct |
30 |
Correct |
3 ms |
860 KB |
Output is correct |
31 |
Correct |
3 ms |
860 KB |
Output is correct |
32 |
Correct |
3 ms |
860 KB |
Output is correct |
33 |
Correct |
2 ms |
860 KB |
Output is correct |
34 |
Correct |
2 ms |
860 KB |
Output is correct |
35 |
Correct |
2 ms |
856 KB |
Output is correct |
36 |
Correct |
3 ms |
860 KB |
Output is correct |
37 |
Correct |
2 ms |
604 KB |
Output is correct |
38 |
Correct |
3 ms |
856 KB |
Output is correct |
39 |
Correct |
77 ms |
15752 KB |
Output is correct |
40 |
Correct |
82 ms |
14788 KB |
Output is correct |
41 |
Correct |
79 ms |
15800 KB |
Output is correct |
42 |
Correct |
79 ms |
15792 KB |
Output is correct |
43 |
Correct |
101 ms |
14964 KB |
Output is correct |
44 |
Correct |
86 ms |
14956 KB |
Output is correct |
45 |
Correct |
39 ms |
10116 KB |
Output is correct |
46 |
Correct |
43 ms |
10136 KB |
Output is correct |
47 |
Correct |
73 ms |
14744 KB |
Output is correct |
48 |
Correct |
78 ms |
14692 KB |
Output is correct |
49 |
Correct |
76 ms |
14692 KB |
Output is correct |
50 |
Correct |
75 ms |
14684 KB |
Output is correct |
51 |
Correct |
76 ms |
13048 KB |
Output is correct |
52 |
Correct |
86 ms |
15848 KB |
Output is correct |
53 |
Correct |
87 ms |
12300 KB |
Output is correct |
54 |
Correct |
90 ms |
14036 KB |
Output is correct |
55 |
Correct |
84 ms |
14384 KB |
Output is correct |
56 |
Correct |
75 ms |
12492 KB |
Output is correct |
57 |
Correct |
33 ms |
8316 KB |
Output is correct |
58 |
Correct |
39 ms |
9276 KB |
Output is correct |
59 |
Correct |
79 ms |
14900 KB |
Output is correct |
60 |
Correct |
85 ms |
14856 KB |
Output is correct |
61 |
Correct |
84 ms |
15068 KB |
Output is correct |
62 |
Correct |
83 ms |
14872 KB |
Output is correct |
63 |
Correct |
84 ms |
15060 KB |
Output is correct |
64 |
Correct |
86 ms |
15064 KB |
Output is correct |
65 |
Correct |
60 ms |
15920 KB |
Output is correct |
66 |
Correct |
88 ms |
15948 KB |
Output is correct |
67 |
Correct |
61 ms |
10436 KB |
Output is correct |
68 |
Correct |
71 ms |
13136 KB |
Output is correct |
69 |
Correct |
86 ms |
14552 KB |
Output is correct |
70 |
Correct |
85 ms |
14684 KB |
Output is correct |
71 |
Correct |
68 ms |
11352 KB |
Output is correct |
72 |
Correct |
89 ms |
13920 KB |
Output is correct |
73 |
Correct |
93 ms |
17536 KB |
Output is correct |
74 |
Correct |
113 ms |
18452 KB |
Output is correct |
75 |
Correct |
105 ms |
19092 KB |
Output is correct |
76 |
Correct |
73 ms |
14664 KB |
Output is correct |
77 |
Correct |
91 ms |
17172 KB |
Output is correct |
78 |
Correct |
104 ms |
19132 KB |
Output is correct |
79 |
Correct |
62 ms |
12348 KB |
Output is correct |
80 |
Correct |
51 ms |
11436 KB |
Output is correct |
81 |
Correct |
80 ms |
19128 KB |
Output is correct |
82 |
Correct |
73 ms |
14212 KB |
Output is correct |
83 |
Correct |
102 ms |
19176 KB |
Output is correct |
84 |
Correct |
100 ms |
19124 KB |
Output is correct |
85 |
Correct |
86 ms |
15116 KB |
Output is correct |
86 |
Correct |
89 ms |
17464 KB |
Output is correct |
87 |
Correct |
85 ms |
15028 KB |
Output is correct |
88 |
Correct |
96 ms |
16652 KB |
Output is correct |
89 |
Correct |
56 ms |
11888 KB |
Output is correct |
90 |
Correct |
88 ms |
16656 KB |
Output is correct |
91 |
Correct |
76 ms |
12820 KB |
Output is correct |
92 |
Correct |
66 ms |
12544 KB |
Output is correct |
93 |
Correct |
104 ms |
16796 KB |
Output is correct |
94 |
Correct |
86 ms |
16476 KB |
Output is correct |
95 |
Correct |
85 ms |
15968 KB |
Output is correct |
96 |
Correct |
89 ms |
16656 KB |
Output is correct |
97 |
Correct |
94 ms |
16680 KB |
Output is correct |
98 |
Correct |
74 ms |
13508 KB |
Output is correct |
99 |
Correct |
64 ms |
17320 KB |
Output is correct |
100 |
Correct |
73 ms |
14720 KB |
Output is correct |
101 |
Correct |
90 ms |
17456 KB |
Output is correct |
102 |
Correct |
75 ms |
15712 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
600 KB |
Output is correct |
2 |
Correct |
2 ms |
860 KB |
Output is correct |
3 |
Correct |
2 ms |
604 KB |
Output is correct |
4 |
Correct |
3 ms |
860 KB |
Output is correct |
5 |
Correct |
2 ms |
604 KB |
Output is correct |
6 |
Correct |
1 ms |
604 KB |
Output is correct |
7 |
Correct |
2 ms |
860 KB |
Output is correct |
8 |
Correct |
3 ms |
860 KB |
Output is correct |
9 |
Correct |
3 ms |
820 KB |
Output is correct |
10 |
Correct |
3 ms |
1112 KB |
Output is correct |
11 |
Correct |
3 ms |
860 KB |
Output is correct |
12 |
Correct |
3 ms |
860 KB |
Output is correct |
13 |
Correct |
2 ms |
604 KB |
Output is correct |
14 |
Correct |
3 ms |
860 KB |
Output is correct |
15 |
Correct |
3 ms |
604 KB |
Output is correct |
16 |
Correct |
2 ms |
860 KB |
Output is correct |
17 |
Correct |
2 ms |
604 KB |
Output is correct |
18 |
Correct |
3 ms |
856 KB |
Output is correct |
19 |
Correct |
2 ms |
604 KB |
Output is correct |
20 |
Correct |
2 ms |
860 KB |
Output is correct |
21 |
Correct |
3 ms |
860 KB |
Output is correct |
22 |
Correct |
3 ms |
860 KB |
Output is correct |
23 |
Correct |
3 ms |
860 KB |
Output is correct |
24 |
Correct |
3 ms |
860 KB |
Output is correct |
25 |
Correct |
2 ms |
600 KB |
Output is correct |
26 |
Correct |
2 ms |
600 KB |
Output is correct |
27 |
Correct |
3 ms |
856 KB |
Output is correct |
28 |
Correct |
3 ms |
860 KB |
Output is correct |
29 |
Correct |
3 ms |
944 KB |
Output is correct |
30 |
Correct |
3 ms |
860 KB |
Output is correct |
31 |
Correct |
3 ms |
860 KB |
Output is correct |
32 |
Correct |
3 ms |
860 KB |
Output is correct |
33 |
Correct |
2 ms |
860 KB |
Output is correct |
34 |
Correct |
2 ms |
860 KB |
Output is correct |
35 |
Correct |
2 ms |
856 KB |
Output is correct |
36 |
Correct |
3 ms |
860 KB |
Output is correct |
37 |
Correct |
2 ms |
604 KB |
Output is correct |
38 |
Correct |
3 ms |
856 KB |
Output is correct |
39 |
Correct |
77 ms |
15752 KB |
Output is correct |
40 |
Correct |
82 ms |
14788 KB |
Output is correct |
41 |
Correct |
79 ms |
15800 KB |
Output is correct |
42 |
Correct |
79 ms |
15792 KB |
Output is correct |
43 |
Correct |
101 ms |
14964 KB |
Output is correct |
44 |
Correct |
86 ms |
14956 KB |
Output is correct |
45 |
Correct |
39 ms |
10116 KB |
Output is correct |
46 |
Correct |
43 ms |
10136 KB |
Output is correct |
47 |
Correct |
73 ms |
14744 KB |
Output is correct |
48 |
Correct |
78 ms |
14692 KB |
Output is correct |
49 |
Correct |
76 ms |
14692 KB |
Output is correct |
50 |
Correct |
75 ms |
14684 KB |
Output is correct |
51 |
Correct |
76 ms |
13048 KB |
Output is correct |
52 |
Correct |
86 ms |
15848 KB |
Output is correct |
53 |
Correct |
87 ms |
12300 KB |
Output is correct |
54 |
Correct |
90 ms |
14036 KB |
Output is correct |
55 |
Correct |
378 ms |
60916 KB |
Output is correct |
56 |
Correct |
301 ms |
50444 KB |
Output is correct |
57 |
Correct |
406 ms |
66800 KB |
Output is correct |
58 |
Correct |
380 ms |
51584 KB |
Output is correct |
59 |
Correct |
319 ms |
47396 KB |
Output is correct |
60 |
Correct |
472 ms |
64216 KB |
Output is correct |
61 |
Correct |
185 ms |
45796 KB |
Output is correct |
62 |
Correct |
196 ms |
45644 KB |
Output is correct |
63 |
Correct |
505 ms |
73568 KB |
Output is correct |
64 |
Correct |
497 ms |
73464 KB |
Output is correct |
65 |
Correct |
387 ms |
63104 KB |
Output is correct |
66 |
Correct |
424 ms |
63540 KB |
Output is correct |
67 |
Correct |
394 ms |
63300 KB |
Output is correct |
68 |
Correct |
435 ms |
63556 KB |
Output is correct |
69 |
Correct |
422 ms |
63616 KB |
Output is correct |
70 |
Correct |
409 ms |
63136 KB |
Output is correct |
71 |
Correct |
412 ms |
63648 KB |
Output is correct |
72 |
Correct |
410 ms |
63516 KB |
Output is correct |
73 |
Correct |
420 ms |
63656 KB |
Output is correct |
74 |
Correct |
393 ms |
63304 KB |
Output is correct |
75 |
Correct |
439 ms |
63552 KB |
Output is correct |
76 |
Correct |
418 ms |
63584 KB |
Output is correct |
77 |
Correct |
412 ms |
63552 KB |
Output is correct |
78 |
Correct |
421 ms |
63592 KB |
Output is correct |
79 |
Correct |
367 ms |
61696 KB |
Output is correct |
80 |
Correct |
388 ms |
66880 KB |
Output is correct |
81 |
Correct |
338 ms |
60096 KB |
Output is correct |
82 |
Correct |
84 ms |
14384 KB |
Output is correct |
83 |
Correct |
75 ms |
12492 KB |
Output is correct |
84 |
Correct |
33 ms |
8316 KB |
Output is correct |
85 |
Correct |
39 ms |
9276 KB |
Output is correct |
86 |
Correct |
79 ms |
14900 KB |
Output is correct |
87 |
Correct |
85 ms |
14856 KB |
Output is correct |
88 |
Correct |
84 ms |
15068 KB |
Output is correct |
89 |
Correct |
83 ms |
14872 KB |
Output is correct |
90 |
Correct |
84 ms |
15060 KB |
Output is correct |
91 |
Correct |
86 ms |
15064 KB |
Output is correct |
92 |
Correct |
60 ms |
15920 KB |
Output is correct |
93 |
Correct |
88 ms |
15948 KB |
Output is correct |
94 |
Correct |
61 ms |
10436 KB |
Output is correct |
95 |
Correct |
71 ms |
13136 KB |
Output is correct |
96 |
Correct |
86 ms |
14552 KB |
Output is correct |
97 |
Correct |
85 ms |
14684 KB |
Output is correct |
98 |
Correct |
68 ms |
11352 KB |
Output is correct |
99 |
Correct |
89 ms |
13920 KB |
Output is correct |
100 |
Correct |
93 ms |
17536 KB |
Output is correct |
101 |
Correct |
113 ms |
18452 KB |
Output is correct |
102 |
Correct |
105 ms |
19092 KB |
Output is correct |
103 |
Correct |
73 ms |
14664 KB |
Output is correct |
104 |
Correct |
91 ms |
17172 KB |
Output is correct |
105 |
Correct |
104 ms |
19132 KB |
Output is correct |
106 |
Correct |
62 ms |
12348 KB |
Output is correct |
107 |
Correct |
51 ms |
11436 KB |
Output is correct |
108 |
Correct |
80 ms |
19128 KB |
Output is correct |
109 |
Correct |
73 ms |
14212 KB |
Output is correct |
110 |
Correct |
102 ms |
19176 KB |
Output is correct |
111 |
Correct |
100 ms |
19124 KB |
Output is correct |
112 |
Correct |
86 ms |
15116 KB |
Output is correct |
113 |
Correct |
89 ms |
17464 KB |
Output is correct |
114 |
Correct |
85 ms |
15028 KB |
Output is correct |
115 |
Correct |
96 ms |
16652 KB |
Output is correct |
116 |
Correct |
56 ms |
11888 KB |
Output is correct |
117 |
Correct |
88 ms |
16656 KB |
Output is correct |
118 |
Correct |
76 ms |
12820 KB |
Output is correct |
119 |
Correct |
66 ms |
12544 KB |
Output is correct |
120 |
Correct |
104 ms |
16796 KB |
Output is correct |
121 |
Correct |
86 ms |
16476 KB |
Output is correct |
122 |
Correct |
85 ms |
15968 KB |
Output is correct |
123 |
Correct |
89 ms |
16656 KB |
Output is correct |
124 |
Correct |
94 ms |
16680 KB |
Output is correct |
125 |
Correct |
74 ms |
13508 KB |
Output is correct |
126 |
Correct |
64 ms |
17320 KB |
Output is correct |
127 |
Correct |
73 ms |
14720 KB |
Output is correct |
128 |
Correct |
90 ms |
17456 KB |
Output is correct |
129 |
Correct |
75 ms |
15712 KB |
Output is correct |
130 |
Correct |
435 ms |
66816 KB |
Output is correct |
131 |
Correct |
298 ms |
49312 KB |
Output is correct |
132 |
Correct |
456 ms |
67376 KB |
Output is correct |
133 |
Correct |
462 ms |
61972 KB |
Output is correct |
134 |
Correct |
407 ms |
57360 KB |
Output is correct |
135 |
Correct |
464 ms |
64852 KB |
Output is correct |
136 |
Correct |
528 ms |
74820 KB |
Output is correct |
137 |
Correct |
526 ms |
74692 KB |
Output is correct |
138 |
Correct |
403 ms |
63500 KB |
Output is correct |
139 |
Correct |
438 ms |
64384 KB |
Output is correct |
140 |
Correct |
402 ms |
63452 KB |
Output is correct |
141 |
Correct |
427 ms |
64060 KB |
Output is correct |
142 |
Correct |
465 ms |
63780 KB |
Output is correct |
143 |
Correct |
424 ms |
64176 KB |
Output is correct |
144 |
Correct |
414 ms |
64308 KB |
Output is correct |
145 |
Correct |
457 ms |
64628 KB |
Output is correct |
146 |
Correct |
414 ms |
63812 KB |
Output is correct |
147 |
Correct |
438 ms |
64260 KB |
Output is correct |
148 |
Correct |
432 ms |
64112 KB |
Output is correct |
149 |
Correct |
420 ms |
64220 KB |
Output is correct |
150 |
Correct |
291 ms |
67132 KB |
Output is correct |
151 |
Correct |
376 ms |
67644 KB |
Output is correct |
152 |
Correct |
384 ms |
67584 KB |
Output is correct |
153 |
Correct |
352 ms |
60868 KB |
Output is correct |