Submission #669675

# Submission time Handle Problem Language Result Execution time Memory
669675 2022-12-07T04:47:08 Z Forested Fuel Station (NOI20_fuelstation) C++17
100 / 100
241 ms 50368 KB
#ifndef LOCAL
#define FAST_IO
#endif

// ============
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

#define OVERRIDE(a, b, c, d, ...) d
#define REP2(i, n) for (i32 i = 0; i < (i32) (n); ++i)
#define REP3(i, m, n) for (i32 i = (i32) (m); i < (i32) (n); ++i)
#define REP(...) OVERRIDE(__VA_ARGS__, REP3, REP2)(__VA_ARGS__)
#define PER(i, n) for (i32 i = (i32) (n) - 1; i >= 0; --i)
#define ALL(x) begin(x), end(x)

using namespace std;

using u32 = unsigned int;
using u64 = unsigned long long;
using u128 = __uint128_t;
using i32 = signed int;
using i64 = signed long long;
using i128 = __int128_t;
using f64 = double;
using f80 = long double;

template <typename T>
using Vec = vector<T>;

template <typename T>
bool chmin(T &x, const T &y) {
    if (x > y) {
        x = y;
        return true;
    }
    return false;
}
template <typename T>
bool chmax(T &x, const T &y) {
    if (x < y) {
        x = y;
        return true;
    }
    return false;
}

istream &operator>>(istream &is, i128 &x) {
    i64 v;
    is >> v;
    x = v;
    return is;
}
ostream &operator<<(ostream &os, i128 x) {
    os << (i64) x;
    return os;
}
istream &operator>>(istream &is, u128 &x) {
    u64 v;
    is >> v;
    x = v;
    return is;
}
ostream &operator<<(ostream &os, u128 x) {
    os << (u64) x;
    return os;
}

[[maybe_unused]] constexpr i32 INF = 1000000100;
[[maybe_unused]] constexpr i64 INF64 = 3000000000000000100;
struct SetUpIO {
    SetUpIO() {
#ifdef FAST_IO
        ios::sync_with_stdio(false);
        cin.tie(nullptr);
#endif
        cout << fixed << setprecision(15);
    }
} set_up_io;
// ============

#ifdef DEBUGF
#else
#define DBG(x) (void) 0
#endif

// ============

#include <cassert>
#include <utility>
#include <vector>

// ============

#include <limits>
#include <utility>

template <typename T>
struct Add {
    using Value = T;
    static Value id() {
        return T(0);
    }
    static Value op(const Value &lhs, const Value &rhs) {
        return lhs + rhs;
    }
    static Value inv(const Value &x) {
        return -x;
    }
};

template <typename T>
struct Mul {
    using Value = T;
    static Value id() {
        return Value(1);
    }
    static Value op(const Value &lhs, const Value &rhs) {
        return lhs * rhs;
    }
    static Value inv(const Value &x) {
        return Value(1) / x;
    }
};

template <typename T>
struct Min {
    using Value = T;
    static Value id() {
        return std::numeric_limits<T>::max();
    }
    static Value op(const Value &lhs, const Value &rhs) {
        return std::min(lhs, rhs);
    }
};

template <typename T>
struct Max {
    using Value = T;
    static Value id() {
        return std::numeric_limits<Value>::min();
    }
    static Value op(const Value &lhs, const Value &rhs) {
        return std::max(lhs, rhs);
    }
};

template <typename T>
struct Xor {
    using Value = T;
    static Value id() {
        return T(0);
    }
    static Value op(const Value &lhs, const Value &rhs) {
        return lhs ^ rhs;
    }
    static Value inv(const Value &x) {
        return x;
    }
};

template <typename Monoid>
struct Reversible {
    using Value = std::pair<typename Monoid::Value, typename Monoid::Value>;
    static Value id() {
        return Value(Monoid::id(), Monoid::id());
    }
    static Value op(const Value &v1, const Value &v2) {
        return Value(
            Monoid::op(v1.first, v2.first),
            Monoid::op(v2.second, v1.second));
    }
};

// ============

template <typename Monoid>
class SegmentTree {
public:
    using Value = typename Monoid::Value;

private:
    int old_length;
    int length;
    std::vector<Value> node;

    static int ceil2(int n) {
        int l = 1;
        while (l < n) {
            l <<= 1;
        }
        return l;
    }

public:
    SegmentTree(int n) :
        old_length(n),
        length(ceil2(old_length)),
        node(length << 1, Monoid::id()) {
        assert(n >= 0);
    }

    SegmentTree(const std::vector<Value> &v) :
        old_length((int) v.size()),
        length(ceil2(old_length)),
        node(length << 1, Monoid::id()) {
        for (int i = 0; i < old_length; ++i) {
            node[i + length] = v[i];
        }
        for (int i = length - 1; i > 0; --i) {
            node[i] = Monoid::op(node[i << 1], node[i << 1 | 1]);
        }
    }

    template <typename F>
    SegmentTree(int n, const F &f) :
        old_length(n), length(ceil2(n)), node(length << 1, Monoid::id()) {
        assert(n >= 0);
        for (int i = 0; i < old_length; ++i) {
            node[i + length] = f(i);
        }
        for (int i = length - 1; i > 0; --i) {
            node[i] = Monoid::op(node[i << 1], node[i << 1 | 1]);
        }
    }

    const Value &operator[](int idx) const {
        assert(idx >= 0 && idx < old_length);
        return node[idx + length];
    }

    void update(int idx, Value val) {
        assert(idx >= 0 && idx < old_length);
        idx += length;
        node[idx] = std::move(val);
        while (idx != 1) {
            idx >>= 1;
            node[idx] = Monoid::op(node[idx << 1], node[idx << 1 | 1]);
        }
    }

    Value prod(int l, int r) const {
        assert(l >= 0 && l <= r && r <= old_length);
        Value prodl = Monoid::id();
        Value prodr = Monoid::id();
        l += length;
        r += length;
        while (l != r) {
            if (l & 1) {
                prodl = Monoid::op(prodl, node[l++]);
            }
            if (r & 1) {
                prodr = Monoid::op(node[--r], prodr);
            }
            l >>= 1;
            r >>= 1;
        }
        return Monoid::op(prodl, prodr);
    }
    
    Value all_prod() const {
        return node[1];
    }
};

// ============

struct Range {
    i64 l, r, a, b;
    Range() : l(-1), r(-1), a(-1), b(-1) {}
    Range(i64 l, i64 r, i64 a, i64 b) : l(l), r(r), a(a), b(b) {}
};

struct Ops {
    using Value = Range;
    static Value id() {
        return Value();
    }
    static Value op(Value x, Value y) {
        if (x.l == -1) {
            return y;
        }
        if (y.l == -1) {
            return x;
        }
        i64 yb = y.b + y.l - x.r;
        if (yb <= x.a) {
            return Range(x.l, y.r, y.a + x.a - yb, x.b);
        } else {
            return Range(x.l, y.r, y.a, x.b + yb - x.a);
        }
    }
};

int main() {
    i32 n;
    i64 d;
    cin >> n >> d;
    Vec<tuple<i64, i64, i64>> stas(n);
    for (auto &[x, a, b] : stas) {
        cin >> x >> a >> b;
    }
    sort(ALL(stas));
    Vec<i32> idx(n);
    iota(ALL(idx), 0);
    sort(ALL(idx), [&](i32 i, i32 j) -> bool {
        return get<2>(stas[i]) > get<2>(stas[j]);
    });
    SegmentTree<Ops> seg(n + 2);
    seg.update(0, Range(0, 0, 0, 0));
    seg.update(n + 1, Range(d, d, 0, 0));
    DBG(seg.all_prod().a);
    DBG(seg.all_prod().b);
    i64 ans = d;
    for (i32 i : idx) {
        auto [x, a, b] = stas[i];
        seg.update(i + 1, Range(x, x, a, 0));
        i64 f = seg.all_prod().b;
        if (f <= b) {
            chmin(ans, f);
        }
        DBG(seg.all_prod().a);
        DBG(seg.all_prod().b);
        DBG(i);
    }
    cout << ans << '\n';
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 320 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 0 ms 328 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 320 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 0 ms 316 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 0 ms 212 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 320 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 165 ms 49712 KB Output is correct
2 Correct 165 ms 49720 KB Output is correct
3 Correct 166 ms 49712 KB Output is correct
4 Correct 165 ms 49732 KB Output is correct
5 Correct 162 ms 50240 KB Output is correct
6 Correct 163 ms 49292 KB Output is correct
7 Correct 182 ms 49168 KB Output is correct
8 Correct 165 ms 49612 KB Output is correct
9 Correct 165 ms 50368 KB Output is correct
10 Correct 170 ms 49092 KB Output is correct
11 Correct 160 ms 49096 KB Output is correct
12 Correct 161 ms 49724 KB Output is correct
13 Correct 169 ms 49080 KB Output is correct
14 Correct 169 ms 49716 KB Output is correct
15 Correct 165 ms 49740 KB Output is correct
16 Correct 177 ms 50292 KB Output is correct
17 Correct 164 ms 50360 KB Output is correct
18 Correct 164 ms 49716 KB Output is correct
19 Correct 164 ms 49740 KB Output is correct
20 Correct 172 ms 49852 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 5 ms 1768 KB Output is correct
3 Correct 5 ms 1736 KB Output is correct
4 Correct 4 ms 1704 KB Output is correct
5 Correct 5 ms 1748 KB Output is correct
6 Correct 5 ms 1748 KB Output is correct
7 Correct 5 ms 1748 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 0 ms 316 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 0 ms 212 KB Output is correct
13 Correct 1 ms 316 KB Output is correct
14 Correct 5 ms 1748 KB Output is correct
15 Correct 5 ms 1748 KB Output is correct
16 Correct 5 ms 1740 KB Output is correct
17 Correct 5 ms 1748 KB Output is correct
18 Correct 5 ms 1696 KB Output is correct
19 Correct 5 ms 1736 KB Output is correct
20 Correct 5 ms 1748 KB Output is correct
21 Correct 5 ms 1748 KB Output is correct
22 Correct 5 ms 1728 KB Output is correct
23 Correct 5 ms 1740 KB Output is correct
24 Correct 5 ms 1708 KB Output is correct
25 Correct 5 ms 1748 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 5 ms 1768 KB Output is correct
3 Correct 5 ms 1736 KB Output is correct
4 Correct 4 ms 1704 KB Output is correct
5 Correct 5 ms 1748 KB Output is correct
6 Correct 5 ms 1748 KB Output is correct
7 Correct 5 ms 1748 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 0 ms 316 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 0 ms 212 KB Output is correct
13 Correct 1 ms 316 KB Output is correct
14 Correct 5 ms 1748 KB Output is correct
15 Correct 5 ms 1748 KB Output is correct
16 Correct 5 ms 1740 KB Output is correct
17 Correct 5 ms 1748 KB Output is correct
18 Correct 5 ms 1696 KB Output is correct
19 Correct 5 ms 1736 KB Output is correct
20 Correct 5 ms 1748 KB Output is correct
21 Correct 5 ms 1748 KB Output is correct
22 Correct 5 ms 1728 KB Output is correct
23 Correct 5 ms 1740 KB Output is correct
24 Correct 5 ms 1708 KB Output is correct
25 Correct 5 ms 1748 KB Output is correct
26 Correct 1 ms 212 KB Output is correct
27 Correct 204 ms 45628 KB Output is correct
28 Correct 190 ms 45364 KB Output is correct
29 Correct 184 ms 45084 KB Output is correct
30 Correct 189 ms 45156 KB Output is correct
31 Correct 218 ms 45740 KB Output is correct
32 Correct 192 ms 45444 KB Output is correct
33 Correct 0 ms 316 KB Output is correct
34 Correct 0 ms 212 KB Output is correct
35 Correct 0 ms 212 KB Output is correct
36 Correct 0 ms 212 KB Output is correct
37 Correct 0 ms 324 KB Output is correct
38 Correct 0 ms 212 KB Output is correct
39 Correct 207 ms 45628 KB Output is correct
40 Correct 200 ms 45632 KB Output is correct
41 Correct 188 ms 45636 KB Output is correct
42 Correct 206 ms 45748 KB Output is correct
43 Correct 190 ms 45672 KB Output is correct
44 Correct 158 ms 45112 KB Output is correct
45 Correct 123 ms 44736 KB Output is correct
46 Correct 200 ms 45740 KB Output is correct
47 Correct 154 ms 47204 KB Output is correct
48 Correct 153 ms 47216 KB Output is correct
49 Correct 197 ms 45008 KB Output is correct
50 Correct 203 ms 45332 KB Output is correct
51 Correct 186 ms 45380 KB Output is correct
52 Correct 199 ms 45240 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 320 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 0 ms 328 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 320 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 0 ms 316 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 0 ms 212 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 320 KB Output is correct
16 Correct 0 ms 212 KB Output is correct
17 Correct 0 ms 320 KB Output is correct
18 Correct 0 ms 320 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 1 ms 316 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 0 ms 212 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 0 ms 212 KB Output is correct
26 Correct 1 ms 212 KB Output is correct
27 Correct 0 ms 212 KB Output is correct
28 Correct 0 ms 212 KB Output is correct
29 Correct 1 ms 212 KB Output is correct
30 Correct 0 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 320 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 0 ms 328 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 320 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 0 ms 316 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 0 ms 212 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 320 KB Output is correct
16 Correct 0 ms 212 KB Output is correct
17 Correct 5 ms 1768 KB Output is correct
18 Correct 5 ms 1736 KB Output is correct
19 Correct 4 ms 1704 KB Output is correct
20 Correct 5 ms 1748 KB Output is correct
21 Correct 5 ms 1748 KB Output is correct
22 Correct 5 ms 1748 KB Output is correct
23 Correct 0 ms 212 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 0 ms 316 KB Output is correct
26 Correct 0 ms 212 KB Output is correct
27 Correct 0 ms 212 KB Output is correct
28 Correct 1 ms 316 KB Output is correct
29 Correct 5 ms 1748 KB Output is correct
30 Correct 5 ms 1748 KB Output is correct
31 Correct 5 ms 1740 KB Output is correct
32 Correct 5 ms 1748 KB Output is correct
33 Correct 5 ms 1696 KB Output is correct
34 Correct 5 ms 1736 KB Output is correct
35 Correct 5 ms 1748 KB Output is correct
36 Correct 5 ms 1748 KB Output is correct
37 Correct 5 ms 1728 KB Output is correct
38 Correct 5 ms 1740 KB Output is correct
39 Correct 5 ms 1708 KB Output is correct
40 Correct 5 ms 1748 KB Output is correct
41 Correct 0 ms 212 KB Output is correct
42 Correct 6 ms 1748 KB Output is correct
43 Correct 6 ms 1864 KB Output is correct
44 Correct 5 ms 1888 KB Output is correct
45 Correct 6 ms 1876 KB Output is correct
46 Correct 6 ms 1904 KB Output is correct
47 Correct 6 ms 1876 KB Output is correct
48 Correct 0 ms 320 KB Output is correct
49 Correct 1 ms 320 KB Output is correct
50 Correct 0 ms 212 KB Output is correct
51 Correct 0 ms 212 KB Output is correct
52 Correct 0 ms 212 KB Output is correct
53 Correct 0 ms 212 KB Output is correct
54 Correct 5 ms 1876 KB Output is correct
55 Correct 6 ms 1884 KB Output is correct
56 Correct 6 ms 1876 KB Output is correct
57 Correct 5 ms 1876 KB Output is correct
58 Correct 6 ms 1868 KB Output is correct
59 Correct 6 ms 1844 KB Output is correct
60 Correct 6 ms 1876 KB Output is correct
61 Correct 6 ms 1876 KB Output is correct
62 Correct 6 ms 1876 KB Output is correct
63 Correct 5 ms 1876 KB Output is correct
64 Correct 7 ms 1876 KB Output is correct
65 Correct 5 ms 1748 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 320 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 0 ms 328 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 320 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 0 ms 316 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 0 ms 212 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 320 KB Output is correct
16 Correct 165 ms 49712 KB Output is correct
17 Correct 165 ms 49720 KB Output is correct
18 Correct 166 ms 49712 KB Output is correct
19 Correct 165 ms 49732 KB Output is correct
20 Correct 162 ms 50240 KB Output is correct
21 Correct 163 ms 49292 KB Output is correct
22 Correct 182 ms 49168 KB Output is correct
23 Correct 165 ms 49612 KB Output is correct
24 Correct 165 ms 50368 KB Output is correct
25 Correct 170 ms 49092 KB Output is correct
26 Correct 160 ms 49096 KB Output is correct
27 Correct 161 ms 49724 KB Output is correct
28 Correct 169 ms 49080 KB Output is correct
29 Correct 169 ms 49716 KB Output is correct
30 Correct 165 ms 49740 KB Output is correct
31 Correct 177 ms 50292 KB Output is correct
32 Correct 164 ms 50360 KB Output is correct
33 Correct 164 ms 49716 KB Output is correct
34 Correct 164 ms 49740 KB Output is correct
35 Correct 172 ms 49852 KB Output is correct
36 Correct 0 ms 212 KB Output is correct
37 Correct 5 ms 1768 KB Output is correct
38 Correct 5 ms 1736 KB Output is correct
39 Correct 4 ms 1704 KB Output is correct
40 Correct 5 ms 1748 KB Output is correct
41 Correct 5 ms 1748 KB Output is correct
42 Correct 5 ms 1748 KB Output is correct
43 Correct 0 ms 212 KB Output is correct
44 Correct 0 ms 212 KB Output is correct
45 Correct 0 ms 316 KB Output is correct
46 Correct 0 ms 212 KB Output is correct
47 Correct 0 ms 212 KB Output is correct
48 Correct 1 ms 316 KB Output is correct
49 Correct 5 ms 1748 KB Output is correct
50 Correct 5 ms 1748 KB Output is correct
51 Correct 5 ms 1740 KB Output is correct
52 Correct 5 ms 1748 KB Output is correct
53 Correct 5 ms 1696 KB Output is correct
54 Correct 5 ms 1736 KB Output is correct
55 Correct 5 ms 1748 KB Output is correct
56 Correct 5 ms 1748 KB Output is correct
57 Correct 5 ms 1728 KB Output is correct
58 Correct 5 ms 1740 KB Output is correct
59 Correct 5 ms 1708 KB Output is correct
60 Correct 5 ms 1748 KB Output is correct
61 Correct 1 ms 212 KB Output is correct
62 Correct 204 ms 45628 KB Output is correct
63 Correct 190 ms 45364 KB Output is correct
64 Correct 184 ms 45084 KB Output is correct
65 Correct 189 ms 45156 KB Output is correct
66 Correct 218 ms 45740 KB Output is correct
67 Correct 192 ms 45444 KB Output is correct
68 Correct 0 ms 316 KB Output is correct
69 Correct 0 ms 212 KB Output is correct
70 Correct 0 ms 212 KB Output is correct
71 Correct 0 ms 212 KB Output is correct
72 Correct 0 ms 324 KB Output is correct
73 Correct 0 ms 212 KB Output is correct
74 Correct 207 ms 45628 KB Output is correct
75 Correct 200 ms 45632 KB Output is correct
76 Correct 188 ms 45636 KB Output is correct
77 Correct 206 ms 45748 KB Output is correct
78 Correct 190 ms 45672 KB Output is correct
79 Correct 158 ms 45112 KB Output is correct
80 Correct 123 ms 44736 KB Output is correct
81 Correct 200 ms 45740 KB Output is correct
82 Correct 154 ms 47204 KB Output is correct
83 Correct 153 ms 47216 KB Output is correct
84 Correct 197 ms 45008 KB Output is correct
85 Correct 203 ms 45332 KB Output is correct
86 Correct 186 ms 45380 KB Output is correct
87 Correct 199 ms 45240 KB Output is correct
88 Correct 0 ms 212 KB Output is correct
89 Correct 0 ms 320 KB Output is correct
90 Correct 0 ms 320 KB Output is correct
91 Correct 0 ms 212 KB Output is correct
92 Correct 0 ms 212 KB Output is correct
93 Correct 1 ms 316 KB Output is correct
94 Correct 0 ms 212 KB Output is correct
95 Correct 0 ms 212 KB Output is correct
96 Correct 0 ms 212 KB Output is correct
97 Correct 0 ms 212 KB Output is correct
98 Correct 1 ms 212 KB Output is correct
99 Correct 0 ms 212 KB Output is correct
100 Correct 0 ms 212 KB Output is correct
101 Correct 1 ms 212 KB Output is correct
102 Correct 0 ms 212 KB Output is correct
103 Correct 0 ms 212 KB Output is correct
104 Correct 6 ms 1748 KB Output is correct
105 Correct 6 ms 1864 KB Output is correct
106 Correct 5 ms 1888 KB Output is correct
107 Correct 6 ms 1876 KB Output is correct
108 Correct 6 ms 1904 KB Output is correct
109 Correct 6 ms 1876 KB Output is correct
110 Correct 0 ms 320 KB Output is correct
111 Correct 1 ms 320 KB Output is correct
112 Correct 0 ms 212 KB Output is correct
113 Correct 0 ms 212 KB Output is correct
114 Correct 0 ms 212 KB Output is correct
115 Correct 0 ms 212 KB Output is correct
116 Correct 5 ms 1876 KB Output is correct
117 Correct 6 ms 1884 KB Output is correct
118 Correct 6 ms 1876 KB Output is correct
119 Correct 5 ms 1876 KB Output is correct
120 Correct 6 ms 1868 KB Output is correct
121 Correct 6 ms 1844 KB Output is correct
122 Correct 6 ms 1876 KB Output is correct
123 Correct 6 ms 1876 KB Output is correct
124 Correct 6 ms 1876 KB Output is correct
125 Correct 5 ms 1876 KB Output is correct
126 Correct 7 ms 1876 KB Output is correct
127 Correct 5 ms 1748 KB Output is correct
128 Correct 1 ms 212 KB Output is correct
129 Correct 218 ms 48836 KB Output is correct
130 Correct 227 ms 49592 KB Output is correct
131 Correct 216 ms 49980 KB Output is correct
132 Correct 220 ms 49356 KB Output is correct
133 Correct 235 ms 49604 KB Output is correct
134 Correct 215 ms 50084 KB Output is correct
135 Correct 0 ms 320 KB Output is correct
136 Correct 1 ms 212 KB Output is correct
137 Correct 0 ms 212 KB Output is correct
138 Correct 0 ms 212 KB Output is correct
139 Correct 0 ms 212 KB Output is correct
140 Correct 1 ms 212 KB Output is correct
141 Correct 225 ms 50228 KB Output is correct
142 Correct 229 ms 49688 KB Output is correct
143 Correct 228 ms 50100 KB Output is correct
144 Correct 218 ms 50000 KB Output is correct
145 Correct 218 ms 50228 KB Output is correct
146 Correct 213 ms 48404 KB Output is correct
147 Correct 203 ms 49100 KB Output is correct
148 Correct 207 ms 48540 KB Output is correct
149 Correct 241 ms 49720 KB Output is correct
150 Correct 166 ms 49596 KB Output is correct
151 Correct 164 ms 49720 KB Output is correct
152 Correct 221 ms 49340 KB Output is correct
153 Correct 233 ms 49416 KB Output is correct
154 Correct 210 ms 49332 KB Output is correct
155 Correct 228 ms 49560 KB Output is correct