답안 #597890

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
597890 2022-07-17T04:28:38 Z qwerasdfzxcl Fish 2 (JOI22_fish2) C++14
100 / 100
2236 ms 23296 KB
#include <bits/stdc++.h>

typedef long long ll;
using namespace std;
int n, a[100100];

struct Seg1{
    ll tree[200200], sz;
    void init(int n){
        sz = n;
        for (int i=sz;i<sz*2;i++) tree[i] = a[i-sz];
        for (int i=sz-1;i;i--) tree[i] = tree[i<<1] + tree[i<<1|1];
    }
    void update(int p, int x){
        for (tree[p+=sz]=x;p>1;p>>=1) tree[p>>1] = tree[p] + tree[p^1];
    }
    ll query(int l, int r){
        ++r;
        ll ret = 0;
        for (l+=sz, r+=sz;l<r;l>>=1, r>>=1){
            if (l&1) ret += tree[l++];
            if (r&1) ret += tree[--r];
        }
        return ret;
    }
}tree1;

struct Seg2{
    int tree[400400];
    void init(int i, int l, int r){
        if (l==r) {tree[i] = a[l]; return;}
        int m = (l+r)>>1;
        init(i<<1, l, m); init(i<<1|1, m+1, r);
        tree[i] = max(tree[i<<1], tree[i<<1|1]);
    }
    void update(int i, int l, int r, int p, int x){
        if (p<l || r<p) return;
        if (l==r) {tree[i] = x; return;}
        int m = (l+r)>>1;
        update(i<<1, l, m, p, x); update(i<<1|1, m+1, r, p, x);
        tree[i] = max(tree[i<<1], tree[i<<1|1]);
    }
    int left_bound(int i, int l, int r, int s, int e, ll x){
        if (r<s || e<l) return -1;
        if (tree[i] <= x) return -1;
        if (l==r) return l;

        int m = (l+r)>>1;
        int tmp = left_bound(i<<1|1, m+1, r, s, e, x);
        if (tmp!=-1) return tmp;
        return left_bound(i<<1, l, m, s, e, x);
    }
    int right_bound(int i, int l, int r, int s, int e, ll x){
        if (r<s || e<l) return -1;
        if (tree[i] <= x) return -1;
        if (l==r) return l;

        int m = (l+r)>>1;
        int tmp = right_bound(i<<1, l, m, s, e, x);
        if (tmp!=-1) return tmp;
        return right_bound(i<<1|1, m+1, r, s, e, x);
    }
}tree2;

struct Node{
    int mn, cnt;
    Node(){}
    Node(int _mn, int _cnt): mn(_mn), cnt(_cnt) {}
    Node operator + (const Node &N) const{
        if (mn < N.mn) return *this;
        if (mn > N.mn) return N;
        return Node(mn, cnt+N.cnt);
    }
};

struct Seg3{
    Node tree[400400];
    int lazy[400400];
    void init(int i, int l, int r){
        if (l==r) {tree[i] = Node(0, 1); return;}
        int m = (l+r)>>1;
        init(i<<1, l, m); init(i<<1|1, m+1, r);
        tree[i] = tree[i<<1] + tree[i<<1|1];
    }
    void propagate(int i, int l, int r){
        tree[i].mn += lazy[i];
        if (l!=r){
            lazy[i<<1] += lazy[i];
            lazy[i<<1|1] += lazy[i];
        }
        lazy[i] = 0;
    }
    void update(int i, int l, int r, int s, int e, int x){
        propagate(i, l, r);
        if (r<s || e<l) return;
        if (s<=l && r<=e){
            lazy[i] += x;
            propagate(i, l, r);
            return;
        }
        int m = (l+r)>>1;
        update(i<<1, l, m, s, e, x); update(i<<1|1, m+1, r, s, e, x);
        tree[i] = tree[i<<1] + tree[i<<1|1];
    }
    Node query(int i, int l, int r, int s, int e){
        propagate(i, l, r);
        if (r<s || e<l) return Node(1e9, 0);
        if (s<=l && r<=e) return tree[i];
        int m = (l+r)>>1;
        return query(i<<1, l, m, s, e) + query(i<<1|1, m+1, r, s, e);
    }
}tree3;

struct Seg4{
    vector<pair<int, int>> tree[400400];
    void update(int i, int l, int r, int s, int e){
        if (l==r) {
            tree[i].emplace_back(s, e);
            tree3.update(1, 1, n, s, e, 1);
            return;
        }

        int m = (l+r)>>1;
        if (e<=m) update(i<<1, l, m, s, e);
        else if (m+1<=s) update(i<<1|1, m+1, r, s, e);
        else{
            tree[i].emplace_back(s, e);
            tree3.update(1, 1, n, s, e, 1);
        }
    }
    void erase(int i, int l, int r, int p){
        while(!tree[i].empty() && tree[i].back().first <= p && p <= tree[i].back().second){
            tree3.update(1, 1, n, tree[i].back().first, tree[i].back().second, -1);
            tree[i].pop_back();
        }
        if (l==r) return;

        int m = (l+r)>>1;
        if (p<=m) erase(i<<1, l, m, p);
        else erase(i<<1|1, m+1, r, p);
    }
    void debug(int i, int l, int r){
        printf("[%d, %d]: ", l, r);
        for (auto &[x, y]:tree[i]) printf("[%d, %d] / ", x, y);
        printf("\n");
        if (l==r) return;

        int m = (l+r)>>1;
        debug(i<<1, l, m);
        debug(i<<1|1, m+1, r);
    }
}tree4;

bool cmp(pair<int, int> &x, pair<int, int> &y){return x.second-x.first < y.second-y.first;}

bool ok(int l, int r, int s, int e){
    ll L = s==l?1e18:a[s-1], R = e==r?1e18:a[e+1];
    ll S = tree1.query(s, e);
    return S<L && S<R;
}

vector<int> getL(int l, int r, int s){
    vector<int> ret;
    int cur = s;
    while(true){
        int nxt = tree2.left_bound(1, 1, n, l, cur-1, tree1.query(cur, s));
        if (nxt==-1) break;
        ret.push_back(nxt+1);
        cur = nxt;
    }

    ret.push_back(l);
    return ret;
}

vector<int> getR(int l, int r, int s){
    vector<int> ret;
    int cur = s;
    while(true){
        int nxt = tree2.right_bound(1, 1, n, cur+1, r, tree1.query(s, cur));
        if (nxt==-1) break;
        //printf(" %d %d -> %d\n", s, cur, nxt);
        ret.push_back(nxt-1);
        cur = nxt;
    }
    ret.push_back(r);
    return ret;
}

void refresh(int x, vector<pair<int, int>> &P){
    if (x<1 || x>n) return;
    tree4.erase(1, 1, n, x);
    auto L = getL(1, n, x);
    auto R = getR(1, n, x);


    for (auto &l:L){
        for (auto &r:R) if (ok(1, n, l, r)){
            P.emplace_back(l, r);
        }
    }
}

void update(int x, int y){
    tree1.update(x, y);
    tree2.update(1, 1, n, x, y);
    a[x] = y;

    vector<pair<int, int>> P;
    refresh(x-1, P);
    refresh(x, P);
    refresh(x+1, P);

    sort(P.begin(), P.end(), cmp);
    P.erase(unique(P.begin(), P.end()), P.end());
    for (auto &[l, r]:P) tree4.update(1, 1, n, l, r);

    //tree4.debug(1, 1, n);
}

int query(int l, int r){
    auto R0 = getR(l, r-1, l);
    auto L0 = getL(l+1, r, r);

    int nl = l, nr = r;
    for (auto &x:R0) if (ok(l, r, l, x)) nl = x+1;
    for (auto &x:L0) if (ok(l, r, x, r)) nr = x-1;

    return tree3.query(1, 1, n, nl, nr).cnt;
}

int main(){
    scanf("%d", &n);
    for (int i=1;i<=n;i++) scanf("%d", a+i);

    tree1.init(n+1);
    tree2.init(1, 1, n);
    tree3.init(1, 1, n);

    vector<pair<int, int>> P;
    for (int i=1;i<=n;i++){
        //printf("ok %d\n", i);
        auto R = getR(1, n, i);
        for (auto &x:R) if (ok(1, n, i, x)){
            P.emplace_back(i, x);
            //printf("%d %d\n", i, x);
        }
    }
    sort(P.begin(), P.end(), cmp);
    for (auto &[l, r]:P) tree4.update(1, 1, n, l, r);

    //tree4.debug(1, 1, n);

    int q;
    scanf("%d", &q);
    while(q--){
        int op, x, y;
        scanf("%d %d %d", &op, &x, &y);
        if (op==1) update(x, y);
        else printf("%d\n", query(x, y));
    }
    return 0;
}

Compilation message

fish2.cpp: In member function 'void Seg4::debug(int, int, int)':
fish2.cpp:144:20: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  144 |         for (auto &[x, y]:tree[i]) printf("[%d, %d] / ", x, y);
      |                    ^
fish2.cpp: In function 'void update(int, int)':
fish2.cpp:216:16: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  216 |     for (auto &[l, r]:P) tree4.update(1, 1, n, l, r);
      |                ^
fish2.cpp: In function 'int main()':
fish2.cpp:250:16: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  250 |     for (auto &[l, r]:P) tree4.update(1, 1, n, l, r);
      |                ^
fish2.cpp:233:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
  233 |     scanf("%d", &n);
      |     ~~~~~^~~~~~~~~~
fish2.cpp:234:33: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
  234 |     for (int i=1;i<=n;i++) scanf("%d", a+i);
      |                            ~~~~~^~~~~~~~~~~
fish2.cpp:255:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
  255 |     scanf("%d", &q);
      |     ~~~~~^~~~~~~~~~
fish2.cpp:258:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
  258 |         scanf("%d %d %d", &op, &x, &y);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9684 KB Output is correct
2 Correct 6 ms 9628 KB Output is correct
3 Correct 5 ms 9684 KB Output is correct
4 Correct 6 ms 9684 KB Output is correct
5 Correct 15 ms 9788 KB Output is correct
6 Correct 9 ms 9780 KB Output is correct
7 Correct 14 ms 9716 KB Output is correct
8 Correct 9 ms 9684 KB Output is correct
9 Correct 12 ms 9684 KB Output is correct
10 Correct 7 ms 9684 KB Output is correct
11 Correct 6 ms 9768 KB Output is correct
12 Correct 8 ms 9796 KB Output is correct
13 Correct 8 ms 9684 KB Output is correct
14 Correct 8 ms 9720 KB Output is correct
15 Correct 9 ms 9720 KB Output is correct
16 Correct 10 ms 9716 KB Output is correct
17 Correct 8 ms 9672 KB Output is correct
18 Correct 8 ms 9684 KB Output is correct
19 Correct 7 ms 9684 KB Output is correct
20 Correct 7 ms 9792 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 9736 KB Output is correct
2 Correct 277 ms 17772 KB Output is correct
3 Correct 387 ms 17888 KB Output is correct
4 Correct 307 ms 17692 KB Output is correct
5 Correct 357 ms 17748 KB Output is correct
6 Correct 72 ms 17348 KB Output is correct
7 Correct 176 ms 16712 KB Output is correct
8 Correct 77 ms 17420 KB Output is correct
9 Correct 171 ms 16680 KB Output is correct
10 Correct 190 ms 16628 KB Output is correct
11 Correct 296 ms 16760 KB Output is correct
12 Correct 102 ms 17300 KB Output is correct
13 Correct 116 ms 17224 KB Output is correct
14 Correct 102 ms 18376 KB Output is correct
15 Correct 101 ms 18176 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9684 KB Output is correct
2 Correct 6 ms 9628 KB Output is correct
3 Correct 5 ms 9684 KB Output is correct
4 Correct 6 ms 9684 KB Output is correct
5 Correct 15 ms 9788 KB Output is correct
6 Correct 9 ms 9780 KB Output is correct
7 Correct 14 ms 9716 KB Output is correct
8 Correct 9 ms 9684 KB Output is correct
9 Correct 12 ms 9684 KB Output is correct
10 Correct 7 ms 9684 KB Output is correct
11 Correct 6 ms 9768 KB Output is correct
12 Correct 8 ms 9796 KB Output is correct
13 Correct 8 ms 9684 KB Output is correct
14 Correct 8 ms 9720 KB Output is correct
15 Correct 9 ms 9720 KB Output is correct
16 Correct 10 ms 9716 KB Output is correct
17 Correct 8 ms 9672 KB Output is correct
18 Correct 8 ms 9684 KB Output is correct
19 Correct 7 ms 9684 KB Output is correct
20 Correct 7 ms 9792 KB Output is correct
21 Correct 6 ms 9736 KB Output is correct
22 Correct 277 ms 17772 KB Output is correct
23 Correct 387 ms 17888 KB Output is correct
24 Correct 307 ms 17692 KB Output is correct
25 Correct 357 ms 17748 KB Output is correct
26 Correct 72 ms 17348 KB Output is correct
27 Correct 176 ms 16712 KB Output is correct
28 Correct 77 ms 17420 KB Output is correct
29 Correct 171 ms 16680 KB Output is correct
30 Correct 190 ms 16628 KB Output is correct
31 Correct 296 ms 16760 KB Output is correct
32 Correct 102 ms 17300 KB Output is correct
33 Correct 116 ms 17224 KB Output is correct
34 Correct 102 ms 18376 KB Output is correct
35 Correct 101 ms 18176 KB Output is correct
36 Correct 311 ms 18652 KB Output is correct
37 Correct 380 ms 18184 KB Output is correct
38 Correct 381 ms 18024 KB Output is correct
39 Correct 311 ms 18504 KB Output is correct
40 Correct 379 ms 18188 KB Output is correct
41 Correct 92 ms 18360 KB Output is correct
42 Correct 100 ms 18420 KB Output is correct
43 Correct 193 ms 16968 KB Output is correct
44 Correct 238 ms 16896 KB Output is correct
45 Correct 231 ms 17368 KB Output is correct
46 Correct 226 ms 17184 KB Output is correct
47 Correct 282 ms 16644 KB Output is correct
48 Correct 115 ms 17504 KB Output is correct
49 Correct 118 ms 17500 KB Output is correct
50 Correct 140 ms 18920 KB Output is correct
51 Correct 110 ms 18832 KB Output is correct
52 Correct 108 ms 18996 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 9736 KB Output is correct
2 Correct 277 ms 17772 KB Output is correct
3 Correct 387 ms 17888 KB Output is correct
4 Correct 307 ms 17692 KB Output is correct
5 Correct 357 ms 17748 KB Output is correct
6 Correct 72 ms 17348 KB Output is correct
7 Correct 176 ms 16712 KB Output is correct
8 Correct 77 ms 17420 KB Output is correct
9 Correct 171 ms 16680 KB Output is correct
10 Correct 190 ms 16628 KB Output is correct
11 Correct 296 ms 16760 KB Output is correct
12 Correct 102 ms 17300 KB Output is correct
13 Correct 116 ms 17224 KB Output is correct
14 Correct 102 ms 18376 KB Output is correct
15 Correct 101 ms 18176 KB Output is correct
16 Correct 5 ms 9684 KB Output is correct
17 Correct 892 ms 18140 KB Output is correct
18 Correct 677 ms 18328 KB Output is correct
19 Correct 889 ms 18460 KB Output is correct
20 Correct 926 ms 18232 KB Output is correct
21 Correct 876 ms 18176 KB Output is correct
22 Correct 697 ms 18360 KB Output is correct
23 Correct 850 ms 18236 KB Output is correct
24 Correct 954 ms 18308 KB Output is correct
25 Correct 878 ms 18468 KB Output is correct
26 Correct 945 ms 18448 KB Output is correct
27 Correct 268 ms 17916 KB Output is correct
28 Correct 299 ms 17984 KB Output is correct
29 Correct 279 ms 18016 KB Output is correct
30 Correct 706 ms 17020 KB Output is correct
31 Correct 721 ms 16892 KB Output is correct
32 Correct 1020 ms 17380 KB Output is correct
33 Correct 562 ms 17124 KB Output is correct
34 Correct 1030 ms 17124 KB Output is correct
35 Correct 760 ms 16700 KB Output is correct
36 Correct 758 ms 17396 KB Output is correct
37 Correct 385 ms 17520 KB Output is correct
38 Correct 316 ms 17668 KB Output is correct
39 Correct 353 ms 19008 KB Output is correct
40 Correct 313 ms 18816 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 9736 KB Output is correct
2 Correct 277 ms 17772 KB Output is correct
3 Correct 387 ms 17888 KB Output is correct
4 Correct 307 ms 17692 KB Output is correct
5 Correct 357 ms 17748 KB Output is correct
6 Correct 72 ms 17348 KB Output is correct
7 Correct 176 ms 16712 KB Output is correct
8 Correct 77 ms 17420 KB Output is correct
9 Correct 171 ms 16680 KB Output is correct
10 Correct 190 ms 16628 KB Output is correct
11 Correct 296 ms 16760 KB Output is correct
12 Correct 102 ms 17300 KB Output is correct
13 Correct 116 ms 17224 KB Output is correct
14 Correct 102 ms 18376 KB Output is correct
15 Correct 101 ms 18176 KB Output is correct
16 Correct 5 ms 9684 KB Output is correct
17 Correct 2027 ms 19420 KB Output is correct
18 Correct 1380 ms 22596 KB Output is correct
19 Correct 1785 ms 19392 KB Output is correct
20 Correct 1171 ms 22188 KB Output is correct
21 Correct 2027 ms 19696 KB Output is correct
22 Correct 1393 ms 22600 KB Output is correct
23 Correct 2051 ms 19376 KB Output is correct
24 Correct 1386 ms 22372 KB Output is correct
25 Correct 1864 ms 19348 KB Output is correct
26 Correct 503 ms 20924 KB Output is correct
27 Correct 645 ms 21344 KB Output is correct
28 Correct 857 ms 20560 KB Output is correct
29 Correct 537 ms 21048 KB Output is correct
30 Correct 647 ms 21308 KB Output is correct
31 Correct 1034 ms 20940 KB Output is correct
32 Correct 1208 ms 21676 KB Output is correct
33 Correct 948 ms 18548 KB Output is correct
34 Correct 1138 ms 22252 KB Output is correct
35 Correct 761 ms 18672 KB Output is correct
36 Correct 1104 ms 21144 KB Output is correct
37 Correct 998 ms 20152 KB Output is correct
38 Correct 717 ms 19784 KB Output is correct
39 Correct 655 ms 21596 KB Output is correct
40 Correct 401 ms 20896 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9684 KB Output is correct
2 Correct 6 ms 9628 KB Output is correct
3 Correct 5 ms 9684 KB Output is correct
4 Correct 6 ms 9684 KB Output is correct
5 Correct 15 ms 9788 KB Output is correct
6 Correct 9 ms 9780 KB Output is correct
7 Correct 14 ms 9716 KB Output is correct
8 Correct 9 ms 9684 KB Output is correct
9 Correct 12 ms 9684 KB Output is correct
10 Correct 7 ms 9684 KB Output is correct
11 Correct 6 ms 9768 KB Output is correct
12 Correct 8 ms 9796 KB Output is correct
13 Correct 8 ms 9684 KB Output is correct
14 Correct 8 ms 9720 KB Output is correct
15 Correct 9 ms 9720 KB Output is correct
16 Correct 10 ms 9716 KB Output is correct
17 Correct 8 ms 9672 KB Output is correct
18 Correct 8 ms 9684 KB Output is correct
19 Correct 7 ms 9684 KB Output is correct
20 Correct 7 ms 9792 KB Output is correct
21 Correct 6 ms 9736 KB Output is correct
22 Correct 277 ms 17772 KB Output is correct
23 Correct 387 ms 17888 KB Output is correct
24 Correct 307 ms 17692 KB Output is correct
25 Correct 357 ms 17748 KB Output is correct
26 Correct 72 ms 17348 KB Output is correct
27 Correct 176 ms 16712 KB Output is correct
28 Correct 77 ms 17420 KB Output is correct
29 Correct 171 ms 16680 KB Output is correct
30 Correct 190 ms 16628 KB Output is correct
31 Correct 296 ms 16760 KB Output is correct
32 Correct 102 ms 17300 KB Output is correct
33 Correct 116 ms 17224 KB Output is correct
34 Correct 102 ms 18376 KB Output is correct
35 Correct 101 ms 18176 KB Output is correct
36 Correct 311 ms 18652 KB Output is correct
37 Correct 380 ms 18184 KB Output is correct
38 Correct 381 ms 18024 KB Output is correct
39 Correct 311 ms 18504 KB Output is correct
40 Correct 379 ms 18188 KB Output is correct
41 Correct 92 ms 18360 KB Output is correct
42 Correct 100 ms 18420 KB Output is correct
43 Correct 193 ms 16968 KB Output is correct
44 Correct 238 ms 16896 KB Output is correct
45 Correct 231 ms 17368 KB Output is correct
46 Correct 226 ms 17184 KB Output is correct
47 Correct 282 ms 16644 KB Output is correct
48 Correct 115 ms 17504 KB Output is correct
49 Correct 118 ms 17500 KB Output is correct
50 Correct 140 ms 18920 KB Output is correct
51 Correct 110 ms 18832 KB Output is correct
52 Correct 108 ms 18996 KB Output is correct
53 Correct 5 ms 9684 KB Output is correct
54 Correct 892 ms 18140 KB Output is correct
55 Correct 677 ms 18328 KB Output is correct
56 Correct 889 ms 18460 KB Output is correct
57 Correct 926 ms 18232 KB Output is correct
58 Correct 876 ms 18176 KB Output is correct
59 Correct 697 ms 18360 KB Output is correct
60 Correct 850 ms 18236 KB Output is correct
61 Correct 954 ms 18308 KB Output is correct
62 Correct 878 ms 18468 KB Output is correct
63 Correct 945 ms 18448 KB Output is correct
64 Correct 268 ms 17916 KB Output is correct
65 Correct 299 ms 17984 KB Output is correct
66 Correct 279 ms 18016 KB Output is correct
67 Correct 706 ms 17020 KB Output is correct
68 Correct 721 ms 16892 KB Output is correct
69 Correct 1020 ms 17380 KB Output is correct
70 Correct 562 ms 17124 KB Output is correct
71 Correct 1030 ms 17124 KB Output is correct
72 Correct 760 ms 16700 KB Output is correct
73 Correct 758 ms 17396 KB Output is correct
74 Correct 385 ms 17520 KB Output is correct
75 Correct 316 ms 17668 KB Output is correct
76 Correct 353 ms 19008 KB Output is correct
77 Correct 313 ms 18816 KB Output is correct
78 Correct 5 ms 9684 KB Output is correct
79 Correct 2027 ms 19420 KB Output is correct
80 Correct 1380 ms 22596 KB Output is correct
81 Correct 1785 ms 19392 KB Output is correct
82 Correct 1171 ms 22188 KB Output is correct
83 Correct 2027 ms 19696 KB Output is correct
84 Correct 1393 ms 22600 KB Output is correct
85 Correct 2051 ms 19376 KB Output is correct
86 Correct 1386 ms 22372 KB Output is correct
87 Correct 1864 ms 19348 KB Output is correct
88 Correct 503 ms 20924 KB Output is correct
89 Correct 645 ms 21344 KB Output is correct
90 Correct 857 ms 20560 KB Output is correct
91 Correct 537 ms 21048 KB Output is correct
92 Correct 647 ms 21308 KB Output is correct
93 Correct 1034 ms 20940 KB Output is correct
94 Correct 1208 ms 21676 KB Output is correct
95 Correct 948 ms 18548 KB Output is correct
96 Correct 1138 ms 22252 KB Output is correct
97 Correct 761 ms 18672 KB Output is correct
98 Correct 1104 ms 21144 KB Output is correct
99 Correct 998 ms 20152 KB Output is correct
100 Correct 717 ms 19784 KB Output is correct
101 Correct 655 ms 21596 KB Output is correct
102 Correct 401 ms 20896 KB Output is correct
103 Correct 2217 ms 19160 KB Output is correct
104 Correct 1277 ms 23272 KB Output is correct
105 Correct 1150 ms 20084 KB Output is correct
106 Correct 951 ms 20732 KB Output is correct
107 Correct 2236 ms 19328 KB Output is correct
108 Correct 1275 ms 23296 KB Output is correct
109 Correct 1289 ms 19672 KB Output is correct
110 Correct 1062 ms 21812 KB Output is correct
111 Correct 1144 ms 19964 KB Output is correct
112 Correct 962 ms 20776 KB Output is correct
113 Correct 581 ms 21112 KB Output is correct
114 Correct 334 ms 20452 KB Output is correct
115 Correct 1065 ms 21040 KB Output is correct
116 Correct 825 ms 20160 KB Output is correct
117 Correct 369 ms 20572 KB Output is correct
118 Correct 733 ms 19188 KB Output is correct
119 Correct 645 ms 21368 KB Output is correct
120 Correct 1064 ms 20808 KB Output is correct
121 Correct 772 ms 20084 KB Output is correct
122 Correct 1317 ms 21692 KB Output is correct
123 Correct 978 ms 18464 KB Output is correct
124 Correct 904 ms 19560 KB Output is correct
125 Correct 896 ms 18272 KB Output is correct
126 Correct 932 ms 19112 KB Output is correct
127 Correct 1198 ms 20120 KB Output is correct
128 Correct 543 ms 19368 KB Output is correct
129 Correct 746 ms 21584 KB Output is correct
130 Correct 493 ms 20980 KB Output is correct