# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
561776 |
2022-05-13T13:18:14 Z |
DanShaders |
Fish 2 (JOI22_fish2) |
C++17 |
|
3779 ms |
10484 KB |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
namespace x = __gnu_pbds;
template <typename T>
using ordered_set = x::tree<T, x::null_type, less<T>, x::rb_tree_tag, x::tree_order_statistics_node_update>;
template <typename T>
using normal_queue = priority_queue<T, vector<T>, greater<>>;
#define all(x) begin(x), end(x)
#define sz(x) ((int) (x).size())
#define x first
#define y second
using ll = long long;
using ld = long double;
const int N = 1 << 17, INF = 0x3f3f3f3f;
pair<int, int> t[2 * N];
int mod[2 * N];
pair<int, int> merge(pair<int, int> a, pair<int, int> b) {
if (a.x == b.x) {
return {a.x, a.y + b.y};
}
return min(a, b);
}
void tapply(int i, int x) {
t[i].x += x;
mod[i] += x;
}
void tpush(int i) {
if (mod[i]) {
tapply(2 * i + 1, mod[i]);
tapply(2 * i + 2, mod[i]);
mod[i] = 0;
}
}
void tpull(int i) {
t[i] = merge(t[2 * i + 1], t[2 * i + 2]);
}
void tadd(int ql, int qr, int x, int ci = 0, int cl = 0, int cr = N) {
if (ql <= cl && cr <= qr) {
tapply(ci, x);
return;
}
if (qr <= cl || cr <= ql) {
return;
}
int mid = (cl + cr) / 2;
tpush(ci);
tadd(ql, qr, x, 2 * ci + 1, cl, mid);
tadd(ql, qr, x, 2 * ci + 2, mid, cr);
tpull(ci);
}
pair<int, int> tget(int ql, int qr, int ci = 0, int cl = 0, int cr = N) {
if (ql <= cl && cr <= qr) {
return t[ci];
}
if (qr <= cl || cr <= ql) {
return {+INF, 0};
}
int mid = (cl + cr) / 2;
tpush(ci);
return merge(
tget(ql, qr, 2 * ci + 1, cl, mid),
tget(ql, qr, 2 * ci + 2, mid, cr)
);
}
pair<int, int> g[2 * N];
ll gs[2 * N];
void gset(int i, int x) {
g[i + N] = {x, i};
i += N;
gs[i] = x;
i /= 2;
while (i) {
g[i] = max(g[2 * i], g[2 * i + 1]);
gs[i] = gs[2 * i] + gs[2 * i + 1];
i /= 2;
}
}
pair<int, int> gget(int l, int r) {
l += N, r += N - 1;
pair<int, int> ans = {-1, -1};
while (l <= r) {
if (l & 1) ans = max(ans, g[l]);
if (!(r & 1)) ans = max(ans, g[r]);
l = (l + 1) / 2;
r = (r - 1) / 2;
}
return ans;
}
ll gsum(int l, int r) {
l += N, r += N - 1;
ll ans = 0;
while (l <= r) {
if (l & 1) ans += gs[l];
if (!(r & 1)) ans += gs[r];
l = (l + 1) / 2;
r = (r - 1) / 2;
}
return ans;
}
int gfirstgreater(int ql, int qr, ll x, int ci = 1, int cl = 0, int cr = N) {
if (qr <= cl || cr <= ql || g[ci].x <= x) {
return qr;
}
if (cr - cl == 1) {
return cl;
}
int mid = (cl + cr) / 2;
int res = gfirstgreater(ql, qr, x, 2 * ci, cl, mid);
if (res >= qr) {
return gfirstgreater(ql, qr, x, 2 * ci + 1, mid, cr);
} else {
return res;
}
}
int glastgreater(int ql, int qr, ll x, int ci = 1, int cl = 0, int cr = N) {
if (qr <= cl || cr <= ql || g[ci].x <= x) {
return ql - 1;
}
if (cr - cl == 1) {
return cl;
}
int mid = (cl + cr) / 2;
int res = glastgreater(ql, qr, x, 2 * ci + 1, mid, cr);
if (res < ql) {
return glastgreater(ql, qr, x, 2 * ci, cl, mid);
} else {
return res;
}
}
int a[N], n;
int up[N];
struct S {
int i, x, cl, cr;
bool operator<(const S &other) const {
return i < other.i;
}
bool operator==(const S &other) const {
return i == other.i && cl == other.cl && cr == other.cr;
}
};
void set_up_to(const S &s) {
if (up[s.i] != s.x) {
up[s.i] = s.x;
// cout << "real tadd " << s.cl + 1 << " " << s.cr << " " << (s.x ? 1 : -1) << endl;
if (!s.x) {
tadd(s.cl + 1, s.cr, -1);
} else {
tadd(s.cl + 1, s.cr, 1);
}
}
}
void loop_set_up(int u, int l, int r, int x, vector<S> &change) {
if (!(l <= u && u < r)) {
return;
}
auto ai = [&](int i) {
if (i < l || i >= r) {
return +INF;
}
return a[i];
};
int cl = glastgreater(l, u, a[u]),
cr = gfirstgreater(u + 1, r, a[u] - 1);
ll sm = gsum(cl + 1, cr);
while (cl != l - 1 || cr != r) {
if (sm < min(ai(cl), ai(cr))) {
int v = gget(cl + 1, cr).y;
// cout << "set " << cl << " " << cr << " " << v << endl;
change.push_back({v, x, cl, cr});
if (ai(cl) <= ai(cr)) {
sm += a[cl];
--cl;
} else {
sm += a[cr];
++cr;
}
}
cl = glastgreater(l, cl + 1, sm);
cr = gfirstgreater(cr - 1, r, sm);
sm = gsum(cl + 1, cr);
}
}
int ai(int i) {
if (i < 0 || i >= n) {
return +INF;
}
return a[i];
}
vector<S> change;
int query(int l, int r) {
change.clear();
if (l) {
loop_set_up(l, 0, n, 0, change);
loop_set_up(l, l, r, 1, change);
}
if (r != n) {
loop_set_up(r - 1, 0, n, 0, change);
loop_set_up(r - 1, l, r, 1, change);
}
stable_sort(all(change));
reverse(all(change));
change.resize(unique(all(change), [](auto x, auto y) {
return x.i == y.i;
}) - begin(change));
for (auto &s : change) {
// cout << "temp " << s.cl << " " << s.cr << " " << s.i << " " << s.x << endl;
int backup = up[s.i];
set_up_to(s);
s.x = backup;
}
auto [ansx, ansy] = tget(l, r);
// cout << ansx << " " << ansy << endl;
for (const auto &s : change) {
set_up_to(s);
}
return ansx ? 0 : ansy;
}
void aset(int i, int x) {
int cl = glastgreater(0, i, a[i]),
cr = gfirstgreater(i + 1, n, a[i] - 1),
nl = glastgreater(0, i, x),
nr = gfirstgreater(i + 1, n, x - 1);
// cout << cr << endl;
int clef = gget(cl + 1, i).y, crig = gget(i + 1, cr).y,
nlef = gget(nl + 1, i).y, nrig = gget(i + 1, nr).y;
// cout << "counted " << clef << " " << crig << " " << nlef << " " << nrig << endl;
change.clear();
loop_set_up(i, 0, n, 0, change);
loop_set_up(cl, 0, n, 0, change);
loop_set_up(cr, 0, n, 0, change);
loop_set_up(clef, 0, n, 0, change);
loop_set_up(crig, 0, n, 0, change);
loop_set_up(nl, 0, n, 0, change);
loop_set_up(nr, 0, n, 0, change);
loop_set_up(nlef, 0, n, 0, change);
loop_set_up(nrig, 0, n, 0, change);
a[i] = x;
gset(i, x);
loop_set_up(i, 0, n, 1, change);
loop_set_up(cl, 0, n, 1, change);
loop_set_up(cr, 0, n, 1, change);
loop_set_up(clef, 0, n, 1, change);
loop_set_up(crig, 0, n, 1, change);
loop_set_up(nl, 0, n, 1, change);
loop_set_up(nr, 0, n, 1, change);
loop_set_up(nlef, 0, n, 1, change);
loop_set_up(nrig, 0, n, 1, change);
stable_sort(all(change));
reverse(all(change));
change.resize(unique(all(change)) - begin(change));
reverse(all(change));
for (auto s : change) {
// cout << "apply " << s.cl << " " << s.cr << " " << s.i << " " << s.x << endl;
set_up_to(s);
}
}
signed main() {
cin.tie(0)->sync_with_stdio(0);
cin >> n;
for (int i = 0; i < n; ++i) {
cin >> a[i];
g[N + i] = {a[i], i};
gs[N + i] = a[i];
}
for (int i = 0; i < n; ++i) {
t[N - 1 + i] = {0, 1};
}
for (int i = N - 1; i--; ) {
t[i] = merge(t[2 * i + 1], t[2 * i + 2]);
mod[i] = 0;
}
for (int i = N; i--; ) {
g[i] = max(g[2 * i], g[2 * i + 1]);
gs[i] = gs[2 * i] + gs[2 * i + 1];
}
for (int i = 0; i < n; ++i) {
int cl = glastgreater(0, i, a[i]);
int cr = gfirstgreater(i + 1, n, a[i] - 1);
if (gsum(cl + 1, cr) < min(ai(cl), ai(cr)) &&
(cl != -1 || cr != n)) {
set_up_to({i, 1, cl, cr});
}
}
int queries;
cin >> queries;
while (queries--) {
int type, l, r;
cin >> type >> l >> r;
if (type == 1) {
aset(l - 1, r);
} else {
cout << query(l - 1, r) << "\n";
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
3924 KB |
Output is correct |
2 |
Correct |
3 ms |
3924 KB |
Output is correct |
3 |
Correct |
2 ms |
3924 KB |
Output is correct |
4 |
Correct |
2 ms |
3924 KB |
Output is correct |
5 |
Correct |
24 ms |
3924 KB |
Output is correct |
6 |
Correct |
11 ms |
3984 KB |
Output is correct |
7 |
Correct |
21 ms |
3924 KB |
Output is correct |
8 |
Correct |
17 ms |
3984 KB |
Output is correct |
9 |
Correct |
13 ms |
3992 KB |
Output is correct |
10 |
Correct |
5 ms |
3924 KB |
Output is correct |
11 |
Correct |
5 ms |
3924 KB |
Output is correct |
12 |
Correct |
8 ms |
3976 KB |
Output is correct |
13 |
Correct |
8 ms |
3968 KB |
Output is correct |
14 |
Correct |
7 ms |
3976 KB |
Output is correct |
15 |
Correct |
8 ms |
3924 KB |
Output is correct |
16 |
Correct |
8 ms |
3924 KB |
Output is correct |
17 |
Correct |
8 ms |
3924 KB |
Output is correct |
18 |
Correct |
6 ms |
3924 KB |
Output is correct |
19 |
Correct |
6 ms |
3924 KB |
Output is correct |
20 |
Correct |
5 ms |
3924 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
3924 KB |
Output is correct |
2 |
Correct |
63 ms |
7336 KB |
Output is correct |
3 |
Correct |
55 ms |
7400 KB |
Output is correct |
4 |
Correct |
56 ms |
7368 KB |
Output is correct |
5 |
Correct |
56 ms |
7332 KB |
Output is correct |
6 |
Correct |
51 ms |
7428 KB |
Output is correct |
7 |
Correct |
42 ms |
7452 KB |
Output is correct |
8 |
Correct |
50 ms |
7412 KB |
Output is correct |
9 |
Correct |
45 ms |
7352 KB |
Output is correct |
10 |
Correct |
52 ms |
7372 KB |
Output is correct |
11 |
Correct |
45 ms |
7368 KB |
Output is correct |
12 |
Correct |
43 ms |
7432 KB |
Output is correct |
13 |
Correct |
44 ms |
7440 KB |
Output is correct |
14 |
Correct |
51 ms |
7340 KB |
Output is correct |
15 |
Correct |
54 ms |
7400 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
3924 KB |
Output is correct |
2 |
Correct |
3 ms |
3924 KB |
Output is correct |
3 |
Correct |
2 ms |
3924 KB |
Output is correct |
4 |
Correct |
2 ms |
3924 KB |
Output is correct |
5 |
Correct |
24 ms |
3924 KB |
Output is correct |
6 |
Correct |
11 ms |
3984 KB |
Output is correct |
7 |
Correct |
21 ms |
3924 KB |
Output is correct |
8 |
Correct |
17 ms |
3984 KB |
Output is correct |
9 |
Correct |
13 ms |
3992 KB |
Output is correct |
10 |
Correct |
5 ms |
3924 KB |
Output is correct |
11 |
Correct |
5 ms |
3924 KB |
Output is correct |
12 |
Correct |
8 ms |
3976 KB |
Output is correct |
13 |
Correct |
8 ms |
3968 KB |
Output is correct |
14 |
Correct |
7 ms |
3976 KB |
Output is correct |
15 |
Correct |
8 ms |
3924 KB |
Output is correct |
16 |
Correct |
8 ms |
3924 KB |
Output is correct |
17 |
Correct |
8 ms |
3924 KB |
Output is correct |
18 |
Correct |
6 ms |
3924 KB |
Output is correct |
19 |
Correct |
6 ms |
3924 KB |
Output is correct |
20 |
Correct |
5 ms |
3924 KB |
Output is correct |
21 |
Correct |
2 ms |
3924 KB |
Output is correct |
22 |
Correct |
63 ms |
7336 KB |
Output is correct |
23 |
Correct |
55 ms |
7400 KB |
Output is correct |
24 |
Correct |
56 ms |
7368 KB |
Output is correct |
25 |
Correct |
56 ms |
7332 KB |
Output is correct |
26 |
Correct |
51 ms |
7428 KB |
Output is correct |
27 |
Correct |
42 ms |
7452 KB |
Output is correct |
28 |
Correct |
50 ms |
7412 KB |
Output is correct |
29 |
Correct |
45 ms |
7352 KB |
Output is correct |
30 |
Correct |
52 ms |
7372 KB |
Output is correct |
31 |
Correct |
45 ms |
7368 KB |
Output is correct |
32 |
Correct |
43 ms |
7432 KB |
Output is correct |
33 |
Correct |
44 ms |
7440 KB |
Output is correct |
34 |
Correct |
51 ms |
7340 KB |
Output is correct |
35 |
Correct |
54 ms |
7400 KB |
Output is correct |
36 |
Correct |
88 ms |
7472 KB |
Output is correct |
37 |
Correct |
80 ms |
7436 KB |
Output is correct |
38 |
Correct |
71 ms |
7448 KB |
Output is correct |
39 |
Correct |
88 ms |
7360 KB |
Output is correct |
40 |
Correct |
70 ms |
7476 KB |
Output is correct |
41 |
Correct |
52 ms |
7444 KB |
Output is correct |
42 |
Correct |
51 ms |
7432 KB |
Output is correct |
43 |
Correct |
63 ms |
7452 KB |
Output is correct |
44 |
Correct |
64 ms |
7372 KB |
Output is correct |
45 |
Correct |
84 ms |
7376 KB |
Output is correct |
46 |
Correct |
66 ms |
7408 KB |
Output is correct |
47 |
Correct |
62 ms |
7364 KB |
Output is correct |
48 |
Correct |
66 ms |
7544 KB |
Output is correct |
49 |
Correct |
55 ms |
7468 KB |
Output is correct |
50 |
Correct |
56 ms |
7456 KB |
Output is correct |
51 |
Correct |
58 ms |
7356 KB |
Output is correct |
52 |
Correct |
55 ms |
7344 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
3924 KB |
Output is correct |
2 |
Correct |
63 ms |
7336 KB |
Output is correct |
3 |
Correct |
55 ms |
7400 KB |
Output is correct |
4 |
Correct |
56 ms |
7368 KB |
Output is correct |
5 |
Correct |
56 ms |
7332 KB |
Output is correct |
6 |
Correct |
51 ms |
7428 KB |
Output is correct |
7 |
Correct |
42 ms |
7452 KB |
Output is correct |
8 |
Correct |
50 ms |
7412 KB |
Output is correct |
9 |
Correct |
45 ms |
7352 KB |
Output is correct |
10 |
Correct |
52 ms |
7372 KB |
Output is correct |
11 |
Correct |
45 ms |
7368 KB |
Output is correct |
12 |
Correct |
43 ms |
7432 KB |
Output is correct |
13 |
Correct |
44 ms |
7440 KB |
Output is correct |
14 |
Correct |
51 ms |
7340 KB |
Output is correct |
15 |
Correct |
54 ms |
7400 KB |
Output is correct |
16 |
Correct |
2 ms |
3924 KB |
Output is correct |
17 |
Correct |
1907 ms |
7872 KB |
Output is correct |
18 |
Correct |
1733 ms |
8088 KB |
Output is correct |
19 |
Correct |
1913 ms |
8008 KB |
Output is correct |
20 |
Correct |
2531 ms |
8004 KB |
Output is correct |
21 |
Correct |
1856 ms |
7948 KB |
Output is correct |
22 |
Correct |
1788 ms |
8088 KB |
Output is correct |
23 |
Correct |
1873 ms |
7864 KB |
Output is correct |
24 |
Correct |
2601 ms |
7992 KB |
Output is correct |
25 |
Correct |
2048 ms |
7840 KB |
Output is correct |
26 |
Correct |
3057 ms |
7824 KB |
Output is correct |
27 |
Correct |
485 ms |
7956 KB |
Output is correct |
28 |
Correct |
490 ms |
7976 KB |
Output is correct |
29 |
Correct |
483 ms |
7992 KB |
Output is correct |
30 |
Correct |
2254 ms |
7884 KB |
Output is correct |
31 |
Correct |
2391 ms |
7672 KB |
Output is correct |
32 |
Correct |
3658 ms |
7864 KB |
Output is correct |
33 |
Correct |
1252 ms |
8040 KB |
Output is correct |
34 |
Correct |
3659 ms |
7916 KB |
Output is correct |
35 |
Correct |
2041 ms |
8012 KB |
Output is correct |
36 |
Correct |
2649 ms |
8236 KB |
Output is correct |
37 |
Correct |
866 ms |
7728 KB |
Output is correct |
38 |
Correct |
808 ms |
7852 KB |
Output is correct |
39 |
Correct |
619 ms |
8064 KB |
Output is correct |
40 |
Correct |
612 ms |
8064 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
3924 KB |
Output is correct |
2 |
Correct |
63 ms |
7336 KB |
Output is correct |
3 |
Correct |
55 ms |
7400 KB |
Output is correct |
4 |
Correct |
56 ms |
7368 KB |
Output is correct |
5 |
Correct |
56 ms |
7332 KB |
Output is correct |
6 |
Correct |
51 ms |
7428 KB |
Output is correct |
7 |
Correct |
42 ms |
7452 KB |
Output is correct |
8 |
Correct |
50 ms |
7412 KB |
Output is correct |
9 |
Correct |
45 ms |
7352 KB |
Output is correct |
10 |
Correct |
52 ms |
7372 KB |
Output is correct |
11 |
Correct |
45 ms |
7368 KB |
Output is correct |
12 |
Correct |
43 ms |
7432 KB |
Output is correct |
13 |
Correct |
44 ms |
7440 KB |
Output is correct |
14 |
Correct |
51 ms |
7340 KB |
Output is correct |
15 |
Correct |
54 ms |
7400 KB |
Output is correct |
16 |
Correct |
3 ms |
3924 KB |
Output is correct |
17 |
Correct |
3202 ms |
7664 KB |
Output is correct |
18 |
Correct |
1404 ms |
7756 KB |
Output is correct |
19 |
Correct |
2107 ms |
7848 KB |
Output is correct |
20 |
Correct |
1173 ms |
7800 KB |
Output is correct |
21 |
Correct |
3779 ms |
7704 KB |
Output is correct |
22 |
Correct |
1431 ms |
7708 KB |
Output is correct |
23 |
Correct |
3313 ms |
7792 KB |
Output is correct |
24 |
Correct |
1345 ms |
7760 KB |
Output is correct |
25 |
Correct |
2676 ms |
7772 KB |
Output is correct |
26 |
Correct |
562 ms |
7812 KB |
Output is correct |
27 |
Correct |
774 ms |
7500 KB |
Output is correct |
28 |
Correct |
970 ms |
7748 KB |
Output is correct |
29 |
Correct |
624 ms |
7756 KB |
Output is correct |
30 |
Correct |
796 ms |
7512 KB |
Output is correct |
31 |
Correct |
1138 ms |
7596 KB |
Output is correct |
32 |
Correct |
1391 ms |
7612 KB |
Output is correct |
33 |
Correct |
1032 ms |
7540 KB |
Output is correct |
34 |
Correct |
1249 ms |
8012 KB |
Output is correct |
35 |
Correct |
907 ms |
7688 KB |
Output is correct |
36 |
Correct |
1167 ms |
7876 KB |
Output is correct |
37 |
Correct |
1148 ms |
7912 KB |
Output is correct |
38 |
Correct |
766 ms |
7888 KB |
Output is correct |
39 |
Correct |
662 ms |
7772 KB |
Output is correct |
40 |
Correct |
303 ms |
7832 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
3924 KB |
Output is correct |
2 |
Correct |
3 ms |
3924 KB |
Output is correct |
3 |
Correct |
2 ms |
3924 KB |
Output is correct |
4 |
Correct |
2 ms |
3924 KB |
Output is correct |
5 |
Correct |
24 ms |
3924 KB |
Output is correct |
6 |
Correct |
11 ms |
3984 KB |
Output is correct |
7 |
Correct |
21 ms |
3924 KB |
Output is correct |
8 |
Correct |
17 ms |
3984 KB |
Output is correct |
9 |
Correct |
13 ms |
3992 KB |
Output is correct |
10 |
Correct |
5 ms |
3924 KB |
Output is correct |
11 |
Correct |
5 ms |
3924 KB |
Output is correct |
12 |
Correct |
8 ms |
3976 KB |
Output is correct |
13 |
Correct |
8 ms |
3968 KB |
Output is correct |
14 |
Correct |
7 ms |
3976 KB |
Output is correct |
15 |
Correct |
8 ms |
3924 KB |
Output is correct |
16 |
Correct |
8 ms |
3924 KB |
Output is correct |
17 |
Correct |
8 ms |
3924 KB |
Output is correct |
18 |
Correct |
6 ms |
3924 KB |
Output is correct |
19 |
Correct |
6 ms |
3924 KB |
Output is correct |
20 |
Correct |
5 ms |
3924 KB |
Output is correct |
21 |
Correct |
2 ms |
3924 KB |
Output is correct |
22 |
Correct |
63 ms |
7336 KB |
Output is correct |
23 |
Correct |
55 ms |
7400 KB |
Output is correct |
24 |
Correct |
56 ms |
7368 KB |
Output is correct |
25 |
Correct |
56 ms |
7332 KB |
Output is correct |
26 |
Correct |
51 ms |
7428 KB |
Output is correct |
27 |
Correct |
42 ms |
7452 KB |
Output is correct |
28 |
Correct |
50 ms |
7412 KB |
Output is correct |
29 |
Correct |
45 ms |
7352 KB |
Output is correct |
30 |
Correct |
52 ms |
7372 KB |
Output is correct |
31 |
Correct |
45 ms |
7368 KB |
Output is correct |
32 |
Correct |
43 ms |
7432 KB |
Output is correct |
33 |
Correct |
44 ms |
7440 KB |
Output is correct |
34 |
Correct |
51 ms |
7340 KB |
Output is correct |
35 |
Correct |
54 ms |
7400 KB |
Output is correct |
36 |
Correct |
88 ms |
7472 KB |
Output is correct |
37 |
Correct |
80 ms |
7436 KB |
Output is correct |
38 |
Correct |
71 ms |
7448 KB |
Output is correct |
39 |
Correct |
88 ms |
7360 KB |
Output is correct |
40 |
Correct |
70 ms |
7476 KB |
Output is correct |
41 |
Correct |
52 ms |
7444 KB |
Output is correct |
42 |
Correct |
51 ms |
7432 KB |
Output is correct |
43 |
Correct |
63 ms |
7452 KB |
Output is correct |
44 |
Correct |
64 ms |
7372 KB |
Output is correct |
45 |
Correct |
84 ms |
7376 KB |
Output is correct |
46 |
Correct |
66 ms |
7408 KB |
Output is correct |
47 |
Correct |
62 ms |
7364 KB |
Output is correct |
48 |
Correct |
66 ms |
7544 KB |
Output is correct |
49 |
Correct |
55 ms |
7468 KB |
Output is correct |
50 |
Correct |
56 ms |
7456 KB |
Output is correct |
51 |
Correct |
58 ms |
7356 KB |
Output is correct |
52 |
Correct |
55 ms |
7344 KB |
Output is correct |
53 |
Correct |
2 ms |
3924 KB |
Output is correct |
54 |
Correct |
1907 ms |
7872 KB |
Output is correct |
55 |
Correct |
1733 ms |
8088 KB |
Output is correct |
56 |
Correct |
1913 ms |
8008 KB |
Output is correct |
57 |
Correct |
2531 ms |
8004 KB |
Output is correct |
58 |
Correct |
1856 ms |
7948 KB |
Output is correct |
59 |
Correct |
1788 ms |
8088 KB |
Output is correct |
60 |
Correct |
1873 ms |
7864 KB |
Output is correct |
61 |
Correct |
2601 ms |
7992 KB |
Output is correct |
62 |
Correct |
2048 ms |
7840 KB |
Output is correct |
63 |
Correct |
3057 ms |
7824 KB |
Output is correct |
64 |
Correct |
485 ms |
7956 KB |
Output is correct |
65 |
Correct |
490 ms |
7976 KB |
Output is correct |
66 |
Correct |
483 ms |
7992 KB |
Output is correct |
67 |
Correct |
2254 ms |
7884 KB |
Output is correct |
68 |
Correct |
2391 ms |
7672 KB |
Output is correct |
69 |
Correct |
3658 ms |
7864 KB |
Output is correct |
70 |
Correct |
1252 ms |
8040 KB |
Output is correct |
71 |
Correct |
3659 ms |
7916 KB |
Output is correct |
72 |
Correct |
2041 ms |
8012 KB |
Output is correct |
73 |
Correct |
2649 ms |
8236 KB |
Output is correct |
74 |
Correct |
866 ms |
7728 KB |
Output is correct |
75 |
Correct |
808 ms |
7852 KB |
Output is correct |
76 |
Correct |
619 ms |
8064 KB |
Output is correct |
77 |
Correct |
612 ms |
8064 KB |
Output is correct |
78 |
Correct |
3 ms |
3924 KB |
Output is correct |
79 |
Correct |
3202 ms |
7664 KB |
Output is correct |
80 |
Correct |
1404 ms |
7756 KB |
Output is correct |
81 |
Correct |
2107 ms |
7848 KB |
Output is correct |
82 |
Correct |
1173 ms |
7800 KB |
Output is correct |
83 |
Correct |
3779 ms |
7704 KB |
Output is correct |
84 |
Correct |
1431 ms |
7708 KB |
Output is correct |
85 |
Correct |
3313 ms |
7792 KB |
Output is correct |
86 |
Correct |
1345 ms |
7760 KB |
Output is correct |
87 |
Correct |
2676 ms |
7772 KB |
Output is correct |
88 |
Correct |
562 ms |
7812 KB |
Output is correct |
89 |
Correct |
774 ms |
7500 KB |
Output is correct |
90 |
Correct |
970 ms |
7748 KB |
Output is correct |
91 |
Correct |
624 ms |
7756 KB |
Output is correct |
92 |
Correct |
796 ms |
7512 KB |
Output is correct |
93 |
Correct |
1138 ms |
7596 KB |
Output is correct |
94 |
Correct |
1391 ms |
7612 KB |
Output is correct |
95 |
Correct |
1032 ms |
7540 KB |
Output is correct |
96 |
Correct |
1249 ms |
8012 KB |
Output is correct |
97 |
Correct |
907 ms |
7688 KB |
Output is correct |
98 |
Correct |
1167 ms |
7876 KB |
Output is correct |
99 |
Correct |
1148 ms |
7912 KB |
Output is correct |
100 |
Correct |
766 ms |
7888 KB |
Output is correct |
101 |
Correct |
662 ms |
7772 KB |
Output is correct |
102 |
Correct |
303 ms |
7832 KB |
Output is correct |
103 |
Correct |
3130 ms |
9012 KB |
Output is correct |
104 |
Correct |
1438 ms |
9940 KB |
Output is correct |
105 |
Correct |
2511 ms |
9632 KB |
Output is correct |
106 |
Correct |
1624 ms |
9544 KB |
Output is correct |
107 |
Correct |
3742 ms |
8888 KB |
Output is correct |
108 |
Correct |
1501 ms |
9816 KB |
Output is correct |
109 |
Correct |
2495 ms |
9424 KB |
Output is correct |
110 |
Correct |
1477 ms |
9656 KB |
Output is correct |
111 |
Correct |
2456 ms |
9692 KB |
Output is correct |
112 |
Correct |
1697 ms |
9736 KB |
Output is correct |
113 |
Correct |
727 ms |
10332 KB |
Output is correct |
114 |
Correct |
480 ms |
10484 KB |
Output is correct |
115 |
Correct |
1292 ms |
9548 KB |
Output is correct |
116 |
Correct |
1271 ms |
9492 KB |
Output is correct |
117 |
Correct |
557 ms |
10468 KB |
Output is correct |
118 |
Correct |
1385 ms |
9592 KB |
Output is correct |
119 |
Correct |
885 ms |
10192 KB |
Output is correct |
120 |
Correct |
1295 ms |
9468 KB |
Output is correct |
121 |
Correct |
1268 ms |
9684 KB |
Output is correct |
122 |
Correct |
1472 ms |
9516 KB |
Output is correct |
123 |
Correct |
1494 ms |
9136 KB |
Output is correct |
124 |
Correct |
1636 ms |
9488 KB |
Output is correct |
125 |
Correct |
2025 ms |
8168 KB |
Output is correct |
126 |
Correct |
1934 ms |
7888 KB |
Output is correct |
127 |
Correct |
1390 ms |
7860 KB |
Output is correct |
128 |
Correct |
1133 ms |
9384 KB |
Output is correct |
129 |
Correct |
860 ms |
9840 KB |
Output is correct |
130 |
Correct |
731 ms |
9884 KB |
Output is correct |