Submission #968158

# Submission time Handle Problem Language Result Execution time Memory
968158 2024-04-23T08:03:04 Z LittleOrange Real Mountains (CCO23_day1problem2) C++17
25 / 25
2729 ms 261904 KB
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 1e6+3;
const ll big = 1e18;
struct l{
    ll x;
    l(const ll &x):x((x+mod)%mod){}
    l(const int &x):x((x+mod)%mod){}
    l operator+(const l& o) const{
        return l(x+o.x);
    }
    l operator-(const l& o) const{
        return l(x-o.x);
    }
    l operator*(const l& o) const{
        return l(x*o.x);
    }
    l operator+(const ll& o) const{
        return l(x+o);
    }
    l operator-(const ll& o) const{
        return l(x-o);
    }
    l operator*(const ll& o) const{
        return l(x*o);
    }
    l operator+(const int& o) const{
        return l(x+o);
    }
    l operator-(const int& o) const{
        return l(x-o);
    }
    l operator*(const int& o) const{
        return l(x*o);
    }
    operator ll() const{
        return (x%mod+mod)%mod;
    }
};
const l rev2 = l(500002);
struct segtree{
    ll n;
    vector<ll> a;
    segtree(ll N):n(N),a(N<<2){}
    void set(ll i, ll l, ll r, ll x, ll v){
        if(l==r) a[i] = v;
        else{
            ll m = l+r>>1;
            if(x<=m) set(i<<1,l,m,x,v);
            else set(i<<1|1,m+1,r,x,v);
            a[i] = min(a[i<<1],a[i<<1|1]);
        }
    }
    void set(ll x, ll v){
        set(1,0,n-1,x,v);
    }
    ll get(ll i, ll l, ll r, ll ql, ll qr){
        if (ql<=l&&r<=qr) return a[i];
        else{
            ll m = l+r>>1;
            ll ret = big;
            if (ql<=m) ret = min(ret,get(i<<1,l,m,ql,qr));
            if (qr>m) ret = min(ret,get(i<<1|1,m+1,r,ql,qr));
            return ret;
        }
    }
    ll get(ll ql, ll qr){
        return get(1,0,n-1,ql,qr);
    }
};
int main(){
    ios::sync_with_stdio(0);cin.tie(0);
    ll n;
    cin >> n;
    vector<ll> a(n);
    ll mxa = 0;
    for(ll &i : a) cin >> i,mxa = max(mxa,i);
    vector<ll> b = a;
    //for(ll i = 1;i<=mxa;i++) b.push_back(i);
    sort(b.begin(),b.end());
    b.erase(unique(b.begin(),b.end()),b.end());
    l ans = 0;
    vector<ll> li = a;
    vector<ll> ri = a;
    for(ll i = 1;i<n;i++) li[i] = max(li[i],li[i-1]);
    for(ll i = n-2;i>=0;i--) ri[i] = max(ri[i],ri[i+1]);
    vector<vector<ll>> add(b.size()),rm(b.size()),fail(b.size());
    for(ll i = 0;i<n;i++){
        ll pos = lower_bound(b.begin(),b.end(),a[i])-b.begin();
        fail[pos].push_back(i);
        if (li[i]>a[i]&&ri[i]>a[i]){
            add[pos].push_back(i);
            ll ed = min(li[i],ri[i]);
            ll ed_pos = lower_bound(b.begin(),b.end(),ed)-b.begin();
            rm[ed_pos].push_back(i);
        }
    }
    segtree t(n);
    for(ll i = 0;i<n;i++) t.set(i,a[i]);
    set<ll> s;
    for(ll j = 0;j<b.size()-1;j++){
        l de = b[j+1]-b[j];
        /*vector<ll> v;
        for(ll i = 0;i<n;i++){
            if (a[i]<=b[j]&&li[i]>b[j]&&ri[i]>b[j]) v.push_back(i);
        }*/
        for(ll i : add[j]) s.insert(i);
        for(ll i : fail[j]) t.set(i,big);
        for(ll i : rm[j]) s.erase(i);
        if(s.empty()) continue;
        ll v_front = *s.begin();
        ll v_back = *s.rbegin();
        //cout << b[j] << ":";
        //for(ll i : s) cout << " " << i;
        //cout << "\n";
        //for(ll i = 0;i<n;i++) cout << L[i] << " \n"[i+1==n];
        //for(ll i = 0;i<n;i++) cout << R[i] << " \n"[i+1==n];
        if (s.size()==1){
            ll i = v_front;
            ans = ans+l(t.get(0,i)+t.get(i,n-1)+b[j])*de+de*(de-1)*rev2;
        }else{
            l base = (t.get(0,v_front)+t.get(v_back,n-1)+t.get(0,n-1));
            l cnt0 = (ll)s.size();
            l cnt = (cnt0*2-3);
            //cout << base << " " << cnt << " " << de << "\n";
            l bj = b[j];
            ans = ans+base*de+cnt*(de*bj+de*(de+1)*rev2)+cnt0*(bj*de+de*(de-1)*rev2);
        }
    }
    cout << ans << "\n";
}

Compilation message

Main.cpp: In member function 'void segtree::set(ll, ll, ll, ll, ll)':
Main.cpp:49:21: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   49 |             ll m = l+r>>1;
      |                    ~^~
Main.cpp: In member function 'll segtree::get(ll, ll, ll, ll, ll)':
Main.cpp:61:21: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   61 |             ll m = l+r>>1;
      |                    ~^~
Main.cpp: In function 'int main()':
Main.cpp:102:19: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  102 |     for(ll j = 0;j<b.size()-1;j++){
      |                  ~^~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 2 ms 1116 KB Output is correct
5 Correct 1 ms 860 KB Output is correct
6 Correct 1 ms 860 KB Output is correct
7 Correct 1 ms 860 KB Output is correct
8 Correct 2 ms 1116 KB Output is correct
9 Correct 1 ms 604 KB Output is correct
10 Correct 2 ms 604 KB Output is correct
11 Correct 2 ms 1116 KB Output is correct
12 Correct 2 ms 1112 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 2 ms 1116 KB Output is correct
5 Correct 1 ms 860 KB Output is correct
6 Correct 1 ms 860 KB Output is correct
7 Correct 1 ms 860 KB Output is correct
8 Correct 2 ms 1116 KB Output is correct
9 Correct 1 ms 604 KB Output is correct
10 Correct 2 ms 604 KB Output is correct
11 Correct 2 ms 1116 KB Output is correct
12 Correct 2 ms 1112 KB Output is correct
13 Correct 3 ms 1112 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 1 ms 348 KB Output is correct
16 Correct 3 ms 1116 KB Output is correct
17 Correct 3 ms 1112 KB Output is correct
18 Correct 3 ms 1116 KB Output is correct
19 Correct 4 ms 1116 KB Output is correct
20 Correct 2 ms 1116 KB Output is correct
21 Correct 2 ms 1068 KB Output is correct
22 Correct 2 ms 1116 KB Output is correct
23 Correct 2 ms 1116 KB Output is correct
24 Correct 2 ms 1116 KB Output is correct
25 Correct 2 ms 1112 KB Output is correct
26 Correct 2 ms 1116 KB Output is correct
27 Correct 2 ms 1116 KB Output is correct
28 Correct 2 ms 1116 KB Output is correct
29 Correct 0 ms 344 KB Output is correct
30 Correct 0 ms 344 KB Output is correct
31 Correct 0 ms 344 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 2 ms 1116 KB Output is correct
5 Correct 1 ms 860 KB Output is correct
6 Correct 1 ms 860 KB Output is correct
7 Correct 1 ms 860 KB Output is correct
8 Correct 2 ms 1116 KB Output is correct
9 Correct 1 ms 604 KB Output is correct
10 Correct 2 ms 604 KB Output is correct
11 Correct 2 ms 1116 KB Output is correct
12 Correct 2 ms 1112 KB Output is correct
13 Correct 3 ms 1112 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 1 ms 348 KB Output is correct
16 Correct 3 ms 1116 KB Output is correct
17 Correct 3 ms 1112 KB Output is correct
18 Correct 3 ms 1116 KB Output is correct
19 Correct 4 ms 1116 KB Output is correct
20 Correct 2 ms 1116 KB Output is correct
21 Correct 2 ms 1068 KB Output is correct
22 Correct 2 ms 1116 KB Output is correct
23 Correct 2 ms 1116 KB Output is correct
24 Correct 2 ms 1116 KB Output is correct
25 Correct 2 ms 1112 KB Output is correct
26 Correct 2 ms 1116 KB Output is correct
27 Correct 2 ms 1116 KB Output is correct
28 Correct 2 ms 1116 KB Output is correct
29 Correct 0 ms 344 KB Output is correct
30 Correct 0 ms 344 KB Output is correct
31 Correct 0 ms 344 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 344 KB Output is correct
35 Correct 4 ms 1628 KB Output is correct
36 Correct 4 ms 1628 KB Output is correct
37 Correct 5 ms 1628 KB Output is correct
38 Correct 4 ms 1880 KB Output is correct
39 Correct 4 ms 1628 KB Output is correct
40 Correct 2 ms 1116 KB Output is correct
41 Correct 2 ms 1116 KB Output is correct
42 Correct 2 ms 1116 KB Output is correct
43 Correct 4 ms 1628 KB Output is correct
44 Correct 4 ms 1628 KB Output is correct
45 Correct 4 ms 1628 KB Output is correct
46 Correct 4 ms 1628 KB Output is correct
47 Correct 4 ms 1628 KB Output is correct
48 Correct 4 ms 1628 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 2 ms 1116 KB Output is correct
5 Correct 1 ms 860 KB Output is correct
6 Correct 1 ms 860 KB Output is correct
7 Correct 1 ms 860 KB Output is correct
8 Correct 2 ms 1116 KB Output is correct
9 Correct 1 ms 604 KB Output is correct
10 Correct 2 ms 604 KB Output is correct
11 Correct 2 ms 1116 KB Output is correct
12 Correct 2 ms 1112 KB Output is correct
13 Correct 3 ms 1112 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 1 ms 348 KB Output is correct
16 Correct 3 ms 1116 KB Output is correct
17 Correct 3 ms 1112 KB Output is correct
18 Correct 3 ms 1116 KB Output is correct
19 Correct 4 ms 1116 KB Output is correct
20 Correct 2 ms 1116 KB Output is correct
21 Correct 2 ms 1068 KB Output is correct
22 Correct 2 ms 1116 KB Output is correct
23 Correct 2 ms 1116 KB Output is correct
24 Correct 2 ms 1116 KB Output is correct
25 Correct 2 ms 1112 KB Output is correct
26 Correct 2 ms 1116 KB Output is correct
27 Correct 2 ms 1116 KB Output is correct
28 Correct 2 ms 1116 KB Output is correct
29 Correct 0 ms 344 KB Output is correct
30 Correct 0 ms 344 KB Output is correct
31 Correct 0 ms 344 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 344 KB Output is correct
35 Correct 4 ms 1628 KB Output is correct
36 Correct 4 ms 1628 KB Output is correct
37 Correct 5 ms 1628 KB Output is correct
38 Correct 4 ms 1880 KB Output is correct
39 Correct 4 ms 1628 KB Output is correct
40 Correct 2 ms 1116 KB Output is correct
41 Correct 2 ms 1116 KB Output is correct
42 Correct 2 ms 1116 KB Output is correct
43 Correct 4 ms 1628 KB Output is correct
44 Correct 4 ms 1628 KB Output is correct
45 Correct 4 ms 1628 KB Output is correct
46 Correct 4 ms 1628 KB Output is correct
47 Correct 4 ms 1628 KB Output is correct
48 Correct 4 ms 1628 KB Output is correct
49 Correct 5 ms 1628 KB Output is correct
50 Correct 5 ms 1628 KB Output is correct
51 Correct 5 ms 1628 KB Output is correct
52 Correct 4 ms 1628 KB Output is correct
53 Correct 4 ms 1628 KB Output is correct
54 Correct 2 ms 1148 KB Output is correct
55 Correct 2 ms 1116 KB Output is correct
56 Correct 2 ms 1116 KB Output is correct
57 Correct 4 ms 1628 KB Output is correct
58 Correct 5 ms 1628 KB Output is correct
59 Correct 5 ms 1624 KB Output is correct
60 Correct 4 ms 1628 KB Output is correct
61 Correct 4 ms 1628 KB Output is correct
62 Correct 4 ms 1628 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 2 ms 1116 KB Output is correct
5 Correct 1 ms 860 KB Output is correct
6 Correct 1 ms 860 KB Output is correct
7 Correct 1 ms 860 KB Output is correct
8 Correct 2 ms 1116 KB Output is correct
9 Correct 1 ms 604 KB Output is correct
10 Correct 2 ms 604 KB Output is correct
11 Correct 2 ms 1116 KB Output is correct
12 Correct 2 ms 1112 KB Output is correct
13 Correct 3 ms 1112 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 1 ms 348 KB Output is correct
16 Correct 3 ms 1116 KB Output is correct
17 Correct 3 ms 1112 KB Output is correct
18 Correct 3 ms 1116 KB Output is correct
19 Correct 4 ms 1116 KB Output is correct
20 Correct 2 ms 1116 KB Output is correct
21 Correct 2 ms 1068 KB Output is correct
22 Correct 2 ms 1116 KB Output is correct
23 Correct 2 ms 1116 KB Output is correct
24 Correct 2 ms 1116 KB Output is correct
25 Correct 2 ms 1112 KB Output is correct
26 Correct 2 ms 1116 KB Output is correct
27 Correct 2 ms 1116 KB Output is correct
28 Correct 2 ms 1116 KB Output is correct
29 Correct 0 ms 344 KB Output is correct
30 Correct 0 ms 344 KB Output is correct
31 Correct 0 ms 344 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 344 KB Output is correct
35 Correct 935 ms 138624 KB Output is correct
36 Correct 909 ms 137908 KB Output is correct
37 Correct 964 ms 138160 KB Output is correct
38 Correct 919 ms 137516 KB Output is correct
39 Correct 938 ms 138060 KB Output is correct
40 Correct 1 ms 348 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 469 ms 135876 KB Output is correct
43 Correct 452 ms 135604 KB Output is correct
44 Correct 447 ms 135680 KB Output is correct
45 Correct 383 ms 137904 KB Output is correct
46 Correct 382 ms 138056 KB Output is correct
47 Correct 376 ms 138160 KB Output is correct
48 Correct 493 ms 137908 KB Output is correct
49 Correct 471 ms 138024 KB Output is correct
50 Correct 493 ms 138064 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 2 ms 1116 KB Output is correct
5 Correct 1 ms 860 KB Output is correct
6 Correct 1 ms 860 KB Output is correct
7 Correct 1 ms 860 KB Output is correct
8 Correct 2 ms 1116 KB Output is correct
9 Correct 1 ms 604 KB Output is correct
10 Correct 2 ms 604 KB Output is correct
11 Correct 2 ms 1116 KB Output is correct
12 Correct 2 ms 1112 KB Output is correct
13 Correct 3 ms 1112 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 1 ms 348 KB Output is correct
16 Correct 3 ms 1116 KB Output is correct
17 Correct 3 ms 1112 KB Output is correct
18 Correct 3 ms 1116 KB Output is correct
19 Correct 4 ms 1116 KB Output is correct
20 Correct 2 ms 1116 KB Output is correct
21 Correct 2 ms 1068 KB Output is correct
22 Correct 2 ms 1116 KB Output is correct
23 Correct 2 ms 1116 KB Output is correct
24 Correct 2 ms 1116 KB Output is correct
25 Correct 2 ms 1112 KB Output is correct
26 Correct 2 ms 1116 KB Output is correct
27 Correct 2 ms 1116 KB Output is correct
28 Correct 2 ms 1116 KB Output is correct
29 Correct 0 ms 344 KB Output is correct
30 Correct 0 ms 344 KB Output is correct
31 Correct 0 ms 344 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 344 KB Output is correct
35 Correct 4 ms 1628 KB Output is correct
36 Correct 4 ms 1628 KB Output is correct
37 Correct 5 ms 1628 KB Output is correct
38 Correct 4 ms 1880 KB Output is correct
39 Correct 4 ms 1628 KB Output is correct
40 Correct 2 ms 1116 KB Output is correct
41 Correct 2 ms 1116 KB Output is correct
42 Correct 2 ms 1116 KB Output is correct
43 Correct 4 ms 1628 KB Output is correct
44 Correct 4 ms 1628 KB Output is correct
45 Correct 4 ms 1628 KB Output is correct
46 Correct 4 ms 1628 KB Output is correct
47 Correct 4 ms 1628 KB Output is correct
48 Correct 4 ms 1628 KB Output is correct
49 Correct 935 ms 138624 KB Output is correct
50 Correct 909 ms 137908 KB Output is correct
51 Correct 964 ms 138160 KB Output is correct
52 Correct 919 ms 137516 KB Output is correct
53 Correct 938 ms 138060 KB Output is correct
54 Correct 1 ms 348 KB Output is correct
55 Correct 0 ms 348 KB Output is correct
56 Correct 469 ms 135876 KB Output is correct
57 Correct 452 ms 135604 KB Output is correct
58 Correct 447 ms 135680 KB Output is correct
59 Correct 383 ms 137904 KB Output is correct
60 Correct 382 ms 138056 KB Output is correct
61 Correct 376 ms 138160 KB Output is correct
62 Correct 493 ms 137908 KB Output is correct
63 Correct 471 ms 138024 KB Output is correct
64 Correct 493 ms 138064 KB Output is correct
65 Correct 2482 ms 204704 KB Output is correct
66 Correct 2406 ms 211212 KB Output is correct
67 Correct 2505 ms 211164 KB Output is correct
68 Correct 2413 ms 212012 KB Output is correct
69 Correct 2412 ms 211492 KB Output is correct
70 Correct 474 ms 138324 KB Output is correct
71 Correct 457 ms 137644 KB Output is correct
72 Correct 451 ms 137516 KB Output is correct
73 Correct 816 ms 210840 KB Output is correct
74 Correct 782 ms 210728 KB Output is correct
75 Correct 814 ms 210676 KB Output is correct
76 Correct 1204 ms 210784 KB Output is correct
77 Correct 1206 ms 210980 KB Output is correct
78 Correct 1258 ms 211408 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 2 ms 1116 KB Output is correct
5 Correct 1 ms 860 KB Output is correct
6 Correct 1 ms 860 KB Output is correct
7 Correct 1 ms 860 KB Output is correct
8 Correct 2 ms 1116 KB Output is correct
9 Correct 1 ms 604 KB Output is correct
10 Correct 2 ms 604 KB Output is correct
11 Correct 2 ms 1116 KB Output is correct
12 Correct 2 ms 1112 KB Output is correct
13 Correct 3 ms 1112 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 1 ms 348 KB Output is correct
16 Correct 3 ms 1116 KB Output is correct
17 Correct 3 ms 1112 KB Output is correct
18 Correct 3 ms 1116 KB Output is correct
19 Correct 4 ms 1116 KB Output is correct
20 Correct 2 ms 1116 KB Output is correct
21 Correct 2 ms 1068 KB Output is correct
22 Correct 2 ms 1116 KB Output is correct
23 Correct 2 ms 1116 KB Output is correct
24 Correct 2 ms 1116 KB Output is correct
25 Correct 2 ms 1112 KB Output is correct
26 Correct 2 ms 1116 KB Output is correct
27 Correct 2 ms 1116 KB Output is correct
28 Correct 2 ms 1116 KB Output is correct
29 Correct 0 ms 344 KB Output is correct
30 Correct 0 ms 344 KB Output is correct
31 Correct 0 ms 344 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 344 KB Output is correct
35 Correct 4 ms 1628 KB Output is correct
36 Correct 4 ms 1628 KB Output is correct
37 Correct 5 ms 1628 KB Output is correct
38 Correct 4 ms 1880 KB Output is correct
39 Correct 4 ms 1628 KB Output is correct
40 Correct 2 ms 1116 KB Output is correct
41 Correct 2 ms 1116 KB Output is correct
42 Correct 2 ms 1116 KB Output is correct
43 Correct 4 ms 1628 KB Output is correct
44 Correct 4 ms 1628 KB Output is correct
45 Correct 4 ms 1628 KB Output is correct
46 Correct 4 ms 1628 KB Output is correct
47 Correct 4 ms 1628 KB Output is correct
48 Correct 4 ms 1628 KB Output is correct
49 Correct 5 ms 1628 KB Output is correct
50 Correct 5 ms 1628 KB Output is correct
51 Correct 5 ms 1628 KB Output is correct
52 Correct 4 ms 1628 KB Output is correct
53 Correct 4 ms 1628 KB Output is correct
54 Correct 2 ms 1148 KB Output is correct
55 Correct 2 ms 1116 KB Output is correct
56 Correct 2 ms 1116 KB Output is correct
57 Correct 4 ms 1628 KB Output is correct
58 Correct 5 ms 1628 KB Output is correct
59 Correct 5 ms 1624 KB Output is correct
60 Correct 4 ms 1628 KB Output is correct
61 Correct 4 ms 1628 KB Output is correct
62 Correct 4 ms 1628 KB Output is correct
63 Correct 935 ms 138624 KB Output is correct
64 Correct 909 ms 137908 KB Output is correct
65 Correct 964 ms 138160 KB Output is correct
66 Correct 919 ms 137516 KB Output is correct
67 Correct 938 ms 138060 KB Output is correct
68 Correct 1 ms 348 KB Output is correct
69 Correct 0 ms 348 KB Output is correct
70 Correct 469 ms 135876 KB Output is correct
71 Correct 452 ms 135604 KB Output is correct
72 Correct 447 ms 135680 KB Output is correct
73 Correct 383 ms 137904 KB Output is correct
74 Correct 382 ms 138056 KB Output is correct
75 Correct 376 ms 138160 KB Output is correct
76 Correct 493 ms 137908 KB Output is correct
77 Correct 471 ms 138024 KB Output is correct
78 Correct 493 ms 138064 KB Output is correct
79 Correct 2482 ms 204704 KB Output is correct
80 Correct 2406 ms 211212 KB Output is correct
81 Correct 2505 ms 211164 KB Output is correct
82 Correct 2413 ms 212012 KB Output is correct
83 Correct 2412 ms 211492 KB Output is correct
84 Correct 474 ms 138324 KB Output is correct
85 Correct 457 ms 137644 KB Output is correct
86 Correct 451 ms 137516 KB Output is correct
87 Correct 816 ms 210840 KB Output is correct
88 Correct 782 ms 210728 KB Output is correct
89 Correct 814 ms 210676 KB Output is correct
90 Correct 1204 ms 210784 KB Output is correct
91 Correct 1206 ms 210980 KB Output is correct
92 Correct 1258 ms 211408 KB Output is correct
93 Correct 471 ms 137528 KB Output is correct
94 Correct 933 ms 258688 KB Output is correct
95 Correct 910 ms 258796 KB Output is correct
96 Correct 908 ms 259244 KB Output is correct
97 Correct 1263 ms 258748 KB Output is correct
98 Correct 1267 ms 258832 KB Output is correct
99 Correct 1302 ms 258420 KB Output is correct
100 Correct 2698 ms 260940 KB Output is correct
101 Correct 2729 ms 259092 KB Output is correct
102 Correct 2679 ms 261904 KB Output is correct
103 Correct 2640 ms 257436 KB Output is correct
104 Correct 2687 ms 256396 KB Output is correct
105 Correct 428 ms 137004 KB Output is correct
106 Correct 450 ms 136712 KB Output is correct