답안 #941379

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
941379 2024-03-08T16:21:55 Z phoenix0423 Alternating Current (BOI18_alternating) C++17
100 / 100
131 ms 25184 KB
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pll;
#define fastio ios::sync_with_stdio(false), cin.tie(0)
#define pb push_back
#define eb emplace_back
#define f first
#define s second
#define int long long
#define lowbit(x) x&-x
const int maxn = 1e5 + 5;
const int INF = 1e18;
int n, m;
vector<int> adj[maxn];
 
struct seg{
    int l, r, id;
    seg(){}
    seg(int _l, int _r, int _id) : l(_l), r(_r), id(_id){
        if(r < l) r += n;
    }
    bool operator < (const seg& other) const{
        if(l != other.l) return l < other.l;
        if(r != other.r) return r > other.r;
        return id < other.id;
    }
} ee[maxn];
 
class comp{
    public:
        bool operator ()(seg a, seg b){
            if(a.r != b.r) return a.r < b.r;
            else return a.l < b.l;
        }
};
struct segtree{
    int st[maxn * 4], tag[maxn * 4];
    void cast(int val, int v){
        st[v] += val, tag[v] += val;
    }
 
    void push(int v){
        if(tag[v]){
            cast(tag[v], v * 2);
            cast(tag[v], v * 2 + 1);
            tag[v] = 0;
        }
    }
    void upd(int l, int r, int val, int v, int L, int R){
        if(l > R || r < L) return;
        if(l <= L && r >= R){
            st[v] += val, tag[v] += val;
            return;
        }
        push(v);
        int m = (L + R) / 2;
        upd(l, r, val, v * 2, L, m);
        upd(l, r, val, v * 2 + 1, m + 1, R);
        st[v] = min(st[v * 2], st[v * 2 + 1]);
    }
    void upd(int l, int r, int val){ upd(l, r, val, 1, 0, n - 1);}
    int qry(int l, int r, int v, int L, int R){
        if(l > R || r < L) return INF;
        if(l <= L && r >= R) return st[v];
        push(v);
        int m = (L + R) / 2;
        return min(qry(l, r, v * 2, L, m), qry(l, r, v * 2 + 1, m + 1, R));
    }
    int qry(int l, int r){ return qry(l, r, 1, 0, n - 1);}
    void insert(int l, int r, int val){
        l %= n, r %= n;
        if(l <= r) upd(l, r, val);
        else upd(l, n - 1, val), upd(0, r, val);
    }
} st[2];
 
signed main(void){
    // fastio;
    cin>>n>>m;
    vector<seg> e;
    for(int i = 0; i < m; i++){
        int a, b;
        cin>>a>>b;
        a--, b--;
        if(a == b + 1) a = 0, b = n - 1;
        ee[i] = seg(a, b, i);
        e.pb(seg(a, b, i));
        if(a <= b) e.pb(seg(a + n, b + n, i));
    }
    vector<int> par(m);
    iota(par.begin(), par.end(), 0);
    sort(e.begin(), e.end());
    int tr = -1, tid = -1;
    vector<seg> nw;
    for(int i = 0; i < e.size(); i++){
        auto [l, r, id] = e[i];
        if(r <= tr) par[id] = tid;
        else tr = r, tid = id;  
    }
    for(int i = 0; i < m; i++){
        if(par[i] == i) nw.pb(ee[i]);
        else{
            adj[par[i]].pb(i);
        }
    }
    sort(nw.begin(), nw.end());
    vector<int> ans(m);
    for(int i = 0; i < nw.size(); i++){
        st[i % 2].insert(nw[i].l, nw[i].r, 1);
        ans[nw[i].id] = i % 2;
        for(auto id : adj[nw[i].id]){
            st[(i % 2 == 0)].insert(ee[id].l, ee[id].r, 1);
            ans[id] = (i % 2 == 0);
        }
    }
    if(st[0].qry(0, n - 1) >= 1 && st[1].qry(0, n - 1) >= 1){
        for(auto x : ans) cout<<x;
        cout<<"\n";
        return 0;
    }
    if(nw.size() % 2 == 0){
        cout<<"impossible\n";
        return 0;
    }
    else{
        for(int i = 0; i < nw.size(); i++){
            st[i % 2].insert(nw[i].l, nw[i].r, -1);
            st[(i % 2 == 0)].insert(nw[i].l, nw[i].r, 1);
            ans[nw[i].id] ^= 1;
            for(auto id : adj[nw[i].id]){
                st[(i % 2 == 0)].insert(ee[id].l, ee[id].r, -1);
                st[i % 2].insert(ee[id].l, ee[id].r, 1);
                ans[id] ^= 1;
            }
            if(st[0].qry(0, n - 1) >= 1 && st[1].qry(0, n - 1) >= 1){
                for(auto x : ans) cout<<x;
                cout<<"\n";
                return 0;
            }
        }
        cout<<"impossible\n";
    }
 
}

Compilation message

alternating.cpp: In function 'int main()':
alternating.cpp:96:22: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<seg>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   96 |     for(int i = 0; i < e.size(); i++){
      |                    ~~^~~~~~~~~~
alternating.cpp:109:22: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<seg>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  109 |     for(int i = 0; i < nw.size(); i++){
      |                    ~~^~~~~~~~~~~
alternating.cpp:127:26: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<seg>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  127 |         for(int i = 0; i < nw.size(); i++){
      |                        ~~^~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 9304 KB Output is correct
2 Correct 2 ms 9052 KB Output is correct
3 Correct 1 ms 5212 KB Output is correct
4 Correct 1 ms 7260 KB Output is correct
5 Correct 1 ms 5208 KB Output is correct
6 Correct 1 ms 7004 KB Output is correct
7 Correct 1 ms 7256 KB Output is correct
8 Correct 1 ms 5212 KB Output is correct
9 Correct 1 ms 5212 KB Output is correct
10 Correct 1 ms 5212 KB Output is correct
11 Correct 1 ms 5212 KB Output is correct
12 Correct 1 ms 7004 KB Output is correct
13 Correct 2 ms 7260 KB Output is correct
14 Correct 1 ms 5208 KB Output is correct
15 Correct 1 ms 7256 KB Output is correct
16 Correct 2 ms 7412 KB Output is correct
17 Correct 1 ms 5212 KB Output is correct
18 Correct 2 ms 7004 KB Output is correct
19 Correct 1 ms 7260 KB Output is correct
20 Correct 1 ms 7240 KB Output is correct
21 Correct 1 ms 7260 KB Output is correct
22 Correct 1 ms 5212 KB Output is correct
23 Correct 2 ms 9304 KB Output is correct
24 Correct 1 ms 5212 KB Output is correct
25 Correct 1 ms 7260 KB Output is correct
26 Correct 1 ms 7260 KB Output is correct
27 Correct 1 ms 5208 KB Output is correct
28 Correct 1 ms 7260 KB Output is correct
29 Correct 1 ms 7260 KB Output is correct
30 Correct 2 ms 7260 KB Output is correct
31 Correct 1 ms 7236 KB Output is correct
32 Correct 1 ms 5396 KB Output is correct
33 Correct 1 ms 7260 KB Output is correct
34 Correct 1 ms 5212 KB Output is correct
35 Correct 1 ms 7260 KB Output is correct
36 Correct 1 ms 7260 KB Output is correct
37 Correct 2 ms 7240 KB Output is correct
38 Correct 2 ms 5212 KB Output is correct
39 Correct 2 ms 7260 KB Output is correct
40 Correct 2 ms 7260 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 9304 KB Output is correct
2 Correct 2 ms 9052 KB Output is correct
3 Correct 1 ms 5212 KB Output is correct
4 Correct 1 ms 7260 KB Output is correct
5 Correct 1 ms 5208 KB Output is correct
6 Correct 1 ms 7004 KB Output is correct
7 Correct 1 ms 7256 KB Output is correct
8 Correct 1 ms 5212 KB Output is correct
9 Correct 1 ms 5212 KB Output is correct
10 Correct 1 ms 5212 KB Output is correct
11 Correct 1 ms 5212 KB Output is correct
12 Correct 1 ms 7004 KB Output is correct
13 Correct 2 ms 7260 KB Output is correct
14 Correct 1 ms 5208 KB Output is correct
15 Correct 1 ms 7256 KB Output is correct
16 Correct 2 ms 7412 KB Output is correct
17 Correct 1 ms 5212 KB Output is correct
18 Correct 2 ms 7004 KB Output is correct
19 Correct 1 ms 7260 KB Output is correct
20 Correct 1 ms 7240 KB Output is correct
21 Correct 1 ms 7260 KB Output is correct
22 Correct 1 ms 5212 KB Output is correct
23 Correct 2 ms 9304 KB Output is correct
24 Correct 1 ms 5212 KB Output is correct
25 Correct 1 ms 7260 KB Output is correct
26 Correct 1 ms 7260 KB Output is correct
27 Correct 1 ms 5208 KB Output is correct
28 Correct 1 ms 7260 KB Output is correct
29 Correct 1 ms 7260 KB Output is correct
30 Correct 2 ms 7260 KB Output is correct
31 Correct 1 ms 7236 KB Output is correct
32 Correct 1 ms 5396 KB Output is correct
33 Correct 1 ms 7260 KB Output is correct
34 Correct 1 ms 5212 KB Output is correct
35 Correct 1 ms 7260 KB Output is correct
36 Correct 1 ms 7260 KB Output is correct
37 Correct 2 ms 7240 KB Output is correct
38 Correct 2 ms 5212 KB Output is correct
39 Correct 2 ms 7260 KB Output is correct
40 Correct 2 ms 7260 KB Output is correct
41 Correct 2 ms 9304 KB Output is correct
42 Correct 2 ms 7256 KB Output is correct
43 Correct 1 ms 5212 KB Output is correct
44 Correct 1 ms 7260 KB Output is correct
45 Correct 2 ms 7260 KB Output is correct
46 Correct 1 ms 5208 KB Output is correct
47 Correct 1 ms 5212 KB Output is correct
48 Correct 1 ms 5208 KB Output is correct
49 Correct 2 ms 5208 KB Output is correct
50 Correct 2 ms 7256 KB Output is correct
51 Correct 2 ms 7260 KB Output is correct
52 Correct 1 ms 5208 KB Output is correct
53 Correct 1 ms 7260 KB Output is correct
54 Correct 1 ms 5212 KB Output is correct
55 Correct 2 ms 7260 KB Output is correct
56 Correct 3 ms 5212 KB Output is correct
57 Correct 1 ms 5212 KB Output is correct
58 Correct 2 ms 7256 KB Output is correct
59 Correct 1 ms 5212 KB Output is correct
60 Correct 1 ms 7260 KB Output is correct
61 Correct 2 ms 7260 KB Output is correct
62 Correct 1 ms 5212 KB Output is correct
63 Correct 1 ms 7260 KB Output is correct
64 Correct 2 ms 5212 KB Output is correct
65 Correct 1 ms 5184 KB Output is correct
66 Correct 2 ms 7260 KB Output is correct
67 Correct 2 ms 7260 KB Output is correct
68 Correct 2 ms 7260 KB Output is correct
69 Correct 2 ms 7260 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 9304 KB Output is correct
2 Correct 2 ms 9052 KB Output is correct
3 Correct 1 ms 5212 KB Output is correct
4 Correct 1 ms 7260 KB Output is correct
5 Correct 1 ms 5208 KB Output is correct
6 Correct 1 ms 7004 KB Output is correct
7 Correct 1 ms 7256 KB Output is correct
8 Correct 1 ms 5212 KB Output is correct
9 Correct 1 ms 5212 KB Output is correct
10 Correct 1 ms 5212 KB Output is correct
11 Correct 1 ms 5212 KB Output is correct
12 Correct 1 ms 7004 KB Output is correct
13 Correct 2 ms 7260 KB Output is correct
14 Correct 1 ms 5208 KB Output is correct
15 Correct 1 ms 7256 KB Output is correct
16 Correct 2 ms 7412 KB Output is correct
17 Correct 1 ms 5212 KB Output is correct
18 Correct 2 ms 7004 KB Output is correct
19 Correct 1 ms 7260 KB Output is correct
20 Correct 1 ms 7240 KB Output is correct
21 Correct 1 ms 7260 KB Output is correct
22 Correct 1 ms 5212 KB Output is correct
23 Correct 2 ms 9304 KB Output is correct
24 Correct 1 ms 5212 KB Output is correct
25 Correct 1 ms 7260 KB Output is correct
26 Correct 1 ms 7260 KB Output is correct
27 Correct 1 ms 5208 KB Output is correct
28 Correct 1 ms 7260 KB Output is correct
29 Correct 1 ms 7260 KB Output is correct
30 Correct 2 ms 7260 KB Output is correct
31 Correct 1 ms 7236 KB Output is correct
32 Correct 1 ms 5396 KB Output is correct
33 Correct 1 ms 7260 KB Output is correct
34 Correct 1 ms 5212 KB Output is correct
35 Correct 1 ms 7260 KB Output is correct
36 Correct 1 ms 7260 KB Output is correct
37 Correct 2 ms 7240 KB Output is correct
38 Correct 2 ms 5212 KB Output is correct
39 Correct 2 ms 7260 KB Output is correct
40 Correct 2 ms 7260 KB Output is correct
41 Correct 2 ms 9304 KB Output is correct
42 Correct 2 ms 7256 KB Output is correct
43 Correct 1 ms 5212 KB Output is correct
44 Correct 1 ms 7260 KB Output is correct
45 Correct 2 ms 7260 KB Output is correct
46 Correct 1 ms 5208 KB Output is correct
47 Correct 1 ms 5212 KB Output is correct
48 Correct 1 ms 5208 KB Output is correct
49 Correct 2 ms 5208 KB Output is correct
50 Correct 2 ms 7256 KB Output is correct
51 Correct 2 ms 7260 KB Output is correct
52 Correct 1 ms 5208 KB Output is correct
53 Correct 1 ms 7260 KB Output is correct
54 Correct 1 ms 5212 KB Output is correct
55 Correct 2 ms 7260 KB Output is correct
56 Correct 3 ms 5212 KB Output is correct
57 Correct 1 ms 5212 KB Output is correct
58 Correct 2 ms 7256 KB Output is correct
59 Correct 1 ms 5212 KB Output is correct
60 Correct 1 ms 7260 KB Output is correct
61 Correct 2 ms 7260 KB Output is correct
62 Correct 1 ms 5212 KB Output is correct
63 Correct 1 ms 7260 KB Output is correct
64 Correct 2 ms 5212 KB Output is correct
65 Correct 1 ms 5184 KB Output is correct
66 Correct 2 ms 7260 KB Output is correct
67 Correct 2 ms 7260 KB Output is correct
68 Correct 2 ms 7260 KB Output is correct
69 Correct 2 ms 7260 KB Output is correct
70 Correct 2 ms 9560 KB Output is correct
71 Correct 2 ms 7260 KB Output is correct
72 Correct 2 ms 5188 KB Output is correct
73 Correct 2 ms 5212 KB Output is correct
74 Correct 2 ms 7260 KB Output is correct
75 Correct 2 ms 5208 KB Output is correct
76 Correct 3 ms 5208 KB Output is correct
77 Correct 2 ms 5208 KB Output is correct
78 Correct 2 ms 7260 KB Output is correct
79 Correct 2 ms 7256 KB Output is correct
80 Correct 2 ms 5212 KB Output is correct
81 Correct 2 ms 5212 KB Output is correct
82 Correct 1 ms 7240 KB Output is correct
83 Correct 2 ms 5212 KB Output is correct
84 Correct 2 ms 7260 KB Output is correct
85 Correct 1 ms 5212 KB Output is correct
86 Correct 2 ms 5212 KB Output is correct
87 Correct 2 ms 7512 KB Output is correct
88 Correct 2 ms 7232 KB Output is correct
89 Correct 2 ms 7260 KB Output is correct
90 Correct 2 ms 7260 KB Output is correct
91 Correct 2 ms 7260 KB Output is correct
92 Correct 2 ms 7236 KB Output is correct
93 Correct 2 ms 7260 KB Output is correct
94 Correct 1 ms 7260 KB Output is correct
95 Correct 1 ms 7260 KB Output is correct
96 Correct 2 ms 7260 KB Output is correct
97 Correct 2 ms 5380 KB Output is correct
98 Correct 2 ms 7260 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 51 ms 16556 KB Output is correct
2 Correct 2 ms 9308 KB Output is correct
3 Correct 78 ms 18508 KB Output is correct
4 Correct 40 ms 15384 KB Output is correct
5 Correct 89 ms 24496 KB Output is correct
6 Correct 131 ms 23876 KB Output is correct
7 Correct 79 ms 22452 KB Output is correct
8 Correct 6 ms 14872 KB Output is correct
9 Correct 5 ms 13148 KB Output is correct
10 Correct 93 ms 23480 KB Output is correct
11 Correct 70 ms 21940 KB Output is correct
12 Correct 81 ms 19748 KB Output is correct
13 Correct 2 ms 9564 KB Output is correct
14 Correct 2 ms 11612 KB Output is correct
15 Correct 87 ms 20852 KB Output is correct
16 Correct 64 ms 19916 KB Output is correct
17 Correct 103 ms 20920 KB Output is correct
18 Correct 86 ms 18180 KB Output is correct
19 Correct 9 ms 14424 KB Output is correct
20 Correct 91 ms 21944 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 9304 KB Output is correct
2 Correct 2 ms 9052 KB Output is correct
3 Correct 1 ms 5212 KB Output is correct
4 Correct 1 ms 7260 KB Output is correct
5 Correct 1 ms 5208 KB Output is correct
6 Correct 1 ms 7004 KB Output is correct
7 Correct 1 ms 7256 KB Output is correct
8 Correct 1 ms 5212 KB Output is correct
9 Correct 1 ms 5212 KB Output is correct
10 Correct 1 ms 5212 KB Output is correct
11 Correct 1 ms 5212 KB Output is correct
12 Correct 1 ms 7004 KB Output is correct
13 Correct 2 ms 7260 KB Output is correct
14 Correct 1 ms 5208 KB Output is correct
15 Correct 1 ms 7256 KB Output is correct
16 Correct 2 ms 7412 KB Output is correct
17 Correct 1 ms 5212 KB Output is correct
18 Correct 2 ms 7004 KB Output is correct
19 Correct 1 ms 7260 KB Output is correct
20 Correct 1 ms 7240 KB Output is correct
21 Correct 1 ms 7260 KB Output is correct
22 Correct 1 ms 5212 KB Output is correct
23 Correct 2 ms 9304 KB Output is correct
24 Correct 1 ms 5212 KB Output is correct
25 Correct 1 ms 7260 KB Output is correct
26 Correct 1 ms 7260 KB Output is correct
27 Correct 1 ms 5208 KB Output is correct
28 Correct 1 ms 7260 KB Output is correct
29 Correct 1 ms 7260 KB Output is correct
30 Correct 2 ms 7260 KB Output is correct
31 Correct 1 ms 7236 KB Output is correct
32 Correct 1 ms 5396 KB Output is correct
33 Correct 1 ms 7260 KB Output is correct
34 Correct 1 ms 5212 KB Output is correct
35 Correct 1 ms 7260 KB Output is correct
36 Correct 1 ms 7260 KB Output is correct
37 Correct 2 ms 7240 KB Output is correct
38 Correct 2 ms 5212 KB Output is correct
39 Correct 2 ms 7260 KB Output is correct
40 Correct 2 ms 7260 KB Output is correct
41 Correct 2 ms 9304 KB Output is correct
42 Correct 2 ms 7256 KB Output is correct
43 Correct 1 ms 5212 KB Output is correct
44 Correct 1 ms 7260 KB Output is correct
45 Correct 2 ms 7260 KB Output is correct
46 Correct 1 ms 5208 KB Output is correct
47 Correct 1 ms 5212 KB Output is correct
48 Correct 1 ms 5208 KB Output is correct
49 Correct 2 ms 5208 KB Output is correct
50 Correct 2 ms 7256 KB Output is correct
51 Correct 2 ms 7260 KB Output is correct
52 Correct 1 ms 5208 KB Output is correct
53 Correct 1 ms 7260 KB Output is correct
54 Correct 1 ms 5212 KB Output is correct
55 Correct 2 ms 7260 KB Output is correct
56 Correct 3 ms 5212 KB Output is correct
57 Correct 1 ms 5212 KB Output is correct
58 Correct 2 ms 7256 KB Output is correct
59 Correct 1 ms 5212 KB Output is correct
60 Correct 1 ms 7260 KB Output is correct
61 Correct 2 ms 7260 KB Output is correct
62 Correct 1 ms 5212 KB Output is correct
63 Correct 1 ms 7260 KB Output is correct
64 Correct 2 ms 5212 KB Output is correct
65 Correct 1 ms 5184 KB Output is correct
66 Correct 2 ms 7260 KB Output is correct
67 Correct 2 ms 7260 KB Output is correct
68 Correct 2 ms 7260 KB Output is correct
69 Correct 2 ms 7260 KB Output is correct
70 Correct 2 ms 9560 KB Output is correct
71 Correct 2 ms 7260 KB Output is correct
72 Correct 2 ms 5188 KB Output is correct
73 Correct 2 ms 5212 KB Output is correct
74 Correct 2 ms 7260 KB Output is correct
75 Correct 2 ms 5208 KB Output is correct
76 Correct 3 ms 5208 KB Output is correct
77 Correct 2 ms 5208 KB Output is correct
78 Correct 2 ms 7260 KB Output is correct
79 Correct 2 ms 7256 KB Output is correct
80 Correct 2 ms 5212 KB Output is correct
81 Correct 2 ms 5212 KB Output is correct
82 Correct 1 ms 7240 KB Output is correct
83 Correct 2 ms 5212 KB Output is correct
84 Correct 2 ms 7260 KB Output is correct
85 Correct 1 ms 5212 KB Output is correct
86 Correct 2 ms 5212 KB Output is correct
87 Correct 2 ms 7512 KB Output is correct
88 Correct 2 ms 7232 KB Output is correct
89 Correct 2 ms 7260 KB Output is correct
90 Correct 2 ms 7260 KB Output is correct
91 Correct 2 ms 7260 KB Output is correct
92 Correct 2 ms 7236 KB Output is correct
93 Correct 2 ms 7260 KB Output is correct
94 Correct 1 ms 7260 KB Output is correct
95 Correct 1 ms 7260 KB Output is correct
96 Correct 2 ms 7260 KB Output is correct
97 Correct 2 ms 5380 KB Output is correct
98 Correct 2 ms 7260 KB Output is correct
99 Correct 51 ms 16556 KB Output is correct
100 Correct 2 ms 9308 KB Output is correct
101 Correct 78 ms 18508 KB Output is correct
102 Correct 40 ms 15384 KB Output is correct
103 Correct 89 ms 24496 KB Output is correct
104 Correct 131 ms 23876 KB Output is correct
105 Correct 79 ms 22452 KB Output is correct
106 Correct 6 ms 14872 KB Output is correct
107 Correct 5 ms 13148 KB Output is correct
108 Correct 93 ms 23480 KB Output is correct
109 Correct 70 ms 21940 KB Output is correct
110 Correct 81 ms 19748 KB Output is correct
111 Correct 2 ms 9564 KB Output is correct
112 Correct 2 ms 11612 KB Output is correct
113 Correct 87 ms 20852 KB Output is correct
114 Correct 64 ms 19916 KB Output is correct
115 Correct 103 ms 20920 KB Output is correct
116 Correct 86 ms 18180 KB Output is correct
117 Correct 9 ms 14424 KB Output is correct
118 Correct 91 ms 21944 KB Output is correct
119 Correct 2 ms 10844 KB Output is correct
120 Correct 80 ms 25184 KB Output is correct
121 Correct 48 ms 19936 KB Output is correct
122 Correct 1 ms 7260 KB Output is correct
123 Correct 10 ms 14936 KB Output is correct
124 Correct 35 ms 18356 KB Output is correct
125 Correct 28 ms 17360 KB Output is correct
126 Correct 3 ms 11864 KB Output is correct
127 Correct 11 ms 15316 KB Output is correct
128 Correct 71 ms 23288 KB Output is correct
129 Correct 42 ms 19392 KB Output is correct
130 Correct 53 ms 20156 KB Output is correct
131 Correct 2 ms 10076 KB Output is correct
132 Correct 3 ms 11356 KB Output is correct
133 Correct 96 ms 22832 KB Output is correct
134 Correct 29 ms 16592 KB Output is correct
135 Correct 2 ms 7772 KB Output is correct
136 Correct 53 ms 20800 KB Output is correct
137 Correct 106 ms 23220 KB Output is correct
138 Correct 5 ms 14936 KB Output is correct