#include <cstdio>
#include <algorithm>
#include <vector>
#include <cassert>
#define m (s+e)/2
using namespace std;
typedef pair<int, int> ii;
int N, M, Q, T[250001], L[250001], R[250001], C[250001], ans[250001];
long long K[250001];
void readInt(int &x) {
x = 0;
char c = getchar_unlocked();
while (c < '0' || c > '9') c = getchar_unlocked();
while (c >= '0' && c <= '9') {
x = (x << 3) + (x << 1) + (c - '0');
c = getchar_unlocked();
}
}
void readLL(long long &x) {
x = 0;
char c = getchar_unlocked();
while (c < '0' || c > '9') c = getchar_unlocked();
while (c >= '0' && c <= '9') {
x = (x << 3) + (x << 1) + (c - '0');
c = getchar_unlocked();
}
}
struct seg {
int s, e;
long long lazy, v;
seg *l, *r;
seg(int _s, int _e) {
s = _s, e = _e;
lazy = 0;
v = 0;
if (s != e) {
l = new seg(s, m);
r = new seg(m + 1, e);
}
}
void prop() {
if (lazy) {
v += lazy;
if (s != e) {
l -> lazy += lazy;
r -> lazy += lazy;
}
lazy = 0;
}
}
void update(int a, int b, long long dv) {
if (s != a || e != b) {
if (a > m) r -> update(a, b, dv);
else if (b <= m) l -> update(a, b, dv);
else l -> update(a, m, dv), r -> update(m + 1, b, dv);
l -> prop(), r -> prop();
v = min(l -> v, r -> v);
} else lazy += dv;
}
long long query(int a, int b) {
prop();
if (s == a && e == b) return v;
if (a > m) return r -> query(a, b);
if (b <= m) return l -> query(a, b);
return min(l -> query(a, m), r -> query(m + 1, b));
}
int descend(int i, long long k) {
prop();
if (s == e) return s;
if (m < i && r -> lazy + r -> v < k) return r -> descend(i, k);
return l -> descend(i, k);
}
} *r1;
struct Fenwick {
long long ft[250001];
Fenwick() {
fill_n(ft, 250001, 0);
}
void update(int i, long long dv) {
for (; i <= 250000; i += (i & -i)) ft[i] += dv;
}
long long query(int a) {
long long ans = 0;
for (; a > 0; a -= (a & -a)) ans += ft[a];
return ans;
}
int descend(int i, long long k) {
int ans = 0;
for (int x = 17; x >= 0; --x) {
if (ans + (1 << x) <= i && ft[ans + (1 << x)] < k) k -= ft[ans + (1 << x)], ans += 1 << x;
}
return ans;
}
} r2;
int main() {
readInt(N), readInt(M), readInt(Q);
r1 = new seg(0, Q);
ii ops[2 * Q];
int ptr = 0;
for (int i = 1; i <= Q; ++i) {
readInt(T[i]);
if (T[i] == 1) readInt(L[i]), readInt(R[i]), readInt(C[i]), readLL(K[i]);
else if (T[i] == 2) readInt(L[i]), readInt(R[i]), readLL(K[i]);
else readInt(L[i]), readLL(K[i]);
ops[ptr++] = ii(L[i], i);
if (R[i] != N && T[i] != 3) ops[ptr++] = ii(R[i] + 1, -i);
}
sort(ops, ops + ptr);
for (int h = 0; h < ptr; ++h) {
int i = ops[h].second;
if (i < 0 && T[-i] == 1) r1 -> update(-i, Q, -K[-i]), r2.update(-i, -K[-i]);
else if (i < 0 && T[-i] == 2) r1 -> update(-i, Q, K[-i]);
else if (T[i] == 3) {
long long curr = r1 -> query(i, i) - r1 -> query(0, i);
int l = r2.descend(i, r2.query(i) - curr + K[i]);
//printf("%d %lld %lld %d\n", i, r2.query(i), curr, l);
if (l == i) ans[i] = 0;
else ans[i] = C[l + 1];
} else if (T[i] == 1) r1 -> update(i, Q, K[i]), r2.update(i, K[i]);
else r1 -> update(i, Q, -K[i]);
//for (int i = 0; i < Q; ++i) assert(r2.query(i) <= r2.query(i + 1));
}
for (int i = 1; i <= Q; ++i) {
if (T[i] == 3) printf("%d\n", ans[i]);
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
2380 KB |
Output is correct |
2 |
Correct |
3 ms |
2508 KB |
Output is correct |
3 |
Correct |
2 ms |
2380 KB |
Output is correct |
4 |
Correct |
3 ms |
2508 KB |
Output is correct |
5 |
Correct |
2 ms |
2380 KB |
Output is correct |
6 |
Correct |
2 ms |
2380 KB |
Output is correct |
7 |
Correct |
3 ms |
2508 KB |
Output is correct |
8 |
Correct |
3 ms |
2532 KB |
Output is correct |
9 |
Correct |
3 ms |
2508 KB |
Output is correct |
10 |
Correct |
3 ms |
2508 KB |
Output is correct |
11 |
Correct |
3 ms |
2508 KB |
Output is correct |
12 |
Correct |
3 ms |
2508 KB |
Output is correct |
13 |
Correct |
2 ms |
2380 KB |
Output is correct |
14 |
Correct |
2 ms |
2508 KB |
Output is correct |
15 |
Correct |
2 ms |
2380 KB |
Output is correct |
16 |
Correct |
3 ms |
2508 KB |
Output is correct |
17 |
Correct |
3 ms |
2380 KB |
Output is correct |
18 |
Correct |
3 ms |
2508 KB |
Output is correct |
19 |
Correct |
3 ms |
2508 KB |
Output is correct |
20 |
Correct |
3 ms |
2508 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
2380 KB |
Output is correct |
2 |
Correct |
3 ms |
2508 KB |
Output is correct |
3 |
Correct |
2 ms |
2380 KB |
Output is correct |
4 |
Correct |
3 ms |
2508 KB |
Output is correct |
5 |
Correct |
2 ms |
2380 KB |
Output is correct |
6 |
Correct |
2 ms |
2380 KB |
Output is correct |
7 |
Correct |
3 ms |
2508 KB |
Output is correct |
8 |
Correct |
3 ms |
2532 KB |
Output is correct |
9 |
Correct |
3 ms |
2508 KB |
Output is correct |
10 |
Correct |
3 ms |
2508 KB |
Output is correct |
11 |
Correct |
3 ms |
2508 KB |
Output is correct |
12 |
Correct |
3 ms |
2508 KB |
Output is correct |
13 |
Correct |
2 ms |
2380 KB |
Output is correct |
14 |
Correct |
2 ms |
2508 KB |
Output is correct |
15 |
Correct |
2 ms |
2380 KB |
Output is correct |
16 |
Correct |
3 ms |
2508 KB |
Output is correct |
17 |
Correct |
3 ms |
2380 KB |
Output is correct |
18 |
Correct |
3 ms |
2508 KB |
Output is correct |
19 |
Correct |
3 ms |
2508 KB |
Output is correct |
20 |
Correct |
3 ms |
2508 KB |
Output is correct |
21 |
Correct |
4 ms |
2508 KB |
Output is correct |
22 |
Correct |
3 ms |
2508 KB |
Output is correct |
23 |
Correct |
3 ms |
2508 KB |
Output is correct |
24 |
Correct |
4 ms |
2508 KB |
Output is correct |
25 |
Correct |
2 ms |
2380 KB |
Output is correct |
26 |
Correct |
2 ms |
2508 KB |
Output is correct |
27 |
Correct |
4 ms |
2508 KB |
Output is correct |
28 |
Correct |
3 ms |
2508 KB |
Output is correct |
29 |
Correct |
3 ms |
2508 KB |
Output is correct |
30 |
Correct |
3 ms |
2508 KB |
Output is correct |
31 |
Correct |
3 ms |
2508 KB |
Output is correct |
32 |
Correct |
3 ms |
2508 KB |
Output is correct |
33 |
Correct |
2 ms |
2412 KB |
Output is correct |
34 |
Correct |
2 ms |
2508 KB |
Output is correct |
35 |
Correct |
3 ms |
2508 KB |
Output is correct |
36 |
Correct |
3 ms |
2508 KB |
Output is correct |
37 |
Correct |
3 ms |
2340 KB |
Output is correct |
38 |
Correct |
3 ms |
2508 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
107 ms |
11160 KB |
Output is correct |
2 |
Correct |
100 ms |
11084 KB |
Output is correct |
3 |
Correct |
100 ms |
11184 KB |
Output is correct |
4 |
Correct |
101 ms |
11168 KB |
Output is correct |
5 |
Correct |
103 ms |
11136 KB |
Output is correct |
6 |
Correct |
122 ms |
11152 KB |
Output is correct |
7 |
Correct |
33 ms |
10564 KB |
Output is correct |
8 |
Correct |
39 ms |
10628 KB |
Output is correct |
9 |
Correct |
103 ms |
11068 KB |
Output is correct |
10 |
Correct |
101 ms |
11156 KB |
Output is correct |
11 |
Correct |
104 ms |
11116 KB |
Output is correct |
12 |
Correct |
100 ms |
11144 KB |
Output is correct |
13 |
Correct |
102 ms |
10252 KB |
Output is correct |
14 |
Correct |
107 ms |
11204 KB |
Output is correct |
15 |
Correct |
103 ms |
11052 KB |
Output is correct |
16 |
Correct |
106 ms |
11152 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
558 ms |
33860 KB |
Output is correct |
2 |
Correct |
434 ms |
27456 KB |
Output is correct |
3 |
Correct |
574 ms |
36576 KB |
Output is correct |
4 |
Correct |
423 ms |
26984 KB |
Output is correct |
5 |
Correct |
449 ms |
27588 KB |
Output is correct |
6 |
Correct |
636 ms |
36580 KB |
Output is correct |
7 |
Correct |
140 ms |
36596 KB |
Output is correct |
8 |
Correct |
194 ms |
36504 KB |
Output is correct |
9 |
Correct |
579 ms |
36576 KB |
Output is correct |
10 |
Correct |
639 ms |
36576 KB |
Output is correct |
11 |
Correct |
662 ms |
36144 KB |
Output is correct |
12 |
Correct |
651 ms |
36580 KB |
Output is correct |
13 |
Correct |
656 ms |
36076 KB |
Output is correct |
14 |
Correct |
642 ms |
36668 KB |
Output is correct |
15 |
Correct |
626 ms |
36460 KB |
Output is correct |
16 |
Correct |
598 ms |
36548 KB |
Output is correct |
17 |
Correct |
621 ms |
36576 KB |
Output is correct |
18 |
Correct |
659 ms |
36392 KB |
Output is correct |
19 |
Correct |
611 ms |
36692 KB |
Output is correct |
20 |
Correct |
620 ms |
36420 KB |
Output is correct |
21 |
Correct |
613 ms |
36652 KB |
Output is correct |
22 |
Correct |
665 ms |
37476 KB |
Output is correct |
23 |
Correct |
642 ms |
37444 KB |
Output is correct |
24 |
Correct |
645 ms |
37352 KB |
Output is correct |
25 |
Correct |
570 ms |
36924 KB |
Output is correct |
26 |
Correct |
556 ms |
37344 KB |
Output is correct |
27 |
Correct |
386 ms |
36744 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
2380 KB |
Output is correct |
2 |
Correct |
3 ms |
2508 KB |
Output is correct |
3 |
Correct |
2 ms |
2380 KB |
Output is correct |
4 |
Correct |
3 ms |
2508 KB |
Output is correct |
5 |
Correct |
2 ms |
2380 KB |
Output is correct |
6 |
Correct |
2 ms |
2380 KB |
Output is correct |
7 |
Correct |
3 ms |
2508 KB |
Output is correct |
8 |
Correct |
3 ms |
2532 KB |
Output is correct |
9 |
Correct |
3 ms |
2508 KB |
Output is correct |
10 |
Correct |
3 ms |
2508 KB |
Output is correct |
11 |
Correct |
3 ms |
2508 KB |
Output is correct |
12 |
Correct |
3 ms |
2508 KB |
Output is correct |
13 |
Correct |
2 ms |
2380 KB |
Output is correct |
14 |
Correct |
2 ms |
2508 KB |
Output is correct |
15 |
Correct |
2 ms |
2380 KB |
Output is correct |
16 |
Correct |
3 ms |
2508 KB |
Output is correct |
17 |
Correct |
3 ms |
2380 KB |
Output is correct |
18 |
Correct |
3 ms |
2508 KB |
Output is correct |
19 |
Correct |
3 ms |
2508 KB |
Output is correct |
20 |
Correct |
3 ms |
2508 KB |
Output is correct |
21 |
Correct |
107 ms |
11160 KB |
Output is correct |
22 |
Correct |
100 ms |
11084 KB |
Output is correct |
23 |
Correct |
100 ms |
11184 KB |
Output is correct |
24 |
Correct |
101 ms |
11168 KB |
Output is correct |
25 |
Correct |
103 ms |
11136 KB |
Output is correct |
26 |
Correct |
122 ms |
11152 KB |
Output is correct |
27 |
Correct |
33 ms |
10564 KB |
Output is correct |
28 |
Correct |
39 ms |
10628 KB |
Output is correct |
29 |
Correct |
103 ms |
11068 KB |
Output is correct |
30 |
Correct |
101 ms |
11156 KB |
Output is correct |
31 |
Correct |
104 ms |
11116 KB |
Output is correct |
32 |
Correct |
100 ms |
11144 KB |
Output is correct |
33 |
Correct |
102 ms |
10252 KB |
Output is correct |
34 |
Correct |
107 ms |
11204 KB |
Output is correct |
35 |
Correct |
103 ms |
11052 KB |
Output is correct |
36 |
Correct |
106 ms |
11152 KB |
Output is correct |
37 |
Correct |
101 ms |
10256 KB |
Output is correct |
38 |
Correct |
81 ms |
9344 KB |
Output is correct |
39 |
Correct |
27 ms |
9548 KB |
Output is correct |
40 |
Correct |
40 ms |
10508 KB |
Output is correct |
41 |
Correct |
125 ms |
11016 KB |
Output is correct |
42 |
Correct |
110 ms |
11148 KB |
Output is correct |
43 |
Correct |
113 ms |
11276 KB |
Output is correct |
44 |
Correct |
112 ms |
11088 KB |
Output is correct |
45 |
Correct |
123 ms |
11232 KB |
Output is correct |
46 |
Correct |
113 ms |
11220 KB |
Output is correct |
47 |
Correct |
46 ms |
11140 KB |
Output is correct |
48 |
Correct |
97 ms |
11172 KB |
Output is correct |
49 |
Correct |
73 ms |
8484 KB |
Output is correct |
50 |
Correct |
86 ms |
9796 KB |
Output is correct |
51 |
Correct |
114 ms |
11140 KB |
Output is correct |
52 |
Correct |
120 ms |
11148 KB |
Output is correct |
53 |
Correct |
77 ms |
9128 KB |
Output is correct |
54 |
Correct |
103 ms |
11152 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
99 ms |
10304 KB |
Output is correct |
2 |
Correct |
102 ms |
11160 KB |
Output is correct |
3 |
Correct |
111 ms |
11280 KB |
Output is correct |
4 |
Correct |
65 ms |
8516 KB |
Output is correct |
5 |
Correct |
85 ms |
10044 KB |
Output is correct |
6 |
Correct |
117 ms |
11280 KB |
Output is correct |
7 |
Correct |
36 ms |
10192 KB |
Output is correct |
8 |
Correct |
40 ms |
9692 KB |
Output is correct |
9 |
Correct |
56 ms |
11188 KB |
Output is correct |
10 |
Correct |
61 ms |
8476 KB |
Output is correct |
11 |
Correct |
100 ms |
11272 KB |
Output is correct |
12 |
Correct |
93 ms |
11204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
2380 KB |
Output is correct |
2 |
Correct |
3 ms |
2508 KB |
Output is correct |
3 |
Correct |
2 ms |
2380 KB |
Output is correct |
4 |
Correct |
3 ms |
2508 KB |
Output is correct |
5 |
Correct |
2 ms |
2380 KB |
Output is correct |
6 |
Correct |
2 ms |
2380 KB |
Output is correct |
7 |
Correct |
3 ms |
2508 KB |
Output is correct |
8 |
Correct |
3 ms |
2532 KB |
Output is correct |
9 |
Correct |
3 ms |
2508 KB |
Output is correct |
10 |
Correct |
3 ms |
2508 KB |
Output is correct |
11 |
Correct |
3 ms |
2508 KB |
Output is correct |
12 |
Correct |
3 ms |
2508 KB |
Output is correct |
13 |
Correct |
2 ms |
2380 KB |
Output is correct |
14 |
Correct |
2 ms |
2508 KB |
Output is correct |
15 |
Correct |
2 ms |
2380 KB |
Output is correct |
16 |
Correct |
3 ms |
2508 KB |
Output is correct |
17 |
Correct |
3 ms |
2380 KB |
Output is correct |
18 |
Correct |
3 ms |
2508 KB |
Output is correct |
19 |
Correct |
3 ms |
2508 KB |
Output is correct |
20 |
Correct |
3 ms |
2508 KB |
Output is correct |
21 |
Correct |
4 ms |
2508 KB |
Output is correct |
22 |
Correct |
3 ms |
2508 KB |
Output is correct |
23 |
Correct |
3 ms |
2508 KB |
Output is correct |
24 |
Correct |
4 ms |
2508 KB |
Output is correct |
25 |
Correct |
2 ms |
2380 KB |
Output is correct |
26 |
Correct |
2 ms |
2508 KB |
Output is correct |
27 |
Correct |
4 ms |
2508 KB |
Output is correct |
28 |
Correct |
3 ms |
2508 KB |
Output is correct |
29 |
Correct |
3 ms |
2508 KB |
Output is correct |
30 |
Correct |
3 ms |
2508 KB |
Output is correct |
31 |
Correct |
3 ms |
2508 KB |
Output is correct |
32 |
Correct |
3 ms |
2508 KB |
Output is correct |
33 |
Correct |
2 ms |
2412 KB |
Output is correct |
34 |
Correct |
2 ms |
2508 KB |
Output is correct |
35 |
Correct |
3 ms |
2508 KB |
Output is correct |
36 |
Correct |
3 ms |
2508 KB |
Output is correct |
37 |
Correct |
3 ms |
2340 KB |
Output is correct |
38 |
Correct |
3 ms |
2508 KB |
Output is correct |
39 |
Correct |
107 ms |
11160 KB |
Output is correct |
40 |
Correct |
100 ms |
11084 KB |
Output is correct |
41 |
Correct |
100 ms |
11184 KB |
Output is correct |
42 |
Correct |
101 ms |
11168 KB |
Output is correct |
43 |
Correct |
103 ms |
11136 KB |
Output is correct |
44 |
Correct |
122 ms |
11152 KB |
Output is correct |
45 |
Correct |
33 ms |
10564 KB |
Output is correct |
46 |
Correct |
39 ms |
10628 KB |
Output is correct |
47 |
Correct |
103 ms |
11068 KB |
Output is correct |
48 |
Correct |
101 ms |
11156 KB |
Output is correct |
49 |
Correct |
104 ms |
11116 KB |
Output is correct |
50 |
Correct |
100 ms |
11144 KB |
Output is correct |
51 |
Correct |
102 ms |
10252 KB |
Output is correct |
52 |
Correct |
107 ms |
11204 KB |
Output is correct |
53 |
Correct |
103 ms |
11052 KB |
Output is correct |
54 |
Correct |
106 ms |
11152 KB |
Output is correct |
55 |
Correct |
101 ms |
10256 KB |
Output is correct |
56 |
Correct |
81 ms |
9344 KB |
Output is correct |
57 |
Correct |
27 ms |
9548 KB |
Output is correct |
58 |
Correct |
40 ms |
10508 KB |
Output is correct |
59 |
Correct |
125 ms |
11016 KB |
Output is correct |
60 |
Correct |
110 ms |
11148 KB |
Output is correct |
61 |
Correct |
113 ms |
11276 KB |
Output is correct |
62 |
Correct |
112 ms |
11088 KB |
Output is correct |
63 |
Correct |
123 ms |
11232 KB |
Output is correct |
64 |
Correct |
113 ms |
11220 KB |
Output is correct |
65 |
Correct |
46 ms |
11140 KB |
Output is correct |
66 |
Correct |
97 ms |
11172 KB |
Output is correct |
67 |
Correct |
73 ms |
8484 KB |
Output is correct |
68 |
Correct |
86 ms |
9796 KB |
Output is correct |
69 |
Correct |
114 ms |
11140 KB |
Output is correct |
70 |
Correct |
120 ms |
11148 KB |
Output is correct |
71 |
Correct |
77 ms |
9128 KB |
Output is correct |
72 |
Correct |
103 ms |
11152 KB |
Output is correct |
73 |
Correct |
99 ms |
10304 KB |
Output is correct |
74 |
Correct |
102 ms |
11160 KB |
Output is correct |
75 |
Correct |
111 ms |
11280 KB |
Output is correct |
76 |
Correct |
65 ms |
8516 KB |
Output is correct |
77 |
Correct |
85 ms |
10044 KB |
Output is correct |
78 |
Correct |
117 ms |
11280 KB |
Output is correct |
79 |
Correct |
36 ms |
10192 KB |
Output is correct |
80 |
Correct |
40 ms |
9692 KB |
Output is correct |
81 |
Correct |
56 ms |
11188 KB |
Output is correct |
82 |
Correct |
61 ms |
8476 KB |
Output is correct |
83 |
Correct |
100 ms |
11272 KB |
Output is correct |
84 |
Correct |
93 ms |
11204 KB |
Output is correct |
85 |
Correct |
94 ms |
10360 KB |
Output is correct |
86 |
Correct |
129 ms |
11208 KB |
Output is correct |
87 |
Correct |
97 ms |
10040 KB |
Output is correct |
88 |
Correct |
116 ms |
11152 KB |
Output is correct |
89 |
Correct |
76 ms |
8140 KB |
Output is correct |
90 |
Correct |
115 ms |
11236 KB |
Output is correct |
91 |
Correct |
94 ms |
9600 KB |
Output is correct |
92 |
Correct |
85 ms |
9284 KB |
Output is correct |
93 |
Correct |
116 ms |
11156 KB |
Output is correct |
94 |
Correct |
107 ms |
11076 KB |
Output is correct |
95 |
Correct |
106 ms |
10948 KB |
Output is correct |
96 |
Correct |
116 ms |
11128 KB |
Output is correct |
97 |
Correct |
120 ms |
11148 KB |
Output is correct |
98 |
Correct |
96 ms |
9876 KB |
Output is correct |
99 |
Correct |
48 ms |
11156 KB |
Output is correct |
100 |
Correct |
80 ms |
9852 KB |
Output is correct |
101 |
Correct |
106 ms |
11176 KB |
Output is correct |
102 |
Correct |
79 ms |
11024 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
2380 KB |
Output is correct |
2 |
Correct |
3 ms |
2508 KB |
Output is correct |
3 |
Correct |
2 ms |
2380 KB |
Output is correct |
4 |
Correct |
3 ms |
2508 KB |
Output is correct |
5 |
Correct |
2 ms |
2380 KB |
Output is correct |
6 |
Correct |
2 ms |
2380 KB |
Output is correct |
7 |
Correct |
3 ms |
2508 KB |
Output is correct |
8 |
Correct |
3 ms |
2532 KB |
Output is correct |
9 |
Correct |
3 ms |
2508 KB |
Output is correct |
10 |
Correct |
3 ms |
2508 KB |
Output is correct |
11 |
Correct |
3 ms |
2508 KB |
Output is correct |
12 |
Correct |
3 ms |
2508 KB |
Output is correct |
13 |
Correct |
2 ms |
2380 KB |
Output is correct |
14 |
Correct |
2 ms |
2508 KB |
Output is correct |
15 |
Correct |
2 ms |
2380 KB |
Output is correct |
16 |
Correct |
3 ms |
2508 KB |
Output is correct |
17 |
Correct |
3 ms |
2380 KB |
Output is correct |
18 |
Correct |
3 ms |
2508 KB |
Output is correct |
19 |
Correct |
3 ms |
2508 KB |
Output is correct |
20 |
Correct |
3 ms |
2508 KB |
Output is correct |
21 |
Correct |
4 ms |
2508 KB |
Output is correct |
22 |
Correct |
3 ms |
2508 KB |
Output is correct |
23 |
Correct |
3 ms |
2508 KB |
Output is correct |
24 |
Correct |
4 ms |
2508 KB |
Output is correct |
25 |
Correct |
2 ms |
2380 KB |
Output is correct |
26 |
Correct |
2 ms |
2508 KB |
Output is correct |
27 |
Correct |
4 ms |
2508 KB |
Output is correct |
28 |
Correct |
3 ms |
2508 KB |
Output is correct |
29 |
Correct |
3 ms |
2508 KB |
Output is correct |
30 |
Correct |
3 ms |
2508 KB |
Output is correct |
31 |
Correct |
3 ms |
2508 KB |
Output is correct |
32 |
Correct |
3 ms |
2508 KB |
Output is correct |
33 |
Correct |
2 ms |
2412 KB |
Output is correct |
34 |
Correct |
2 ms |
2508 KB |
Output is correct |
35 |
Correct |
3 ms |
2508 KB |
Output is correct |
36 |
Correct |
3 ms |
2508 KB |
Output is correct |
37 |
Correct |
3 ms |
2340 KB |
Output is correct |
38 |
Correct |
3 ms |
2508 KB |
Output is correct |
39 |
Correct |
107 ms |
11160 KB |
Output is correct |
40 |
Correct |
100 ms |
11084 KB |
Output is correct |
41 |
Correct |
100 ms |
11184 KB |
Output is correct |
42 |
Correct |
101 ms |
11168 KB |
Output is correct |
43 |
Correct |
103 ms |
11136 KB |
Output is correct |
44 |
Correct |
122 ms |
11152 KB |
Output is correct |
45 |
Correct |
33 ms |
10564 KB |
Output is correct |
46 |
Correct |
39 ms |
10628 KB |
Output is correct |
47 |
Correct |
103 ms |
11068 KB |
Output is correct |
48 |
Correct |
101 ms |
11156 KB |
Output is correct |
49 |
Correct |
104 ms |
11116 KB |
Output is correct |
50 |
Correct |
100 ms |
11144 KB |
Output is correct |
51 |
Correct |
102 ms |
10252 KB |
Output is correct |
52 |
Correct |
107 ms |
11204 KB |
Output is correct |
53 |
Correct |
103 ms |
11052 KB |
Output is correct |
54 |
Correct |
106 ms |
11152 KB |
Output is correct |
55 |
Correct |
558 ms |
33860 KB |
Output is correct |
56 |
Correct |
434 ms |
27456 KB |
Output is correct |
57 |
Correct |
574 ms |
36576 KB |
Output is correct |
58 |
Correct |
423 ms |
26984 KB |
Output is correct |
59 |
Correct |
449 ms |
27588 KB |
Output is correct |
60 |
Correct |
636 ms |
36580 KB |
Output is correct |
61 |
Correct |
140 ms |
36596 KB |
Output is correct |
62 |
Correct |
194 ms |
36504 KB |
Output is correct |
63 |
Correct |
579 ms |
36576 KB |
Output is correct |
64 |
Correct |
639 ms |
36576 KB |
Output is correct |
65 |
Correct |
662 ms |
36144 KB |
Output is correct |
66 |
Correct |
651 ms |
36580 KB |
Output is correct |
67 |
Correct |
656 ms |
36076 KB |
Output is correct |
68 |
Correct |
642 ms |
36668 KB |
Output is correct |
69 |
Correct |
626 ms |
36460 KB |
Output is correct |
70 |
Correct |
598 ms |
36548 KB |
Output is correct |
71 |
Correct |
621 ms |
36576 KB |
Output is correct |
72 |
Correct |
659 ms |
36392 KB |
Output is correct |
73 |
Correct |
611 ms |
36692 KB |
Output is correct |
74 |
Correct |
620 ms |
36420 KB |
Output is correct |
75 |
Correct |
613 ms |
36652 KB |
Output is correct |
76 |
Correct |
665 ms |
37476 KB |
Output is correct |
77 |
Correct |
642 ms |
37444 KB |
Output is correct |
78 |
Correct |
645 ms |
37352 KB |
Output is correct |
79 |
Correct |
570 ms |
36924 KB |
Output is correct |
80 |
Correct |
556 ms |
37344 KB |
Output is correct |
81 |
Correct |
386 ms |
36744 KB |
Output is correct |
82 |
Correct |
101 ms |
10256 KB |
Output is correct |
83 |
Correct |
81 ms |
9344 KB |
Output is correct |
84 |
Correct |
27 ms |
9548 KB |
Output is correct |
85 |
Correct |
40 ms |
10508 KB |
Output is correct |
86 |
Correct |
125 ms |
11016 KB |
Output is correct |
87 |
Correct |
110 ms |
11148 KB |
Output is correct |
88 |
Correct |
113 ms |
11276 KB |
Output is correct |
89 |
Correct |
112 ms |
11088 KB |
Output is correct |
90 |
Correct |
123 ms |
11232 KB |
Output is correct |
91 |
Correct |
113 ms |
11220 KB |
Output is correct |
92 |
Correct |
46 ms |
11140 KB |
Output is correct |
93 |
Correct |
97 ms |
11172 KB |
Output is correct |
94 |
Correct |
73 ms |
8484 KB |
Output is correct |
95 |
Correct |
86 ms |
9796 KB |
Output is correct |
96 |
Correct |
114 ms |
11140 KB |
Output is correct |
97 |
Correct |
120 ms |
11148 KB |
Output is correct |
98 |
Correct |
77 ms |
9128 KB |
Output is correct |
99 |
Correct |
103 ms |
11152 KB |
Output is correct |
100 |
Correct |
99 ms |
10304 KB |
Output is correct |
101 |
Correct |
102 ms |
11160 KB |
Output is correct |
102 |
Correct |
111 ms |
11280 KB |
Output is correct |
103 |
Correct |
65 ms |
8516 KB |
Output is correct |
104 |
Correct |
85 ms |
10044 KB |
Output is correct |
105 |
Correct |
117 ms |
11280 KB |
Output is correct |
106 |
Correct |
36 ms |
10192 KB |
Output is correct |
107 |
Correct |
40 ms |
9692 KB |
Output is correct |
108 |
Correct |
56 ms |
11188 KB |
Output is correct |
109 |
Correct |
61 ms |
8476 KB |
Output is correct |
110 |
Correct |
100 ms |
11272 KB |
Output is correct |
111 |
Correct |
93 ms |
11204 KB |
Output is correct |
112 |
Correct |
94 ms |
10360 KB |
Output is correct |
113 |
Correct |
129 ms |
11208 KB |
Output is correct |
114 |
Correct |
97 ms |
10040 KB |
Output is correct |
115 |
Correct |
116 ms |
11152 KB |
Output is correct |
116 |
Correct |
76 ms |
8140 KB |
Output is correct |
117 |
Correct |
115 ms |
11236 KB |
Output is correct |
118 |
Correct |
94 ms |
9600 KB |
Output is correct |
119 |
Correct |
85 ms |
9284 KB |
Output is correct |
120 |
Correct |
116 ms |
11156 KB |
Output is correct |
121 |
Correct |
107 ms |
11076 KB |
Output is correct |
122 |
Correct |
106 ms |
10948 KB |
Output is correct |
123 |
Correct |
116 ms |
11128 KB |
Output is correct |
124 |
Correct |
120 ms |
11148 KB |
Output is correct |
125 |
Correct |
96 ms |
9876 KB |
Output is correct |
126 |
Correct |
48 ms |
11156 KB |
Output is correct |
127 |
Correct |
80 ms |
9852 KB |
Output is correct |
128 |
Correct |
106 ms |
11176 KB |
Output is correct |
129 |
Correct |
79 ms |
11024 KB |
Output is correct |
130 |
Correct |
623 ms |
43124 KB |
Output is correct |
131 |
Correct |
418 ms |
31960 KB |
Output is correct |
132 |
Correct |
640 ms |
43088 KB |
Output is correct |
133 |
Correct |
650 ms |
41668 KB |
Output is correct |
134 |
Correct |
592 ms |
37256 KB |
Output is correct |
135 |
Correct |
613 ms |
43588 KB |
Output is correct |
136 |
Correct |
593 ms |
43664 KB |
Output is correct |
137 |
Correct |
611 ms |
43604 KB |
Output is correct |
138 |
Correct |
626 ms |
42820 KB |
Output is correct |
139 |
Correct |
618 ms |
43256 KB |
Output is correct |
140 |
Correct |
623 ms |
42848 KB |
Output is correct |
141 |
Correct |
619 ms |
43204 KB |
Output is correct |
142 |
Correct |
643 ms |
43120 KB |
Output is correct |
143 |
Correct |
634 ms |
43076 KB |
Output is correct |
144 |
Correct |
620 ms |
43104 KB |
Output is correct |
145 |
Correct |
632 ms |
43180 KB |
Output is correct |
146 |
Correct |
613 ms |
43108 KB |
Output is correct |
147 |
Correct |
633 ms |
43108 KB |
Output is correct |
148 |
Correct |
616 ms |
43204 KB |
Output is correct |
149 |
Correct |
624 ms |
43204 KB |
Output is correct |
150 |
Correct |
214 ms |
42436 KB |
Output is correct |
151 |
Correct |
568 ms |
42888 KB |
Output is correct |
152 |
Correct |
616 ms |
42812 KB |
Output is correct |
153 |
Correct |
422 ms |
42664 KB |
Output is correct |