Submission #738036

# Submission time Handle Problem Language Result Execution time Memory
738036 2023-05-08T05:51:25 Z resting Fish 2 (JOI22_fish2) C++17
100 / 100
2807 ms 60380 KB
#include <bits/stdc++.h>
using namespace std;

#define ll long long

const int mx = 1e5 + 5;
const ll inf = 1e15;


struct segtree2 {
    int l, r, cnt1 = 0, cnt2 = 0, lz = 0;
    segtree2* lc, * rc;
    segtree2* getmem();
    segtree2() : segtree2(-1, -1) {};
    segtree2(int l, int r) : l(l), r(r) {
        if (l == r)return;
        int m = (l + r) / 2;
        lc = getmem(); *lc = segtree2(l, m);
        rc = getmem(); *rc = segtree2(m + 1, r);
    }
    void fix() {
        if (l == r) {
            cnt1 = cnt2 = 0;
            if (lz == 1) cnt1 = 1;
            if (lz > 1) cnt2 = 1;
            return;
        }
        if (lz == 0) {
            cnt1 = lc->cnt1 + rc->cnt1;
            cnt2 = lc->cnt2 + rc->cnt2;
        } else if (lz == 1) {
            cnt2 = lc->cnt1 + rc->cnt1 + lc->cnt2 + rc->cnt2;
            cnt1 = (r - l + 1) - cnt2;
        } else {
            cnt1 = 0;
            cnt2 = (r - l + 1);
        }
    }
    void upd(int ql, int qr, int qv) {
        if (l > qr || r < ql) return;
        if (l >= ql && r <= qr) {
            lz += qv; fix();
            return;
        }
        lc->upd(ql, qr, qv);
        rc->upd(ql, qr, qv);
        fix();
    }
    int q(int ql, int qr, int qlz = 0) {
        if (l > qr || r < ql) return 0;
        lz += qlz; fix();
        int res = 0;
        if (l >= ql && r <= qr) {
            res = cnt2 + cnt1;
        } else {
            res = lc->q(ql, qr, lz) + rc->q(ql, qr, lz);
        }
        lz -= qlz; fix();
        return res;
    }
};
segtree2 mem2[mx * 4];
int memsz2 = 0;
segtree2* segtree2::getmem() { return &mem2[memsz2++]; }
segtree2 ac2;

struct segtree {
    int l, r, v, m;
    segtree* lc, * rc;
    segtree* getmem();
    vector<pair<int, int>> k;
    segtree() : segtree(-1, -1) {};
    segtree(int l, int r) : l(l), r(r) {
        m = (l + r) / 2;
        if (l == r)return;
        lc = getmem(); *lc = segtree(l, m);
        rc = getmem(); *rc = segtree(m + 1, r);
    }
    void del(int ql, int qr) {
        if (qr < m) { lc->del(ql, qr); return; }
        if (ql > m) { rc->del(ql, qr); return; }
        k.erase(find(k.begin(), k.end(), pair<int, int>(ql, qr)));
    }
    void add(int ql, int qr) {
        if (qr < m) { lc->add(ql, qr); return; }
        if (ql > m) { rc->add(ql, qr); return; }
        k.push_back({ ql, qr });
    }
    void q(int qi) {
        if (l == r)return;
        if (qi <= m)lc->q(qi);
        else rc->q(qi);
        if (qi <= m) {
            for (auto t = k.begin(); t != k.end();) {
                if (t->first <= qi) {
                    ac2.upd(t->first, t->second, -1);
                    k.erase(t);
                } else ++t;
            }
        } else {
            for (auto t = k.begin(); t != k.end(); ) {
                if (t->second >= qi) {
                    ac2.upd(t->first, t->second, -1);
                    k.erase(t);
                } else ++t;
            }
        }
    }
    void q2(int qi) {
        if (l == r)return;
        if (qi <= m)lc->q2(qi);
        else rc->q2(qi);
        if (qi <= m) {
            for (auto t = k.begin(); t != k.end();t++) {
                if (t->first <= qi) {
                    ac2.upd(t->first, t->second, -1);
                } 
            }
        } else {
            for (auto t = k.begin(); t != k.end(); t++) {
                if (t->second >= qi) {
                    ac2.upd(t->first, t->second, -1);
                } 
            }
        }
    }    void q3(int qi) {
        if (l == r)return;
        if (qi <= m)lc->q3(qi);
        else rc->q3(qi);
        if (qi <= m) {
            for (auto t = k.begin(); t != k.end();t++) {
                if (t->first <= qi) {
                    ac2.upd(t->first, t->second, 1);
                } 
            }
        } else {
            for (auto t = k.begin(); t != k.end(); t++) {
                if (t->second >= qi) {
                    ac2.upd(t->first, t->second, 1);
                } 
            }
        }
    }
};
segtree mem[mx * 4];
int memsz = 0;
segtree* segtree::getmem() { return &mem[memsz++]; }


struct segtree3 {
    int l, r; ll mx = 0, sm = 0;
    segtree3* lc, * rc;
    segtree3* getmem();
    segtree3() : segtree3(-1, -1) {};
    segtree3(int l, int r) : l(l), r(r) {
        if (l == r)return;
        int m = (l + r) / 2;
        lc = getmem(); *lc = segtree3(l, m);
        rc = getmem(); *rc = segtree3(m + 1, r);
    }
    void fix() {
        if (l == r) return;
        mx = max(lc->mx, rc->mx);
        sm = lc->sm + rc->sm;
    }
    void upd(int qi, ll qv) {
        if (l > qi || r < qi) return;
        if (l == r) {
            mx = qv; sm = qv;return;
        }
        lc->upd(qi, qv); rc->upd(qi, qv);
        fix();
    }
    int walkl(int ql, ll qv) {
        if (r < ql) return -1;
        if (mx <= qv) return -1;
        if (l == r) return l;
        int v = lc->walkl(ql, qv);
        return v == -1 ? rc->walkl(ql, qv) : v;
    }
    int walkr(int qr, ll qv) {
        if (l > qr) return -1;
        if (mx <= qv) return -1;
        if (l == r) return l;
        int v = rc->walkr(qr, qv);
        return v == -1 ? lc->walkr(qr, qv) : v;
    }
    ll qsum(int ql, int qr) {
        if (l > qr || r < ql) return 0;
        if (l >= ql && r <= qr) return sm;
        return lc->qsum(ql, qr) + rc->qsum(ql, qr);
    }
};
segtree3 mem3[mx * 4];
int memsz3 = 0;
segtree3* segtree3::getmem() { return &mem3[memsz++]; }


segtree ac;  segtree3 ac3; vector<ll> ac4;
int n;

void clear(int i) {
    ac.q(i);
}

void redo(int i, bool extendleft, bool extendright) {
    //cout << "REDO " << i << endl;
    //walking time
    int l = i, r = i;
    while (1) {
        ll t = ac3.qsum(l, r);
        int wr = ac3.walkl(r + 1, t);
        int wl = ac3.walkr(l - 1, t);
        if (wl < i - 1 && !extendleft) break;
        if (wr > i + 1 && !extendright) break;
        if (wl == -1 || wr == -1) break;
        t = ac3.qsum(wl + 1, wr - 1);
        if (ac4[wl] > t && ac4[wr] > t) {
            ac.add(wl + 1, wr - 1);
            ac2.upd(wl + 1, wr - 1, 1);
        }
        l = wl + 1, r = wr - 1;
        if (ac4[wl] > ac4[wr]) {
            if (!extendright) break;
            r++;
        } else {
            if (!extendleft) break;
            l--;
        }
    }
}

int getl(int l, int r) {
    int rr = l;
    int res = l;
    while (1) {
        ll t = ac3.qsum(l, rr);
        rr = ac3.walkl(rr + 1, t);
        if (rr > r || rr == -1) break;
        t = ac3.qsum(l, rr - 1);
        if (ac4[rr] > t) res = rr;
    }
    return res;
}

int getr(int l, int r) {
    int l2 = r;
    int res = r;
    while (1) {
        ll t = ac3.qsum(l2, r);
        l2 = ac3.walkr(l2 - 1, t);
        if (l2 < l || l2 == -1) break;
        t = ac3.qsum(l2 + 1, r);
        if (ac4[l2] > t) res = l2;
    }
    return res;
}

void upd(int i, ll v, bool left, bool right) {
    ac4[i] = v; ac3.upd(i, v);
    clear(i);
    if (i < n + 1 && right)clear(i + 1);
    if (i && left)clear(i - 1);

    redo(i, 1, 1);
    if (i < n + 1 && right)redo(i + 1, 0, 1);
    if (i && left)redo(i - 1, 1, 0);
}

void solve() {
    cin >> n;
    vector<int> a(n + 1, 0); for (int i = 1; i <= n; i++) cin >> a[i];
    ac = segtree(0, n + 1); ac2 = segtree2(0, n + 1); ac3 = segtree3(0, n + 1); ac4 = vector<ll>(n + 2, 0);
    for (int i = 0; i <= n + 1; i++) { ac4[i] = a[i]; ac3.upd(i, a[i]); }
    for (int i = 0; i <= n + 1; i++) { redo(i, 1, 0); }
    int q; cin >> q;
    while (q--) {
        int t; cin >> t;
        if (t == 1) {
            int x, y; cin >> x >> y; a[x] = y;
            upd(x, y, 1, 1);
        } else {
            int l, r; cin >> l >> r;
            int l2 = getl(l, r), r2 = getr(l, r);
            ac.q2(l);
            cout << (r2 - l2 + 1 - ac2.q(l2, r2)) << endl;
            ac.q3(l);
        }
    }
}

int32_t main() {
    cin.tie(0)->sync_with_stdio(0);
    int t = 1;
    // cin >> t;
    while (t--)
        solve();
}
# Verdict Execution time Memory Grader output
1 Correct 25 ms 53544 KB Output is correct
2 Correct 25 ms 53632 KB Output is correct
3 Correct 25 ms 53460 KB Output is correct
4 Correct 29 ms 53424 KB Output is correct
5 Correct 28 ms 53460 KB Output is correct
6 Correct 27 ms 53484 KB Output is correct
7 Correct 27 ms 53460 KB Output is correct
8 Correct 28 ms 53460 KB Output is correct
9 Correct 26 ms 53540 KB Output is correct
10 Correct 26 ms 53532 KB Output is correct
11 Correct 25 ms 53492 KB Output is correct
12 Correct 26 ms 53568 KB Output is correct
13 Correct 26 ms 53460 KB Output is correct
14 Correct 25 ms 53560 KB Output is correct
15 Correct 26 ms 53452 KB Output is correct
16 Correct 28 ms 53452 KB Output is correct
17 Correct 27 ms 53536 KB Output is correct
18 Correct 26 ms 53448 KB Output is correct
19 Correct 27 ms 53588 KB Output is correct
20 Correct 26 ms 53576 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 25 ms 53428 KB Output is correct
2 Correct 107 ms 56156 KB Output is correct
3 Correct 118 ms 56252 KB Output is correct
4 Correct 108 ms 56128 KB Output is correct
5 Correct 108 ms 56212 KB Output is correct
6 Correct 101 ms 56376 KB Output is correct
7 Correct 92 ms 55628 KB Output is correct
8 Correct 106 ms 56384 KB Output is correct
9 Correct 96 ms 55672 KB Output is correct
10 Correct 116 ms 55620 KB Output is correct
11 Correct 103 ms 55668 KB Output is correct
12 Correct 101 ms 55992 KB Output is correct
13 Correct 99 ms 56032 KB Output is correct
14 Correct 111 ms 56756 KB Output is correct
15 Correct 109 ms 56648 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 25 ms 53544 KB Output is correct
2 Correct 25 ms 53632 KB Output is correct
3 Correct 25 ms 53460 KB Output is correct
4 Correct 29 ms 53424 KB Output is correct
5 Correct 28 ms 53460 KB Output is correct
6 Correct 27 ms 53484 KB Output is correct
7 Correct 27 ms 53460 KB Output is correct
8 Correct 28 ms 53460 KB Output is correct
9 Correct 26 ms 53540 KB Output is correct
10 Correct 26 ms 53532 KB Output is correct
11 Correct 25 ms 53492 KB Output is correct
12 Correct 26 ms 53568 KB Output is correct
13 Correct 26 ms 53460 KB Output is correct
14 Correct 25 ms 53560 KB Output is correct
15 Correct 26 ms 53452 KB Output is correct
16 Correct 28 ms 53452 KB Output is correct
17 Correct 27 ms 53536 KB Output is correct
18 Correct 26 ms 53448 KB Output is correct
19 Correct 27 ms 53588 KB Output is correct
20 Correct 26 ms 53576 KB Output is correct
21 Correct 25 ms 53428 KB Output is correct
22 Correct 107 ms 56156 KB Output is correct
23 Correct 118 ms 56252 KB Output is correct
24 Correct 108 ms 56128 KB Output is correct
25 Correct 108 ms 56212 KB Output is correct
26 Correct 101 ms 56376 KB Output is correct
27 Correct 92 ms 55628 KB Output is correct
28 Correct 106 ms 56384 KB Output is correct
29 Correct 96 ms 55672 KB Output is correct
30 Correct 116 ms 55620 KB Output is correct
31 Correct 103 ms 55668 KB Output is correct
32 Correct 101 ms 55992 KB Output is correct
33 Correct 99 ms 56032 KB Output is correct
34 Correct 111 ms 56756 KB Output is correct
35 Correct 109 ms 56648 KB Output is correct
36 Correct 124 ms 56268 KB Output is correct
37 Correct 125 ms 56356 KB Output is correct
38 Correct 127 ms 56244 KB Output is correct
39 Correct 129 ms 56440 KB Output is correct
40 Correct 125 ms 56116 KB Output is correct
41 Correct 108 ms 56320 KB Output is correct
42 Correct 119 ms 56416 KB Output is correct
43 Correct 115 ms 55680 KB Output is correct
44 Correct 111 ms 55628 KB Output is correct
45 Correct 136 ms 55732 KB Output is correct
46 Correct 122 ms 55644 KB Output is correct
47 Correct 116 ms 55372 KB Output is correct
48 Correct 107 ms 56024 KB Output is correct
49 Correct 109 ms 56112 KB Output is correct
50 Correct 121 ms 56804 KB Output is correct
51 Correct 123 ms 56748 KB Output is correct
52 Correct 121 ms 56768 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 25 ms 53428 KB Output is correct
2 Correct 107 ms 56156 KB Output is correct
3 Correct 118 ms 56252 KB Output is correct
4 Correct 108 ms 56128 KB Output is correct
5 Correct 108 ms 56212 KB Output is correct
6 Correct 101 ms 56376 KB Output is correct
7 Correct 92 ms 55628 KB Output is correct
8 Correct 106 ms 56384 KB Output is correct
9 Correct 96 ms 55672 KB Output is correct
10 Correct 116 ms 55620 KB Output is correct
11 Correct 103 ms 55668 KB Output is correct
12 Correct 101 ms 55992 KB Output is correct
13 Correct 99 ms 56032 KB Output is correct
14 Correct 111 ms 56756 KB Output is correct
15 Correct 109 ms 56648 KB Output is correct
16 Correct 25 ms 53552 KB Output is correct
17 Correct 1940 ms 56808 KB Output is correct
18 Correct 1791 ms 58408 KB Output is correct
19 Correct 2087 ms 58040 KB Output is correct
20 Correct 2125 ms 57976 KB Output is correct
21 Correct 1964 ms 58004 KB Output is correct
22 Correct 1817 ms 58292 KB Output is correct
23 Correct 1830 ms 57824 KB Output is correct
24 Correct 2283 ms 58096 KB Output is correct
25 Correct 2087 ms 58068 KB Output is correct
26 Correct 2369 ms 58092 KB Output is correct
27 Correct 813 ms 58928 KB Output is correct
28 Correct 807 ms 58692 KB Output is correct
29 Correct 866 ms 58720 KB Output is correct
30 Correct 1644 ms 57216 KB Output is correct
31 Correct 1894 ms 57376 KB Output is correct
32 Correct 2807 ms 57356 KB Output is correct
33 Correct 1218 ms 57572 KB Output is correct
34 Correct 2784 ms 57220 KB Output is correct
35 Correct 1562 ms 57396 KB Output is correct
36 Correct 1903 ms 57776 KB Output is correct
37 Correct 815 ms 57616 KB Output is correct
38 Correct 764 ms 57656 KB Output is correct
39 Correct 882 ms 58996 KB Output is correct
40 Correct 676 ms 58796 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 25 ms 53428 KB Output is correct
2 Correct 107 ms 56156 KB Output is correct
3 Correct 118 ms 56252 KB Output is correct
4 Correct 108 ms 56128 KB Output is correct
5 Correct 108 ms 56212 KB Output is correct
6 Correct 101 ms 56376 KB Output is correct
7 Correct 92 ms 55628 KB Output is correct
8 Correct 106 ms 56384 KB Output is correct
9 Correct 96 ms 55672 KB Output is correct
10 Correct 116 ms 55620 KB Output is correct
11 Correct 103 ms 55668 KB Output is correct
12 Correct 101 ms 55992 KB Output is correct
13 Correct 99 ms 56032 KB Output is correct
14 Correct 111 ms 56756 KB Output is correct
15 Correct 109 ms 56648 KB Output is correct
16 Correct 28 ms 53512 KB Output is correct
17 Correct 896 ms 57136 KB Output is correct
18 Correct 1024 ms 58944 KB Output is correct
19 Correct 1002 ms 57312 KB Output is correct
20 Correct 945 ms 58900 KB Output is correct
21 Correct 1218 ms 57112 KB Output is correct
22 Correct 1014 ms 58852 KB Output is correct
23 Correct 1080 ms 57016 KB Output is correct
24 Correct 970 ms 58972 KB Output is correct
25 Correct 1056 ms 57264 KB Output is correct
26 Correct 588 ms 57848 KB Output is correct
27 Correct 647 ms 57856 KB Output is correct
28 Correct 768 ms 58144 KB Output is correct
29 Correct 597 ms 57720 KB Output is correct
30 Correct 665 ms 57772 KB Output is correct
31 Correct 876 ms 57996 KB Output is correct
32 Correct 972 ms 58424 KB Output is correct
33 Correct 550 ms 56588 KB Output is correct
34 Correct 920 ms 58808 KB Output is correct
35 Correct 548 ms 56520 KB Output is correct
36 Correct 880 ms 58316 KB Output is correct
37 Correct 866 ms 57704 KB Output is correct
38 Correct 760 ms 57696 KB Output is correct
39 Correct 691 ms 58256 KB Output is correct
40 Correct 538 ms 57932 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 25 ms 53544 KB Output is correct
2 Correct 25 ms 53632 KB Output is correct
3 Correct 25 ms 53460 KB Output is correct
4 Correct 29 ms 53424 KB Output is correct
5 Correct 28 ms 53460 KB Output is correct
6 Correct 27 ms 53484 KB Output is correct
7 Correct 27 ms 53460 KB Output is correct
8 Correct 28 ms 53460 KB Output is correct
9 Correct 26 ms 53540 KB Output is correct
10 Correct 26 ms 53532 KB Output is correct
11 Correct 25 ms 53492 KB Output is correct
12 Correct 26 ms 53568 KB Output is correct
13 Correct 26 ms 53460 KB Output is correct
14 Correct 25 ms 53560 KB Output is correct
15 Correct 26 ms 53452 KB Output is correct
16 Correct 28 ms 53452 KB Output is correct
17 Correct 27 ms 53536 KB Output is correct
18 Correct 26 ms 53448 KB Output is correct
19 Correct 27 ms 53588 KB Output is correct
20 Correct 26 ms 53576 KB Output is correct
21 Correct 25 ms 53428 KB Output is correct
22 Correct 107 ms 56156 KB Output is correct
23 Correct 118 ms 56252 KB Output is correct
24 Correct 108 ms 56128 KB Output is correct
25 Correct 108 ms 56212 KB Output is correct
26 Correct 101 ms 56376 KB Output is correct
27 Correct 92 ms 55628 KB Output is correct
28 Correct 106 ms 56384 KB Output is correct
29 Correct 96 ms 55672 KB Output is correct
30 Correct 116 ms 55620 KB Output is correct
31 Correct 103 ms 55668 KB Output is correct
32 Correct 101 ms 55992 KB Output is correct
33 Correct 99 ms 56032 KB Output is correct
34 Correct 111 ms 56756 KB Output is correct
35 Correct 109 ms 56648 KB Output is correct
36 Correct 124 ms 56268 KB Output is correct
37 Correct 125 ms 56356 KB Output is correct
38 Correct 127 ms 56244 KB Output is correct
39 Correct 129 ms 56440 KB Output is correct
40 Correct 125 ms 56116 KB Output is correct
41 Correct 108 ms 56320 KB Output is correct
42 Correct 119 ms 56416 KB Output is correct
43 Correct 115 ms 55680 KB Output is correct
44 Correct 111 ms 55628 KB Output is correct
45 Correct 136 ms 55732 KB Output is correct
46 Correct 122 ms 55644 KB Output is correct
47 Correct 116 ms 55372 KB Output is correct
48 Correct 107 ms 56024 KB Output is correct
49 Correct 109 ms 56112 KB Output is correct
50 Correct 121 ms 56804 KB Output is correct
51 Correct 123 ms 56748 KB Output is correct
52 Correct 121 ms 56768 KB Output is correct
53 Correct 25 ms 53552 KB Output is correct
54 Correct 1940 ms 56808 KB Output is correct
55 Correct 1791 ms 58408 KB Output is correct
56 Correct 2087 ms 58040 KB Output is correct
57 Correct 2125 ms 57976 KB Output is correct
58 Correct 1964 ms 58004 KB Output is correct
59 Correct 1817 ms 58292 KB Output is correct
60 Correct 1830 ms 57824 KB Output is correct
61 Correct 2283 ms 58096 KB Output is correct
62 Correct 2087 ms 58068 KB Output is correct
63 Correct 2369 ms 58092 KB Output is correct
64 Correct 813 ms 58928 KB Output is correct
65 Correct 807 ms 58692 KB Output is correct
66 Correct 866 ms 58720 KB Output is correct
67 Correct 1644 ms 57216 KB Output is correct
68 Correct 1894 ms 57376 KB Output is correct
69 Correct 2807 ms 57356 KB Output is correct
70 Correct 1218 ms 57572 KB Output is correct
71 Correct 2784 ms 57220 KB Output is correct
72 Correct 1562 ms 57396 KB Output is correct
73 Correct 1903 ms 57776 KB Output is correct
74 Correct 815 ms 57616 KB Output is correct
75 Correct 764 ms 57656 KB Output is correct
76 Correct 882 ms 58996 KB Output is correct
77 Correct 676 ms 58796 KB Output is correct
78 Correct 28 ms 53512 KB Output is correct
79 Correct 896 ms 57136 KB Output is correct
80 Correct 1024 ms 58944 KB Output is correct
81 Correct 1002 ms 57312 KB Output is correct
82 Correct 945 ms 58900 KB Output is correct
83 Correct 1218 ms 57112 KB Output is correct
84 Correct 1014 ms 58852 KB Output is correct
85 Correct 1080 ms 57016 KB Output is correct
86 Correct 970 ms 58972 KB Output is correct
87 Correct 1056 ms 57264 KB Output is correct
88 Correct 588 ms 57848 KB Output is correct
89 Correct 647 ms 57856 KB Output is correct
90 Correct 768 ms 58144 KB Output is correct
91 Correct 597 ms 57720 KB Output is correct
92 Correct 665 ms 57772 KB Output is correct
93 Correct 876 ms 57996 KB Output is correct
94 Correct 972 ms 58424 KB Output is correct
95 Correct 550 ms 56588 KB Output is correct
96 Correct 920 ms 58808 KB Output is correct
97 Correct 548 ms 56520 KB Output is correct
98 Correct 880 ms 58316 KB Output is correct
99 Correct 866 ms 57704 KB Output is correct
100 Correct 760 ms 57696 KB Output is correct
101 Correct 691 ms 58256 KB Output is correct
102 Correct 538 ms 57932 KB Output is correct
103 Correct 941 ms 57252 KB Output is correct
104 Correct 1050 ms 60380 KB Output is correct
105 Correct 1714 ms 58176 KB Output is correct
106 Correct 1514 ms 58848 KB Output is correct
107 Correct 1212 ms 57636 KB Output is correct
108 Correct 1039 ms 60256 KB Output is correct
109 Correct 1489 ms 57764 KB Output is correct
110 Correct 1337 ms 59372 KB Output is correct
111 Correct 1791 ms 58376 KB Output is correct
112 Correct 1509 ms 58724 KB Output is correct
113 Correct 730 ms 59384 KB Output is correct
114 Correct 747 ms 59060 KB Output is correct
115 Correct 1014 ms 58868 KB Output is correct
116 Correct 1099 ms 58524 KB Output is correct
117 Correct 718 ms 59176 KB Output is correct
118 Correct 1231 ms 57824 KB Output is correct
119 Correct 682 ms 59432 KB Output is correct
120 Correct 998 ms 58880 KB Output is correct
121 Correct 1148 ms 58248 KB Output is correct
122 Correct 1042 ms 59332 KB Output is correct
123 Correct 781 ms 56992 KB Output is correct
124 Correct 1345 ms 58176 KB Output is correct
125 Correct 1453 ms 57292 KB Output is correct
126 Correct 1565 ms 57744 KB Output is correct
127 Correct 1022 ms 58416 KB Output is correct
128 Correct 1060 ms 57996 KB Output is correct
129 Correct 833 ms 59392 KB Output is correct
130 Correct 729 ms 58912 KB Output is correct