Submission #757670

# Submission time Handle Problem Language Result Execution time Memory
757670 2023-06-13T14:34:15 Z maomao90 Tortoise (CEOI21_tortoise) C++17
100 / 100
399 ms 24784 KB
    // Hallelujah, praise the one who set me free
    // Hallelujah, death has lost its grip on me
    // You have broken every chain, There's salvation in your name
    // Jesus Christ, my living hope
    #include <bits/stdc++.h> 
    using namespace std;
     
    #define REP(i, s, e) for (int i = (s); i < (e); i++)
    #define RREP(i, s, e) for (int i = (s); i >= (e); i--)
    template <class T>
    inline bool mnto(T& a, T b) {return a > b ? a = b, 1 : 0;}
    template <class T>
    inline bool mxto(T& a, T b) {return a < b ? a = b, 1: 0;}
    typedef long long ll;
    typedef long double ld;
    #define FI first
    #define SE second
    typedef pair<int, int> ii;
    typedef pair<ll, ll> pll;
    typedef tuple<int, int, int> iii;
    #define ALL(_a) _a.begin(), _a.end()
    #define SZ(_a) (int) _a.size()
    #define pb push_back
    typedef vector<int> vi;
    typedef vector<ll> vll;
    typedef vector<ii> vii;
    typedef vector<iii> viii;
     
    #ifndef DEBUG
    #define cerr if (0) cerr
    #endif
     
    const int INF = 1000000005;
    const ll LINF = 1000000000000000005ll;
    const int MAXN = 500005;
     
    int n;
    int a[MAXN];
    int lft[MAXN], rht[MAXN];
    int grp[MAXN], cnt[MAXN];
    bool done[MAXN];
    int donewalk[MAXN];
    ll ans;
     
    int fw[MAXN];
    void fincre(int i, int x) {
        i++;
        for (; i <= n; i += i & -i) {
            fw[i] += x;
        }
    }
    void fincre(int s, int e, int x) {
        fincre(s, x);
        fincre(e + 1, -x);
    }
    int fqsm(int i) {
        i++;
        int res = 0;
        for (; i > 0; i -= i & -i) {
            res += fw[i];
        }
        return res;
    }
     
    #define MLR int mid = lo + hi >> 1, lc = u << 1, rc = u << 1 ^ 1
    int st[MAXN * 4], lz[MAXN * 4];
    void propo(int u, int lo, int hi) {
        if (lz[u] == 0) {
            return;
        }
        MLR;
        st[lc] += lz[u];
        lz[lc] += lz[u];
        st[rc] += lz[u];
        lz[rc] += lz[u];
        lz[u] = 0;
    }
    void upd(int p, int x, int u = 1, int lo = 0, int hi = n - 1) {
        if (lo == hi) {
            st[u] = x;
            return;
        }
        MLR;
        propo(u, lo, hi);
        if (p <= mid) {
            upd(p, x, lc, lo, mid);
        } else {
            upd(p, x, rc, mid + 1, hi);
        }
        st[u] = min(st[lc], st[rc]);
    }
    void incre(int s, int e, int x, int u = 1, int lo = 0, int hi = n - 1) {
        if (lo >= s && hi <= e) {
            st[u] += x;
            lz[u] += x;
            return;
        }
        MLR;
        propo(u, lo, hi);
        if (s <= mid) {
            incre(s, e, x, lc, lo, mid);
        }
        if (e > mid) {
            incre(s, e, x, rc, mid + 1, hi);
        }
        st[u] = min(st[lc], st[rc]);
    }
    int qmn(int s, int e, int u = 1, int lo = 0, int hi = n - 1) {
        if (lo >= s && hi <= e) {
            return st[u];
        }
        MLR;
        propo(u, lo, hi);
        int res = INF;
        if (s <= mid) {
            mnto(res, qmn(s, e, lc, lo, mid));
        }
        if (e > mid) {
            mnto(res, qmn(s, e, rc, mid + 1, hi));
        }
        return res;
    }
     
    int main() {
    #ifndef DEBUG
        ios::sync_with_stdio(0), cin.tie(0);
    #endif
        cin >> n;
        ll tot = 0;
        REP (i, 0, n) {
            cin >> a[i];
            if (a[i] > 0) {
                tot += a[i];
            }
        }
        int prv = -INF;
        int gc = 0;
        REP (i, 0, n) {
            if (a[i] == -1) {
                prv = i;
                gc++;
            }
            lft[i] = prv;
            grp[i] = gc;
        }
        prv = INF;
        RREP (i, n - 1, 0) {
            if (a[i] == -1) {
                prv = i;
            }
            rht[i] = prv;
        }
        vi id, pos;
        REP (i, 0, n) {
            if (a[i] <= 0) {
                continue;
            }
            cnt[grp[i]]++;
            id.pb(i);
            pos.pb(i);
        }
        sort(ALL(id), [&] (int l, int r) {
                return ii{min(l - lft[l], rht[l] - l), -l} < 
                ii{min(r - lft[r], rht[r] - r), -r};
                });
        REP (i, 1, n) {
            fincre(i, n - 1, 1);
        }
        REP (i, 0, n) {
            upd(i, INF);
        }
        for (int i : id) {
            cerr << i << '\n';
            done[i] = 1;
            int w = 2 * min(i - lft[i], rht[i] - i);
            // x <= a[i]
            int mn = qmn(i + 1, n - 1);
            assert(mn >= 0);
            // x * w <= mn
            // x <= floor(mn / w)
            int x1 = mn / w;
            int ct = fqsm(i);
            if (ct > 2 * i) {
                continue;
            }
            if (i - lft[i] <= rht[i] - i) { // left cycle
                if (donewalk[grp[i]] && donewalk[grp[i]] < i) {
                    continue;
                }
                auto apply = [&] (int x, bool walk) {
                    if (x + walk == 0) {
                        return;
                    }
                    if (walk) {
                        donewalk[grp[i]] = i;
                    }
                    cerr << "APPLY: " << x << ' ' << walk << '\n';
                    ans += x + walk;
                    fincre(i, n - 1, x * w);
                    incre(i, n - 1, -x * w);
                    // ct + (x - 1) * w + upd <= 2 * i
                    assert(ct + (x - 1 + walk) * w <= 2 * i);
                    upd(i, 2 * i - (ct + (x - 1 + walk) * w));
                };
                // ct + (x - 1) * w <= 2 * i
                // x <= (2 * i - ct) / w + 1
                int x2 = (2 * i - ct) / w + 1;
                if (a[i] < min(x1, x2)) {
                    auto ptr = upper_bound(ALL(pos), i);
                    bool walk = 0;
                    if (ptr == pos.end() || grp[*ptr] != grp[i] || done[*ptr]) {
                        walk = 1;
                    }
                    if (donewalk[grp[i]]) {
                        walk = 0;
                    }
                    apply(a[i] - walk, walk);
                    continue;
                } 
                if (rht[i] == INF) {
                    apply(min(x1, x2), 0);
                    continue;
                }
                if (x1 < x2) { // stopped by suffix but still have extra for walk
                    auto ptr = upper_bound(ALL(pos), i);
                    bool walk = 0;
                    if (ptr == pos.end() || grp[*ptr] != grp[i] || done[*ptr]) {
                        walk = 1;
                    }
                    if (donewalk[grp[i]]) {
                        walk = 0;
                    }
                    if (a[i] == x1 && walk) {
                        apply(x1 - 1, 1);
                    } else {
                        apply(x1, walk);
                    }
                    continue;
                }
                // no extra for walk unless replace one cycle with walk
                int nct = ct + x2 * w;
                // nct + j - i <= 2 * j
                // nct - i <= j
                int j = nct - i;
                auto ptr = lower_bound(ALL(pos), j);
                bool walk = 0;
                if (ptr == pos.end() || grp[*ptr] != grp[i] || done[*ptr]) {
                    walk = 1;
                }
                if (donewalk[grp[i]]) {
                    walk = 0;
                }
                apply(x2 - walk, walk);
            } else { // right cycle
                if (donewalk[grp[i]] && donewalk[grp[i]] > i) {
                    continue;
                }
                auto apply = [&] (int x) {
                    if (x == 0) {
                        return;
                    }
                    cerr << "APPLY: " << x << '\n';
                    ans += x;
                    fincre(i, n - 1, x * w);
                    incre(i, n - 1, -x * w);
                    // ct + x * w + upd <= 2 * i
                    assert(ct + x * w <= 2 * i);
                    upd(i, 2 * i - (ct + x * w));
                };
                auto ptr = lower_bound(ALL(pos), i);
                bool walk = 0;
                if (ptr == pos.begin() || grp[*prev(ptr)] != grp[i] || 
                        done[*prev(ptr)] || fqsm(*prev(ptr)) > 2 * (*prev(ptr))) {
                    walk = 1;
                }
                if (donewalk[grp[i]]) {
                    walk = 0;
                }
                if (walk) {
                    cerr << "WALK\n";
                    donewalk[grp[i]] = i;
                    a[i]--;
                    ans++;
                    // ct + upd <= 2 * i
                    upd(i, 2 * i - ct);
                }
                // ct + x * w <= 2 * i
                // x <= (2 * i - ct) / w
                int x2 = (2 * i - ct) / w;
                apply(min({a[i], x1, x2}));
            }
        }
        cout << tot - ans << '\n';
        return 0;
    }

Compilation message

tortoise.cpp: In function 'void propo(int, int, int)':
tortoise.cpp:65:30: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   65 |     #define MLR int mid = lo + hi >> 1, lc = u << 1, rc = u << 1 ^ 1
      |                           ~~~^~~~
tortoise.cpp:71:9: note: in expansion of macro 'MLR'
   71 |         MLR;
      |         ^~~
tortoise.cpp:65:21: warning: unused variable 'mid' [-Wunused-variable]
   65 |     #define MLR int mid = lo + hi >> 1, lc = u << 1, rc = u << 1 ^ 1
      |                     ^~~
tortoise.cpp:71:9: note: in expansion of macro 'MLR'
   71 |         MLR;
      |         ^~~
tortoise.cpp: In function 'void upd(int, int, int, int, int)':
tortoise.cpp:65:30: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   65 |     #define MLR int mid = lo + hi >> 1, lc = u << 1, rc = u << 1 ^ 1
      |                           ~~~^~~~
tortoise.cpp:83:9: note: in expansion of macro 'MLR'
   83 |         MLR;
      |         ^~~
tortoise.cpp: In function 'void incre(int, int, int, int, int, int)':
tortoise.cpp:65:30: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   65 |     #define MLR int mid = lo + hi >> 1, lc = u << 1, rc = u << 1 ^ 1
      |                           ~~~^~~~
tortoise.cpp:98:9: note: in expansion of macro 'MLR'
   98 |         MLR;
      |         ^~~
tortoise.cpp: In function 'int qmn(int, int, int, int, int)':
tortoise.cpp:65:30: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   65 |     #define MLR int mid = lo + hi >> 1, lc = u << 1, rc = u << 1 ^ 1
      |                           ~~~^~~~
tortoise.cpp:112:9: note: in expansion of macro 'MLR'
  112 |         MLR;
      |         ^~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 332 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 336 KB Output is correct
6 Correct 1 ms 340 KB Output is correct
7 Correct 1 ms 340 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 1 ms 340 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 1 ms 332 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 1 ms 340 KB Output is correct
18 Correct 1 ms 340 KB Output is correct
19 Correct 1 ms 336 KB Output is correct
20 Correct 1 ms 340 KB Output is correct
21 Correct 1 ms 340 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 1 ms 328 KB Output is correct
24 Correct 1 ms 340 KB Output is correct
25 Correct 1 ms 340 KB Output is correct
26 Correct 1 ms 340 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 332 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 336 KB Output is correct
6 Correct 1 ms 340 KB Output is correct
7 Correct 1 ms 340 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 1 ms 340 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 1 ms 332 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 1 ms 340 KB Output is correct
18 Correct 1 ms 340 KB Output is correct
19 Correct 1 ms 336 KB Output is correct
20 Correct 1 ms 340 KB Output is correct
21 Correct 1 ms 340 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 1 ms 328 KB Output is correct
24 Correct 1 ms 340 KB Output is correct
25 Correct 1 ms 340 KB Output is correct
26 Correct 1 ms 340 KB Output is correct
27 Correct 1 ms 340 KB Output is correct
28 Correct 1 ms 340 KB Output is correct
29 Correct 1 ms 340 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 1 ms 340 KB Output is correct
33 Correct 1 ms 328 KB Output is correct
34 Correct 1 ms 340 KB Output is correct
35 Correct 1 ms 332 KB Output is correct
36 Correct 1 ms 340 KB Output is correct
37 Correct 1 ms 340 KB Output is correct
38 Correct 1 ms 340 KB Output is correct
39 Correct 1 ms 332 KB Output is correct
40 Correct 1 ms 340 KB Output is correct
41 Correct 1 ms 340 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 332 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 336 KB Output is correct
6 Correct 1 ms 340 KB Output is correct
7 Correct 1 ms 340 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 1 ms 340 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 1 ms 332 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 1 ms 340 KB Output is correct
18 Correct 1 ms 340 KB Output is correct
19 Correct 1 ms 336 KB Output is correct
20 Correct 1 ms 340 KB Output is correct
21 Correct 1 ms 340 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 1 ms 328 KB Output is correct
24 Correct 1 ms 340 KB Output is correct
25 Correct 1 ms 340 KB Output is correct
26 Correct 1 ms 340 KB Output is correct
27 Correct 1 ms 340 KB Output is correct
28 Correct 1 ms 340 KB Output is correct
29 Correct 1 ms 340 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 1 ms 340 KB Output is correct
33 Correct 1 ms 328 KB Output is correct
34 Correct 1 ms 340 KB Output is correct
35 Correct 1 ms 332 KB Output is correct
36 Correct 1 ms 340 KB Output is correct
37 Correct 1 ms 340 KB Output is correct
38 Correct 1 ms 340 KB Output is correct
39 Correct 1 ms 332 KB Output is correct
40 Correct 1 ms 340 KB Output is correct
41 Correct 1 ms 340 KB Output is correct
42 Correct 1 ms 340 KB Output is correct
43 Correct 1 ms 340 KB Output is correct
44 Correct 1 ms 340 KB Output is correct
45 Correct 1 ms 340 KB Output is correct
46 Correct 1 ms 340 KB Output is correct
47 Correct 1 ms 336 KB Output is correct
48 Correct 1 ms 340 KB Output is correct
49 Correct 1 ms 332 KB Output is correct
50 Correct 1 ms 340 KB Output is correct
51 Correct 1 ms 340 KB Output is correct
52 Correct 1 ms 340 KB Output is correct
53 Correct 1 ms 340 KB Output is correct
54 Correct 1 ms 340 KB Output is correct
55 Correct 1 ms 340 KB Output is correct
56 Correct 1 ms 340 KB Output is correct
57 Correct 1 ms 340 KB Output is correct
58 Correct 1 ms 340 KB Output is correct
59 Correct 1 ms 340 KB Output is correct
60 Correct 1 ms 340 KB Output is correct
61 Correct 1 ms 328 KB Output is correct
62 Correct 1 ms 340 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 332 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 336 KB Output is correct
6 Correct 1 ms 340 KB Output is correct
7 Correct 1 ms 340 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 1 ms 340 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 1 ms 332 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 1 ms 340 KB Output is correct
18 Correct 1 ms 340 KB Output is correct
19 Correct 1 ms 336 KB Output is correct
20 Correct 1 ms 340 KB Output is correct
21 Correct 1 ms 340 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 1 ms 328 KB Output is correct
24 Correct 1 ms 340 KB Output is correct
25 Correct 1 ms 340 KB Output is correct
26 Correct 1 ms 340 KB Output is correct
27 Correct 1 ms 340 KB Output is correct
28 Correct 1 ms 340 KB Output is correct
29 Correct 1 ms 340 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 1 ms 340 KB Output is correct
33 Correct 1 ms 328 KB Output is correct
34 Correct 1 ms 340 KB Output is correct
35 Correct 1 ms 332 KB Output is correct
36 Correct 1 ms 340 KB Output is correct
37 Correct 1 ms 340 KB Output is correct
38 Correct 1 ms 340 KB Output is correct
39 Correct 1 ms 332 KB Output is correct
40 Correct 1 ms 340 KB Output is correct
41 Correct 1 ms 340 KB Output is correct
42 Correct 1 ms 340 KB Output is correct
43 Correct 1 ms 340 KB Output is correct
44 Correct 1 ms 340 KB Output is correct
45 Correct 1 ms 340 KB Output is correct
46 Correct 1 ms 340 KB Output is correct
47 Correct 1 ms 336 KB Output is correct
48 Correct 1 ms 340 KB Output is correct
49 Correct 1 ms 332 KB Output is correct
50 Correct 1 ms 340 KB Output is correct
51 Correct 1 ms 340 KB Output is correct
52 Correct 1 ms 340 KB Output is correct
53 Correct 1 ms 340 KB Output is correct
54 Correct 1 ms 340 KB Output is correct
55 Correct 1 ms 340 KB Output is correct
56 Correct 1 ms 340 KB Output is correct
57 Correct 1 ms 340 KB Output is correct
58 Correct 1 ms 340 KB Output is correct
59 Correct 1 ms 340 KB Output is correct
60 Correct 1 ms 340 KB Output is correct
61 Correct 1 ms 328 KB Output is correct
62 Correct 1 ms 340 KB Output is correct
63 Correct 4 ms 596 KB Output is correct
64 Correct 3 ms 596 KB Output is correct
65 Correct 2 ms 592 KB Output is correct
66 Correct 3 ms 596 KB Output is correct
67 Correct 2 ms 596 KB Output is correct
68 Correct 2 ms 596 KB Output is correct
69 Correct 3 ms 596 KB Output is correct
70 Correct 3 ms 596 KB Output is correct
71 Correct 4 ms 728 KB Output is correct
72 Correct 3 ms 724 KB Output is correct
73 Correct 3 ms 724 KB Output is correct
74 Correct 4 ms 840 KB Output is correct
75 Correct 2 ms 596 KB Output is correct
76 Correct 3 ms 596 KB Output is correct
77 Correct 3 ms 596 KB Output is correct
78 Correct 2 ms 596 KB Output is correct
79 Correct 3 ms 596 KB Output is correct
80 Correct 3 ms 600 KB Output is correct
81 Correct 3 ms 596 KB Output is correct
82 Correct 3 ms 596 KB Output is correct
83 Correct 3 ms 596 KB Output is correct
84 Correct 3 ms 596 KB Output is correct
85 Correct 2 ms 596 KB Output is correct
86 Correct 3 ms 596 KB Output is correct
87 Correct 3 ms 596 KB Output is correct
88 Correct 3 ms 596 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 332 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 336 KB Output is correct
6 Correct 1 ms 340 KB Output is correct
7 Correct 1 ms 340 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 1 ms 340 KB Output is correct
10 Correct 1 ms 340 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 1 ms 332 KB Output is correct
15 Correct 1 ms 340 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 1 ms 340 KB Output is correct
18 Correct 1 ms 340 KB Output is correct
19 Correct 1 ms 336 KB Output is correct
20 Correct 1 ms 340 KB Output is correct
21 Correct 1 ms 340 KB Output is correct
22 Correct 1 ms 340 KB Output is correct
23 Correct 1 ms 328 KB Output is correct
24 Correct 1 ms 340 KB Output is correct
25 Correct 1 ms 340 KB Output is correct
26 Correct 1 ms 340 KB Output is correct
27 Correct 1 ms 340 KB Output is correct
28 Correct 1 ms 340 KB Output is correct
29 Correct 1 ms 340 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 1 ms 340 KB Output is correct
32 Correct 1 ms 340 KB Output is correct
33 Correct 1 ms 328 KB Output is correct
34 Correct 1 ms 340 KB Output is correct
35 Correct 1 ms 332 KB Output is correct
36 Correct 1 ms 340 KB Output is correct
37 Correct 1 ms 340 KB Output is correct
38 Correct 1 ms 340 KB Output is correct
39 Correct 1 ms 332 KB Output is correct
40 Correct 1 ms 340 KB Output is correct
41 Correct 1 ms 340 KB Output is correct
42 Correct 1 ms 340 KB Output is correct
43 Correct 1 ms 340 KB Output is correct
44 Correct 1 ms 340 KB Output is correct
45 Correct 1 ms 340 KB Output is correct
46 Correct 1 ms 340 KB Output is correct
47 Correct 1 ms 336 KB Output is correct
48 Correct 1 ms 340 KB Output is correct
49 Correct 1 ms 332 KB Output is correct
50 Correct 1 ms 340 KB Output is correct
51 Correct 1 ms 340 KB Output is correct
52 Correct 1 ms 340 KB Output is correct
53 Correct 1 ms 340 KB Output is correct
54 Correct 1 ms 340 KB Output is correct
55 Correct 1 ms 340 KB Output is correct
56 Correct 1 ms 340 KB Output is correct
57 Correct 1 ms 340 KB Output is correct
58 Correct 1 ms 340 KB Output is correct
59 Correct 1 ms 340 KB Output is correct
60 Correct 1 ms 340 KB Output is correct
61 Correct 1 ms 328 KB Output is correct
62 Correct 1 ms 340 KB Output is correct
63 Correct 4 ms 596 KB Output is correct
64 Correct 3 ms 596 KB Output is correct
65 Correct 2 ms 592 KB Output is correct
66 Correct 3 ms 596 KB Output is correct
67 Correct 2 ms 596 KB Output is correct
68 Correct 2 ms 596 KB Output is correct
69 Correct 3 ms 596 KB Output is correct
70 Correct 3 ms 596 KB Output is correct
71 Correct 4 ms 728 KB Output is correct
72 Correct 3 ms 724 KB Output is correct
73 Correct 3 ms 724 KB Output is correct
74 Correct 4 ms 840 KB Output is correct
75 Correct 2 ms 596 KB Output is correct
76 Correct 3 ms 596 KB Output is correct
77 Correct 3 ms 596 KB Output is correct
78 Correct 2 ms 596 KB Output is correct
79 Correct 3 ms 596 KB Output is correct
80 Correct 3 ms 600 KB Output is correct
81 Correct 3 ms 596 KB Output is correct
82 Correct 3 ms 596 KB Output is correct
83 Correct 3 ms 596 KB Output is correct
84 Correct 3 ms 596 KB Output is correct
85 Correct 2 ms 596 KB Output is correct
86 Correct 3 ms 596 KB Output is correct
87 Correct 3 ms 596 KB Output is correct
88 Correct 3 ms 596 KB Output is correct
89 Correct 198 ms 21492 KB Output is correct
90 Correct 190 ms 21612 KB Output is correct
91 Correct 208 ms 21524 KB Output is correct
92 Correct 237 ms 22120 KB Output is correct
93 Correct 229 ms 22132 KB Output is correct
94 Correct 253 ms 22196 KB Output is correct
95 Correct 204 ms 21728 KB Output is correct
96 Correct 211 ms 22012 KB Output is correct
97 Correct 259 ms 21812 KB Output is correct
98 Correct 305 ms 21944 KB Output is correct
99 Correct 363 ms 24784 KB Output is correct
100 Correct 330 ms 24528 KB Output is correct
101 Correct 363 ms 24612 KB Output is correct
102 Correct 399 ms 24556 KB Output is correct
103 Correct 114 ms 15368 KB Output is correct
104 Correct 16 ms 1876 KB Output is correct
105 Correct 21 ms 1884 KB Output is correct
106 Correct 21 ms 1856 KB Output is correct
107 Correct 14 ms 1876 KB Output is correct
108 Correct 14 ms 1876 KB Output is correct
109 Correct 108 ms 15136 KB Output is correct