# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
911235 |
2024-01-18T16:36:05 Z |
cadmiumsky |
Fish 2 (JOI22_fish2) |
C++17 |
|
4000 ms |
25540 KB |
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
using namespace std;
using ll = long long;
using ld = long double;
//#define int ll
#define sz(x) ((int)(x).size())
using pii = pair<int,int>;
using tii = tuple<int,int,int>;
const int nmax = 1e5 + 5;
const int inf = 1e9 + 5;
template<typename Node>
struct AINT {
vector<Node> aint;
int n;
void init(int _n, Node TMP = Node()) {
n = _n;
aint.assign(2 * n + 5, TMP);
}
tii getsons(int node, int cl, int cr) { int mid = cl + cr >> 1; return tii{mid, node + 1, node + (mid - cl + 1) * 2};}
template<class CB> void walk(int ismutable, int toRight, CB&& cb) {
if(ismutable == 0 && toRight == 0) walk<0, 0>(cb, 1, 1, n);
else if(ismutable == 0) walk<0, 1>(cb, 1, 1, n);
else if(toRight == 0) walk<1, 0>(cb, 1, 1, n);
else walk<1, 1>(cb, 1, 1, n);
}
template<int ismutable, int toRight, class CB> void walk(CB&& cb, int node, int cl, int cr) {
//cerr << node << '\t' << cl << ' ' << cr << '\n';
if(!cb(aint[node], cl, cr)) return;
auto [mid, L, R] = getsons(node, cl, cr);
aint[node].push(aint[L], aint[R]);
if(toRight) walk<ismutable, toRight>(cb, L, cl, mid), walk<ismutable, toRight>(cb, R, mid + 1, cr);
else walk<ismutable, toRight>(cb, R, mid + 1, cr), walk<ismutable, toRight>(cb, L, cl, mid);
if(ismutable) aint[node].pull(aint[L], aint[R]);
return;
}
};
struct MinCounter {
int mn, cnt;
int add;
MinCounter(int a, int b, int c = 0): mn(a), cnt(b), add(c) {;}
MinCounter(): mn(inf), cnt(0), add(0) {;}
void push(MinCounter& a, MinCounter& b) {
a.mn += add;
a.add += add;
b.add += add;
b.mn += add;
add = 0;
}
void pull(const MinCounter a, const MinCounter b) {
*this = MinCounter(min(a.mn, b.mn), a.cnt * (a.mn <= b.mn) + b.cnt * (b.mn <= a.mn));
}
};
struct GreaterFinder {
int mx;
GreaterFinder(int a = 0): mx(a) {;}
void pull(const GreaterFinder& a, const GreaterFinder& b) { *this = GreaterFinder(max(a.mx, b.mx)); }
void push(const GreaterFinder& a, const GreaterFinder& b) {;}
};
struct Sum {
ll sum;
Sum(ll a = 0): sum(a) {;}
void pull(const Sum& a, const Sum& b) { *this = Sum(a.sum + b.sum); }
void push(const Sum& a, const Sum& b) {;}
};
int a[nmax];
AINT<Sum> sum;
ll getsum(int l, int r) {
ll rez = 0;
//for(int i = l; i <= r; i++)
//rez += a[i];
sum.walk(0, 1, [&](Sum& a, int cl, int cr) { if(cr < l || r < cl) return 0; if(l <= cl && cr <= r) { rez += a.sum; return 0; } return 1; }); return rez;
return rez;
}
AINT<MinCounter> mncnt;
int n;
namespace Finders {
AINT<GreaterFinder> finder;
int nextGreater(int P, int lim) { // urmatorul de la pozitia P >= lim
int rez = n + 1;
finder.walk(0, 1,
[&](GreaterFinder& a, int cl, int cr) { if(rez < cl) return 0; if(cr < P || a.mx < lim) { rez = cr + 1; return 0; } if(cl == cr) { rez = cl; return 0; } return 1; });
return rez;
}
int prevGreater(int P, int lim) {
int rez = 0;
finder.walk(0, 0,
[&](GreaterFinder& a, int cl, int cr) { if(rez > cr) return 0; if(P < cl || a.mx < lim) { rez = cl - 1; return 0; } if(cl == cr) { rez = cl; return 0; } return 1; });
return rez;
}
int nextBreaker(int L, int start) {
int ptr = start;
while(ptr < n) {
if(getsum(L, ptr) < a[ptr + 1]) {
return ptr + 1;
}
ptr = nextGreater(ptr + 1, a[ptr + 1] * 2) - 1;
}
return n + 1;
}
int prevBreaker(int R, int start) {
int ptr = start;
while(ptr > 1) {
if(getsum(ptr, R) < a[ptr - 1]) {
return ptr - 1;
}
ptr = prevGreater(ptr - 1, a[ptr - 1] * 2) + 1;
}
return 0;
}
}
vector<pii> getIntervs(int P) {
using namespace Finders;
vector<pii> elems;
int L = P, R = P, direction = 1, fail = 0;
while(L > 1 || R < n) {
if(direction == 1) {
int nvR = nextBreaker(L, R) - 1;
if(nvR == R && fail) {
elems.emplace_back(L, R);
if((L != 1 && a[L - 1] <= a[R + 1]) || R == n) L--;
else R++;
fail = 0;
}
else { fail = R == nvR; R = nvR; }
}
else {
int nvL = prevBreaker(R, L) + 1;
if(nvL == L && fail) {
elems.emplace_back(L, R);
if((L != 1 && a[L - 1] <= a[R + 1]) || R == n) L--;
else R++;
fail = 0;
}
else {fail = L == nvL; L = nvL; }
}
direction *= -1;
}
return elems;
}
namespace Segments {
set<pii> appearingIntervs;
void erase(int l, int r) {
if(appearingIntervs.count(pii{l, r})) {
appearingIntervs.erase(pii{l, r});
mncnt.walk(1, 1, [&](MinCounter& val, int cl, int cr) {
if(cr < l || r < cl) return 0;
if(l <= cl && cr <= r) {
val.mn -= 1;
val.add -= 1;
return 0;
}
return 1;
});
}
return;
}
void insert(int l, int r) {
if(!appearingIntervs.count(pii{l, r})) {
appearingIntervs.insert(pii{l, r});
mncnt.walk(1, 1, [&](MinCounter& val, int cl, int cr) {
if(cr < l || r < cl) return 0;
if(l <= cl && cr <= r) {
val.mn += 1;
val.add += 1;
return 0;
}
return 1;
});
}
return;
}
}
void updPoz(int P, int x) {
vector<pii> V = getIntervs(P), T;
if(P > 1) T = getIntervs(P - 1), copy(all(T), back_inserter(V));
if(P < n) T = getIntervs(P + 1), copy(all(T), back_inserter(V));
for(auto [l, r] : V)
Segments::erase(l, r);
Finders::finder.walk(1, 1, [&](GreaterFinder& val, int cl, int cr) {
if(cr < P || P < cl) return 0;
if(cl == cr) {
val = GreaterFinder(x);
return 0;
}
return 1;
});
a[P] = x;
sum.walk(1, 1, [&](Sum& val, int cl, int cr) {
if(cr < P || P < cl) return 0;
if(cl == cr) {
val = Sum(x);
return 0;
}
return 1;
});
V = getIntervs(P);
if(P > 1) T = getIntervs(P - 1), copy(all(T), back_inserter(V));
if(P < n) T = getIntervs(P + 1), copy(all(T), back_inserter(V));
for(auto [l, r] : V)
Segments::insert(l, r);
return;
}
int query(int l, int r) {
int answer = l, ptr = l;
while(ptr <= r) {
ptr = Finders::nextBreaker(l, ptr);
if(ptr <= r) answer = ptr;
}
l = answer;
answer = ptr = r;
while(ptr >= l) {
ptr = Finders::prevBreaker(r, ptr);
if(ptr >= l) answer = ptr;
}
r = answer;
MinCounter cnt(1e9 + 5, -1, 0), cnt2;
mncnt.walk(0, 1, [&](MinCounter& val, int cl, int cr) {
if(cr < l || r < cl) return 0;
if(l <= cl && cr <= r) {
cnt.pull(cnt, val);
return 0;
}
return 1;
});
return cnt.cnt;
}
signed main() {
cin >> n;
for(int i = 1; i <= n; i++) {
cin >> a[i];
}
using namespace Finders;
finder.init(n);
mncnt.init(n);
sum.init(n);
finder.walk(1, 1, [&](GreaterFinder& val, int cl, int cr) { if(cl != cr) return 1; val = GreaterFinder(a[cl]); return 0;});
mncnt.walk(1, 1, [&](MinCounter& val, int cl, int cr) { if(cl != cr) return 1; val = MinCounter(0, 1); return 0;});
sum.walk(1, 1, [&](Sum& val, int cl, int cr) { if(cl != cr) return 1; val = Sum(a[cl]); return 0;});
vector<pii> V, T;
for(int i = 1; i <= n; i++) {
T = getIntervs(i);
copy(all(T), back_inserter(V));
}
for(auto [l, r] : V) {
Segments::insert(l, r);
}
int q;
cin >> q;
for(int TC = 0, t, x, y; TC < q; TC++) {
cin >> t >> x >> y;
if(t == 1)
updPoz(x, y);
else
cout << query(x, y) << '\n';
}
}
/**
Anul asta se da centroid.
-- Surse oficiale
*/
Compilation message
fish2.cpp: In instantiation of 'tii AINT<Node>::getsons(int, int, int) [with Node = Sum; tii = std::tuple<int, int, int>]':
fish2.cpp:41:24: required from 'void AINT<Node>::walk(CB&&, int, int, int) [with int ismutable = 0; int toRight = 0; CB = getsum(int, int)::<lambda(Sum&, int, int)>&; Node = Sum]'
fish2.cpp:30:50: required from 'void AINT<Node>::walk(int, int, CB&&) [with CB = getsum(int, int)::<lambda(Sum&, int, int)>; Node = Sum]'
fish2.cpp:98:141: required from here
fish2.cpp:27:56: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
27 | tii getsons(int node, int cl, int cr) { int mid = cl + cr >> 1; return tii{mid, node + 1, node + (mid - cl + 1) * 2};}
| ~~~^~~~
fish2.cpp: In instantiation of 'tii AINT<Node>::getsons(int, int, int) [with Node = GreaterFinder; tii = std::tuple<int, int, int>]':
fish2.cpp:41:24: required from 'void AINT<Node>::walk(CB&&, int, int, int) [with int ismutable = 0; int toRight = 0; CB = Finders::nextGreater(int, int)::<lambda(GreaterFinder&, int, int)>&; Node = GreaterFinder]'
fish2.cpp:30:50: required from 'void AINT<Node>::walk(int, int, CB&&) [with CB = Finders::nextGreater(int, int)::<lambda(GreaterFinder&, int, int)>; Node = GreaterFinder]'
fish2.cpp:113:171: required from here
fish2.cpp:27:56: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
fish2.cpp: In instantiation of 'tii AINT<Node>::getsons(int, int, int) [with Node = MinCounter; tii = std::tuple<int, int, int>]':
fish2.cpp:41:24: required from 'void AINT<Node>::walk(CB&&, int, int, int) [with int ismutable = 0; int toRight = 0; CB = Segments::erase(int, int)::<lambda(MinCounter&, int, int)>&; Node = MinCounter]'
fish2.cpp:30:50: required from 'void AINT<Node>::walk(int, int, CB&&) [with CB = Segments::erase(int, int)::<lambda(MinCounter&, int, int)>; Node = MinCounter]'
fish2.cpp:200:8: required from here
fish2.cpp:27:56: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
344 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
15 ms |
584 KB |
Output is correct |
6 |
Correct |
8 ms |
348 KB |
Output is correct |
7 |
Correct |
13 ms |
596 KB |
Output is correct |
8 |
Correct |
12 ms |
588 KB |
Output is correct |
9 |
Correct |
8 ms |
576 KB |
Output is correct |
10 |
Correct |
3 ms |
348 KB |
Output is correct |
11 |
Correct |
2 ms |
348 KB |
Output is correct |
12 |
Correct |
7 ms |
348 KB |
Output is correct |
13 |
Correct |
6 ms |
348 KB |
Output is correct |
14 |
Correct |
5 ms |
344 KB |
Output is correct |
15 |
Correct |
7 ms |
532 KB |
Output is correct |
16 |
Correct |
4 ms |
576 KB |
Output is correct |
17 |
Correct |
5 ms |
348 KB |
Output is correct |
18 |
Correct |
5 ms |
348 KB |
Output is correct |
19 |
Correct |
4 ms |
344 KB |
Output is correct |
20 |
Correct |
3 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
613 ms |
23732 KB |
Output is correct |
3 |
Correct |
1274 ms |
22452 KB |
Output is correct |
4 |
Correct |
477 ms |
22492 KB |
Output is correct |
5 |
Correct |
1149 ms |
23988 KB |
Output is correct |
6 |
Correct |
105 ms |
7832 KB |
Output is correct |
7 |
Correct |
919 ms |
10620 KB |
Output is correct |
8 |
Correct |
106 ms |
7948 KB |
Output is correct |
9 |
Correct |
963 ms |
11092 KB |
Output is correct |
10 |
Correct |
547 ms |
14392 KB |
Output is correct |
11 |
Correct |
838 ms |
22448 KB |
Output is correct |
12 |
Correct |
218 ms |
8720 KB |
Output is correct |
13 |
Correct |
248 ms |
8900 KB |
Output is correct |
14 |
Correct |
197 ms |
9360 KB |
Output is correct |
15 |
Correct |
187 ms |
9468 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
344 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
15 ms |
584 KB |
Output is correct |
6 |
Correct |
8 ms |
348 KB |
Output is correct |
7 |
Correct |
13 ms |
596 KB |
Output is correct |
8 |
Correct |
12 ms |
588 KB |
Output is correct |
9 |
Correct |
8 ms |
576 KB |
Output is correct |
10 |
Correct |
3 ms |
348 KB |
Output is correct |
11 |
Correct |
2 ms |
348 KB |
Output is correct |
12 |
Correct |
7 ms |
348 KB |
Output is correct |
13 |
Correct |
6 ms |
348 KB |
Output is correct |
14 |
Correct |
5 ms |
344 KB |
Output is correct |
15 |
Correct |
7 ms |
532 KB |
Output is correct |
16 |
Correct |
4 ms |
576 KB |
Output is correct |
17 |
Correct |
5 ms |
348 KB |
Output is correct |
18 |
Correct |
5 ms |
348 KB |
Output is correct |
19 |
Correct |
4 ms |
344 KB |
Output is correct |
20 |
Correct |
3 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
344 KB |
Output is correct |
22 |
Correct |
613 ms |
23732 KB |
Output is correct |
23 |
Correct |
1274 ms |
22452 KB |
Output is correct |
24 |
Correct |
477 ms |
22492 KB |
Output is correct |
25 |
Correct |
1149 ms |
23988 KB |
Output is correct |
26 |
Correct |
105 ms |
7832 KB |
Output is correct |
27 |
Correct |
919 ms |
10620 KB |
Output is correct |
28 |
Correct |
106 ms |
7948 KB |
Output is correct |
29 |
Correct |
963 ms |
11092 KB |
Output is correct |
30 |
Correct |
547 ms |
14392 KB |
Output is correct |
31 |
Correct |
838 ms |
22448 KB |
Output is correct |
32 |
Correct |
218 ms |
8720 KB |
Output is correct |
33 |
Correct |
248 ms |
8900 KB |
Output is correct |
34 |
Correct |
197 ms |
9360 KB |
Output is correct |
35 |
Correct |
187 ms |
9468 KB |
Output is correct |
36 |
Correct |
524 ms |
23252 KB |
Output is correct |
37 |
Correct |
1334 ms |
22944 KB |
Output is correct |
38 |
Correct |
1190 ms |
22564 KB |
Output is correct |
39 |
Correct |
541 ms |
23308 KB |
Output is correct |
40 |
Correct |
1087 ms |
22952 KB |
Output is correct |
41 |
Correct |
112 ms |
7852 KB |
Output is correct |
42 |
Correct |
110 ms |
7880 KB |
Output is correct |
43 |
Correct |
925 ms |
10460 KB |
Output is correct |
44 |
Correct |
955 ms |
10248 KB |
Output is correct |
45 |
Correct |
625 ms |
15220 KB |
Output is correct |
46 |
Correct |
585 ms |
14136 KB |
Output is correct |
47 |
Correct |
700 ms |
15788 KB |
Output is correct |
48 |
Correct |
283 ms |
9180 KB |
Output is correct |
49 |
Correct |
237 ms |
8904 KB |
Output is correct |
50 |
Correct |
200 ms |
9400 KB |
Output is correct |
51 |
Correct |
208 ms |
9544 KB |
Output is correct |
52 |
Correct |
197 ms |
9468 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
613 ms |
23732 KB |
Output is correct |
3 |
Correct |
1274 ms |
22452 KB |
Output is correct |
4 |
Correct |
477 ms |
22492 KB |
Output is correct |
5 |
Correct |
1149 ms |
23988 KB |
Output is correct |
6 |
Correct |
105 ms |
7832 KB |
Output is correct |
7 |
Correct |
919 ms |
10620 KB |
Output is correct |
8 |
Correct |
106 ms |
7948 KB |
Output is correct |
9 |
Correct |
963 ms |
11092 KB |
Output is correct |
10 |
Correct |
547 ms |
14392 KB |
Output is correct |
11 |
Correct |
838 ms |
22448 KB |
Output is correct |
12 |
Correct |
218 ms |
8720 KB |
Output is correct |
13 |
Correct |
248 ms |
8900 KB |
Output is correct |
14 |
Correct |
197 ms |
9360 KB |
Output is correct |
15 |
Correct |
187 ms |
9468 KB |
Output is correct |
16 |
Correct |
1 ms |
344 KB |
Output is correct |
17 |
Correct |
2927 ms |
23468 KB |
Output is correct |
18 |
Correct |
1515 ms |
23500 KB |
Output is correct |
19 |
Correct |
3031 ms |
24068 KB |
Output is correct |
20 |
Correct |
3097 ms |
24020 KB |
Output is correct |
21 |
Correct |
2606 ms |
23420 KB |
Output is correct |
22 |
Correct |
1539 ms |
23064 KB |
Output is correct |
23 |
Correct |
2534 ms |
23472 KB |
Output is correct |
24 |
Correct |
2983 ms |
25540 KB |
Output is correct |
25 |
Correct |
2708 ms |
24468 KB |
Output is correct |
26 |
Correct |
2951 ms |
25288 KB |
Output is correct |
27 |
Correct |
428 ms |
8712 KB |
Output is correct |
28 |
Correct |
422 ms |
8652 KB |
Output is correct |
29 |
Correct |
427 ms |
8440 KB |
Output is correct |
30 |
Correct |
2577 ms |
15304 KB |
Output is correct |
31 |
Correct |
2778 ms |
14656 KB |
Output is correct |
32 |
Correct |
1704 ms |
22816 KB |
Output is correct |
33 |
Correct |
1000 ms |
15152 KB |
Output is correct |
34 |
Correct |
1686 ms |
22156 KB |
Output is correct |
35 |
Correct |
1410 ms |
15064 KB |
Output is correct |
36 |
Correct |
1175 ms |
15660 KB |
Output is correct |
37 |
Correct |
689 ms |
9152 KB |
Output is correct |
38 |
Correct |
671 ms |
9520 KB |
Output is correct |
39 |
Correct |
669 ms |
10140 KB |
Output is correct |
40 |
Correct |
617 ms |
10244 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
613 ms |
23732 KB |
Output is correct |
3 |
Correct |
1274 ms |
22452 KB |
Output is correct |
4 |
Correct |
477 ms |
22492 KB |
Output is correct |
5 |
Correct |
1149 ms |
23988 KB |
Output is correct |
6 |
Correct |
105 ms |
7832 KB |
Output is correct |
7 |
Correct |
919 ms |
10620 KB |
Output is correct |
8 |
Correct |
106 ms |
7948 KB |
Output is correct |
9 |
Correct |
963 ms |
11092 KB |
Output is correct |
10 |
Correct |
547 ms |
14392 KB |
Output is correct |
11 |
Correct |
838 ms |
22448 KB |
Output is correct |
12 |
Correct |
218 ms |
8720 KB |
Output is correct |
13 |
Correct |
248 ms |
8900 KB |
Output is correct |
14 |
Correct |
197 ms |
9360 KB |
Output is correct |
15 |
Correct |
187 ms |
9468 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
3680 ms |
23196 KB |
Output is correct |
18 |
Correct |
3135 ms |
24132 KB |
Output is correct |
19 |
Execution timed out |
4030 ms |
24060 KB |
Time limit exceeded |
20 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
344 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
15 ms |
584 KB |
Output is correct |
6 |
Correct |
8 ms |
348 KB |
Output is correct |
7 |
Correct |
13 ms |
596 KB |
Output is correct |
8 |
Correct |
12 ms |
588 KB |
Output is correct |
9 |
Correct |
8 ms |
576 KB |
Output is correct |
10 |
Correct |
3 ms |
348 KB |
Output is correct |
11 |
Correct |
2 ms |
348 KB |
Output is correct |
12 |
Correct |
7 ms |
348 KB |
Output is correct |
13 |
Correct |
6 ms |
348 KB |
Output is correct |
14 |
Correct |
5 ms |
344 KB |
Output is correct |
15 |
Correct |
7 ms |
532 KB |
Output is correct |
16 |
Correct |
4 ms |
576 KB |
Output is correct |
17 |
Correct |
5 ms |
348 KB |
Output is correct |
18 |
Correct |
5 ms |
348 KB |
Output is correct |
19 |
Correct |
4 ms |
344 KB |
Output is correct |
20 |
Correct |
3 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
344 KB |
Output is correct |
22 |
Correct |
613 ms |
23732 KB |
Output is correct |
23 |
Correct |
1274 ms |
22452 KB |
Output is correct |
24 |
Correct |
477 ms |
22492 KB |
Output is correct |
25 |
Correct |
1149 ms |
23988 KB |
Output is correct |
26 |
Correct |
105 ms |
7832 KB |
Output is correct |
27 |
Correct |
919 ms |
10620 KB |
Output is correct |
28 |
Correct |
106 ms |
7948 KB |
Output is correct |
29 |
Correct |
963 ms |
11092 KB |
Output is correct |
30 |
Correct |
547 ms |
14392 KB |
Output is correct |
31 |
Correct |
838 ms |
22448 KB |
Output is correct |
32 |
Correct |
218 ms |
8720 KB |
Output is correct |
33 |
Correct |
248 ms |
8900 KB |
Output is correct |
34 |
Correct |
197 ms |
9360 KB |
Output is correct |
35 |
Correct |
187 ms |
9468 KB |
Output is correct |
36 |
Correct |
524 ms |
23252 KB |
Output is correct |
37 |
Correct |
1334 ms |
22944 KB |
Output is correct |
38 |
Correct |
1190 ms |
22564 KB |
Output is correct |
39 |
Correct |
541 ms |
23308 KB |
Output is correct |
40 |
Correct |
1087 ms |
22952 KB |
Output is correct |
41 |
Correct |
112 ms |
7852 KB |
Output is correct |
42 |
Correct |
110 ms |
7880 KB |
Output is correct |
43 |
Correct |
925 ms |
10460 KB |
Output is correct |
44 |
Correct |
955 ms |
10248 KB |
Output is correct |
45 |
Correct |
625 ms |
15220 KB |
Output is correct |
46 |
Correct |
585 ms |
14136 KB |
Output is correct |
47 |
Correct |
700 ms |
15788 KB |
Output is correct |
48 |
Correct |
283 ms |
9180 KB |
Output is correct |
49 |
Correct |
237 ms |
8904 KB |
Output is correct |
50 |
Correct |
200 ms |
9400 KB |
Output is correct |
51 |
Correct |
208 ms |
9544 KB |
Output is correct |
52 |
Correct |
197 ms |
9468 KB |
Output is correct |
53 |
Correct |
1 ms |
344 KB |
Output is correct |
54 |
Correct |
2927 ms |
23468 KB |
Output is correct |
55 |
Correct |
1515 ms |
23500 KB |
Output is correct |
56 |
Correct |
3031 ms |
24068 KB |
Output is correct |
57 |
Correct |
3097 ms |
24020 KB |
Output is correct |
58 |
Correct |
2606 ms |
23420 KB |
Output is correct |
59 |
Correct |
1539 ms |
23064 KB |
Output is correct |
60 |
Correct |
2534 ms |
23472 KB |
Output is correct |
61 |
Correct |
2983 ms |
25540 KB |
Output is correct |
62 |
Correct |
2708 ms |
24468 KB |
Output is correct |
63 |
Correct |
2951 ms |
25288 KB |
Output is correct |
64 |
Correct |
428 ms |
8712 KB |
Output is correct |
65 |
Correct |
422 ms |
8652 KB |
Output is correct |
66 |
Correct |
427 ms |
8440 KB |
Output is correct |
67 |
Correct |
2577 ms |
15304 KB |
Output is correct |
68 |
Correct |
2778 ms |
14656 KB |
Output is correct |
69 |
Correct |
1704 ms |
22816 KB |
Output is correct |
70 |
Correct |
1000 ms |
15152 KB |
Output is correct |
71 |
Correct |
1686 ms |
22156 KB |
Output is correct |
72 |
Correct |
1410 ms |
15064 KB |
Output is correct |
73 |
Correct |
1175 ms |
15660 KB |
Output is correct |
74 |
Correct |
689 ms |
9152 KB |
Output is correct |
75 |
Correct |
671 ms |
9520 KB |
Output is correct |
76 |
Correct |
669 ms |
10140 KB |
Output is correct |
77 |
Correct |
617 ms |
10244 KB |
Output is correct |
78 |
Correct |
0 ms |
348 KB |
Output is correct |
79 |
Correct |
3680 ms |
23196 KB |
Output is correct |
80 |
Correct |
3135 ms |
24132 KB |
Output is correct |
81 |
Execution timed out |
4030 ms |
24060 KB |
Time limit exceeded |
82 |
Halted |
0 ms |
0 KB |
- |