#include <bits/stdc++.h>
using ll = long long;
template <class T> using Vec = std::vector<T>;
constexpr ll INF = std::numeric_limits<ll>::max() / 2;
struct Fenwick {
Vec<ll> data;
explicit Fenwick(const int n): data(n + 1) {}
void add(int i, const ll x) {
for (++i; i < (int) data.size(); i += i & -i) {
data[i] += x;
}
}
ll get(int i) const {
ll x = 0;
for (; i > 0; i -= i & -i) {
x += data[i];
}
return x;
}
int lower_bound(ll x) const {
int i = 1, j = 0;
while (2 * i < (int) data.size()) {
i <<= 1;
}
while (i > 0) {
if (j + i < (int) data.size() and x > data[j + i]) {
j += i;
x -= data[j];
}
i >>= 1;
}
return j + 1;
}
};
struct Func {
ll add, lb;
explicit Func(const ll a = 0, const ll l = -INF) : add(a), lb(l) {}
Func composite(const Func& old) const {
return Func(old.add + add, std::max(old.lb + add, lb));
}
};
struct Segtree {
int size;
Vec<Func> data;
explicit Segtree(const int n) : size(n), data(2 * n) {}
void flush(const int k) {
data[2 * k] = data[k].composite(data[2 * k]);
data[2 * k + 1] = data[k].composite(data[2 * k + 1]);
data[k] = Func();
}
void push(const int k) {
const int lsb = __builtin_ctz(k);
const int width = 31 - __builtin_clz(k);
for (int d = width; d > lsb; --d) {
flush(k >> d);
}
}
void operate(int l, int r, const Func& f) {
l += size;
r += size;
push(l);
push(r);
while (l < r) {
if (l & 1) {
data[l] = f.composite(data[l]);
l += 1;
}
if (r & 1) {
r -= 1;
data[r] = f.composite(data[r]);
}
l >>= 1;
r >>= 1;
}
}
ll get(int i) const {
i += size;
Func ret;
while (i > 0) {
ret = data[i].composite(ret);
i >>= 1;
}
return std::max(ret.add, ret.lb);
}
};
int scan_int() {
int x;
std::scanf("%d", &x);
return x;
}
ll scan_ll() {
ll x;
std::scanf("%lld", &x);
return x;
}
void print(const int x) {
std::printf("%d\n", x);
}
int main() {
const int N = scan_int();
const int M = scan_int();
const int Q = scan_int();
Fenwick whole(N);
Segtree real(N);
Vec<int> ans, group;
ans.reserve(Q);
group.reserve(Q);
Vec<Vec<std::pair<int, ll>>> query(N), add(N);
for (int i = 0; i < Q; ++i) {
const int t = scan_int();
if (t == 1) {
const int l = scan_int() - 1;
const int r = scan_int();
const int c = scan_int();
const ll k = scan_ll();
whole.add(l, k);
whole.add(r, -k);
real.operate(l, r, Func(k));
add[l].emplace_back((int) group.size(), k);
if (r != N) {
add[r].emplace_back((int) group.size(), -k);
}
group.push_back(c);
} else if (t == 2) {
const int l = scan_int() - 1;
const int r = scan_int();
const ll k = scan_ll();
real.operate(l, r, Func(-k, 0));
} else {
const int a = scan_int() - 1;
const ll b = scan_ll();
const ll d = real.get(a) - b;
if (d >= 0) {
query[a].emplace_back((int) ans.size(), whole.get(a + 1) - d);
}
ans.push_back(0);
}
// for (int j = 0; j < N; ++j) {
// std::cerr << real.get(j) << " \n"[j + 1 == N];
// }
}
Fenwick fen((int) group.size());
for (int i = 0; i < N; ++i) {
for (const auto [j, x] : add[i]) {
fen.add(j, x);
}
for (const auto [j, x] : query[i]) {
// std::cerr << j << ' ' << x << '\n';
ans[j] = group[fen.lower_bound(x) - 1];
}
}
for (const int x : ans) {
print(x);
}
return 0;
}
Compilation message
foodcourt.cpp: In function 'int main()':
foodcourt.cpp:111:15: warning: unused variable 'M' [-Wunused-variable]
111 | const int M = scan_int();
| ^
foodcourt.cpp: In function 'int scan_int()':
foodcourt.cpp:95:15: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
95 | std::scanf("%d", &x);
| ~~~~~~~~~~^~~~~~~~~~
foodcourt.cpp: In function 'll scan_ll()':
foodcourt.cpp:101:15: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
101 | std::scanf("%lld", &x);
| ~~~~~~~~~~^~~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
460 KB |
Output is correct |
2 |
Correct |
2 ms |
460 KB |
Output is correct |
3 |
Correct |
2 ms |
436 KB |
Output is correct |
4 |
Correct |
3 ms |
460 KB |
Output is correct |
5 |
Correct |
2 ms |
356 KB |
Output is correct |
6 |
Correct |
2 ms |
332 KB |
Output is correct |
7 |
Correct |
2 ms |
460 KB |
Output is correct |
8 |
Correct |
2 ms |
544 KB |
Output is correct |
9 |
Correct |
2 ms |
460 KB |
Output is correct |
10 |
Correct |
3 ms |
588 KB |
Output is correct |
11 |
Correct |
2 ms |
460 KB |
Output is correct |
12 |
Correct |
2 ms |
460 KB |
Output is correct |
13 |
Correct |
2 ms |
460 KB |
Output is correct |
14 |
Correct |
2 ms |
460 KB |
Output is correct |
15 |
Correct |
2 ms |
460 KB |
Output is correct |
16 |
Correct |
2 ms |
460 KB |
Output is correct |
17 |
Correct |
2 ms |
460 KB |
Output is correct |
18 |
Correct |
2 ms |
460 KB |
Output is correct |
19 |
Correct |
2 ms |
460 KB |
Output is correct |
20 |
Correct |
3 ms |
560 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
460 KB |
Output is correct |
2 |
Correct |
2 ms |
460 KB |
Output is correct |
3 |
Correct |
2 ms |
436 KB |
Output is correct |
4 |
Correct |
3 ms |
460 KB |
Output is correct |
5 |
Correct |
2 ms |
356 KB |
Output is correct |
6 |
Correct |
2 ms |
332 KB |
Output is correct |
7 |
Correct |
2 ms |
460 KB |
Output is correct |
8 |
Correct |
2 ms |
544 KB |
Output is correct |
9 |
Correct |
2 ms |
460 KB |
Output is correct |
10 |
Correct |
3 ms |
588 KB |
Output is correct |
11 |
Correct |
2 ms |
460 KB |
Output is correct |
12 |
Correct |
2 ms |
460 KB |
Output is correct |
13 |
Correct |
2 ms |
460 KB |
Output is correct |
14 |
Correct |
2 ms |
460 KB |
Output is correct |
15 |
Correct |
2 ms |
460 KB |
Output is correct |
16 |
Correct |
2 ms |
460 KB |
Output is correct |
17 |
Correct |
2 ms |
460 KB |
Output is correct |
18 |
Correct |
2 ms |
460 KB |
Output is correct |
19 |
Correct |
2 ms |
460 KB |
Output is correct |
20 |
Correct |
3 ms |
560 KB |
Output is correct |
21 |
Correct |
4 ms |
460 KB |
Output is correct |
22 |
Correct |
3 ms |
552 KB |
Output is correct |
23 |
Correct |
4 ms |
460 KB |
Output is correct |
24 |
Correct |
3 ms |
588 KB |
Output is correct |
25 |
Correct |
2 ms |
332 KB |
Output is correct |
26 |
Correct |
2 ms |
332 KB |
Output is correct |
27 |
Correct |
2 ms |
556 KB |
Output is correct |
28 |
Correct |
2 ms |
460 KB |
Output is correct |
29 |
Correct |
3 ms |
460 KB |
Output is correct |
30 |
Correct |
3 ms |
460 KB |
Output is correct |
31 |
Correct |
3 ms |
452 KB |
Output is correct |
32 |
Correct |
2 ms |
504 KB |
Output is correct |
33 |
Correct |
2 ms |
460 KB |
Output is correct |
34 |
Correct |
3 ms |
460 KB |
Output is correct |
35 |
Correct |
2 ms |
460 KB |
Output is correct |
36 |
Correct |
2 ms |
556 KB |
Output is correct |
37 |
Correct |
2 ms |
460 KB |
Output is correct |
38 |
Correct |
3 ms |
588 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
67 ms |
8644 KB |
Output is correct |
2 |
Correct |
71 ms |
9268 KB |
Output is correct |
3 |
Correct |
62 ms |
8616 KB |
Output is correct |
4 |
Correct |
63 ms |
8516 KB |
Output is correct |
5 |
Correct |
82 ms |
9408 KB |
Output is correct |
6 |
Correct |
69 ms |
9284 KB |
Output is correct |
7 |
Correct |
31 ms |
1840 KB |
Output is correct |
8 |
Correct |
38 ms |
1900 KB |
Output is correct |
9 |
Correct |
74 ms |
8776 KB |
Output is correct |
10 |
Correct |
71 ms |
8792 KB |
Output is correct |
11 |
Correct |
82 ms |
8764 KB |
Output is correct |
12 |
Correct |
65 ms |
8772 KB |
Output is correct |
13 |
Correct |
82 ms |
7208 KB |
Output is correct |
14 |
Correct |
68 ms |
9508 KB |
Output is correct |
15 |
Correct |
72 ms |
8740 KB |
Output is correct |
16 |
Correct |
81 ms |
10600 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
374 ms |
32140 KB |
Output is correct |
2 |
Correct |
301 ms |
26948 KB |
Output is correct |
3 |
Correct |
462 ms |
35500 KB |
Output is correct |
4 |
Correct |
334 ms |
33284 KB |
Output is correct |
5 |
Correct |
322 ms |
28208 KB |
Output is correct |
6 |
Correct |
473 ms |
37812 KB |
Output is correct |
7 |
Correct |
151 ms |
8036 KB |
Output is correct |
8 |
Correct |
172 ms |
8352 KB |
Output is correct |
9 |
Correct |
454 ms |
39036 KB |
Output is correct |
10 |
Correct |
478 ms |
39108 KB |
Output is correct |
11 |
Correct |
411 ms |
35676 KB |
Output is correct |
12 |
Correct |
429 ms |
35696 KB |
Output is correct |
13 |
Correct |
423 ms |
35804 KB |
Output is correct |
14 |
Correct |
475 ms |
35616 KB |
Output is correct |
15 |
Correct |
498 ms |
35572 KB |
Output is correct |
16 |
Correct |
399 ms |
35656 KB |
Output is correct |
17 |
Correct |
508 ms |
35576 KB |
Output is correct |
18 |
Correct |
435 ms |
35620 KB |
Output is correct |
19 |
Correct |
470 ms |
35660 KB |
Output is correct |
20 |
Correct |
501 ms |
35584 KB |
Output is correct |
21 |
Correct |
447 ms |
35628 KB |
Output is correct |
22 |
Correct |
498 ms |
35568 KB |
Output is correct |
23 |
Correct |
479 ms |
35684 KB |
Output is correct |
24 |
Correct |
457 ms |
35572 KB |
Output is correct |
25 |
Correct |
296 ms |
29864 KB |
Output is correct |
26 |
Correct |
289 ms |
35012 KB |
Output is correct |
27 |
Correct |
364 ms |
39408 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
460 KB |
Output is correct |
2 |
Correct |
2 ms |
460 KB |
Output is correct |
3 |
Correct |
2 ms |
436 KB |
Output is correct |
4 |
Correct |
3 ms |
460 KB |
Output is correct |
5 |
Correct |
2 ms |
356 KB |
Output is correct |
6 |
Correct |
2 ms |
332 KB |
Output is correct |
7 |
Correct |
2 ms |
460 KB |
Output is correct |
8 |
Correct |
2 ms |
544 KB |
Output is correct |
9 |
Correct |
2 ms |
460 KB |
Output is correct |
10 |
Correct |
3 ms |
588 KB |
Output is correct |
11 |
Correct |
2 ms |
460 KB |
Output is correct |
12 |
Correct |
2 ms |
460 KB |
Output is correct |
13 |
Correct |
2 ms |
460 KB |
Output is correct |
14 |
Correct |
2 ms |
460 KB |
Output is correct |
15 |
Correct |
2 ms |
460 KB |
Output is correct |
16 |
Correct |
2 ms |
460 KB |
Output is correct |
17 |
Correct |
2 ms |
460 KB |
Output is correct |
18 |
Correct |
2 ms |
460 KB |
Output is correct |
19 |
Correct |
2 ms |
460 KB |
Output is correct |
20 |
Correct |
3 ms |
560 KB |
Output is correct |
21 |
Correct |
67 ms |
8644 KB |
Output is correct |
22 |
Correct |
71 ms |
9268 KB |
Output is correct |
23 |
Correct |
62 ms |
8616 KB |
Output is correct |
24 |
Correct |
63 ms |
8516 KB |
Output is correct |
25 |
Correct |
82 ms |
9408 KB |
Output is correct |
26 |
Correct |
69 ms |
9284 KB |
Output is correct |
27 |
Correct |
31 ms |
1840 KB |
Output is correct |
28 |
Correct |
38 ms |
1900 KB |
Output is correct |
29 |
Correct |
74 ms |
8776 KB |
Output is correct |
30 |
Correct |
71 ms |
8792 KB |
Output is correct |
31 |
Correct |
82 ms |
8764 KB |
Output is correct |
32 |
Correct |
65 ms |
8772 KB |
Output is correct |
33 |
Correct |
82 ms |
7208 KB |
Output is correct |
34 |
Correct |
68 ms |
9508 KB |
Output is correct |
35 |
Correct |
72 ms |
8740 KB |
Output is correct |
36 |
Correct |
81 ms |
10600 KB |
Output is correct |
37 |
Correct |
73 ms |
8132 KB |
Output is correct |
38 |
Correct |
76 ms |
8228 KB |
Output is correct |
39 |
Correct |
29 ms |
1708 KB |
Output is correct |
40 |
Correct |
33 ms |
2000 KB |
Output is correct |
41 |
Correct |
77 ms |
9032 KB |
Output is correct |
42 |
Correct |
82 ms |
9048 KB |
Output is correct |
43 |
Correct |
82 ms |
9028 KB |
Output is correct |
44 |
Correct |
96 ms |
9088 KB |
Output is correct |
45 |
Correct |
85 ms |
8944 KB |
Output is correct |
46 |
Correct |
77 ms |
9028 KB |
Output is correct |
47 |
Correct |
58 ms |
7936 KB |
Output is correct |
48 |
Correct |
64 ms |
8796 KB |
Output is correct |
49 |
Correct |
53 ms |
6296 KB |
Output is correct |
50 |
Correct |
73 ms |
8388 KB |
Output is correct |
51 |
Correct |
92 ms |
9004 KB |
Output is correct |
52 |
Correct |
100 ms |
9036 KB |
Output is correct |
53 |
Correct |
64 ms |
8900 KB |
Output is correct |
54 |
Correct |
78 ms |
10656 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
82 ms |
9776 KB |
Output is correct |
2 |
Correct |
130 ms |
9516 KB |
Output is correct |
3 |
Correct |
102 ms |
10496 KB |
Output is correct |
4 |
Correct |
66 ms |
8900 KB |
Output is correct |
5 |
Correct |
74 ms |
9720 KB |
Output is correct |
6 |
Correct |
85 ms |
10528 KB |
Output is correct |
7 |
Correct |
40 ms |
2744 KB |
Output is correct |
8 |
Correct |
41 ms |
2756 KB |
Output is correct |
9 |
Correct |
67 ms |
9316 KB |
Output is correct |
10 |
Correct |
52 ms |
8388 KB |
Output is correct |
11 |
Correct |
76 ms |
10152 KB |
Output is correct |
12 |
Correct |
74 ms |
10112 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
460 KB |
Output is correct |
2 |
Correct |
2 ms |
460 KB |
Output is correct |
3 |
Correct |
2 ms |
436 KB |
Output is correct |
4 |
Correct |
3 ms |
460 KB |
Output is correct |
5 |
Correct |
2 ms |
356 KB |
Output is correct |
6 |
Correct |
2 ms |
332 KB |
Output is correct |
7 |
Correct |
2 ms |
460 KB |
Output is correct |
8 |
Correct |
2 ms |
544 KB |
Output is correct |
9 |
Correct |
2 ms |
460 KB |
Output is correct |
10 |
Correct |
3 ms |
588 KB |
Output is correct |
11 |
Correct |
2 ms |
460 KB |
Output is correct |
12 |
Correct |
2 ms |
460 KB |
Output is correct |
13 |
Correct |
2 ms |
460 KB |
Output is correct |
14 |
Correct |
2 ms |
460 KB |
Output is correct |
15 |
Correct |
2 ms |
460 KB |
Output is correct |
16 |
Correct |
2 ms |
460 KB |
Output is correct |
17 |
Correct |
2 ms |
460 KB |
Output is correct |
18 |
Correct |
2 ms |
460 KB |
Output is correct |
19 |
Correct |
2 ms |
460 KB |
Output is correct |
20 |
Correct |
3 ms |
560 KB |
Output is correct |
21 |
Correct |
4 ms |
460 KB |
Output is correct |
22 |
Correct |
3 ms |
552 KB |
Output is correct |
23 |
Correct |
4 ms |
460 KB |
Output is correct |
24 |
Correct |
3 ms |
588 KB |
Output is correct |
25 |
Correct |
2 ms |
332 KB |
Output is correct |
26 |
Correct |
2 ms |
332 KB |
Output is correct |
27 |
Correct |
2 ms |
556 KB |
Output is correct |
28 |
Correct |
2 ms |
460 KB |
Output is correct |
29 |
Correct |
3 ms |
460 KB |
Output is correct |
30 |
Correct |
3 ms |
460 KB |
Output is correct |
31 |
Correct |
3 ms |
452 KB |
Output is correct |
32 |
Correct |
2 ms |
504 KB |
Output is correct |
33 |
Correct |
2 ms |
460 KB |
Output is correct |
34 |
Correct |
3 ms |
460 KB |
Output is correct |
35 |
Correct |
2 ms |
460 KB |
Output is correct |
36 |
Correct |
2 ms |
556 KB |
Output is correct |
37 |
Correct |
2 ms |
460 KB |
Output is correct |
38 |
Correct |
3 ms |
588 KB |
Output is correct |
39 |
Correct |
67 ms |
8644 KB |
Output is correct |
40 |
Correct |
71 ms |
9268 KB |
Output is correct |
41 |
Correct |
62 ms |
8616 KB |
Output is correct |
42 |
Correct |
63 ms |
8516 KB |
Output is correct |
43 |
Correct |
82 ms |
9408 KB |
Output is correct |
44 |
Correct |
69 ms |
9284 KB |
Output is correct |
45 |
Correct |
31 ms |
1840 KB |
Output is correct |
46 |
Correct |
38 ms |
1900 KB |
Output is correct |
47 |
Correct |
74 ms |
8776 KB |
Output is correct |
48 |
Correct |
71 ms |
8792 KB |
Output is correct |
49 |
Correct |
82 ms |
8764 KB |
Output is correct |
50 |
Correct |
65 ms |
8772 KB |
Output is correct |
51 |
Correct |
82 ms |
7208 KB |
Output is correct |
52 |
Correct |
68 ms |
9508 KB |
Output is correct |
53 |
Correct |
72 ms |
8740 KB |
Output is correct |
54 |
Correct |
81 ms |
10600 KB |
Output is correct |
55 |
Correct |
73 ms |
8132 KB |
Output is correct |
56 |
Correct |
76 ms |
8228 KB |
Output is correct |
57 |
Correct |
29 ms |
1708 KB |
Output is correct |
58 |
Correct |
33 ms |
2000 KB |
Output is correct |
59 |
Correct |
77 ms |
9032 KB |
Output is correct |
60 |
Correct |
82 ms |
9048 KB |
Output is correct |
61 |
Correct |
82 ms |
9028 KB |
Output is correct |
62 |
Correct |
96 ms |
9088 KB |
Output is correct |
63 |
Correct |
85 ms |
8944 KB |
Output is correct |
64 |
Correct |
77 ms |
9028 KB |
Output is correct |
65 |
Correct |
58 ms |
7936 KB |
Output is correct |
66 |
Correct |
64 ms |
8796 KB |
Output is correct |
67 |
Correct |
53 ms |
6296 KB |
Output is correct |
68 |
Correct |
73 ms |
8388 KB |
Output is correct |
69 |
Correct |
92 ms |
9004 KB |
Output is correct |
70 |
Correct |
100 ms |
9036 KB |
Output is correct |
71 |
Correct |
64 ms |
8900 KB |
Output is correct |
72 |
Correct |
78 ms |
10656 KB |
Output is correct |
73 |
Correct |
82 ms |
9776 KB |
Output is correct |
74 |
Correct |
130 ms |
9516 KB |
Output is correct |
75 |
Correct |
102 ms |
10496 KB |
Output is correct |
76 |
Correct |
66 ms |
8900 KB |
Output is correct |
77 |
Correct |
74 ms |
9720 KB |
Output is correct |
78 |
Correct |
85 ms |
10528 KB |
Output is correct |
79 |
Correct |
40 ms |
2744 KB |
Output is correct |
80 |
Correct |
41 ms |
2756 KB |
Output is correct |
81 |
Correct |
67 ms |
9316 KB |
Output is correct |
82 |
Correct |
52 ms |
8388 KB |
Output is correct |
83 |
Correct |
76 ms |
10152 KB |
Output is correct |
84 |
Correct |
74 ms |
10112 KB |
Output is correct |
85 |
Correct |
77 ms |
7876 KB |
Output is correct |
86 |
Correct |
78 ms |
9540 KB |
Output is correct |
87 |
Correct |
74 ms |
9228 KB |
Output is correct |
88 |
Correct |
83 ms |
10052 KB |
Output is correct |
89 |
Correct |
61 ms |
7220 KB |
Output is correct |
90 |
Correct |
79 ms |
9488 KB |
Output is correct |
91 |
Correct |
67 ms |
6980 KB |
Output is correct |
92 |
Correct |
58 ms |
6816 KB |
Output is correct |
93 |
Correct |
85 ms |
9536 KB |
Output is correct |
94 |
Correct |
83 ms |
9540 KB |
Output is correct |
95 |
Correct |
75 ms |
8868 KB |
Output is correct |
96 |
Correct |
84 ms |
9540 KB |
Output is correct |
97 |
Correct |
97 ms |
9560 KB |
Output is correct |
98 |
Correct |
71 ms |
7328 KB |
Output is correct |
99 |
Correct |
61 ms |
8476 KB |
Output is correct |
100 |
Correct |
59 ms |
7840 KB |
Output is correct |
101 |
Correct |
95 ms |
9308 KB |
Output is correct |
102 |
Correct |
95 ms |
10612 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
460 KB |
Output is correct |
2 |
Correct |
2 ms |
460 KB |
Output is correct |
3 |
Correct |
2 ms |
436 KB |
Output is correct |
4 |
Correct |
3 ms |
460 KB |
Output is correct |
5 |
Correct |
2 ms |
356 KB |
Output is correct |
6 |
Correct |
2 ms |
332 KB |
Output is correct |
7 |
Correct |
2 ms |
460 KB |
Output is correct |
8 |
Correct |
2 ms |
544 KB |
Output is correct |
9 |
Correct |
2 ms |
460 KB |
Output is correct |
10 |
Correct |
3 ms |
588 KB |
Output is correct |
11 |
Correct |
2 ms |
460 KB |
Output is correct |
12 |
Correct |
2 ms |
460 KB |
Output is correct |
13 |
Correct |
2 ms |
460 KB |
Output is correct |
14 |
Correct |
2 ms |
460 KB |
Output is correct |
15 |
Correct |
2 ms |
460 KB |
Output is correct |
16 |
Correct |
2 ms |
460 KB |
Output is correct |
17 |
Correct |
2 ms |
460 KB |
Output is correct |
18 |
Correct |
2 ms |
460 KB |
Output is correct |
19 |
Correct |
2 ms |
460 KB |
Output is correct |
20 |
Correct |
3 ms |
560 KB |
Output is correct |
21 |
Correct |
4 ms |
460 KB |
Output is correct |
22 |
Correct |
3 ms |
552 KB |
Output is correct |
23 |
Correct |
4 ms |
460 KB |
Output is correct |
24 |
Correct |
3 ms |
588 KB |
Output is correct |
25 |
Correct |
2 ms |
332 KB |
Output is correct |
26 |
Correct |
2 ms |
332 KB |
Output is correct |
27 |
Correct |
2 ms |
556 KB |
Output is correct |
28 |
Correct |
2 ms |
460 KB |
Output is correct |
29 |
Correct |
3 ms |
460 KB |
Output is correct |
30 |
Correct |
3 ms |
460 KB |
Output is correct |
31 |
Correct |
3 ms |
452 KB |
Output is correct |
32 |
Correct |
2 ms |
504 KB |
Output is correct |
33 |
Correct |
2 ms |
460 KB |
Output is correct |
34 |
Correct |
3 ms |
460 KB |
Output is correct |
35 |
Correct |
2 ms |
460 KB |
Output is correct |
36 |
Correct |
2 ms |
556 KB |
Output is correct |
37 |
Correct |
2 ms |
460 KB |
Output is correct |
38 |
Correct |
3 ms |
588 KB |
Output is correct |
39 |
Correct |
67 ms |
8644 KB |
Output is correct |
40 |
Correct |
71 ms |
9268 KB |
Output is correct |
41 |
Correct |
62 ms |
8616 KB |
Output is correct |
42 |
Correct |
63 ms |
8516 KB |
Output is correct |
43 |
Correct |
82 ms |
9408 KB |
Output is correct |
44 |
Correct |
69 ms |
9284 KB |
Output is correct |
45 |
Correct |
31 ms |
1840 KB |
Output is correct |
46 |
Correct |
38 ms |
1900 KB |
Output is correct |
47 |
Correct |
74 ms |
8776 KB |
Output is correct |
48 |
Correct |
71 ms |
8792 KB |
Output is correct |
49 |
Correct |
82 ms |
8764 KB |
Output is correct |
50 |
Correct |
65 ms |
8772 KB |
Output is correct |
51 |
Correct |
82 ms |
7208 KB |
Output is correct |
52 |
Correct |
68 ms |
9508 KB |
Output is correct |
53 |
Correct |
72 ms |
8740 KB |
Output is correct |
54 |
Correct |
81 ms |
10600 KB |
Output is correct |
55 |
Correct |
374 ms |
32140 KB |
Output is correct |
56 |
Correct |
301 ms |
26948 KB |
Output is correct |
57 |
Correct |
462 ms |
35500 KB |
Output is correct |
58 |
Correct |
334 ms |
33284 KB |
Output is correct |
59 |
Correct |
322 ms |
28208 KB |
Output is correct |
60 |
Correct |
473 ms |
37812 KB |
Output is correct |
61 |
Correct |
151 ms |
8036 KB |
Output is correct |
62 |
Correct |
172 ms |
8352 KB |
Output is correct |
63 |
Correct |
454 ms |
39036 KB |
Output is correct |
64 |
Correct |
478 ms |
39108 KB |
Output is correct |
65 |
Correct |
411 ms |
35676 KB |
Output is correct |
66 |
Correct |
429 ms |
35696 KB |
Output is correct |
67 |
Correct |
423 ms |
35804 KB |
Output is correct |
68 |
Correct |
475 ms |
35616 KB |
Output is correct |
69 |
Correct |
498 ms |
35572 KB |
Output is correct |
70 |
Correct |
399 ms |
35656 KB |
Output is correct |
71 |
Correct |
508 ms |
35576 KB |
Output is correct |
72 |
Correct |
435 ms |
35620 KB |
Output is correct |
73 |
Correct |
470 ms |
35660 KB |
Output is correct |
74 |
Correct |
501 ms |
35584 KB |
Output is correct |
75 |
Correct |
447 ms |
35628 KB |
Output is correct |
76 |
Correct |
498 ms |
35568 KB |
Output is correct |
77 |
Correct |
479 ms |
35684 KB |
Output is correct |
78 |
Correct |
457 ms |
35572 KB |
Output is correct |
79 |
Correct |
296 ms |
29864 KB |
Output is correct |
80 |
Correct |
289 ms |
35012 KB |
Output is correct |
81 |
Correct |
364 ms |
39408 KB |
Output is correct |
82 |
Correct |
73 ms |
8132 KB |
Output is correct |
83 |
Correct |
76 ms |
8228 KB |
Output is correct |
84 |
Correct |
29 ms |
1708 KB |
Output is correct |
85 |
Correct |
33 ms |
2000 KB |
Output is correct |
86 |
Correct |
77 ms |
9032 KB |
Output is correct |
87 |
Correct |
82 ms |
9048 KB |
Output is correct |
88 |
Correct |
82 ms |
9028 KB |
Output is correct |
89 |
Correct |
96 ms |
9088 KB |
Output is correct |
90 |
Correct |
85 ms |
8944 KB |
Output is correct |
91 |
Correct |
77 ms |
9028 KB |
Output is correct |
92 |
Correct |
58 ms |
7936 KB |
Output is correct |
93 |
Correct |
64 ms |
8796 KB |
Output is correct |
94 |
Correct |
53 ms |
6296 KB |
Output is correct |
95 |
Correct |
73 ms |
8388 KB |
Output is correct |
96 |
Correct |
92 ms |
9004 KB |
Output is correct |
97 |
Correct |
100 ms |
9036 KB |
Output is correct |
98 |
Correct |
64 ms |
8900 KB |
Output is correct |
99 |
Correct |
78 ms |
10656 KB |
Output is correct |
100 |
Correct |
82 ms |
9776 KB |
Output is correct |
101 |
Correct |
130 ms |
9516 KB |
Output is correct |
102 |
Correct |
102 ms |
10496 KB |
Output is correct |
103 |
Correct |
66 ms |
8900 KB |
Output is correct |
104 |
Correct |
74 ms |
9720 KB |
Output is correct |
105 |
Correct |
85 ms |
10528 KB |
Output is correct |
106 |
Correct |
40 ms |
2744 KB |
Output is correct |
107 |
Correct |
41 ms |
2756 KB |
Output is correct |
108 |
Correct |
67 ms |
9316 KB |
Output is correct |
109 |
Correct |
52 ms |
8388 KB |
Output is correct |
110 |
Correct |
76 ms |
10152 KB |
Output is correct |
111 |
Correct |
74 ms |
10112 KB |
Output is correct |
112 |
Correct |
77 ms |
7876 KB |
Output is correct |
113 |
Correct |
78 ms |
9540 KB |
Output is correct |
114 |
Correct |
74 ms |
9228 KB |
Output is correct |
115 |
Correct |
83 ms |
10052 KB |
Output is correct |
116 |
Correct |
61 ms |
7220 KB |
Output is correct |
117 |
Correct |
79 ms |
9488 KB |
Output is correct |
118 |
Correct |
67 ms |
6980 KB |
Output is correct |
119 |
Correct |
58 ms |
6816 KB |
Output is correct |
120 |
Correct |
85 ms |
9536 KB |
Output is correct |
121 |
Correct |
83 ms |
9540 KB |
Output is correct |
122 |
Correct |
75 ms |
8868 KB |
Output is correct |
123 |
Correct |
84 ms |
9540 KB |
Output is correct |
124 |
Correct |
97 ms |
9560 KB |
Output is correct |
125 |
Correct |
71 ms |
7328 KB |
Output is correct |
126 |
Correct |
61 ms |
8476 KB |
Output is correct |
127 |
Correct |
59 ms |
7840 KB |
Output is correct |
128 |
Correct |
95 ms |
9308 KB |
Output is correct |
129 |
Correct |
95 ms |
10612 KB |
Output is correct |
130 |
Correct |
445 ms |
35524 KB |
Output is correct |
131 |
Correct |
278 ms |
26576 KB |
Output is correct |
132 |
Correct |
411 ms |
36012 KB |
Output is correct |
133 |
Correct |
437 ms |
36920 KB |
Output is correct |
134 |
Correct |
377 ms |
35224 KB |
Output is correct |
135 |
Correct |
454 ms |
38444 KB |
Output is correct |
136 |
Correct |
453 ms |
39960 KB |
Output is correct |
137 |
Correct |
467 ms |
39864 KB |
Output is correct |
138 |
Correct |
447 ms |
36292 KB |
Output is correct |
139 |
Correct |
417 ms |
36420 KB |
Output is correct |
140 |
Correct |
416 ms |
36196 KB |
Output is correct |
141 |
Correct |
420 ms |
36320 KB |
Output is correct |
142 |
Correct |
417 ms |
36312 KB |
Output is correct |
143 |
Correct |
415 ms |
36204 KB |
Output is correct |
144 |
Correct |
401 ms |
36300 KB |
Output is correct |
145 |
Correct |
456 ms |
36288 KB |
Output is correct |
146 |
Correct |
465 ms |
36296 KB |
Output is correct |
147 |
Correct |
421 ms |
36464 KB |
Output is correct |
148 |
Correct |
412 ms |
36332 KB |
Output is correct |
149 |
Correct |
439 ms |
36292 KB |
Output is correct |
150 |
Correct |
253 ms |
32052 KB |
Output is correct |
151 |
Correct |
293 ms |
35600 KB |
Output is correct |
152 |
Correct |
314 ms |
35696 KB |
Output is correct |
153 |
Correct |
340 ms |
40260 KB |
Output is correct |