#include <bits/stdc++.h>
using namespace std;
#define u_map unordered_map
#define u_set unordered_set
#define u_multiset unordered_multiset
using ll = long long;
using vvi = vector<vector<int>>;
using vi = vector<int>;
using vvll = vector<vector<long long>>;
using vll = vector<long long>;
using vd = vector<double>;
using vvd = vector<vector<double>>;
using pii = pair<int, int>;
using vpii = vector<pair<int, int>>;
template<typename C> struct rge{C l, r;};
template<typename C> rge<C> range(C i, C j) { return rge<C>{i, j}; }
template<typename C> ostream& operator<<(ostream &os, rge<C> &r) { os << '{'; for(auto it = r.l; it != r.r; it++) os << "," + (it == r.l) << *it; os << '}'; return os; }
template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p) { return os << '{' << p.first << "," << p.second << '}'; }
template<typename T_container, typename T = typename enable_if<!is_same<T_container, string>::value, typename T_container::value_type>::type> ostream& operator<<(ostream &os, const T_container &v) { os << '{'; string sep; for (const T &x : v) os << sep << x, sep = ","; return os << '}'; }
void dbg_out() { cerr << ']' << endl; }
template<typename A> void dbg_out(A H) { cerr << H; dbg_out(); }
template<typename A, typename B, typename... C> void dbg_out(A H, B G, C... T) { cerr << H << ","; dbg_out(G, T...); }
#ifdef DEBUG
#define debug(...) cerr << "[" << #__VA_ARGS__ << "] = [", dbg_out(__VA_ARGS__)
#else
#define debug(...)
#endif
namespace segtree {
/**
* Range set
* Range query: longest sequence of same numbers
*/
const ll INF = 4'234'567'890'123'456'789;
struct QueryOut {
int ans;
ll lnum, rnum;
int llen, rlen;
bool same;
int len;
QueryOut(int ans, ll lnum, int llen, ll rnum, int rlen, bool same, int len) : ans(ans), lnum(lnum), llen(llen), rnum(rnum), rlen(rlen), same(same), len(len) {}
QueryOut() {len = 0;}
};
QueryOut combine(QueryOut x, QueryOut y) {
if(x.len == 0) return y;
if(y.len == 0) return x;
int new_ans = max({x.ans, y.ans});
if(x.rnum == y.lnum) new_ans = max(new_ans, x.rlen + y.llen);
return QueryOut(
new_ans,
x.lnum,
(x.same && x.rnum == y.lnum) ? x.llen + y.llen : x.llen,
y.rnum,
(y.same && x.rnum == y.lnum) ? y.rlen + x.rlen : y.rlen,
x.same && y.same && x.rnum == y.lnum,
x.len + y.len
);
}
struct Node {
Node *l, *r;
int lo, hi;
ll mset = -INF;
ll madd = 0;
QueryOut qout;
Node(int lo, int hi, vll &v): lo(lo), hi(hi) {
if(lo + 1 == hi){
// same = true;
// lnum = rnum = v[lo];
// llen = rlen = 1;
qout = QueryOut(1, v[lo], 1, v[lo], 1, true, 1);
} else {
int mid = lo + (hi - lo) / 2;
l = new Node(lo, mid, v);
r = new Node(mid, hi, v);
update();
}
}
void update() {
qout = combine(l->qout, r->qout);
}
void push() {
if(mset != -INF) {
l->set(lo, hi, mset);
r->set(lo, hi, mset);
mset = -INF;
} else if(madd) {
l->add(lo, hi, madd);
r->add(lo, hi, madd);
madd = 0;
}
}
void set(int left, int right, ll val) {
assert(val != -INF);
if(right <= lo || hi <= left) return;
if(left <= lo && hi <= right) {
mset = val;
madd = 0;
qout = QueryOut(hi - lo, val, hi - lo, val, hi - lo, true, hi - lo);
} else {
push();
l->set(left, right, val);
r->set(left, right, val);
update();
}
}
void add(int left, int right, ll val) {
if(right <= lo || hi <= left) return;
if(left <= lo && hi <= right) {
if(mset != -INF) {
mset += val;
} else {
madd += val;
}
qout = QueryOut(qout.ans, qout.lnum + val, qout.llen, qout.rnum + val, qout.rlen, qout.same, hi - lo);
} else {
push();
l->add(left, right, val);
r->add(left, right, val);
update();
}
}
QueryOut query(int left, int right) {
if(right <= lo || hi <= left) return QueryOut(-1, -1, -1, -1, -1, false, 0); // dummy
if(left <= lo && hi <= right){
return qout;
} else {
push();
return combine(l->query(left, right), r->query(left, right));
}
}
};
}
namespace lichao {
const ll INF = 2'000'000'000'000'000'005;
struct Line{
ll m, c;
Line(ll _m, ll _c) : m(_m), c(_c) {}
ll eval(ll x){
return m * x + c;
}
bool nonzero() {
return m != 0 || c != 0;
}
};
Line operator+(Line &a, Line &b) { return Line(a.m + b.m, a.c + b.c); }
ostream& operator<<(ostream &os, Line x) { return os << "{m=" << x.m << ", c=" << x.c << '}'; }
struct Node {
Node *l = 0, *r = 0;
int lo, hi; // [lo, hi)
Line line = Line(0, INF);
Line madd = Line(0, 0);
bool mwipe = false;
Node(int lo, int hi): lo(lo), hi(hi) {}
void push() {
assert(lo + 1 < hi);
if(!l) {
int mid = lo + (hi - lo) / 2;
l = new Node(lo, mid);
r = new Node(mid, hi);
}
if(madd.nonzero()) {
l->add_affine(lo, hi, madd);
r->add_affine(lo, hi, madd);
madd = Line(0, 0);
}
if(mwipe) {
l->wipe(lo, hi);
r->wipe(lo, hi);
mwipe = false;
}
}
// Reset all lines on [left, right).
void wipe(int left, int right) {
if(right <= lo || hi <= left) return;
if(left <= lo && hi <= right) {
madd = Line(0, 0);
mwipe = true;
line = Line(0, INF);
} else {
push();
l->insert_line(lo, hi, line);
r->insert_line(lo, hi, line);
line = Line(0, INF);
l->wipe(left, right);
r->wipe(left, right);
}
}
// Insert new_line on [left, right). O(log^2 n) / O(log n) if left=0, right=n.
void insert_line(int left, int right, Line new_line) {
if(right <= lo || hi <= left) return;
if(left <= lo && hi <= right) {
bool ldiff = line.eval(lo) <= new_line.eval(lo);
bool rdiff = line.eval(hi - 1) <= new_line.eval(hi - 1);
if(ldiff && rdiff) return;
if(!ldiff && !rdiff){
line = new_line;
return;
}
}
push();
l->insert_line(left, right, new_line);
r->insert_line(left, right, new_line);
}
// Add the value of the line to everything in [left, right). O(log^2 n).
void add_affine(int left, int right, Line add) {
if(right <= lo || hi <= left) return;
if(left <= lo && hi <= right) {
line = line + add;
madd = madd + add;
} else {
push();
l->insert_line(lo, hi, line);
r->insert_line(lo, hi, line);
line = Line(0, INF);
l->add_affine(left, right, add);
r->add_affine(left, right, add);
}
}
// Get min at x. O(log n).
ll query(int x){
assert(lo <= x && x < hi);
if(!l){
return line.eval(x);
}
push();
ll rec;
int mid = lo + (hi - lo) / 2;
if(x >= mid) {
rec = r->query(x);
} else {
rec = l->query(x);
}
return min(line.eval(x), rec);
}
void print_state(string prefix=""){
#ifdef DEBUG
cerr << prefix << "Node" << endl;
cerr << prefix << lo << ' ' << hi << endl;
cerr << prefix << "line: " << line << " madd: " << madd << " mwipe: " << mwipe << endl;
if(l) {
cerr << prefix << "Left:" << endl;
l->print_state(prefix + " | ");
cerr << prefix << "Right:" << endl;
r->print_state(prefix + " | ");
}
#else
#endif
}
};
}
void solve(){
int n, q;
cin >> n >> q;
vi v(n);
for(int i = 0; i < n; i++) cin >> v[i];
vll diff(n-1);
for(int i = 0; i < n-1; i++) {
diff[i] = v[i+1] - v[i];
}
// breaks at n=1 for some reason lmao
if(n == 1){
while(q--){
int t;
cin >> t;
if(t == 1 || t == 2){
int l, r; ll s, c;
cin >> l >> r >> s >> c;
} else {
int l, r;
cin >> l >> r;
cout << 1 << endl;
}
}
return;
}
lichao::Node* lct = new lichao::Node(0, n);
for(int i = 0; i < n; i++){
lct->insert_line(i, i+1, lichao::Line(0, v[i]));
}
segtree::Node* st = new segtree::Node(0, n-1, diff);
while(q--){
int t;
cin >> t;
if(t == 1){
int l, r; ll s, c;
cin >> l >> r >> s >> c;
l--;
lichao::Line ln = lichao::Line(c, s - c * l);
debug("add", ln, l, r);
lct->add_affine(l, r, ln);
st->add(l, r, c);
// debug(lct->query(r) - lct->query(r-1));
if(l > 0) {
st->set(l-1, l, lct->query(l) - lct->query(l-1));
}
if(r < n) {
st->set(r-1, r, lct->query(r) - lct->query(r-1));
}
lct->print_state();
}else if(t == 2){
int l, r; ll s, c;
cin >> l >> r >> s >> c;
l--;
lichao::Line ln = lichao::Line(c, s - c * l);
debug("replace", ln, l, r);
lct->wipe(l, r);
debug("wiping done");
lct->print_state();
lct->insert_line(l, r, ln);
st->set(l, r, c);
if(l > 0) {
st->set(l-1, l, lct->query(l) - lct->query(l-1));
}
if(r < n) {
debug(lct->query(r), lct->query(r-1));
st->set(r-1, r, lct->query(r) - lct->query(r-1));
}
lct->print_state();
}else{
int l, r;
cin >> l >> r;
l--;
if(l + 1 == r){
cout << 1 << endl;
} else {
segtree::QueryOut qout = st->query(l, r-1);
debug(qout.ans, qout.lnum, qout.llen, qout.rnum, qout.rlen, qout.same);
cout << qout.ans + 1 << endl;
}
}
}
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
solve();
return 0;
}
Compilation message
Progression.cpp: In constructor 'segtree::QueryOut::QueryOut(int, ll, int, ll, int, bool, int)':
Progression.cpp:44:13: warning: 'segtree::QueryOut::llen' will be initialized after [-Wreorder]
44 | int llen, rlen;
| ^~~~
Progression.cpp:43:18: warning: 'll segtree::QueryOut::rnum' [-Wreorder]
43 | ll lnum, rnum;
| ^~~~
Progression.cpp:47:9: warning: when initialized here [-Wreorder]
47 | QueryOut(int ans, ll lnum, int llen, ll rnum, int rlen, bool same, int len) : ans(ans), lnum(lnum), llen(llen), rnum(rnum), rlen(rlen), same(same), len(len) {}
| ^~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
373 ms |
115656 KB |
Output is correct |
2 |
Correct |
227 ms |
3424 KB |
Output is correct |
3 |
Correct |
220 ms |
3528 KB |
Output is correct |
4 |
Correct |
219 ms |
3544 KB |
Output is correct |
5 |
Correct |
223 ms |
3540 KB |
Output is correct |
6 |
Correct |
246 ms |
3656 KB |
Output is correct |
7 |
Correct |
213 ms |
3524 KB |
Output is correct |
8 |
Correct |
1 ms |
212 KB |
Output is correct |
9 |
Correct |
1 ms |
212 KB |
Output is correct |
10 |
Correct |
1 ms |
332 KB |
Output is correct |
11 |
Correct |
386 ms |
115780 KB |
Output is correct |
12 |
Correct |
374 ms |
115740 KB |
Output is correct |
13 |
Correct |
384 ms |
115900 KB |
Output is correct |
14 |
Correct |
390 ms |
116064 KB |
Output is correct |
15 |
Correct |
399 ms |
115896 KB |
Output is correct |
16 |
Correct |
394 ms |
115644 KB |
Output is correct |
17 |
Correct |
372 ms |
115804 KB |
Output is correct |
18 |
Correct |
403 ms |
115708 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
596 KB |
Output is correct |
2 |
Correct |
2 ms |
340 KB |
Output is correct |
3 |
Correct |
2 ms |
328 KB |
Output is correct |
4 |
Correct |
2 ms |
340 KB |
Output is correct |
5 |
Correct |
1 ms |
340 KB |
Output is correct |
6 |
Correct |
1 ms |
332 KB |
Output is correct |
7 |
Correct |
2 ms |
212 KB |
Output is correct |
8 |
Correct |
4 ms |
592 KB |
Output is correct |
9 |
Correct |
3 ms |
600 KB |
Output is correct |
10 |
Correct |
4 ms |
596 KB |
Output is correct |
11 |
Correct |
4 ms |
596 KB |
Output is correct |
12 |
Correct |
4 ms |
596 KB |
Output is correct |
13 |
Correct |
3 ms |
596 KB |
Output is correct |
14 |
Correct |
5 ms |
584 KB |
Output is correct |
15 |
Correct |
5 ms |
584 KB |
Output is correct |
16 |
Correct |
5 ms |
596 KB |
Output is correct |
17 |
Correct |
4 ms |
596 KB |
Output is correct |
18 |
Correct |
4 ms |
588 KB |
Output is correct |
19 |
Correct |
2 ms |
212 KB |
Output is correct |
20 |
Correct |
2 ms |
212 KB |
Output is correct |
21 |
Correct |
2 ms |
324 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
828 ms |
110040 KB |
Output is correct |
2 |
Correct |
412 ms |
2716 KB |
Output is correct |
3 |
Correct |
416 ms |
2620 KB |
Output is correct |
4 |
Correct |
412 ms |
2764 KB |
Output is correct |
5 |
Correct |
429 ms |
2808 KB |
Output is correct |
6 |
Correct |
441 ms |
2900 KB |
Output is correct |
7 |
Correct |
426 ms |
2876 KB |
Output is correct |
8 |
Correct |
2 ms |
212 KB |
Output is correct |
9 |
Correct |
2 ms |
212 KB |
Output is correct |
10 |
Correct |
2 ms |
324 KB |
Output is correct |
11 |
Correct |
863 ms |
112752 KB |
Output is correct |
12 |
Correct |
842 ms |
114220 KB |
Output is correct |
13 |
Correct |
859 ms |
112996 KB |
Output is correct |
14 |
Correct |
966 ms |
112988 KB |
Output is correct |
15 |
Correct |
871 ms |
114224 KB |
Output is correct |
16 |
Correct |
886 ms |
114736 KB |
Output is correct |
17 |
Correct |
850 ms |
114764 KB |
Output is correct |
18 |
Correct |
924 ms |
114912 KB |
Output is correct |
19 |
Correct |
787 ms |
114124 KB |
Output is correct |
20 |
Correct |
821 ms |
114204 KB |
Output is correct |
21 |
Correct |
812 ms |
114052 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1601 ms |
108768 KB |
Output is correct |
2 |
Correct |
319 ms |
1844 KB |
Output is correct |
3 |
Correct |
336 ms |
1640 KB |
Output is correct |
4 |
Correct |
327 ms |
1740 KB |
Output is correct |
5 |
Correct |
374 ms |
1756 KB |
Output is correct |
6 |
Correct |
382 ms |
1796 KB |
Output is correct |
7 |
Correct |
331 ms |
1684 KB |
Output is correct |
8 |
Correct |
1 ms |
220 KB |
Output is correct |
9 |
Correct |
2 ms |
212 KB |
Output is correct |
10 |
Correct |
1 ms |
328 KB |
Output is correct |
11 |
Correct |
1418 ms |
113760 KB |
Output is correct |
12 |
Correct |
1525 ms |
116932 KB |
Output is correct |
13 |
Correct |
1499 ms |
113712 KB |
Output is correct |
14 |
Correct |
1496 ms |
113652 KB |
Output is correct |
15 |
Correct |
1464 ms |
116860 KB |
Output is correct |
16 |
Correct |
1515 ms |
117052 KB |
Output is correct |
17 |
Correct |
1483 ms |
117080 KB |
Output is correct |
18 |
Correct |
1503 ms |
117172 KB |
Output is correct |
19 |
Correct |
1521 ms |
116980 KB |
Output is correct |
20 |
Correct |
1520 ms |
116976 KB |
Output is correct |
21 |
Correct |
1512 ms |
116932 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
828 ms |
110040 KB |
Output is correct |
2 |
Correct |
412 ms |
2716 KB |
Output is correct |
3 |
Correct |
416 ms |
2620 KB |
Output is correct |
4 |
Correct |
412 ms |
2764 KB |
Output is correct |
5 |
Correct |
429 ms |
2808 KB |
Output is correct |
6 |
Correct |
441 ms |
2900 KB |
Output is correct |
7 |
Correct |
426 ms |
2876 KB |
Output is correct |
8 |
Correct |
2 ms |
212 KB |
Output is correct |
9 |
Correct |
2 ms |
212 KB |
Output is correct |
10 |
Correct |
2 ms |
324 KB |
Output is correct |
11 |
Correct |
863 ms |
112752 KB |
Output is correct |
12 |
Correct |
842 ms |
114220 KB |
Output is correct |
13 |
Correct |
859 ms |
112996 KB |
Output is correct |
14 |
Correct |
966 ms |
112988 KB |
Output is correct |
15 |
Correct |
871 ms |
114224 KB |
Output is correct |
16 |
Correct |
886 ms |
114736 KB |
Output is correct |
17 |
Correct |
850 ms |
114764 KB |
Output is correct |
18 |
Correct |
924 ms |
114912 KB |
Output is correct |
19 |
Correct |
787 ms |
114124 KB |
Output is correct |
20 |
Correct |
821 ms |
114204 KB |
Output is correct |
21 |
Correct |
812 ms |
114052 KB |
Output is correct |
22 |
Correct |
1763 ms |
116524 KB |
Output is correct |
23 |
Correct |
371 ms |
3532 KB |
Output is correct |
24 |
Correct |
359 ms |
3604 KB |
Output is correct |
25 |
Correct |
393 ms |
3496 KB |
Output is correct |
26 |
Correct |
392 ms |
3500 KB |
Output is correct |
27 |
Correct |
419 ms |
3576 KB |
Output is correct |
28 |
Correct |
384 ms |
3472 KB |
Output is correct |
29 |
Correct |
2 ms |
220 KB |
Output is correct |
30 |
Correct |
1 ms |
212 KB |
Output is correct |
31 |
Correct |
2 ms |
340 KB |
Output is correct |
32 |
Correct |
1828 ms |
113772 KB |
Output is correct |
33 |
Correct |
1764 ms |
116372 KB |
Output is correct |
34 |
Correct |
1778 ms |
113744 KB |
Output is correct |
35 |
Correct |
1782 ms |
113812 KB |
Output is correct |
36 |
Correct |
1390 ms |
113608 KB |
Output is correct |
37 |
Correct |
1471 ms |
113516 KB |
Output is correct |
38 |
Correct |
1561 ms |
113532 KB |
Output is correct |
39 |
Correct |
1807 ms |
116592 KB |
Output is correct |
40 |
Correct |
1840 ms |
116580 KB |
Output is correct |
41 |
Correct |
1752 ms |
116780 KB |
Output is correct |
42 |
Correct |
1820 ms |
116460 KB |
Output is correct |
43 |
Correct |
1784 ms |
116540 KB |
Output is correct |
44 |
Correct |
1696 ms |
116408 KB |
Output is correct |
45 |
Correct |
1788 ms |
116372 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
373 ms |
115656 KB |
Output is correct |
2 |
Correct |
227 ms |
3424 KB |
Output is correct |
3 |
Correct |
220 ms |
3528 KB |
Output is correct |
4 |
Correct |
219 ms |
3544 KB |
Output is correct |
5 |
Correct |
223 ms |
3540 KB |
Output is correct |
6 |
Correct |
246 ms |
3656 KB |
Output is correct |
7 |
Correct |
213 ms |
3524 KB |
Output is correct |
8 |
Correct |
1 ms |
212 KB |
Output is correct |
9 |
Correct |
1 ms |
212 KB |
Output is correct |
10 |
Correct |
1 ms |
332 KB |
Output is correct |
11 |
Correct |
386 ms |
115780 KB |
Output is correct |
12 |
Correct |
374 ms |
115740 KB |
Output is correct |
13 |
Correct |
384 ms |
115900 KB |
Output is correct |
14 |
Correct |
390 ms |
116064 KB |
Output is correct |
15 |
Correct |
399 ms |
115896 KB |
Output is correct |
16 |
Correct |
394 ms |
115644 KB |
Output is correct |
17 |
Correct |
372 ms |
115804 KB |
Output is correct |
18 |
Correct |
403 ms |
115708 KB |
Output is correct |
19 |
Correct |
4 ms |
596 KB |
Output is correct |
20 |
Correct |
2 ms |
340 KB |
Output is correct |
21 |
Correct |
2 ms |
328 KB |
Output is correct |
22 |
Correct |
2 ms |
340 KB |
Output is correct |
23 |
Correct |
1 ms |
340 KB |
Output is correct |
24 |
Correct |
1 ms |
332 KB |
Output is correct |
25 |
Correct |
2 ms |
212 KB |
Output is correct |
26 |
Correct |
4 ms |
592 KB |
Output is correct |
27 |
Correct |
3 ms |
600 KB |
Output is correct |
28 |
Correct |
4 ms |
596 KB |
Output is correct |
29 |
Correct |
4 ms |
596 KB |
Output is correct |
30 |
Correct |
4 ms |
596 KB |
Output is correct |
31 |
Correct |
3 ms |
596 KB |
Output is correct |
32 |
Correct |
5 ms |
584 KB |
Output is correct |
33 |
Correct |
5 ms |
584 KB |
Output is correct |
34 |
Correct |
5 ms |
596 KB |
Output is correct |
35 |
Correct |
4 ms |
596 KB |
Output is correct |
36 |
Correct |
4 ms |
588 KB |
Output is correct |
37 |
Correct |
2 ms |
212 KB |
Output is correct |
38 |
Correct |
2 ms |
212 KB |
Output is correct |
39 |
Correct |
2 ms |
324 KB |
Output is correct |
40 |
Correct |
828 ms |
110040 KB |
Output is correct |
41 |
Correct |
412 ms |
2716 KB |
Output is correct |
42 |
Correct |
416 ms |
2620 KB |
Output is correct |
43 |
Correct |
412 ms |
2764 KB |
Output is correct |
44 |
Correct |
429 ms |
2808 KB |
Output is correct |
45 |
Correct |
441 ms |
2900 KB |
Output is correct |
46 |
Correct |
426 ms |
2876 KB |
Output is correct |
47 |
Correct |
2 ms |
212 KB |
Output is correct |
48 |
Correct |
2 ms |
212 KB |
Output is correct |
49 |
Correct |
2 ms |
324 KB |
Output is correct |
50 |
Correct |
863 ms |
112752 KB |
Output is correct |
51 |
Correct |
842 ms |
114220 KB |
Output is correct |
52 |
Correct |
859 ms |
112996 KB |
Output is correct |
53 |
Correct |
966 ms |
112988 KB |
Output is correct |
54 |
Correct |
871 ms |
114224 KB |
Output is correct |
55 |
Correct |
886 ms |
114736 KB |
Output is correct |
56 |
Correct |
850 ms |
114764 KB |
Output is correct |
57 |
Correct |
924 ms |
114912 KB |
Output is correct |
58 |
Correct |
787 ms |
114124 KB |
Output is correct |
59 |
Correct |
821 ms |
114204 KB |
Output is correct |
60 |
Correct |
812 ms |
114052 KB |
Output is correct |
61 |
Correct |
1601 ms |
108768 KB |
Output is correct |
62 |
Correct |
319 ms |
1844 KB |
Output is correct |
63 |
Correct |
336 ms |
1640 KB |
Output is correct |
64 |
Correct |
327 ms |
1740 KB |
Output is correct |
65 |
Correct |
374 ms |
1756 KB |
Output is correct |
66 |
Correct |
382 ms |
1796 KB |
Output is correct |
67 |
Correct |
331 ms |
1684 KB |
Output is correct |
68 |
Correct |
1 ms |
220 KB |
Output is correct |
69 |
Correct |
2 ms |
212 KB |
Output is correct |
70 |
Correct |
1 ms |
328 KB |
Output is correct |
71 |
Correct |
1418 ms |
113760 KB |
Output is correct |
72 |
Correct |
1525 ms |
116932 KB |
Output is correct |
73 |
Correct |
1499 ms |
113712 KB |
Output is correct |
74 |
Correct |
1496 ms |
113652 KB |
Output is correct |
75 |
Correct |
1464 ms |
116860 KB |
Output is correct |
76 |
Correct |
1515 ms |
117052 KB |
Output is correct |
77 |
Correct |
1483 ms |
117080 KB |
Output is correct |
78 |
Correct |
1503 ms |
117172 KB |
Output is correct |
79 |
Correct |
1521 ms |
116980 KB |
Output is correct |
80 |
Correct |
1520 ms |
116976 KB |
Output is correct |
81 |
Correct |
1512 ms |
116932 KB |
Output is correct |
82 |
Correct |
1763 ms |
116524 KB |
Output is correct |
83 |
Correct |
371 ms |
3532 KB |
Output is correct |
84 |
Correct |
359 ms |
3604 KB |
Output is correct |
85 |
Correct |
393 ms |
3496 KB |
Output is correct |
86 |
Correct |
392 ms |
3500 KB |
Output is correct |
87 |
Correct |
419 ms |
3576 KB |
Output is correct |
88 |
Correct |
384 ms |
3472 KB |
Output is correct |
89 |
Correct |
2 ms |
220 KB |
Output is correct |
90 |
Correct |
1 ms |
212 KB |
Output is correct |
91 |
Correct |
2 ms |
340 KB |
Output is correct |
92 |
Correct |
1828 ms |
113772 KB |
Output is correct |
93 |
Correct |
1764 ms |
116372 KB |
Output is correct |
94 |
Correct |
1778 ms |
113744 KB |
Output is correct |
95 |
Correct |
1782 ms |
113812 KB |
Output is correct |
96 |
Correct |
1390 ms |
113608 KB |
Output is correct |
97 |
Correct |
1471 ms |
113516 KB |
Output is correct |
98 |
Correct |
1561 ms |
113532 KB |
Output is correct |
99 |
Correct |
1807 ms |
116592 KB |
Output is correct |
100 |
Correct |
1840 ms |
116580 KB |
Output is correct |
101 |
Correct |
1752 ms |
116780 KB |
Output is correct |
102 |
Correct |
1820 ms |
116460 KB |
Output is correct |
103 |
Correct |
1784 ms |
116540 KB |
Output is correct |
104 |
Correct |
1696 ms |
116408 KB |
Output is correct |
105 |
Correct |
1788 ms |
116372 KB |
Output is correct |
106 |
Correct |
2171 ms |
117540 KB |
Output is correct |
107 |
Correct |
404 ms |
3700 KB |
Output is correct |
108 |
Correct |
389 ms |
3844 KB |
Output is correct |
109 |
Correct |
387 ms |
3712 KB |
Output is correct |
110 |
Correct |
1 ms |
340 KB |
Output is correct |
111 |
Correct |
1 ms |
340 KB |
Output is correct |
112 |
Correct |
1 ms |
340 KB |
Output is correct |
113 |
Correct |
1829 ms |
116648 KB |
Output is correct |
114 |
Correct |
1836 ms |
116552 KB |
Output is correct |
115 |
Correct |
1917 ms |
116440 KB |
Output is correct |
116 |
Correct |
1743 ms |
116432 KB |
Output is correct |
117 |
Correct |
2116 ms |
117396 KB |
Output is correct |
118 |
Correct |
1706 ms |
116748 KB |
Output is correct |
119 |
Correct |
1757 ms |
116668 KB |
Output is correct |
120 |
Correct |
938 ms |
115072 KB |
Output is correct |
121 |
Correct |
879 ms |
114924 KB |
Output is correct |
122 |
Correct |
933 ms |
115000 KB |
Output is correct |
123 |
Correct |
833 ms |
114128 KB |
Output is correct |
124 |
Correct |
825 ms |
114196 KB |
Output is correct |
125 |
Correct |
847 ms |
114252 KB |
Output is correct |
126 |
Correct |
2033 ms |
114192 KB |
Output is correct |
127 |
Correct |
2055 ms |
114080 KB |
Output is correct |
128 |
Correct |
2106 ms |
117428 KB |
Output is correct |
129 |
Correct |
2045 ms |
114276 KB |
Output is correct |
130 |
Correct |
1497 ms |
114412 KB |
Output is correct |
131 |
Correct |
1473 ms |
114096 KB |
Output is correct |
132 |
Correct |
1467 ms |
114080 KB |
Output is correct |
133 |
Correct |
2047 ms |
117640 KB |
Output is correct |
134 |
Correct |
2020 ms |
117384 KB |
Output is correct |
135 |
Correct |
2044 ms |
117536 KB |
Output is correct |
136 |
Correct |
381 ms |
3684 KB |
Output is correct |
137 |
Correct |
415 ms |
3736 KB |
Output is correct |
138 |
Correct |
388 ms |
3648 KB |
Output is correct |