Submission #676919

# Submission time Handle Problem Language Result Execution time Memory
676919 2023-01-01T15:10:35 Z dooompy Alternating Current (BOI18_alternating) C++17
100 / 100
128 ms 23916 KB
#include "bits/stdc++.h"

using namespace std;

void abc() {cout << endl;}
template <typename T, typename ...U> void abc(T a, U ...b) {
    cout << a << ' ', abc(b...);
}
template <typename T> void printv(T l, T r) {
    while (l != r) cout << *l << " \n"[++l == r];
}
template <typename A, typename B> istream& operator >> (istream& o, pair<A, B> &a) {
    return o >> a.first >> a.second;
}
template <typename A, typename B> ostream& operator << (ostream& o, pair<A, B> a) {
    return o << '(' << a.first << ", " << a.second << ')';
}
template <typename T> ostream& operator << (ostream& o, vector<T> a) {
    bool is = false;
    for (T i : a) {o << (is ? ' ' : '{'), is = true, o << i;}
    return o << '}';
}

#ifdef local
#define test(args...) abc("[" + string(#args) + "]", args)
#else
#define test(args...) void(0)
#endif

using ll = long long;

struct wire {
    int l, r, len, idx;
};

vector<wire> wires;
const int MAXT = 555555;

struct bit {
    pair<int, int> tree[MAXT];

    void init() {
        fill(tree, tree+MAXT, pair<int, int> {0, 0});
    }

    void upd(int x, pair<int, int> v) {
        for (; x < MAXT; x += x & (-x)) tree[x] = max(tree[x], v);
    }

    pair<int, int> query(int x) {
        pair<int, int> res = {0, 0};

        for (; x; x -= x & (-x)) {
            res = max(res, tree[x]);
        }

        return res;
    }
} bt;

struct segtree {
    int tree[MAXT];
    int lazy[MAXT];

    void init() {
        fill(tree, tree+MAXT, 0);
        fill(lazy, lazy+MAXT, 0);
    }

    void pushdown(int x, int l, int r) {
        if (l == r) return;

        int mid = (l + r) / 2;

        tree[2 * x] += lazy[x];
        tree[2 * x + 1] += lazy[x];
        lazy[2 * x] += lazy[x];
        lazy[2 * x + 1] += lazy[x];

        lazy[x] = 0;
        return;
    }

    void update(int x, int l, int r, int ql, int qr, int v) {
        pushdown(x, l, r);
        if (ql <= l && r <= qr) {
            lazy[x] += v;
            tree[x] += v;
            return;
        }

        if (l > qr || ql > r) return;

        int mid = (l + r) / 2;

        update(2 * x, l, mid, ql, qr, v);
        update(2* x + 1, mid + 1, r, ql, qr, v);

        tree[x] = min(tree[ 2 * x], tree[2 * x + 1]);
    }

} segs[2];

int par[200005];
vector<int> adj[200005];
int col[200005];

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
//    freopen("", "r", stdin);
//    freopen("", "w", stdout);
    int n, m; cin >> n >> m;

    bt.init();

    segs[0].init(); segs[1].init();

    for (int i = 0; i < m; i++) {
        int a, b; cin >> a >> b;
        if (b < a) {
            wires.push_back({a, b, b + (n - a) + 1, i});
        } else wires.push_back({a, b, b - a + 1, i});
    }

    sort(wires.begin(), wires.end(), [](wire a, wire b) {
        return a.len < b.len;
    });

    vector<wire> doms;

    for (int i = m - 1; i >= 0; i--) {
        int st = wires[i].l, en = wires[i].r;
        if (en < st) en += n;

        auto q = bt.query(st);

        int dom = -1;

        if (q.first >= en) {
            dom = q.second;
        }

        if (dom == -1 && wires[i].l <= wires[i].r) {
            q = bt.query(wires[i].l + n);

            if (q.first >= wires[i].r + n) {
                dom = q.second;
            }
        }

        par[wires[i].idx] = dom;
        if (dom != -1) {
            adj[dom].push_back(wires[i].idx);
        }
        if (par[wires[i].idx] == -1) {
            doms.push_back(wires[i]);

            bt.upd(st, {en, wires[i].idx});

            if (wires[i].l <= wires[i].r) {
                bt.upd(st + n, {en + n, wires[i].idx});
            }
        }
    }

    sort(doms.begin(), doms.end(), [](wire a, wire b) {
        return a.l < b.l;
    });

    sort(wires.begin(), wires.end(), [](wire a, wire b) {
        return a.idx < b.idx;
    });

//    cout << segs[0].query(1, 1, n, 1, n) << endl;


    auto upd = [&](int idx, int v) {
        if (wires[idx].l <= wires[idx].r) {
            segs[col[idx] - 1].update(1, 1, n, wires[idx].l, wires[idx].r, v);
        } else {
            segs[col[idx] - 1].update(1, 1, n, 1, wires[idx].r, v);
            segs[col[idx] - 1].update(1, 1, n, wires[idx].l, n, v);
        }
    };

    int ct = 0;

    for (int i = 0; i < doms.size(); i++) {
        col[doms[i].idx] = 1 + (i % 2);
    }

    for (int i = 0; i < m; i++) {
        if (par[i] != -1) {
            col[i] = 3 - col[par[i]];
        }
    }

    for (int i = 0; i < m; i++) {
        upd(i, 1);
    }

    if (segs[0].tree[1] > 0 && segs[1].tree[1] > 0) {
        for (int i = 0; i < m; i++) {
            cout << col[i] - 1;
        }
        return 0;
    }

    if (doms.size() % 2 == 0 || doms.size() <= 1) {
        cout << "impossible";
        return 0;
    }

    for (int i = 0; i < doms.size(); i++) {
        upd(doms[i].idx, -1);
        col[doms[i].idx] = 3 - col[doms[i].idx];
        upd(doms[i].idx, 1);
        for (auto nxt : adj[doms[i].idx]) {
            upd(nxt, -1);
            col[nxt] = 3 - col[nxt];
            upd(nxt, 1);
        }

        if (segs[0].tree[1] > 0 && segs[1].tree[1] > 0) {
            for (int i = 0; i < m; i++) {
                cout << col[i] - 1;
            }
            return 0;
        }
    }

    cout << "impossible";
}

Compilation message

alternating.cpp: In member function 'void segtree::pushdown(int, int, int)':
alternating.cpp:73:13: warning: unused variable 'mid' [-Wunused-variable]
   73 |         int mid = (l + r) / 2;
      |             ^~~
alternating.cpp: In function 'int main()':
alternating.cpp:189:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<wire>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  189 |     for (int i = 0; i < doms.size(); i++) {
      |                     ~~^~~~~~~~~~~~~
alternating.cpp:215:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<wire>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  215 |     for (int i = 0; i < doms.size(); i++) {
      |                     ~~^~~~~~~~~~~~~
alternating.cpp:187:9: warning: unused variable 'ct' [-Wunused-variable]
  187 |     int ct = 0;
      |         ^~
# Verdict Execution time Memory Grader output
1 Correct 9 ms 18004 KB Output is correct
2 Correct 9 ms 17956 KB Output is correct
3 Correct 10 ms 18004 KB Output is correct
4 Correct 9 ms 18004 KB Output is correct
5 Correct 8 ms 18004 KB Output is correct
6 Correct 8 ms 18004 KB Output is correct
7 Correct 10 ms 17964 KB Output is correct
8 Correct 8 ms 17952 KB Output is correct
9 Correct 8 ms 18004 KB Output is correct
10 Correct 9 ms 17956 KB Output is correct
11 Correct 8 ms 18004 KB Output is correct
12 Correct 8 ms 18076 KB Output is correct
13 Correct 10 ms 17960 KB Output is correct
14 Correct 9 ms 18004 KB Output is correct
15 Correct 8 ms 18076 KB Output is correct
16 Correct 9 ms 18004 KB Output is correct
17 Correct 9 ms 18004 KB Output is correct
18 Correct 8 ms 17964 KB Output is correct
19 Correct 8 ms 17956 KB Output is correct
20 Correct 11 ms 18028 KB Output is correct
21 Correct 9 ms 18004 KB Output is correct
22 Correct 9 ms 18004 KB Output is correct
23 Correct 8 ms 17960 KB Output is correct
24 Correct 9 ms 18076 KB Output is correct
25 Correct 8 ms 18004 KB Output is correct
26 Correct 8 ms 18004 KB Output is correct
27 Correct 8 ms 17956 KB Output is correct
28 Correct 8 ms 17964 KB Output is correct
29 Correct 9 ms 18084 KB Output is correct
30 Correct 8 ms 18004 KB Output is correct
31 Correct 8 ms 17960 KB Output is correct
32 Correct 8 ms 18004 KB Output is correct
33 Correct 8 ms 18004 KB Output is correct
34 Correct 8 ms 17964 KB Output is correct
35 Correct 8 ms 17952 KB Output is correct
36 Correct 8 ms 18024 KB Output is correct
37 Correct 8 ms 18004 KB Output is correct
38 Correct 9 ms 18004 KB Output is correct
39 Correct 8 ms 17960 KB Output is correct
40 Correct 8 ms 18004 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 9 ms 18004 KB Output is correct
2 Correct 9 ms 17956 KB Output is correct
3 Correct 10 ms 18004 KB Output is correct
4 Correct 9 ms 18004 KB Output is correct
5 Correct 8 ms 18004 KB Output is correct
6 Correct 8 ms 18004 KB Output is correct
7 Correct 10 ms 17964 KB Output is correct
8 Correct 8 ms 17952 KB Output is correct
9 Correct 8 ms 18004 KB Output is correct
10 Correct 9 ms 17956 KB Output is correct
11 Correct 8 ms 18004 KB Output is correct
12 Correct 8 ms 18076 KB Output is correct
13 Correct 10 ms 17960 KB Output is correct
14 Correct 9 ms 18004 KB Output is correct
15 Correct 8 ms 18076 KB Output is correct
16 Correct 9 ms 18004 KB Output is correct
17 Correct 9 ms 18004 KB Output is correct
18 Correct 8 ms 17964 KB Output is correct
19 Correct 8 ms 17956 KB Output is correct
20 Correct 11 ms 18028 KB Output is correct
21 Correct 9 ms 18004 KB Output is correct
22 Correct 9 ms 18004 KB Output is correct
23 Correct 8 ms 17960 KB Output is correct
24 Correct 9 ms 18076 KB Output is correct
25 Correct 8 ms 18004 KB Output is correct
26 Correct 8 ms 18004 KB Output is correct
27 Correct 8 ms 17956 KB Output is correct
28 Correct 8 ms 17964 KB Output is correct
29 Correct 9 ms 18084 KB Output is correct
30 Correct 8 ms 18004 KB Output is correct
31 Correct 8 ms 17960 KB Output is correct
32 Correct 8 ms 18004 KB Output is correct
33 Correct 8 ms 18004 KB Output is correct
34 Correct 8 ms 17964 KB Output is correct
35 Correct 8 ms 17952 KB Output is correct
36 Correct 8 ms 18024 KB Output is correct
37 Correct 8 ms 18004 KB Output is correct
38 Correct 9 ms 18004 KB Output is correct
39 Correct 8 ms 17960 KB Output is correct
40 Correct 8 ms 18004 KB Output is correct
41 Correct 9 ms 18092 KB Output is correct
42 Correct 8 ms 18004 KB Output is correct
43 Correct 8 ms 18004 KB Output is correct
44 Correct 9 ms 17956 KB Output is correct
45 Correct 9 ms 17956 KB Output is correct
46 Correct 9 ms 18012 KB Output is correct
47 Correct 9 ms 18072 KB Output is correct
48 Correct 10 ms 18088 KB Output is correct
49 Correct 9 ms 18004 KB Output is correct
50 Correct 8 ms 18004 KB Output is correct
51 Correct 9 ms 17968 KB Output is correct
52 Correct 8 ms 18004 KB Output is correct
53 Correct 10 ms 18004 KB Output is correct
54 Correct 8 ms 18004 KB Output is correct
55 Correct 9 ms 18004 KB Output is correct
56 Correct 8 ms 18004 KB Output is correct
57 Correct 9 ms 18004 KB Output is correct
58 Correct 9 ms 18080 KB Output is correct
59 Correct 9 ms 18048 KB Output is correct
60 Correct 9 ms 18004 KB Output is correct
61 Correct 9 ms 18004 KB Output is correct
62 Correct 9 ms 17964 KB Output is correct
63 Correct 9 ms 18004 KB Output is correct
64 Correct 9 ms 18004 KB Output is correct
65 Correct 9 ms 17964 KB Output is correct
66 Correct 8 ms 17956 KB Output is correct
67 Correct 10 ms 18004 KB Output is correct
68 Correct 9 ms 17960 KB Output is correct
69 Correct 9 ms 18004 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 9 ms 18004 KB Output is correct
2 Correct 9 ms 17956 KB Output is correct
3 Correct 10 ms 18004 KB Output is correct
4 Correct 9 ms 18004 KB Output is correct
5 Correct 8 ms 18004 KB Output is correct
6 Correct 8 ms 18004 KB Output is correct
7 Correct 10 ms 17964 KB Output is correct
8 Correct 8 ms 17952 KB Output is correct
9 Correct 8 ms 18004 KB Output is correct
10 Correct 9 ms 17956 KB Output is correct
11 Correct 8 ms 18004 KB Output is correct
12 Correct 8 ms 18076 KB Output is correct
13 Correct 10 ms 17960 KB Output is correct
14 Correct 9 ms 18004 KB Output is correct
15 Correct 8 ms 18076 KB Output is correct
16 Correct 9 ms 18004 KB Output is correct
17 Correct 9 ms 18004 KB Output is correct
18 Correct 8 ms 17964 KB Output is correct
19 Correct 8 ms 17956 KB Output is correct
20 Correct 11 ms 18028 KB Output is correct
21 Correct 9 ms 18004 KB Output is correct
22 Correct 9 ms 18004 KB Output is correct
23 Correct 8 ms 17960 KB Output is correct
24 Correct 9 ms 18076 KB Output is correct
25 Correct 8 ms 18004 KB Output is correct
26 Correct 8 ms 18004 KB Output is correct
27 Correct 8 ms 17956 KB Output is correct
28 Correct 8 ms 17964 KB Output is correct
29 Correct 9 ms 18084 KB Output is correct
30 Correct 8 ms 18004 KB Output is correct
31 Correct 8 ms 17960 KB Output is correct
32 Correct 8 ms 18004 KB Output is correct
33 Correct 8 ms 18004 KB Output is correct
34 Correct 8 ms 17964 KB Output is correct
35 Correct 8 ms 17952 KB Output is correct
36 Correct 8 ms 18024 KB Output is correct
37 Correct 8 ms 18004 KB Output is correct
38 Correct 9 ms 18004 KB Output is correct
39 Correct 8 ms 17960 KB Output is correct
40 Correct 8 ms 18004 KB Output is correct
41 Correct 9 ms 18092 KB Output is correct
42 Correct 8 ms 18004 KB Output is correct
43 Correct 8 ms 18004 KB Output is correct
44 Correct 9 ms 17956 KB Output is correct
45 Correct 9 ms 17956 KB Output is correct
46 Correct 9 ms 18012 KB Output is correct
47 Correct 9 ms 18072 KB Output is correct
48 Correct 10 ms 18088 KB Output is correct
49 Correct 9 ms 18004 KB Output is correct
50 Correct 8 ms 18004 KB Output is correct
51 Correct 9 ms 17968 KB Output is correct
52 Correct 8 ms 18004 KB Output is correct
53 Correct 10 ms 18004 KB Output is correct
54 Correct 8 ms 18004 KB Output is correct
55 Correct 9 ms 18004 KB Output is correct
56 Correct 8 ms 18004 KB Output is correct
57 Correct 9 ms 18004 KB Output is correct
58 Correct 9 ms 18080 KB Output is correct
59 Correct 9 ms 18048 KB Output is correct
60 Correct 9 ms 18004 KB Output is correct
61 Correct 9 ms 18004 KB Output is correct
62 Correct 9 ms 17964 KB Output is correct
63 Correct 9 ms 18004 KB Output is correct
64 Correct 9 ms 18004 KB Output is correct
65 Correct 9 ms 17964 KB Output is correct
66 Correct 8 ms 17956 KB Output is correct
67 Correct 10 ms 18004 KB Output is correct
68 Correct 9 ms 17960 KB Output is correct
69 Correct 9 ms 18004 KB Output is correct
70 Correct 8 ms 18132 KB Output is correct
71 Correct 9 ms 18096 KB Output is correct
72 Correct 8 ms 18068 KB Output is correct
73 Correct 9 ms 17996 KB Output is correct
74 Correct 8 ms 18004 KB Output is correct
75 Correct 9 ms 18044 KB Output is correct
76 Correct 8 ms 18004 KB Output is correct
77 Correct 9 ms 18004 KB Output is correct
78 Correct 8 ms 18092 KB Output is correct
79 Correct 9 ms 18004 KB Output is correct
80 Correct 9 ms 18056 KB Output is correct
81 Correct 10 ms 17992 KB Output is correct
82 Correct 9 ms 18004 KB Output is correct
83 Correct 9 ms 18096 KB Output is correct
84 Correct 9 ms 18132 KB Output is correct
85 Correct 9 ms 18004 KB Output is correct
86 Correct 8 ms 17964 KB Output is correct
87 Correct 9 ms 18132 KB Output is correct
88 Correct 8 ms 18004 KB Output is correct
89 Correct 9 ms 18084 KB Output is correct
90 Correct 9 ms 18132 KB Output is correct
91 Correct 8 ms 18004 KB Output is correct
92 Correct 10 ms 18000 KB Output is correct
93 Correct 8 ms 18004 KB Output is correct
94 Correct 10 ms 17956 KB Output is correct
95 Correct 9 ms 17956 KB Output is correct
96 Correct 9 ms 18136 KB Output is correct
97 Correct 9 ms 18004 KB Output is correct
98 Correct 9 ms 18004 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 32 ms 21572 KB Output is correct
2 Correct 9 ms 18004 KB Output is correct
3 Correct 36 ms 19764 KB Output is correct
4 Correct 40 ms 19884 KB Output is correct
5 Correct 88 ms 22252 KB Output is correct
6 Correct 128 ms 22772 KB Output is correct
7 Correct 68 ms 22080 KB Output is correct
8 Correct 11 ms 18132 KB Output is correct
9 Correct 9 ms 18004 KB Output is correct
10 Correct 81 ms 23468 KB Output is correct
11 Correct 59 ms 21580 KB Output is correct
12 Correct 56 ms 22124 KB Output is correct
13 Correct 9 ms 18004 KB Output is correct
14 Correct 9 ms 18004 KB Output is correct
15 Correct 65 ms 22512 KB Output is correct
16 Correct 90 ms 21104 KB Output is correct
17 Correct 88 ms 22232 KB Output is correct
18 Correct 71 ms 22336 KB Output is correct
19 Correct 13 ms 18400 KB Output is correct
20 Correct 60 ms 23916 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 9 ms 18004 KB Output is correct
2 Correct 9 ms 17956 KB Output is correct
3 Correct 10 ms 18004 KB Output is correct
4 Correct 9 ms 18004 KB Output is correct
5 Correct 8 ms 18004 KB Output is correct
6 Correct 8 ms 18004 KB Output is correct
7 Correct 10 ms 17964 KB Output is correct
8 Correct 8 ms 17952 KB Output is correct
9 Correct 8 ms 18004 KB Output is correct
10 Correct 9 ms 17956 KB Output is correct
11 Correct 8 ms 18004 KB Output is correct
12 Correct 8 ms 18076 KB Output is correct
13 Correct 10 ms 17960 KB Output is correct
14 Correct 9 ms 18004 KB Output is correct
15 Correct 8 ms 18076 KB Output is correct
16 Correct 9 ms 18004 KB Output is correct
17 Correct 9 ms 18004 KB Output is correct
18 Correct 8 ms 17964 KB Output is correct
19 Correct 8 ms 17956 KB Output is correct
20 Correct 11 ms 18028 KB Output is correct
21 Correct 9 ms 18004 KB Output is correct
22 Correct 9 ms 18004 KB Output is correct
23 Correct 8 ms 17960 KB Output is correct
24 Correct 9 ms 18076 KB Output is correct
25 Correct 8 ms 18004 KB Output is correct
26 Correct 8 ms 18004 KB Output is correct
27 Correct 8 ms 17956 KB Output is correct
28 Correct 8 ms 17964 KB Output is correct
29 Correct 9 ms 18084 KB Output is correct
30 Correct 8 ms 18004 KB Output is correct
31 Correct 8 ms 17960 KB Output is correct
32 Correct 8 ms 18004 KB Output is correct
33 Correct 8 ms 18004 KB Output is correct
34 Correct 8 ms 17964 KB Output is correct
35 Correct 8 ms 17952 KB Output is correct
36 Correct 8 ms 18024 KB Output is correct
37 Correct 8 ms 18004 KB Output is correct
38 Correct 9 ms 18004 KB Output is correct
39 Correct 8 ms 17960 KB Output is correct
40 Correct 8 ms 18004 KB Output is correct
41 Correct 9 ms 18092 KB Output is correct
42 Correct 8 ms 18004 KB Output is correct
43 Correct 8 ms 18004 KB Output is correct
44 Correct 9 ms 17956 KB Output is correct
45 Correct 9 ms 17956 KB Output is correct
46 Correct 9 ms 18012 KB Output is correct
47 Correct 9 ms 18072 KB Output is correct
48 Correct 10 ms 18088 KB Output is correct
49 Correct 9 ms 18004 KB Output is correct
50 Correct 8 ms 18004 KB Output is correct
51 Correct 9 ms 17968 KB Output is correct
52 Correct 8 ms 18004 KB Output is correct
53 Correct 10 ms 18004 KB Output is correct
54 Correct 8 ms 18004 KB Output is correct
55 Correct 9 ms 18004 KB Output is correct
56 Correct 8 ms 18004 KB Output is correct
57 Correct 9 ms 18004 KB Output is correct
58 Correct 9 ms 18080 KB Output is correct
59 Correct 9 ms 18048 KB Output is correct
60 Correct 9 ms 18004 KB Output is correct
61 Correct 9 ms 18004 KB Output is correct
62 Correct 9 ms 17964 KB Output is correct
63 Correct 9 ms 18004 KB Output is correct
64 Correct 9 ms 18004 KB Output is correct
65 Correct 9 ms 17964 KB Output is correct
66 Correct 8 ms 17956 KB Output is correct
67 Correct 10 ms 18004 KB Output is correct
68 Correct 9 ms 17960 KB Output is correct
69 Correct 9 ms 18004 KB Output is correct
70 Correct 8 ms 18132 KB Output is correct
71 Correct 9 ms 18096 KB Output is correct
72 Correct 8 ms 18068 KB Output is correct
73 Correct 9 ms 17996 KB Output is correct
74 Correct 8 ms 18004 KB Output is correct
75 Correct 9 ms 18044 KB Output is correct
76 Correct 8 ms 18004 KB Output is correct
77 Correct 9 ms 18004 KB Output is correct
78 Correct 8 ms 18092 KB Output is correct
79 Correct 9 ms 18004 KB Output is correct
80 Correct 9 ms 18056 KB Output is correct
81 Correct 10 ms 17992 KB Output is correct
82 Correct 9 ms 18004 KB Output is correct
83 Correct 9 ms 18096 KB Output is correct
84 Correct 9 ms 18132 KB Output is correct
85 Correct 9 ms 18004 KB Output is correct
86 Correct 8 ms 17964 KB Output is correct
87 Correct 9 ms 18132 KB Output is correct
88 Correct 8 ms 18004 KB Output is correct
89 Correct 9 ms 18084 KB Output is correct
90 Correct 9 ms 18132 KB Output is correct
91 Correct 8 ms 18004 KB Output is correct
92 Correct 10 ms 18000 KB Output is correct
93 Correct 8 ms 18004 KB Output is correct
94 Correct 10 ms 17956 KB Output is correct
95 Correct 9 ms 17956 KB Output is correct
96 Correct 9 ms 18136 KB Output is correct
97 Correct 9 ms 18004 KB Output is correct
98 Correct 9 ms 18004 KB Output is correct
99 Correct 32 ms 21572 KB Output is correct
100 Correct 9 ms 18004 KB Output is correct
101 Correct 36 ms 19764 KB Output is correct
102 Correct 40 ms 19884 KB Output is correct
103 Correct 88 ms 22252 KB Output is correct
104 Correct 128 ms 22772 KB Output is correct
105 Correct 68 ms 22080 KB Output is correct
106 Correct 11 ms 18132 KB Output is correct
107 Correct 9 ms 18004 KB Output is correct
108 Correct 81 ms 23468 KB Output is correct
109 Correct 59 ms 21580 KB Output is correct
110 Correct 56 ms 22124 KB Output is correct
111 Correct 9 ms 18004 KB Output is correct
112 Correct 9 ms 18004 KB Output is correct
113 Correct 65 ms 22512 KB Output is correct
114 Correct 90 ms 21104 KB Output is correct
115 Correct 88 ms 22232 KB Output is correct
116 Correct 71 ms 22336 KB Output is correct
117 Correct 13 ms 18400 KB Output is correct
118 Correct 60 ms 23916 KB Output is correct
119 Correct 9 ms 18088 KB Output is correct
120 Correct 95 ms 23356 KB Output is correct
121 Correct 60 ms 20956 KB Output is correct
122 Correct 9 ms 17960 KB Output is correct
123 Correct 16 ms 18388 KB Output is correct
124 Correct 33 ms 19876 KB Output is correct
125 Correct 30 ms 19524 KB Output is correct
126 Correct 9 ms 17996 KB Output is correct
127 Correct 18 ms 18520 KB Output is correct
128 Correct 66 ms 22520 KB Output is correct
129 Correct 41 ms 20188 KB Output is correct
130 Correct 60 ms 20924 KB Output is correct
131 Correct 9 ms 18004 KB Output is correct
132 Correct 10 ms 18092 KB Output is correct
133 Correct 98 ms 22252 KB Output is correct
134 Correct 33 ms 19156 KB Output is correct
135 Correct 8 ms 18004 KB Output is correct
136 Correct 49 ms 21748 KB Output is correct
137 Correct 103 ms 21640 KB Output is correct
138 Correct 9 ms 18132 KB Output is correct