Submission #318489

# Submission time Handle Problem Language Result Execution time Memory
318489 2020-11-02T05:50:16 Z jhnah917 Alternating Current (BOI18_alternating) C++14
100 / 100
169 ms 15192 KB
#include <bits/stdc++.h>
#define x first
#define y second
#define all(v) v.begin(), v.end()
#define compress(v) sort(all(v)), v.erase(unique(all(v)), v.end())
using namespace std;

typedef long long ll;

int par[101010];
vector<int> g[101010];
int find(int v){ return v == par[v] ? v : par[v] = find(par[v]); }
void merge(int pa, int ch){ pa = find(pa); ch = find(ch); if(pa != ch) par[ch] = pa; }

struct Seg{
    int tree[1 << 18], tmp[1 << 18], n;
    void init(int _n){ n = _n; memset(tree, 0, sizeof tree); memset(tmp, 0, sizeof tree); }
    void push(int node, int s, int e){
        if(!tmp[node]) return;
        tree[node] += tmp[node];
        if(s != e){
            tmp[node << 1] += tmp[node];
            tmp[node << 1 | 1] += tmp[node];
        }
        tmp[node] = 0;
    }
    void update(int node, int s, int e, int l, int r, int v){
        push(node, s, e);
        if(r < s || e < l) return;
        if(l <= s && e <= r){
            tmp[node] += v; push(node, s, e);
            return;
        }
        int m = s + e >> 1;
        update(node << 1, s, m, l, r, v);
        update(node << 1 | 1, m+1, e, l, r, v);
        tree[node] = min(tree[node << 1], tree[node << 1 | 1]);
    }
    int query(int node, int s, int e, int l, int r){
        push(node, s, e);
        if(r < s || e < l) return 1e9;
        if(l <= s && e <= r) return tree[node];
        int m = s + e >> 1;
        int t1 = query(node << 1, s, m, l, r);
        int t2 = query(node << 1 | 1, m+1, e, l, r);
        return min(t1, t2);
    }
    void update(int s, int e, int x){
        if(e >= n) e -= n;
        if(s <= e) update(1, 0, n-1, s, e, x);
        else update(1, 0, n-1, 0, e, x), update(1, 0, n-1, s, n-1, x);
    }
    int query(){ return query(1, 0, n-1, 0, n-1); }
} seg[2];

struct Info{
    int s, e, x, eli, color;
    Info() : Info(0, 0, 0) {}
    Info(int s, int e, int x) : s(s), e(e), x(x), eli(-1), color(-1) {}
    bool operator < (const Info &t) const { return make_pair(s, -e) < make_pair(t.s, -t.e); }
};

int n, m, ed, ed_idx;
Info a[101010];
vector<Info> v;

int tmp[101010];

void calc_elimination(){
    deque<Info> dq;
    sort(a+1, a+m+1);
    for(int i=1; i<=m; i++){
        if(dq.empty() || dq.back().e < a[i].e) dq.push_back(a[i]);
        else tmp[a[i].x] = dq.back().x;
    }
    while(dq.size() && dq.front().e <= ed) tmp[dq[0].x] = ed_idx, dq.pop_front();
    for(auto i : dq) v.push_back(i);
    for(int i=1; i<=m; i++) if(tmp[a[i].x]) a[i].eli = tmp[a[i].x];
    
    iota(par, par+101010, 0);
    for(int i=1; i<=m; i++) if(a[i].eli != -1) merge(a[i].eli, a[i].x);
    for(int i=1; i<=m; i++){
        if(a[i].eli != -1) a[i].eli = find(a[i].x), g[a[i].eli].push_back(a[i].x);
        else g[a[i].x].push_back(a[i].x);
    }
}

inline bool eval(){ return seg[0].query() > 0 && seg[1].query() > 0; }

void even(){
    seg[0].init(n); seg[1].init(n);
    
    for(int i=0; i<v.size(); i++) a[v[i].x].color = i % 2;
    for(int i=1; i<=m; i++) if(a[i].color == -1) a[i].color = !a[a[i].eli].color;
    
    for(int i=1; i<=m; i++){
        seg[a[i].color].update(a[i].s, a[i].e, 1);
    }
    if(eval()){
        for(int i=1; i<=m; i++) cout << a[i].color;
    }
    else cout << "impossible";
}

void odd(){
    seg[0].init(n); seg[1].init(n);
    for(int i=0; i<v.size(); i++) a[v[i].x].color = i % 2;
    for(int i=1; i<=m; i++) if(a[i].color == -1) a[i].color = !a[a[i].eli].color;
    for(int i=1; i<=m; i++){
        seg[a[i].color].update(a[i].s, a[i].e, 1);
    }
    if(eval()){ for(int j=1; j<=m; j++) cout << a[j].color; return; }
    
    for(int i=0; i<v.size(); i++){
        for(auto j : g[v[i].x]){
            seg[a[j].color].update(a[j].s, a[j].e, -1);
            a[j].color ^= 1;
            seg[a[j].color].update(a[j].s, a[j].e, 1);
        }
        if(eval()){ for(int j=1; j<=m; j++) cout << a[j].color; return; }
    }
    cout << "impossible";
}

int main(){
    ios_base::sync_with_stdio(false); cin.tie(nullptr);
    cin >> n >> m;
    for(int i=1; i<=m; i++){
        int s, e; cin >> s >> e; s--; e--;
        if(s > e){
            if(ed < e) ed = e, ed_idx = i;
            e += n;
        }
        a[i] = {s, e, i};
    }
    calc_elimination();
    sort(a+1, a+m+1, [](Info a, Info b){ return a.x < b.x; });
    if(v.size() % 2 == 0) even();
    else odd();
}

Compilation message

alternating.cpp: In member function 'void Seg::update(int, int, int, int, int, int)':
alternating.cpp:34:19: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   34 |         int m = s + e >> 1;
      |                 ~~^~~
alternating.cpp: In member function 'int Seg::query(int, int, int, int, int)':
alternating.cpp:43:19: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   43 |         int m = s + e >> 1;
      |                 ~~^~~
alternating.cpp: In function 'void even()':
alternating.cpp:93:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<Info>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   93 |     for(int i=0; i<v.size(); i++) a[v[i].x].color = i % 2;
      |                  ~^~~~~~~~~
alternating.cpp: In function 'void odd()':
alternating.cpp:107:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<Info>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  107 |     for(int i=0; i<v.size(); i++) a[v[i].x].color = i % 2;
      |                  ~^~~~~~~~~
alternating.cpp:114:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<Info>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  114 |     for(int i=0; i<v.size(); i++){
      |                  ~^~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 6 ms 9196 KB Output is correct
2 Correct 6 ms 9196 KB Output is correct
3 Correct 7 ms 9196 KB Output is correct
4 Correct 6 ms 9196 KB Output is correct
5 Correct 6 ms 9196 KB Output is correct
6 Correct 6 ms 9196 KB Output is correct
7 Correct 6 ms 9196 KB Output is correct
8 Correct 6 ms 9196 KB Output is correct
9 Correct 6 ms 9196 KB Output is correct
10 Correct 6 ms 9196 KB Output is correct
11 Correct 6 ms 9192 KB Output is correct
12 Correct 6 ms 9216 KB Output is correct
13 Correct 6 ms 9196 KB Output is correct
14 Correct 6 ms 9196 KB Output is correct
15 Correct 6 ms 9196 KB Output is correct
16 Correct 7 ms 9196 KB Output is correct
17 Correct 6 ms 9196 KB Output is correct
18 Correct 6 ms 9196 KB Output is correct
19 Correct 6 ms 9196 KB Output is correct
20 Correct 6 ms 9196 KB Output is correct
21 Correct 6 ms 9196 KB Output is correct
22 Correct 6 ms 9196 KB Output is correct
23 Correct 6 ms 9196 KB Output is correct
24 Correct 6 ms 9196 KB Output is correct
25 Correct 6 ms 9196 KB Output is correct
26 Correct 6 ms 9196 KB Output is correct
27 Correct 6 ms 9196 KB Output is correct
28 Correct 6 ms 9196 KB Output is correct
29 Correct 6 ms 9196 KB Output is correct
30 Correct 6 ms 9196 KB Output is correct
31 Correct 6 ms 9196 KB Output is correct
32 Correct 6 ms 9196 KB Output is correct
33 Correct 6 ms 9196 KB Output is correct
34 Correct 6 ms 9196 KB Output is correct
35 Correct 6 ms 9196 KB Output is correct
36 Correct 7 ms 9196 KB Output is correct
37 Correct 6 ms 9196 KB Output is correct
38 Correct 6 ms 9196 KB Output is correct
39 Correct 6 ms 9196 KB Output is correct
40 Correct 6 ms 9196 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 6 ms 9196 KB Output is correct
2 Correct 6 ms 9196 KB Output is correct
3 Correct 7 ms 9196 KB Output is correct
4 Correct 6 ms 9196 KB Output is correct
5 Correct 6 ms 9196 KB Output is correct
6 Correct 6 ms 9196 KB Output is correct
7 Correct 6 ms 9196 KB Output is correct
8 Correct 6 ms 9196 KB Output is correct
9 Correct 6 ms 9196 KB Output is correct
10 Correct 6 ms 9196 KB Output is correct
11 Correct 6 ms 9192 KB Output is correct
12 Correct 6 ms 9216 KB Output is correct
13 Correct 6 ms 9196 KB Output is correct
14 Correct 6 ms 9196 KB Output is correct
15 Correct 6 ms 9196 KB Output is correct
16 Correct 7 ms 9196 KB Output is correct
17 Correct 6 ms 9196 KB Output is correct
18 Correct 6 ms 9196 KB Output is correct
19 Correct 6 ms 9196 KB Output is correct
20 Correct 6 ms 9196 KB Output is correct
21 Correct 6 ms 9196 KB Output is correct
22 Correct 6 ms 9196 KB Output is correct
23 Correct 6 ms 9196 KB Output is correct
24 Correct 6 ms 9196 KB Output is correct
25 Correct 6 ms 9196 KB Output is correct
26 Correct 6 ms 9196 KB Output is correct
27 Correct 6 ms 9196 KB Output is correct
28 Correct 6 ms 9196 KB Output is correct
29 Correct 6 ms 9196 KB Output is correct
30 Correct 6 ms 9196 KB Output is correct
31 Correct 6 ms 9196 KB Output is correct
32 Correct 6 ms 9196 KB Output is correct
33 Correct 6 ms 9196 KB Output is correct
34 Correct 6 ms 9196 KB Output is correct
35 Correct 6 ms 9196 KB Output is correct
36 Correct 7 ms 9196 KB Output is correct
37 Correct 6 ms 9196 KB Output is correct
38 Correct 6 ms 9196 KB Output is correct
39 Correct 6 ms 9196 KB Output is correct
40 Correct 6 ms 9196 KB Output is correct
41 Correct 7 ms 9228 KB Output is correct
42 Correct 6 ms 9196 KB Output is correct
43 Correct 6 ms 9196 KB Output is correct
44 Correct 6 ms 9196 KB Output is correct
45 Correct 6 ms 9196 KB Output is correct
46 Correct 6 ms 9196 KB Output is correct
47 Correct 6 ms 9196 KB Output is correct
48 Correct 6 ms 9196 KB Output is correct
49 Correct 6 ms 9196 KB Output is correct
50 Correct 6 ms 9196 KB Output is correct
51 Correct 6 ms 9196 KB Output is correct
52 Correct 6 ms 9196 KB Output is correct
53 Correct 6 ms 9196 KB Output is correct
54 Correct 6 ms 9196 KB Output is correct
55 Correct 6 ms 9196 KB Output is correct
56 Correct 6 ms 9196 KB Output is correct
57 Correct 6 ms 9196 KB Output is correct
58 Correct 6 ms 9196 KB Output is correct
59 Correct 6 ms 9196 KB Output is correct
60 Correct 6 ms 9196 KB Output is correct
61 Correct 6 ms 9196 KB Output is correct
62 Correct 6 ms 9196 KB Output is correct
63 Correct 6 ms 9196 KB Output is correct
64 Correct 6 ms 9196 KB Output is correct
65 Correct 6 ms 9196 KB Output is correct
66 Correct 6 ms 9196 KB Output is correct
67 Correct 6 ms 9196 KB Output is correct
68 Correct 6 ms 9196 KB Output is correct
69 Correct 6 ms 9196 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 6 ms 9196 KB Output is correct
2 Correct 6 ms 9196 KB Output is correct
3 Correct 7 ms 9196 KB Output is correct
4 Correct 6 ms 9196 KB Output is correct
5 Correct 6 ms 9196 KB Output is correct
6 Correct 6 ms 9196 KB Output is correct
7 Correct 6 ms 9196 KB Output is correct
8 Correct 6 ms 9196 KB Output is correct
9 Correct 6 ms 9196 KB Output is correct
10 Correct 6 ms 9196 KB Output is correct
11 Correct 6 ms 9192 KB Output is correct
12 Correct 6 ms 9216 KB Output is correct
13 Correct 6 ms 9196 KB Output is correct
14 Correct 6 ms 9196 KB Output is correct
15 Correct 6 ms 9196 KB Output is correct
16 Correct 7 ms 9196 KB Output is correct
17 Correct 6 ms 9196 KB Output is correct
18 Correct 6 ms 9196 KB Output is correct
19 Correct 6 ms 9196 KB Output is correct
20 Correct 6 ms 9196 KB Output is correct
21 Correct 6 ms 9196 KB Output is correct
22 Correct 6 ms 9196 KB Output is correct
23 Correct 6 ms 9196 KB Output is correct
24 Correct 6 ms 9196 KB Output is correct
25 Correct 6 ms 9196 KB Output is correct
26 Correct 6 ms 9196 KB Output is correct
27 Correct 6 ms 9196 KB Output is correct
28 Correct 6 ms 9196 KB Output is correct
29 Correct 6 ms 9196 KB Output is correct
30 Correct 6 ms 9196 KB Output is correct
31 Correct 6 ms 9196 KB Output is correct
32 Correct 6 ms 9196 KB Output is correct
33 Correct 6 ms 9196 KB Output is correct
34 Correct 6 ms 9196 KB Output is correct
35 Correct 6 ms 9196 KB Output is correct
36 Correct 7 ms 9196 KB Output is correct
37 Correct 6 ms 9196 KB Output is correct
38 Correct 6 ms 9196 KB Output is correct
39 Correct 6 ms 9196 KB Output is correct
40 Correct 6 ms 9196 KB Output is correct
41 Correct 7 ms 9228 KB Output is correct
42 Correct 6 ms 9196 KB Output is correct
43 Correct 6 ms 9196 KB Output is correct
44 Correct 6 ms 9196 KB Output is correct
45 Correct 6 ms 9196 KB Output is correct
46 Correct 6 ms 9196 KB Output is correct
47 Correct 6 ms 9196 KB Output is correct
48 Correct 6 ms 9196 KB Output is correct
49 Correct 6 ms 9196 KB Output is correct
50 Correct 6 ms 9196 KB Output is correct
51 Correct 6 ms 9196 KB Output is correct
52 Correct 6 ms 9196 KB Output is correct
53 Correct 6 ms 9196 KB Output is correct
54 Correct 6 ms 9196 KB Output is correct
55 Correct 6 ms 9196 KB Output is correct
56 Correct 6 ms 9196 KB Output is correct
57 Correct 6 ms 9196 KB Output is correct
58 Correct 6 ms 9196 KB Output is correct
59 Correct 6 ms 9196 KB Output is correct
60 Correct 6 ms 9196 KB Output is correct
61 Correct 6 ms 9196 KB Output is correct
62 Correct 6 ms 9196 KB Output is correct
63 Correct 6 ms 9196 KB Output is correct
64 Correct 6 ms 9196 KB Output is correct
65 Correct 6 ms 9196 KB Output is correct
66 Correct 6 ms 9196 KB Output is correct
67 Correct 6 ms 9196 KB Output is correct
68 Correct 6 ms 9196 KB Output is correct
69 Correct 6 ms 9196 KB Output is correct
70 Correct 6 ms 9196 KB Output is correct
71 Correct 7 ms 9324 KB Output is correct
72 Correct 6 ms 9196 KB Output is correct
73 Correct 6 ms 9196 KB Output is correct
74 Correct 6 ms 9196 KB Output is correct
75 Correct 6 ms 9324 KB Output is correct
76 Correct 6 ms 9196 KB Output is correct
77 Correct 6 ms 9196 KB Output is correct
78 Correct 6 ms 9196 KB Output is correct
79 Correct 6 ms 9196 KB Output is correct
80 Correct 6 ms 9196 KB Output is correct
81 Correct 6 ms 9196 KB Output is correct
82 Correct 7 ms 9196 KB Output is correct
83 Correct 7 ms 9196 KB Output is correct
84 Correct 7 ms 9196 KB Output is correct
85 Correct 6 ms 9196 KB Output is correct
86 Correct 6 ms 9196 KB Output is correct
87 Correct 6 ms 9196 KB Output is correct
88 Correct 6 ms 9196 KB Output is correct
89 Correct 6 ms 9196 KB Output is correct
90 Correct 7 ms 9196 KB Output is correct
91 Correct 6 ms 9196 KB Output is correct
92 Correct 7 ms 9196 KB Output is correct
93 Correct 6 ms 9196 KB Output is correct
94 Correct 6 ms 9196 KB Output is correct
95 Correct 6 ms 9196 KB Output is correct
96 Correct 7 ms 9196 KB Output is correct
97 Correct 7 ms 9196 KB Output is correct
98 Correct 6 ms 9196 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 37 ms 10212 KB Output is correct
2 Correct 6 ms 9196 KB Output is correct
3 Correct 103 ms 9712 KB Output is correct
4 Correct 48 ms 9712 KB Output is correct
5 Correct 95 ms 12504 KB Output is correct
6 Correct 169 ms 11868 KB Output is correct
7 Correct 83 ms 10788 KB Output is correct
8 Correct 9 ms 9324 KB Output is correct
9 Correct 7 ms 9196 KB Output is correct
10 Correct 101 ms 12636 KB Output is correct
11 Correct 72 ms 11232 KB Output is correct
12 Correct 76 ms 10212 KB Output is correct
13 Correct 6 ms 9196 KB Output is correct
14 Correct 6 ms 9196 KB Output is correct
15 Correct 90 ms 10216 KB Output is correct
16 Correct 107 ms 12772 KB Output is correct
17 Correct 143 ms 10340 KB Output is correct
18 Correct 107 ms 10332 KB Output is correct
19 Correct 14 ms 9324 KB Output is correct
20 Correct 80 ms 13272 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 6 ms 9196 KB Output is correct
2 Correct 6 ms 9196 KB Output is correct
3 Correct 7 ms 9196 KB Output is correct
4 Correct 6 ms 9196 KB Output is correct
5 Correct 6 ms 9196 KB Output is correct
6 Correct 6 ms 9196 KB Output is correct
7 Correct 6 ms 9196 KB Output is correct
8 Correct 6 ms 9196 KB Output is correct
9 Correct 6 ms 9196 KB Output is correct
10 Correct 6 ms 9196 KB Output is correct
11 Correct 6 ms 9192 KB Output is correct
12 Correct 6 ms 9216 KB Output is correct
13 Correct 6 ms 9196 KB Output is correct
14 Correct 6 ms 9196 KB Output is correct
15 Correct 6 ms 9196 KB Output is correct
16 Correct 7 ms 9196 KB Output is correct
17 Correct 6 ms 9196 KB Output is correct
18 Correct 6 ms 9196 KB Output is correct
19 Correct 6 ms 9196 KB Output is correct
20 Correct 6 ms 9196 KB Output is correct
21 Correct 6 ms 9196 KB Output is correct
22 Correct 6 ms 9196 KB Output is correct
23 Correct 6 ms 9196 KB Output is correct
24 Correct 6 ms 9196 KB Output is correct
25 Correct 6 ms 9196 KB Output is correct
26 Correct 6 ms 9196 KB Output is correct
27 Correct 6 ms 9196 KB Output is correct
28 Correct 6 ms 9196 KB Output is correct
29 Correct 6 ms 9196 KB Output is correct
30 Correct 6 ms 9196 KB Output is correct
31 Correct 6 ms 9196 KB Output is correct
32 Correct 6 ms 9196 KB Output is correct
33 Correct 6 ms 9196 KB Output is correct
34 Correct 6 ms 9196 KB Output is correct
35 Correct 6 ms 9196 KB Output is correct
36 Correct 7 ms 9196 KB Output is correct
37 Correct 6 ms 9196 KB Output is correct
38 Correct 6 ms 9196 KB Output is correct
39 Correct 6 ms 9196 KB Output is correct
40 Correct 6 ms 9196 KB Output is correct
41 Correct 7 ms 9228 KB Output is correct
42 Correct 6 ms 9196 KB Output is correct
43 Correct 6 ms 9196 KB Output is correct
44 Correct 6 ms 9196 KB Output is correct
45 Correct 6 ms 9196 KB Output is correct
46 Correct 6 ms 9196 KB Output is correct
47 Correct 6 ms 9196 KB Output is correct
48 Correct 6 ms 9196 KB Output is correct
49 Correct 6 ms 9196 KB Output is correct
50 Correct 6 ms 9196 KB Output is correct
51 Correct 6 ms 9196 KB Output is correct
52 Correct 6 ms 9196 KB Output is correct
53 Correct 6 ms 9196 KB Output is correct
54 Correct 6 ms 9196 KB Output is correct
55 Correct 6 ms 9196 KB Output is correct
56 Correct 6 ms 9196 KB Output is correct
57 Correct 6 ms 9196 KB Output is correct
58 Correct 6 ms 9196 KB Output is correct
59 Correct 6 ms 9196 KB Output is correct
60 Correct 6 ms 9196 KB Output is correct
61 Correct 6 ms 9196 KB Output is correct
62 Correct 6 ms 9196 KB Output is correct
63 Correct 6 ms 9196 KB Output is correct
64 Correct 6 ms 9196 KB Output is correct
65 Correct 6 ms 9196 KB Output is correct
66 Correct 6 ms 9196 KB Output is correct
67 Correct 6 ms 9196 KB Output is correct
68 Correct 6 ms 9196 KB Output is correct
69 Correct 6 ms 9196 KB Output is correct
70 Correct 6 ms 9196 KB Output is correct
71 Correct 7 ms 9324 KB Output is correct
72 Correct 6 ms 9196 KB Output is correct
73 Correct 6 ms 9196 KB Output is correct
74 Correct 6 ms 9196 KB Output is correct
75 Correct 6 ms 9324 KB Output is correct
76 Correct 6 ms 9196 KB Output is correct
77 Correct 6 ms 9196 KB Output is correct
78 Correct 6 ms 9196 KB Output is correct
79 Correct 6 ms 9196 KB Output is correct
80 Correct 6 ms 9196 KB Output is correct
81 Correct 6 ms 9196 KB Output is correct
82 Correct 7 ms 9196 KB Output is correct
83 Correct 7 ms 9196 KB Output is correct
84 Correct 7 ms 9196 KB Output is correct
85 Correct 6 ms 9196 KB Output is correct
86 Correct 6 ms 9196 KB Output is correct
87 Correct 6 ms 9196 KB Output is correct
88 Correct 6 ms 9196 KB Output is correct
89 Correct 6 ms 9196 KB Output is correct
90 Correct 7 ms 9196 KB Output is correct
91 Correct 6 ms 9196 KB Output is correct
92 Correct 7 ms 9196 KB Output is correct
93 Correct 6 ms 9196 KB Output is correct
94 Correct 6 ms 9196 KB Output is correct
95 Correct 6 ms 9196 KB Output is correct
96 Correct 7 ms 9196 KB Output is correct
97 Correct 7 ms 9196 KB Output is correct
98 Correct 6 ms 9196 KB Output is correct
99 Correct 37 ms 10212 KB Output is correct
100 Correct 6 ms 9196 KB Output is correct
101 Correct 103 ms 9712 KB Output is correct
102 Correct 48 ms 9712 KB Output is correct
103 Correct 95 ms 12504 KB Output is correct
104 Correct 169 ms 11868 KB Output is correct
105 Correct 83 ms 10788 KB Output is correct
106 Correct 9 ms 9324 KB Output is correct
107 Correct 7 ms 9196 KB Output is correct
108 Correct 101 ms 12636 KB Output is correct
109 Correct 72 ms 11232 KB Output is correct
110 Correct 76 ms 10212 KB Output is correct
111 Correct 6 ms 9196 KB Output is correct
112 Correct 6 ms 9196 KB Output is correct
113 Correct 90 ms 10216 KB Output is correct
114 Correct 107 ms 12772 KB Output is correct
115 Correct 143 ms 10340 KB Output is correct
116 Correct 107 ms 10332 KB Output is correct
117 Correct 14 ms 9324 KB Output is correct
118 Correct 80 ms 13272 KB Output is correct
119 Correct 6 ms 9196 KB Output is correct
120 Correct 128 ms 15192 KB Output is correct
121 Correct 63 ms 13020 KB Output is correct
122 Correct 6 ms 9196 KB Output is correct
123 Correct 15 ms 9452 KB Output is correct
124 Correct 41 ms 10916 KB Output is correct
125 Correct 32 ms 10656 KB Output is correct
126 Correct 6 ms 9196 KB Output is correct
127 Correct 14 ms 9580 KB Output is correct
128 Correct 81 ms 13016 KB Output is correct
129 Correct 47 ms 10696 KB Output is correct
130 Correct 59 ms 11724 KB Output is correct
131 Correct 6 ms 9196 KB Output is correct
132 Correct 7 ms 9196 KB Output is correct
133 Correct 151 ms 11492 KB Output is correct
134 Correct 46 ms 9836 KB Output is correct
135 Correct 6 ms 9196 KB Output is correct
136 Correct 66 ms 13312 KB Output is correct
137 Correct 145 ms 11868 KB Output is correct
138 Correct 7 ms 9196 KB Output is correct