답안 #830627

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
830627 2023-08-19T08:44:16 Z Johann Alternating Current (BOI18_alternating) C++14
100 / 100
108 ms 9900 KB
#include <bits/stdc++.h>
using namespace std;

#define pii pair<int,int>
#define vi vector<int>
#define vb vector<bool>
#define all(x) (x).begin(), (x).end()
#define sz(x) (int) (x).size()

struct wire {
    int a, b, idx;
};

struct item {
    int d1, d2;
    int f2f1, f2f2;
};
const item NEUTRAL = { 0, 0, INT_MAX, INT_MAX };
struct SegTree {
    vector<item> arr;
    int size;
    void update(item & self, item & c1, item & c2) {
        if (self.d1 > 0) self.f2f1 = INT_MAX;
        else if (c1.f2f1 != INT_MAX) self.f2f1 = c1.f2f1;
        else self.f2f1 = c2.f2f1;
        if (self.d2 > 0) self.f2f2 = INT_MAX;
        else if (c1.f2f2 != INT_MAX) self.f2f2 = c1.f2f2;
        else self.f2f2 = c2.f2f2;
    }
    void update(item & self, int pos) {
        self.f2f1 = (self.d1 > 0) ? INT_MAX : pos;
        self.f2f2 = (self.d2 > 0) ? INT_MAX : pos;
    }
    void init(int _n) {
        size = 1;
        while (size < _n) size *= 2;
        arr.assign(2 * size, { 0, 0, INT_MAX, INT_MAX });
        for (int i = 0; i < size; ++i) {
            arr[size + i] = { 0 , 0, i, i };
        }
        for (int x = size-1; x > 0; --x) update(arr[x], arr[2 * x], arr[2 * x + 1]);
    }
    item query(int a, int b) {
        if (a < b) {
            return query(a, b, 1, 0, size);
        } else {
            item ans = { 0, 0, INT_MAX, INT_MAX };
            item c1 = query(a, size, 1, 0, size);
            item c2 = query(0, b, 1, 0, size);
            if (c2.f2f1 != INT_MAX) c2.f2f1 += size;
            if (c2.f2f2 != INT_MAX) c2.f2f2 += size;
            update(ans, c1, c2);
            return ans;
        }
    }
    item query(int a, int b, int x, int lx, int rx) {
        if (a <= lx && rx <= b) { return arr[x] = arr[x]; }
        if (b <= lx || rx <= a) { return NEUTRAL; }
        int m = (lx + rx) / 2;
        item ans = { arr[x].d1, arr[x].d2, INT_MAX, INT_MAX };
        item c1 = query(a, b, 2 * x, lx, m);
        item c2 = query(a, b, 2 * x + 1, m, rx);
        update(ans, c1, c2);
        return ans;
    }
    void set(int a, int b, int c) {
        // current \in { +- 1, +- 2 }
        if (a < b) {
            set(a, b, c, 1, 0, size);
        } else {
            set(a, size, c, 1, 0, size);
            set(0, b, c, 1, 0, size);
        }
    }
    void set(int a, int b, int c, int x, int lx, int rx) {
        if (a <= lx && rx <= b) {
            if (abs(c) == 1) { arr[x].d1 += c; }
            else { arr[x].d2 += c / 2; }
            if (rx - lx > 1) update(arr[x], arr[2 * x], arr[2 * x + 1]);
            else update(arr[x], lx);
            return;
        }
        if (b <= lx || rx <= a) { return; }
        int m = (lx + rx) / 2;
        set(a, b, c, 2 * x, lx, m);
        set(a, b, c, 2*x+1, m, rx);
        update(arr[x], arr[2 * x], arr[2 * x + 1]);
    }
};


bool in(wire a, wire b, int N) { // ist a in b?
    int ea = a.b;
    if (a.b <= a.a) ea += N;
    int eb = b.b;
    if (b.b <= b.a) eb += N;
    return (b.a <= a.a && ea <= eb) || (b.a <= a.a + N && ea + N <= eb);
}

int alter(int state) {
    if (abs(state) == 1) return state * 2;
    else return state / 2;
}
void setSeg(SegTree & seg, wire & parent, vector<wire> & children, vi & states, int state) {
    states[parent.idx] = state;
    seg.set(parent.a, parent.b, state);
    state = alter(state);
    for (wire c : children) {
        states[c.idx] = state;
        seg.set(c.a, c.b, state);
    }
}
void coutStates(vi & states) {
    for (int b : states) printf("%d", b-1);
    cout << endl;
}
void alter(SegTree & seg, wire & parent, vector<wire> & children, vi & states) {
    int oldState = states[parent.idx];
    setSeg(seg, parent, children, states, -oldState);
    setSeg(seg, parent, children, states, alter(oldState));
}
void DebugOutput(SegTree & seg, vi & states, int N) {
    for (int j = 0; j < N; ++j) {
        item tmp = seg.query(j, j + 1);
        cout << ((tmp.f2f1 == INT_MAX) ? "-" : to_string(tmp.f2f1));
        cout << "/" << ((tmp.f2f2 == INT_MAX) ? "-" : to_string(tmp.f2f2));
        cout << " ";
    } cout << endl;
    coutStates(states);
    cout << endl;
}


int main() {

    int N, M;
    scanf("%d %d", &N, &M);
    vector<wire> wires(M);
    vi states(M, 0);
    for (int i = 0,a,b; i < M; ++i) {
        scanf("%d %d", &a, &b);
        wires[i] = { --a, b, i };
    }
    sort(wires.begin(), wires.end(), [&](wire & one, wire & two) {
        if (one.a != two.a) return one.a < two.a;
        else {
            int l1 = one.b - one.a; if (l1 <= 0) l1 += N;
            int l2 = two.b - two.a; if (l2 <= 0) l2 += N;
            return l1 > l2;
        }
    });

    // nasty fehler bei 1 N, 1 N ?
    vector<wire> parents;
    vector<vector<wire>> children;
    parents.push_back(wires[0]);
    children.push_back(vector<wire>());
    for (int i = 1; i < M; ++i) {
        if (in(wires[i], parents.back(), N)) {
            children.back().push_back(wires[i]);
        } else {
            parents.push_back(wires[i]);
            children.push_back(vector<wire>());
        }
    }
    reverse(all(parents));
    reverse(all(children));
    while (parents.size() > 1) {
        if (in(parents.back(), parents.front(), N)) {
            children[0].push_back(parents.back());
            for (wire w : children.back()) children[0].push_back(w);
            parents.pop_back();
            children.pop_back();
        } else {
            break;
        }
    }
    reverse(all(parents));
    reverse(all(children));

    SegTree seg;
    seg.init(N);
    for (int i = 0, s; i < sz(parents); ++i) {
        s = (i % 2) + 1;
        setSeg(seg, parents[i], children[i], states, s);
        // DebugOutput(seg, states, N);
    }
    for (int i = 0; i < sz(parents); ++i) {
        item res = seg.query(0, N);
        if (res.f2f1 == INT_MAX && res.f2f2 == INT_MAX) {
            coutStates(states);
            return 0;
        }
        alter(seg, parents[i], children[i], states);
        // DebugOutput(seg, states, N);
    }
    printf("impossible");

}

Compilation message

alternating.cpp: In function 'int main()':
alternating.cpp:137:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
  137 |     scanf("%d %d", &N, &M);
      |     ~~~~~^~~~~~~~~~~~~~~~~
alternating.cpp:141:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
  141 |         scanf("%d %d", &a, &b);
      |         ~~~~~^~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 0 ms 296 KB Output is correct
8 Correct 0 ms 296 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 0 ms 300 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 1 ms 300 KB Output is correct
16 Correct 1 ms 212 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 1 ms 300 KB Output is correct
23 Correct 0 ms 212 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 0 ms 212 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 212 KB Output is correct
29 Correct 1 ms 212 KB Output is correct
30 Correct 0 ms 212 KB Output is correct
31 Correct 0 ms 212 KB Output is correct
32 Correct 1 ms 256 KB Output is correct
33 Correct 0 ms 300 KB Output is correct
34 Correct 0 ms 212 KB Output is correct
35 Correct 1 ms 212 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 0 ms 300 KB Output is correct
38 Correct 0 ms 212 KB Output is correct
39 Correct 0 ms 212 KB Output is correct
40 Correct 0 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 0 ms 296 KB Output is correct
8 Correct 0 ms 296 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 0 ms 300 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 1 ms 300 KB Output is correct
16 Correct 1 ms 212 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 1 ms 300 KB Output is correct
23 Correct 0 ms 212 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 0 ms 212 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 212 KB Output is correct
29 Correct 1 ms 212 KB Output is correct
30 Correct 0 ms 212 KB Output is correct
31 Correct 0 ms 212 KB Output is correct
32 Correct 1 ms 256 KB Output is correct
33 Correct 0 ms 300 KB Output is correct
34 Correct 0 ms 212 KB Output is correct
35 Correct 1 ms 212 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 0 ms 300 KB Output is correct
38 Correct 0 ms 212 KB Output is correct
39 Correct 0 ms 212 KB Output is correct
40 Correct 0 ms 212 KB Output is correct
41 Correct 0 ms 212 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 1 ms 300 KB Output is correct
44 Correct 0 ms 212 KB Output is correct
45 Correct 0 ms 212 KB Output is correct
46 Correct 0 ms 212 KB Output is correct
47 Correct 0 ms 212 KB Output is correct
48 Correct 0 ms 212 KB Output is correct
49 Correct 0 ms 212 KB Output is correct
50 Correct 0 ms 212 KB Output is correct
51 Correct 0 ms 212 KB Output is correct
52 Correct 1 ms 212 KB Output is correct
53 Correct 1 ms 212 KB Output is correct
54 Correct 0 ms 212 KB Output is correct
55 Correct 1 ms 296 KB Output is correct
56 Correct 0 ms 212 KB Output is correct
57 Correct 0 ms 212 KB Output is correct
58 Correct 0 ms 212 KB Output is correct
59 Correct 0 ms 296 KB Output is correct
60 Correct 0 ms 212 KB Output is correct
61 Correct 0 ms 212 KB Output is correct
62 Correct 0 ms 300 KB Output is correct
63 Correct 1 ms 212 KB Output is correct
64 Correct 0 ms 212 KB Output is correct
65 Correct 0 ms 212 KB Output is correct
66 Correct 0 ms 212 KB Output is correct
67 Correct 0 ms 212 KB Output is correct
68 Correct 0 ms 292 KB Output is correct
69 Correct 0 ms 300 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 0 ms 296 KB Output is correct
8 Correct 0 ms 296 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 0 ms 300 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 1 ms 300 KB Output is correct
16 Correct 1 ms 212 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 1 ms 300 KB Output is correct
23 Correct 0 ms 212 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 0 ms 212 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 212 KB Output is correct
29 Correct 1 ms 212 KB Output is correct
30 Correct 0 ms 212 KB Output is correct
31 Correct 0 ms 212 KB Output is correct
32 Correct 1 ms 256 KB Output is correct
33 Correct 0 ms 300 KB Output is correct
34 Correct 0 ms 212 KB Output is correct
35 Correct 1 ms 212 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 0 ms 300 KB Output is correct
38 Correct 0 ms 212 KB Output is correct
39 Correct 0 ms 212 KB Output is correct
40 Correct 0 ms 212 KB Output is correct
41 Correct 0 ms 212 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 1 ms 300 KB Output is correct
44 Correct 0 ms 212 KB Output is correct
45 Correct 0 ms 212 KB Output is correct
46 Correct 0 ms 212 KB Output is correct
47 Correct 0 ms 212 KB Output is correct
48 Correct 0 ms 212 KB Output is correct
49 Correct 0 ms 212 KB Output is correct
50 Correct 0 ms 212 KB Output is correct
51 Correct 0 ms 212 KB Output is correct
52 Correct 1 ms 212 KB Output is correct
53 Correct 1 ms 212 KB Output is correct
54 Correct 0 ms 212 KB Output is correct
55 Correct 1 ms 296 KB Output is correct
56 Correct 0 ms 212 KB Output is correct
57 Correct 0 ms 212 KB Output is correct
58 Correct 0 ms 212 KB Output is correct
59 Correct 0 ms 296 KB Output is correct
60 Correct 0 ms 212 KB Output is correct
61 Correct 0 ms 212 KB Output is correct
62 Correct 0 ms 300 KB Output is correct
63 Correct 1 ms 212 KB Output is correct
64 Correct 0 ms 212 KB Output is correct
65 Correct 0 ms 212 KB Output is correct
66 Correct 0 ms 212 KB Output is correct
67 Correct 0 ms 212 KB Output is correct
68 Correct 0 ms 292 KB Output is correct
69 Correct 0 ms 300 KB Output is correct
70 Correct 1 ms 300 KB Output is correct
71 Correct 1 ms 340 KB Output is correct
72 Correct 0 ms 300 KB Output is correct
73 Correct 0 ms 340 KB Output is correct
74 Correct 1 ms 340 KB Output is correct
75 Correct 1 ms 212 KB Output is correct
76 Correct 1 ms 300 KB Output is correct
77 Correct 1 ms 300 KB Output is correct
78 Correct 1 ms 340 KB Output is correct
79 Correct 0 ms 212 KB Output is correct
80 Correct 1 ms 308 KB Output is correct
81 Correct 1 ms 340 KB Output is correct
82 Correct 0 ms 340 KB Output is correct
83 Correct 1 ms 340 KB Output is correct
84 Correct 1 ms 308 KB Output is correct
85 Correct 0 ms 340 KB Output is correct
86 Correct 0 ms 212 KB Output is correct
87 Correct 4 ms 344 KB Output is correct
88 Correct 1 ms 212 KB Output is correct
89 Correct 1 ms 300 KB Output is correct
90 Correct 1 ms 304 KB Output is correct
91 Correct 0 ms 212 KB Output is correct
92 Correct 1 ms 340 KB Output is correct
93 Correct 1 ms 212 KB Output is correct
94 Correct 0 ms 212 KB Output is correct
95 Correct 1 ms 296 KB Output is correct
96 Correct 1 ms 340 KB Output is correct
97 Correct 1 ms 340 KB Output is correct
98 Correct 1 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 39 ms 8244 KB Output is correct
2 Correct 2 ms 4308 KB Output is correct
3 Correct 66 ms 6452 KB Output is correct
4 Correct 40 ms 6464 KB Output is correct
5 Correct 62 ms 9652 KB Output is correct
6 Correct 108 ms 9540 KB Output is correct
7 Correct 49 ms 8684 KB Output is correct
8 Correct 4 ms 4564 KB Output is correct
9 Correct 3 ms 4436 KB Output is correct
10 Correct 71 ms 9900 KB Output is correct
11 Correct 41 ms 8212 KB Output is correct
12 Correct 44 ms 8084 KB Output is correct
13 Correct 2 ms 4308 KB Output is correct
14 Correct 2 ms 4308 KB Output is correct
15 Correct 57 ms 8536 KB Output is correct
16 Correct 92 ms 7592 KB Output is correct
17 Correct 93 ms 8576 KB Output is correct
18 Correct 63 ms 4556 KB Output is correct
19 Correct 13 ms 4664 KB Output is correct
20 Correct 51 ms 8368 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 0 ms 296 KB Output is correct
8 Correct 0 ms 296 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 0 ms 300 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 1 ms 300 KB Output is correct
16 Correct 1 ms 212 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 1 ms 300 KB Output is correct
23 Correct 0 ms 212 KB Output is correct
24 Correct 1 ms 212 KB Output is correct
25 Correct 0 ms 212 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 212 KB Output is correct
29 Correct 1 ms 212 KB Output is correct
30 Correct 0 ms 212 KB Output is correct
31 Correct 0 ms 212 KB Output is correct
32 Correct 1 ms 256 KB Output is correct
33 Correct 0 ms 300 KB Output is correct
34 Correct 0 ms 212 KB Output is correct
35 Correct 1 ms 212 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 0 ms 300 KB Output is correct
38 Correct 0 ms 212 KB Output is correct
39 Correct 0 ms 212 KB Output is correct
40 Correct 0 ms 212 KB Output is correct
41 Correct 0 ms 212 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 1 ms 300 KB Output is correct
44 Correct 0 ms 212 KB Output is correct
45 Correct 0 ms 212 KB Output is correct
46 Correct 0 ms 212 KB Output is correct
47 Correct 0 ms 212 KB Output is correct
48 Correct 0 ms 212 KB Output is correct
49 Correct 0 ms 212 KB Output is correct
50 Correct 0 ms 212 KB Output is correct
51 Correct 0 ms 212 KB Output is correct
52 Correct 1 ms 212 KB Output is correct
53 Correct 1 ms 212 KB Output is correct
54 Correct 0 ms 212 KB Output is correct
55 Correct 1 ms 296 KB Output is correct
56 Correct 0 ms 212 KB Output is correct
57 Correct 0 ms 212 KB Output is correct
58 Correct 0 ms 212 KB Output is correct
59 Correct 0 ms 296 KB Output is correct
60 Correct 0 ms 212 KB Output is correct
61 Correct 0 ms 212 KB Output is correct
62 Correct 0 ms 300 KB Output is correct
63 Correct 1 ms 212 KB Output is correct
64 Correct 0 ms 212 KB Output is correct
65 Correct 0 ms 212 KB Output is correct
66 Correct 0 ms 212 KB Output is correct
67 Correct 0 ms 212 KB Output is correct
68 Correct 0 ms 292 KB Output is correct
69 Correct 0 ms 300 KB Output is correct
70 Correct 1 ms 300 KB Output is correct
71 Correct 1 ms 340 KB Output is correct
72 Correct 0 ms 300 KB Output is correct
73 Correct 0 ms 340 KB Output is correct
74 Correct 1 ms 340 KB Output is correct
75 Correct 1 ms 212 KB Output is correct
76 Correct 1 ms 300 KB Output is correct
77 Correct 1 ms 300 KB Output is correct
78 Correct 1 ms 340 KB Output is correct
79 Correct 0 ms 212 KB Output is correct
80 Correct 1 ms 308 KB Output is correct
81 Correct 1 ms 340 KB Output is correct
82 Correct 0 ms 340 KB Output is correct
83 Correct 1 ms 340 KB Output is correct
84 Correct 1 ms 308 KB Output is correct
85 Correct 0 ms 340 KB Output is correct
86 Correct 0 ms 212 KB Output is correct
87 Correct 4 ms 344 KB Output is correct
88 Correct 1 ms 212 KB Output is correct
89 Correct 1 ms 300 KB Output is correct
90 Correct 1 ms 304 KB Output is correct
91 Correct 0 ms 212 KB Output is correct
92 Correct 1 ms 340 KB Output is correct
93 Correct 1 ms 212 KB Output is correct
94 Correct 0 ms 212 KB Output is correct
95 Correct 1 ms 296 KB Output is correct
96 Correct 1 ms 340 KB Output is correct
97 Correct 1 ms 340 KB Output is correct
98 Correct 1 ms 340 KB Output is correct
99 Correct 39 ms 8244 KB Output is correct
100 Correct 2 ms 4308 KB Output is correct
101 Correct 66 ms 6452 KB Output is correct
102 Correct 40 ms 6464 KB Output is correct
103 Correct 62 ms 9652 KB Output is correct
104 Correct 108 ms 9540 KB Output is correct
105 Correct 49 ms 8684 KB Output is correct
106 Correct 4 ms 4564 KB Output is correct
107 Correct 3 ms 4436 KB Output is correct
108 Correct 71 ms 9900 KB Output is correct
109 Correct 41 ms 8212 KB Output is correct
110 Correct 44 ms 8084 KB Output is correct
111 Correct 2 ms 4308 KB Output is correct
112 Correct 2 ms 4308 KB Output is correct
113 Correct 57 ms 8536 KB Output is correct
114 Correct 92 ms 7592 KB Output is correct
115 Correct 93 ms 8576 KB Output is correct
116 Correct 63 ms 4556 KB Output is correct
117 Correct 13 ms 4664 KB Output is correct
118 Correct 51 ms 8368 KB Output is correct
119 Correct 3 ms 4436 KB Output is correct
120 Correct 71 ms 9068 KB Output is correct
121 Correct 38 ms 7336 KB Output is correct
122 Correct 0 ms 296 KB Output is correct
123 Correct 11 ms 4740 KB Output is correct
124 Correct 43 ms 6384 KB Output is correct
125 Correct 18 ms 5968 KB Output is correct
126 Correct 2 ms 4400 KB Output is correct
127 Correct 7 ms 4924 KB Output is correct
128 Correct 45 ms 8724 KB Output is correct
129 Correct 31 ms 6712 KB Output is correct
130 Correct 40 ms 7492 KB Output is correct
131 Correct 2 ms 4308 KB Output is correct
132 Correct 2 ms 4436 KB Output is correct
133 Correct 90 ms 8916 KB Output is correct
134 Correct 24 ms 5588 KB Output is correct
135 Correct 2 ms 4308 KB Output is correct
136 Correct 71 ms 7904 KB Output is correct
137 Correct 100 ms 8296 KB Output is correct
138 Correct 3 ms 4436 KB Output is correct