답안 #1058648

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1058648 2024-08-14T11:44:30 Z otarius Alternating Current (BOI18_alternating) C++17
100 / 100
82 ms 18512 KB
#include <bits/stdc++.h>
#include <bits/extc++.h>
using namespace __gnu_pbds;
using namespace std;
 
// #pragma GCC optimize("Ofast")
// #pragma GCC optimize ("unroll-loops")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
 
#define ff first
#define sc second
#define pb push_back
#define ll long long
#define pll pair<ll, ll>
#define pii pair<int, int>
#define ull unsigned long long
#define all(x) (x).begin(),(x).end()
 
// #define int long long
// #define int unsigned long long
 
// #define ordered_set(T) tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>
// #define ordered_multiset(T) tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>
 
void open_file(string filename) {
    freopen((filename + ".in").c_str(), "r", stdin);
    freopen((filename + ".out").c_str(), "w", stdout);
}
 
// const ll mod = 1e9 + 7;
// const ll mod = 998244353;
 
const ll inf = 1e9;
const ll biginf = 1e18;
const int maxN = 1e5 + 25;
 
int par[maxN];
vector<int> g[maxN];
void make_set() {
    for (int i = 0; i <= maxN; i++) par[i] = i;
}
int find_set(int v) {
    if (v == par[v])
        return v;
    return par[v] = find_set(par[v]);
}
void union_set(int x, int y) {
    x = find_set(x);
    y = find_set(y);
    if (x != y) par[y] = x;
}
 
struct segtree {
    int t[4 * maxN], lazy[4 * maxN], n;
    void init(int _n) {
        n = _n;
        for (int i = 0; i < 4 * maxN; i++)
            t[i] = lazy[i] = 0;
    }
    
    void prop(int v, int tl, int tr) {
        if (!lazy[v]) return;
        t[v] += lazy[v];
        if (tl != tr) {
            lazy[2 * v] += lazy[v];
            lazy[2 * v + 1] += lazy[v];
        } lazy[v] = 0;
    }
    
    void update(int v, int tl, int tr, int l, int r, int val) {
        prop(v, tl, tr);
        if (r < tl || tr < l) return;
        if (l <= tl && tr <= r) {
            lazy[v] += val;
            prop(v, tl, tr);
            return;
        } int tm = (tl + tr) / 2;
        update(2 * v, tl, tm, l, r, val);
        update(2 * v + 1, tm + 1, tr, l, r, val);
        t[v] = min(t[2 * v], t[2 * v + 1]);
    }
    
    int query(int v, int tl, int tr, int l, int r) {
        prop(v, tl, tr);
        if (l > r) return -inf;
        if (tl == l && tr == r)
            return t[v];
        int tm = (tl + tr) / 2;
        return min(query(2 * v, tl, tm, l, min(r, tm)),
                   query(2 * v + 1, tm + 1, tr, max(l, tm + 1), r));
    }
    
    void update(int l, int r, int val) {
        if (r > n) r -= n;
        if (l <= r) {
            update(1, 1, n, l, r, val);
        }
        else {
            update(1, 1, n, l, n, val);
            update(1, 1, n, 1, r, val);
        }
    }
    
    int eval() {
        return query(1, 1, n, 1, n);
    }
} seg[2];
bool check() {
    return (seg[0].eval() > 0 && seg[1].eval() > 0);
}
 
struct line {
    int x, y, id, cl, clr;
    line() {
        
    }
    line(int _x, int _y, int _id) {
        x = _x; y = _y; id = _id; cl = clr = -1;
    }
    bool operator<(const line &p) {
        return make_pair(x, -y) < make_pair(p.x, -p.y);
    }
} arr[maxN];
bool comp(line a, line b) {
    return a.id < b.id;
}
 
vector<line> good;
int n, m, mx, mxi, cld[maxN];
void elim() {
    deque<line> dq;
    sort(arr + 1, arr + m + 1);
    for (int i = 1; i <= m; i++) {
        if (dq.empty() || dq.back().y < arr[i].y) dq.push_back(arr[i]);
        else cld[arr[i].id] = dq.back().id;
    } while (dq.size() && dq.front().y <= mx) {
        cld[dq.front().id] = mxi; dq.pop_front();
    } for (line x : dq) good.pb(x);
    for (int i = 1; i <= m; i++)
        if (cld[arr[i].id]) arr[i].cl = cld[arr[i].id];
    make_set();
    for (int i = 1; i <= m; i++)
        if (arr[i].cl != -1) union_set(arr[i].cl, arr[i].id);
    for (int i = 1; i <= m; i++) {
        if (arr[i].cl != -1) {
            arr[i].cl = find_set(arr[i].cl);
            g[arr[i].cl].pb(arr[i].id);
        } else g[arr[i].id].pb(arr[i].id);
    }
}
void even() {
    for (int i = 0; i < good.size(); i++)
        arr[good[i].id].clr = i % 2;
    for (int i = 1; i <= m; i++)
        if (arr[i].clr == -1) arr[i].clr = (arr[arr[i].cl].clr ^ 1);
    for (int i = 1; i <= m; i++) {
        seg[arr[i].clr].update(arr[i].x, arr[i].y, 1);
    }
    if (check()) {
        for (int i = 1; i <= m; i++)
            cout << arr[i].clr;
    } else {
        cout << "impossible";
    } exit(0);
}
void odd() {
    for (int i = 0; i < good.size(); i++)
        arr[good[i].id].clr = i % 2;
    for (int i = 1; i <= m; i++)
        if (arr[i].clr == -1) arr[i].clr = (arr[arr[i].cl].clr ^ 1);
    for (int i = 1; i <= m; i++)
        seg[arr[i].clr].update(arr[i].x, arr[i].y, 1);
    if (check()) {
        for (int i = 1; i <= m; i++)
            cout << arr[i].clr;
        exit(0);
    } for (int i = 0; i < good.size(); i++) {
        for (int j : g[good[i].id]) {
            seg[arr[j].clr].update(arr[j].x, arr[j].y, -1);
            arr[j].clr ^= 1;
            seg[arr[j].clr].update(arr[j].x, arr[j].y, 1);
        } if (check()) {
            for (int j = 1; j <= m; j++)
                cout << arr[j].clr;
            exit(0);
        }
    } cout << "impossible";
    exit(0);
}
void solve() {
    cin >> n >> m;
    seg[0].init(n); seg[1].init(n);
    for (int i = 1; i <= m; i++) {
        int l, r; cin >> l >> r;
        if (l > r) {
            if (mx < r) {
                mx = r; mxi = i;
            } r += n;
        } arr[i] = {l, r, i};
    } elim();
    sort(arr + 1, arr + m + 1, comp);
    if (good.size() % 2 == 0) even();
    else odd();
}
int32_t main() { 
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr); cout.tie(nullptr);
    
    int t = 1;
    // cin >> t;
    while (t--) {
        solve();
        cout << '\n';
    }
    return 0;
}

Compilation message

alternating.cpp: In function 'void even()':
alternating.cpp:152:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<line>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  152 |     for (int i = 0; i < good.size(); i++)
      |                     ~~^~~~~~~~~~~~~
alternating.cpp: In function 'void odd()':
alternating.cpp:167:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<line>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  167 |     for (int i = 0; i < good.size(); i++)
      |                     ~~^~~~~~~~~~~~~
alternating.cpp:177:25: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<line>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  177 |     } for (int i = 0; i < good.size(); i++) {
      |                       ~~^~~~~~~~~~~~~
alternating.cpp: In function 'void open_file(std::string)':
alternating.cpp:26:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   26 |     freopen((filename + ".in").c_str(), "r", stdin);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
alternating.cpp:27:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   27 |     freopen((filename + ".out").c_str(), "w", stdout);
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
alternating.cpp: In function 'void make_set()':
alternating.cpp:40:44: warning: iteration 100025 invokes undefined behavior [-Waggressive-loop-optimizations]
   40 |     for (int i = 0; i <= maxN; i++) par[i] = i;
      |                                     ~~~~~~~^~~
alternating.cpp:40:23: note: within this loop
   40 |     for (int i = 0; i <= maxN; i++) par[i] = i;
      |                     ~~^~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 11612 KB Output is correct
2 Correct 1 ms 11612 KB Output is correct
3 Correct 1 ms 11612 KB Output is correct
4 Correct 1 ms 11612 KB Output is correct
5 Correct 2 ms 11636 KB Output is correct
6 Correct 1 ms 11612 KB Output is correct
7 Correct 1 ms 11612 KB Output is correct
8 Correct 2 ms 11612 KB Output is correct
9 Correct 1 ms 11612 KB Output is correct
10 Correct 2 ms 11612 KB Output is correct
11 Correct 2 ms 11612 KB Output is correct
12 Correct 2 ms 11612 KB Output is correct
13 Correct 1 ms 11560 KB Output is correct
14 Correct 1 ms 11612 KB Output is correct
15 Correct 1 ms 11612 KB Output is correct
16 Correct 1 ms 11612 KB Output is correct
17 Correct 2 ms 11612 KB Output is correct
18 Correct 1 ms 11612 KB Output is correct
19 Correct 1 ms 11612 KB Output is correct
20 Correct 1 ms 11612 KB Output is correct
21 Correct 1 ms 11612 KB Output is correct
22 Correct 1 ms 11612 KB Output is correct
23 Correct 1 ms 11612 KB Output is correct
24 Correct 1 ms 11612 KB Output is correct
25 Correct 1 ms 11612 KB Output is correct
26 Correct 2 ms 11612 KB Output is correct
27 Correct 1 ms 11608 KB Output is correct
28 Correct 1 ms 11612 KB Output is correct
29 Correct 1 ms 11612 KB Output is correct
30 Correct 1 ms 11612 KB Output is correct
31 Correct 1 ms 11612 KB Output is correct
32 Correct 1 ms 11612 KB Output is correct
33 Correct 2 ms 11612 KB Output is correct
34 Correct 2 ms 11608 KB Output is correct
35 Correct 1 ms 11612 KB Output is correct
36 Correct 1 ms 11612 KB Output is correct
37 Correct 1 ms 11612 KB Output is correct
38 Correct 1 ms 11612 KB Output is correct
39 Correct 1 ms 11612 KB Output is correct
40 Correct 2 ms 11612 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 11612 KB Output is correct
2 Correct 1 ms 11612 KB Output is correct
3 Correct 1 ms 11612 KB Output is correct
4 Correct 1 ms 11612 KB Output is correct
5 Correct 2 ms 11636 KB Output is correct
6 Correct 1 ms 11612 KB Output is correct
7 Correct 1 ms 11612 KB Output is correct
8 Correct 2 ms 11612 KB Output is correct
9 Correct 1 ms 11612 KB Output is correct
10 Correct 2 ms 11612 KB Output is correct
11 Correct 2 ms 11612 KB Output is correct
12 Correct 2 ms 11612 KB Output is correct
13 Correct 1 ms 11560 KB Output is correct
14 Correct 1 ms 11612 KB Output is correct
15 Correct 1 ms 11612 KB Output is correct
16 Correct 1 ms 11612 KB Output is correct
17 Correct 2 ms 11612 KB Output is correct
18 Correct 1 ms 11612 KB Output is correct
19 Correct 1 ms 11612 KB Output is correct
20 Correct 1 ms 11612 KB Output is correct
21 Correct 1 ms 11612 KB Output is correct
22 Correct 1 ms 11612 KB Output is correct
23 Correct 1 ms 11612 KB Output is correct
24 Correct 1 ms 11612 KB Output is correct
25 Correct 1 ms 11612 KB Output is correct
26 Correct 2 ms 11612 KB Output is correct
27 Correct 1 ms 11608 KB Output is correct
28 Correct 1 ms 11612 KB Output is correct
29 Correct 1 ms 11612 KB Output is correct
30 Correct 1 ms 11612 KB Output is correct
31 Correct 1 ms 11612 KB Output is correct
32 Correct 1 ms 11612 KB Output is correct
33 Correct 2 ms 11612 KB Output is correct
34 Correct 2 ms 11608 KB Output is correct
35 Correct 1 ms 11612 KB Output is correct
36 Correct 1 ms 11612 KB Output is correct
37 Correct 1 ms 11612 KB Output is correct
38 Correct 1 ms 11612 KB Output is correct
39 Correct 1 ms 11612 KB Output is correct
40 Correct 2 ms 11612 KB Output is correct
41 Correct 2 ms 11612 KB Output is correct
42 Correct 1 ms 11612 KB Output is correct
43 Correct 2 ms 11440 KB Output is correct
44 Correct 2 ms 11612 KB Output is correct
45 Correct 2 ms 11612 KB Output is correct
46 Correct 2 ms 11608 KB Output is correct
47 Correct 2 ms 11608 KB Output is correct
48 Correct 1 ms 11612 KB Output is correct
49 Correct 2 ms 11780 KB Output is correct
50 Correct 1 ms 11612 KB Output is correct
51 Correct 1 ms 11608 KB Output is correct
52 Correct 1 ms 11612 KB Output is correct
53 Correct 1 ms 11612 KB Output is correct
54 Correct 2 ms 11612 KB Output is correct
55 Correct 1 ms 11612 KB Output is correct
56 Correct 2 ms 11612 KB Output is correct
57 Correct 2 ms 11612 KB Output is correct
58 Correct 2 ms 11612 KB Output is correct
59 Correct 1 ms 11612 KB Output is correct
60 Correct 1 ms 11612 KB Output is correct
61 Correct 1 ms 11608 KB Output is correct
62 Correct 1 ms 11612 KB Output is correct
63 Correct 1 ms 11612 KB Output is correct
64 Correct 2 ms 11612 KB Output is correct
65 Correct 1 ms 11612 KB Output is correct
66 Correct 2 ms 11612 KB Output is correct
67 Correct 1 ms 11612 KB Output is correct
68 Correct 2 ms 11612 KB Output is correct
69 Correct 1 ms 11612 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 11612 KB Output is correct
2 Correct 1 ms 11612 KB Output is correct
3 Correct 1 ms 11612 KB Output is correct
4 Correct 1 ms 11612 KB Output is correct
5 Correct 2 ms 11636 KB Output is correct
6 Correct 1 ms 11612 KB Output is correct
7 Correct 1 ms 11612 KB Output is correct
8 Correct 2 ms 11612 KB Output is correct
9 Correct 1 ms 11612 KB Output is correct
10 Correct 2 ms 11612 KB Output is correct
11 Correct 2 ms 11612 KB Output is correct
12 Correct 2 ms 11612 KB Output is correct
13 Correct 1 ms 11560 KB Output is correct
14 Correct 1 ms 11612 KB Output is correct
15 Correct 1 ms 11612 KB Output is correct
16 Correct 1 ms 11612 KB Output is correct
17 Correct 2 ms 11612 KB Output is correct
18 Correct 1 ms 11612 KB Output is correct
19 Correct 1 ms 11612 KB Output is correct
20 Correct 1 ms 11612 KB Output is correct
21 Correct 1 ms 11612 KB Output is correct
22 Correct 1 ms 11612 KB Output is correct
23 Correct 1 ms 11612 KB Output is correct
24 Correct 1 ms 11612 KB Output is correct
25 Correct 1 ms 11612 KB Output is correct
26 Correct 2 ms 11612 KB Output is correct
27 Correct 1 ms 11608 KB Output is correct
28 Correct 1 ms 11612 KB Output is correct
29 Correct 1 ms 11612 KB Output is correct
30 Correct 1 ms 11612 KB Output is correct
31 Correct 1 ms 11612 KB Output is correct
32 Correct 1 ms 11612 KB Output is correct
33 Correct 2 ms 11612 KB Output is correct
34 Correct 2 ms 11608 KB Output is correct
35 Correct 1 ms 11612 KB Output is correct
36 Correct 1 ms 11612 KB Output is correct
37 Correct 1 ms 11612 KB Output is correct
38 Correct 1 ms 11612 KB Output is correct
39 Correct 1 ms 11612 KB Output is correct
40 Correct 2 ms 11612 KB Output is correct
41 Correct 2 ms 11612 KB Output is correct
42 Correct 1 ms 11612 KB Output is correct
43 Correct 2 ms 11440 KB Output is correct
44 Correct 2 ms 11612 KB Output is correct
45 Correct 2 ms 11612 KB Output is correct
46 Correct 2 ms 11608 KB Output is correct
47 Correct 2 ms 11608 KB Output is correct
48 Correct 1 ms 11612 KB Output is correct
49 Correct 2 ms 11780 KB Output is correct
50 Correct 1 ms 11612 KB Output is correct
51 Correct 1 ms 11608 KB Output is correct
52 Correct 1 ms 11612 KB Output is correct
53 Correct 1 ms 11612 KB Output is correct
54 Correct 2 ms 11612 KB Output is correct
55 Correct 1 ms 11612 KB Output is correct
56 Correct 2 ms 11612 KB Output is correct
57 Correct 2 ms 11612 KB Output is correct
58 Correct 2 ms 11612 KB Output is correct
59 Correct 1 ms 11612 KB Output is correct
60 Correct 1 ms 11612 KB Output is correct
61 Correct 1 ms 11608 KB Output is correct
62 Correct 1 ms 11612 KB Output is correct
63 Correct 1 ms 11612 KB Output is correct
64 Correct 2 ms 11612 KB Output is correct
65 Correct 1 ms 11612 KB Output is correct
66 Correct 2 ms 11612 KB Output is correct
67 Correct 1 ms 11612 KB Output is correct
68 Correct 2 ms 11612 KB Output is correct
69 Correct 1 ms 11612 KB Output is correct
70 Correct 2 ms 11612 KB Output is correct
71 Correct 2 ms 11612 KB Output is correct
72 Correct 1 ms 11520 KB Output is correct
73 Correct 1 ms 11612 KB Output is correct
74 Correct 1 ms 11612 KB Output is correct
75 Correct 2 ms 11608 KB Output is correct
76 Correct 2 ms 11612 KB Output is correct
77 Correct 1 ms 11612 KB Output is correct
78 Correct 1 ms 11516 KB Output is correct
79 Correct 2 ms 11612 KB Output is correct
80 Correct 2 ms 11612 KB Output is correct
81 Correct 2 ms 11612 KB Output is correct
82 Correct 1 ms 11516 KB Output is correct
83 Correct 2 ms 11612 KB Output is correct
84 Correct 2 ms 11712 KB Output is correct
85 Correct 1 ms 11612 KB Output is correct
86 Correct 1 ms 11488 KB Output is correct
87 Correct 1 ms 11612 KB Output is correct
88 Correct 2 ms 11612 KB Output is correct
89 Correct 2 ms 11608 KB Output is correct
90 Correct 2 ms 11612 KB Output is correct
91 Correct 1 ms 11520 KB Output is correct
92 Correct 2 ms 11612 KB Output is correct
93 Correct 2 ms 11612 KB Output is correct
94 Correct 1 ms 11612 KB Output is correct
95 Correct 1 ms 11612 KB Output is correct
96 Correct 2 ms 11612 KB Output is correct
97 Correct 2 ms 11612 KB Output is correct
98 Correct 2 ms 11612 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 21 ms 12256 KB Output is correct
2 Correct 2 ms 11612 KB Output is correct
3 Correct 43 ms 12044 KB Output is correct
4 Correct 25 ms 12148 KB Output is correct
5 Correct 52 ms 14548 KB Output is correct
6 Correct 82 ms 13904 KB Output is correct
7 Correct 45 ms 12956 KB Output is correct
8 Correct 3 ms 11612 KB Output is correct
9 Correct 2 ms 11612 KB Output is correct
10 Correct 54 ms 14840 KB Output is correct
11 Correct 39 ms 13396 KB Output is correct
12 Correct 57 ms 12420 KB Output is correct
13 Correct 2 ms 11608 KB Output is correct
14 Correct 2 ms 11608 KB Output is correct
15 Correct 50 ms 12436 KB Output is correct
16 Correct 46 ms 15060 KB Output is correct
17 Correct 66 ms 12376 KB Output is correct
18 Correct 56 ms 12500 KB Output is correct
19 Correct 5 ms 11612 KB Output is correct
20 Correct 45 ms 16512 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 11612 KB Output is correct
2 Correct 1 ms 11612 KB Output is correct
3 Correct 1 ms 11612 KB Output is correct
4 Correct 1 ms 11612 KB Output is correct
5 Correct 2 ms 11636 KB Output is correct
6 Correct 1 ms 11612 KB Output is correct
7 Correct 1 ms 11612 KB Output is correct
8 Correct 2 ms 11612 KB Output is correct
9 Correct 1 ms 11612 KB Output is correct
10 Correct 2 ms 11612 KB Output is correct
11 Correct 2 ms 11612 KB Output is correct
12 Correct 2 ms 11612 KB Output is correct
13 Correct 1 ms 11560 KB Output is correct
14 Correct 1 ms 11612 KB Output is correct
15 Correct 1 ms 11612 KB Output is correct
16 Correct 1 ms 11612 KB Output is correct
17 Correct 2 ms 11612 KB Output is correct
18 Correct 1 ms 11612 KB Output is correct
19 Correct 1 ms 11612 KB Output is correct
20 Correct 1 ms 11612 KB Output is correct
21 Correct 1 ms 11612 KB Output is correct
22 Correct 1 ms 11612 KB Output is correct
23 Correct 1 ms 11612 KB Output is correct
24 Correct 1 ms 11612 KB Output is correct
25 Correct 1 ms 11612 KB Output is correct
26 Correct 2 ms 11612 KB Output is correct
27 Correct 1 ms 11608 KB Output is correct
28 Correct 1 ms 11612 KB Output is correct
29 Correct 1 ms 11612 KB Output is correct
30 Correct 1 ms 11612 KB Output is correct
31 Correct 1 ms 11612 KB Output is correct
32 Correct 1 ms 11612 KB Output is correct
33 Correct 2 ms 11612 KB Output is correct
34 Correct 2 ms 11608 KB Output is correct
35 Correct 1 ms 11612 KB Output is correct
36 Correct 1 ms 11612 KB Output is correct
37 Correct 1 ms 11612 KB Output is correct
38 Correct 1 ms 11612 KB Output is correct
39 Correct 1 ms 11612 KB Output is correct
40 Correct 2 ms 11612 KB Output is correct
41 Correct 2 ms 11612 KB Output is correct
42 Correct 1 ms 11612 KB Output is correct
43 Correct 2 ms 11440 KB Output is correct
44 Correct 2 ms 11612 KB Output is correct
45 Correct 2 ms 11612 KB Output is correct
46 Correct 2 ms 11608 KB Output is correct
47 Correct 2 ms 11608 KB Output is correct
48 Correct 1 ms 11612 KB Output is correct
49 Correct 2 ms 11780 KB Output is correct
50 Correct 1 ms 11612 KB Output is correct
51 Correct 1 ms 11608 KB Output is correct
52 Correct 1 ms 11612 KB Output is correct
53 Correct 1 ms 11612 KB Output is correct
54 Correct 2 ms 11612 KB Output is correct
55 Correct 1 ms 11612 KB Output is correct
56 Correct 2 ms 11612 KB Output is correct
57 Correct 2 ms 11612 KB Output is correct
58 Correct 2 ms 11612 KB Output is correct
59 Correct 1 ms 11612 KB Output is correct
60 Correct 1 ms 11612 KB Output is correct
61 Correct 1 ms 11608 KB Output is correct
62 Correct 1 ms 11612 KB Output is correct
63 Correct 1 ms 11612 KB Output is correct
64 Correct 2 ms 11612 KB Output is correct
65 Correct 1 ms 11612 KB Output is correct
66 Correct 2 ms 11612 KB Output is correct
67 Correct 1 ms 11612 KB Output is correct
68 Correct 2 ms 11612 KB Output is correct
69 Correct 1 ms 11612 KB Output is correct
70 Correct 2 ms 11612 KB Output is correct
71 Correct 2 ms 11612 KB Output is correct
72 Correct 1 ms 11520 KB Output is correct
73 Correct 1 ms 11612 KB Output is correct
74 Correct 1 ms 11612 KB Output is correct
75 Correct 2 ms 11608 KB Output is correct
76 Correct 2 ms 11612 KB Output is correct
77 Correct 1 ms 11612 KB Output is correct
78 Correct 1 ms 11516 KB Output is correct
79 Correct 2 ms 11612 KB Output is correct
80 Correct 2 ms 11612 KB Output is correct
81 Correct 2 ms 11612 KB Output is correct
82 Correct 1 ms 11516 KB Output is correct
83 Correct 2 ms 11612 KB Output is correct
84 Correct 2 ms 11712 KB Output is correct
85 Correct 1 ms 11612 KB Output is correct
86 Correct 1 ms 11488 KB Output is correct
87 Correct 1 ms 11612 KB Output is correct
88 Correct 2 ms 11612 KB Output is correct
89 Correct 2 ms 11608 KB Output is correct
90 Correct 2 ms 11612 KB Output is correct
91 Correct 1 ms 11520 KB Output is correct
92 Correct 2 ms 11612 KB Output is correct
93 Correct 2 ms 11612 KB Output is correct
94 Correct 1 ms 11612 KB Output is correct
95 Correct 1 ms 11612 KB Output is correct
96 Correct 2 ms 11612 KB Output is correct
97 Correct 2 ms 11612 KB Output is correct
98 Correct 2 ms 11612 KB Output is correct
99 Correct 21 ms 12256 KB Output is correct
100 Correct 2 ms 11612 KB Output is correct
101 Correct 43 ms 12044 KB Output is correct
102 Correct 25 ms 12148 KB Output is correct
103 Correct 52 ms 14548 KB Output is correct
104 Correct 82 ms 13904 KB Output is correct
105 Correct 45 ms 12956 KB Output is correct
106 Correct 3 ms 11612 KB Output is correct
107 Correct 2 ms 11612 KB Output is correct
108 Correct 54 ms 14840 KB Output is correct
109 Correct 39 ms 13396 KB Output is correct
110 Correct 57 ms 12420 KB Output is correct
111 Correct 2 ms 11608 KB Output is correct
112 Correct 2 ms 11608 KB Output is correct
113 Correct 50 ms 12436 KB Output is correct
114 Correct 46 ms 15060 KB Output is correct
115 Correct 66 ms 12376 KB Output is correct
116 Correct 56 ms 12500 KB Output is correct
117 Correct 5 ms 11612 KB Output is correct
118 Correct 45 ms 16512 KB Output is correct
119 Correct 2 ms 11612 KB Output is correct
120 Correct 56 ms 18512 KB Output is correct
121 Correct 30 ms 15416 KB Output is correct
122 Correct 2 ms 11612 KB Output is correct
123 Correct 7 ms 11868 KB Output is correct
124 Correct 22 ms 13212 KB Output is correct
125 Correct 17 ms 12952 KB Output is correct
126 Correct 2 ms 11612 KB Output is correct
127 Correct 6 ms 11792 KB Output is correct
128 Correct 42 ms 15132 KB Output is correct
129 Correct 25 ms 12864 KB Output is correct
130 Correct 31 ms 13912 KB Output is correct
131 Correct 2 ms 11612 KB Output is correct
132 Correct 1 ms 11612 KB Output is correct
133 Correct 68 ms 13580 KB Output is correct
134 Correct 19 ms 12124 KB Output is correct
135 Correct 2 ms 11612 KB Output is correct
136 Correct 34 ms 15604 KB Output is correct
137 Correct 69 ms 13908 KB Output is correct
138 Correct 3 ms 11612 KB Output is correct