Submission #1014293

# Submission time Handle Problem Language Result Execution time Memory
1014293 2024-07-04T16:10:13 Z hengliao Flooding Wall (BOI24_wall) C++17
58 / 100
174 ms 218452 KB
#pragma GCC optimize("Ofast")
#pragma GCC target("popcnt")
#include<bits/stdc++.h>
#include <chrono>
#include <random>
using namespace std;

#define F first
#define S second
#define pb push_back
#define vll vector<ll>
#define pll pair<ll, ll>
typedef long long ll;

const ll mod=1e9+7;
const ll mxN=5e5+5;

struct segtree{
    ll tree[4*mxN];
    ll lazy[4*mxN];
    ll treelen;
 
    void init(ll siz){
        treelen=siz+1;
        while(__builtin_popcount(treelen)!=1){
            treelen++;
        }
        memset(tree, 0, sizeof(tree));
        for(ll i=0;i<2*treelen;i++) lazy[i]=1;
    }
 
    void push(ll idx, ll low, ll high){
        if(low!=high){
            lazy[2*idx]*=lazy[idx];
            lazy[2*idx]%=mod;
            lazy[2*idx+1]*=lazy[idx];
            lazy[2*idx+1]%=mod;
        }
    }
 
    void check(ll idx, ll low, ll high){
        if(lazy[idx]==1) return;
        tree[idx]*=lazy[idx];
        tree[idx]%=mod;
        push(idx, low, high);
        lazy[idx]=1;
    }
 
    void update1(ll idx, ll low, ll high, ll qlow, ll qhigh, ll val){
        //check(idx, low, high);
        if(low>=qlow && high<=qhigh){
            lazy[idx]*=val;
            lazy[idx]%=mod;
            check(idx, low, high);
            return;
        }
        if(low>qhigh || high<qlow){
            return;
        }
        ll mid=(low+high)/2;
        check(2*idx, low, mid);
        if(qlow<=mid) update1(2*idx, low, mid, qlow, qhigh, val);
        check(2*idx+1, mid+1, high);
        if(qhigh>=mid+1) update1(2*idx+1, mid+1, high, qlow, qhigh, val);
        tree[idx]=tree[2*idx]+tree[2*idx+1];
    }
 
    ll getsum1(ll idx, ll low, ll high, ll qlow, ll qhigh){
        check(idx, low, high);
        if(low>=qlow && high<=qhigh){
            return tree[idx];
        }
        if(low>qhigh || high<qlow){
            return 0LL;
        }
        ll mid=(low+high)/2;
        ll re=0;
        if(qlow<=mid) re+=getsum1(2*idx, low, mid, qlow, qhigh);
        if(qhigh>=mid+1) re+=getsum1(2*idx+1, mid+1, high, qlow, qhigh);
        return re;
    }
 
    void setto1(ll idx, ll low, ll high, ll qlow, ll qhigh, ll val){
        //check(idx, low, high);
        if(low>=qlow && high<=qhigh){
            tree[idx]=val;
            tree[idx]%=mod;
            //check(idx, low, high);
            return;
        }
        if(low>qhigh || high<qlow){
            return;
        }
        ll mid=(low+high)/2;
        check(2*idx, low, mid);
        if(qlow<=mid) setto1(2*idx, low, mid, qlow, qhigh, val);
        check(2*idx+1, mid+1, high);
        if(qhigh>=mid+1) setto1(2*idx+1, mid+1, high, qlow, qhigh, val);
        tree[idx]=tree[2*idx]+tree[2*idx+1];
    }
 
    void update(ll qlow, ll qhigh, ll val){
        update1(1, 0, treelen-1, qlow, qhigh, val);
    }
 
    ll getsum(ll qlow, ll qhigh){
        return getsum1(1, 0, treelen-1, qlow, qhigh);
    }
 
    void setto(ll idx, ll val){
        setto1(1, 0, treelen-1, idx, idx, val);
    }
};

ll pw(ll a, ll b){
    ll re=1;
    a%=mod;
    for(ll i=0;i<32;i++){
        if(b&(1LL<<i)){
            re*=a;
            re%=mod;
        }
        a*=a;
        a%=mod;
    }
    return re;
}

ll inv(ll a){
    return pw(a, mod-2);
}

ll seg[mxN];
ll lef[mxN][2];
ll rig[mxN][2];
ll pw2[mxN];
bool good[mxN][2];
ll n;
ll a[mxN][2];
vector<pair<ll, pll>> v;
segtree SEG, SEG2, SEG3, SEG4;
ll inv2;

bool compare(pair<ll, pll> &a, pair<ll, pll> &b){
    if(a.F!=b.F){
        return a.F>b.F;
    }
    return a.S.F<b.S.F;
}

bool compare2(pair<ll, pll> &a, pair<ll, pll> &b){
    if(a.F!=b.F){
        return a.F>b.F;
    }
    return a.S.F>b.S.F;
}

void solve(){
    memset(good, 0, sizeof(good));
	cin>>n;
    SEG.init(2*n+10);
    SEG2.init(2*n+10);
    SEG3.init(2*n+10);
    for(ll i=0;i<n;i++){
        cin>>a[i][0];
    }
    for(ll i=0;i<n;i++){
        cin>>a[i][1];
    }
    for(ll i=0;i<n;i++){
        v.pb({a[i][0], {i, 0}});
        v.pb({a[i][1], {i, 1}});
        seg[i]=2;
    }
    ll pre=2;
    SEG3.setto(2*n, 1);
    SEG3.setto(2*n+1, 1);
    for(ll i=n-1;i>=0;i--){
        SEG3.setto(2*i, pre);
        SEG3.setto(2*i+1, pre);
        pre*=2;
        pre%=mod;
    }
    sort(v.begin(), v.end(), compare);
    ll ans=0;
    for(auto &it:v){
        ll val=it.F;
        ll id=it.S.F;
        ll id2=it.S.S;
        ll pre=1;
        ll cur=0;
        if(id>0){
            cur=id*SEG2.getsum(0, 2*id-1);
            cur%=mod;
            if(cur<0) cur+=mod;
            cur-=SEG.getsum(0, 2*id-1);
            cur%=mod;
            if(cur<0) cur+=mod;
            cur*=inv(seg[id]);
            cur%=mod;
        }
        ans+=cur*val;
        ans%=mod;
        ans+=(((val*((SEG3.getsum(0, 0)*inv(SEG3.getsum(2*id, 2*id)))%mod)))%mod)
        *SEG3.getsum(2*(id+1), 2*(id+1));
        ans%=mod;
        ll tep=pw2[id]*SEG3.getsum(2*(id+1), 2*(id+1));
        tep%=mod;
        SEG2.setto(2*id+id2, tep);
        SEG.setto(2*id+id2, (id*tep)%mod);
        seg[id]--;
        if(seg[id]==1){
            SEG3.update(0, 2*id+1, inv2);
            if(id>0){
                SEG.update(0, 2*id-1, inv2);
                SEG2.update(0, 2*id-1, inv2);
            }
        }
        else{
            SEG3.update(0, 2*id+1, 0);
            if(id>0){
                SEG.update(0, 2*id-1, 0);
                SEG2.update(0, 2*id-1, 0);
            }
        }
    }
    //if(n>=10005) return;
    SEG.init(2*n+10);
    SEG2.init(2*n+10);
    SEG3.init(2*n+10);
    pre=2;
    SEG3.setto(2*n, 1);
    SEG3.setto(2*n+1, 1);
    for(ll i=0;i<n;i++){
        SEG3.setto(2*i, pre);
        SEG3.setto(2*i+1, pre);
        pre*=2;
        pre%=mod;
    }
    sort(v.begin(), v.end(), compare2);
    memset(good, 0, sizeof(good));
    for(ll i=0;i<n;i++){
        seg[i]=2;
    }
    for(auto &it:v){
        ll val=it.F;
        ll id=it.S.F;
        ll id2=it.S.S;
        ll pre=1;
        ll cur=0;
        if(id<n-1){
            cur-=id*SEG2.getsum(2*(id+1), 2*n-1);
            cur%=mod;
            if(cur<0) cur+=mod;
            cur+=SEG.getsum(2*(id+1), 2*n-1);
            cur%=mod;
            if(cur<0) cur+=mod;
            cur*=inv(seg[id]);
            cur%=mod;
        }
        ans+=cur*val;
        ans%=mod;
        ll tep;
        if(id>0) tep=pw2[n-id-1]*SEG3.getsum(2*(id-1), 2*(id-1));
        else tep=pw2[n-id-1];
        tep%=mod;
        SEG2.setto(2*id+id2, tep);
        SEG.setto(2*id+id2, (id*tep)%mod);
        seg[id]--;
        if(seg[id]==1){
            SEG3.update(2*id, 2*n-1, inv2);
            if(id<n-1){
                SEG.update(2*(id+1), 2*n-1, inv2);
                SEG2.update(2*(id+1), 2*n-1, inv2);
            }
        }
        else{
            SEG3.update(2*id, 2*n-1, 0);
            if(id<n-1){
                SEG.update(2*(id+1), 2*n-1, 0);
                SEG2.update(2*(id+1), 2*n-1, 0);
            }
        }
    }
    SEG.init(2*n+10);
    SEG2.init(2*n+10);
    SEG3.init(2*n+10);
    SEG4.init(2*n+10);
    pre=2;
    SEG3.setto(2*n, 1);
    SEG3.setto(2*n+1, 1);
    for(ll i=0;i<n;i++){
        SEG3.setto(2*i, pre);
        SEG3.setto(2*i+1, pre);
        pre*=2;
        pre%=mod;
    }
    pre=2;
    SEG4.setto(2*n, 1);
    SEG4.setto(2*n+1, 1);
    for(ll i=n-1;i>=0;i--){
        SEG4.setto(2*i, pre);
        SEG4.setto(2*i+1, pre);
        pre*=2;
        pre%=mod;
    }
    memset(good, 0, sizeof(good));
    for(ll i=0;i<n;i++){
        seg[i]=2;
    }
    ll preval=0;
    vector<pair<ll, pll>> waiting;
    //if(n>=10005) return;
    for(auto &it:v){
        ll val=it.F;
        ll id=it.S.F;
        ll id2=it.S.S;
        ll pre=1;
        ll cur=0;
        if(val!=preval){
            for(auto &it2:waiting){
                ll val2=it2.F;
                ll id23=it2.S.F;
                ll id22=it2.S.S;
                SEG2.setto(2*id23+id22, 0);
                SEG.setto(2*id23+id22, 0);
                if(seg[id23]==1){
                    SEG4.update(0, 2*id23+1, inv2);
                    
                }
                else{
                    SEG4.update(0, 2*id23+1, 0);
                    
                }
            }
            waiting.clear();
        }
        if(id<n-1){
            cur-=id*SEG2.getsum(2*(id+1), 2*n-1);
            cur%=mod;
            if(cur<0) cur+=mod;
            cur+=SEG.getsum(2*(id+1), 2*n-1);
            cur%=mod;
            if(cur<0) cur+=mod;
            cur*=inv(seg[id]);
            cur%=mod;
        }
        ans-=cur*val;
        ans%=mod;
        if(ans<0) ans+=mod;
        ll tep;
        if(id>0) tep=SEG4.getsum(2*(id+1), 2*(id+1))*SEG3.getsum(2*(id-1), 2*(id-1));
        else tep=SEG4.getsum(2*(id+1), 2*(id+1));
        tep%=mod;
        SEG2.setto(2*id+id2, tep);
        SEG.setto(2*id+id2, (id*tep)%mod);
        seg[id]--;
        if(seg[id]==1){
            SEG3.update(2*id, 2*n-1, inv2);
            if(id<n-1){
                SEG.update(2*(id+1), 2*n-1, inv2);
                SEG2.update(2*(id+1), 2*n-1, inv2);
            }
        }
        else{
            SEG3.update(2*id, 2*n-1, 0);
            if(id<n-1){
                SEG.update(2*(id+1), 2*n-1, 0);
                SEG2.update(2*(id+1), 2*n-1, 0);
            }
        }
        preval=val;
        waiting.pb(it);
    }
    //cout<<ans<<'\n';
    for(ll i=0;i<n;i++){
        for(ll j=0;j<2;j++){
            ans-=a[i][j]*pw2[n-1];
            ans%=mod;
            if(ans<0) ans+=mod;
        }
    }
    cout<<ans<<'\n';
}

int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

    inv2=inv(2);
    pw2[0]=1;
    for(ll i=1;i<mxN;i++){
        pw2[i]=pw2[i-1]*2;
        pw2[i]%=mod;
    }

	solve();
	return 0;
}

Compilation message

Main.cpp: In function 'void solve()':
Main.cpp:190:12: warning: unused variable 'pre' [-Wunused-variable]
  190 |         ll pre=1;
      |            ^~~
Main.cpp:249:12: warning: unused variable 'pre' [-Wunused-variable]
  249 |         ll pre=1;
      |            ^~~
Main.cpp:322:20: warning: unused variable 'val2' [-Wunused-variable]
  322 |                 ll val2=it2.F;
      |                    ^~~~
Main.cpp:318:12: warning: unused variable 'pre' [-Wunused-variable]
  318 |         ll pre=1;
      |            ^~~
# Verdict Execution time Memory Grader output
1 Correct 33 ms 69972 KB Output is correct
2 Correct 30 ms 69968 KB Output is correct
3 Correct 29 ms 69972 KB Output is correct
4 Correct 31 ms 70012 KB Output is correct
5 Correct 31 ms 69968 KB Output is correct
6 Correct 30 ms 69968 KB Output is correct
7 Correct 32 ms 70024 KB Output is correct
8 Correct 38 ms 69972 KB Output is correct
9 Correct 33 ms 69968 KB Output is correct
10 Correct 30 ms 69980 KB Output is correct
11 Correct 31 ms 69972 KB Output is correct
12 Correct 33 ms 69960 KB Output is correct
13 Correct 33 ms 69896 KB Output is correct
14 Correct 35 ms 69972 KB Output is correct
15 Correct 33 ms 69980 KB Output is correct
16 Correct 35 ms 69972 KB Output is correct
17 Correct 33 ms 69972 KB Output is correct
18 Correct 33 ms 69872 KB Output is correct
19 Correct 34 ms 69980 KB Output is correct
20 Correct 32 ms 69972 KB Output is correct
21 Correct 33 ms 69968 KB Output is correct
22 Correct 33 ms 69972 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 33 ms 69872 KB Output is correct
2 Correct 33 ms 69968 KB Output is correct
3 Correct 33 ms 69968 KB Output is correct
4 Correct 32 ms 69976 KB Output is correct
5 Correct 38 ms 69972 KB Output is correct
6 Correct 37 ms 69968 KB Output is correct
7 Correct 31 ms 69968 KB Output is correct
8 Correct 36 ms 69968 KB Output is correct
9 Correct 33 ms 69976 KB Output is correct
10 Correct 33 ms 69972 KB Output is correct
11 Correct 32 ms 69924 KB Output is correct
12 Correct 32 ms 70036 KB Output is correct
13 Correct 32 ms 69972 KB Output is correct
14 Correct 32 ms 69968 KB Output is correct
15 Correct 34 ms 69972 KB Output is correct
16 Correct 33 ms 69972 KB Output is correct
17 Correct 34 ms 69976 KB Output is correct
18 Correct 33 ms 69916 KB Output is correct
19 Correct 41 ms 69968 KB Output is correct
20 Correct 34 ms 69968 KB Output is correct
21 Correct 33 ms 69944 KB Output is correct
22 Correct 34 ms 69980 KB Output is correct
23 Correct 34 ms 69884 KB Output is correct
24 Correct 34 ms 69972 KB Output is correct
25 Correct 35 ms 69968 KB Output is correct
26 Correct 34 ms 70032 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 33 ms 69872 KB Output is correct
2 Correct 33 ms 69968 KB Output is correct
3 Correct 33 ms 69968 KB Output is correct
4 Correct 32 ms 69976 KB Output is correct
5 Correct 38 ms 69972 KB Output is correct
6 Correct 37 ms 69968 KB Output is correct
7 Correct 31 ms 69968 KB Output is correct
8 Correct 36 ms 69968 KB Output is correct
9 Correct 33 ms 69976 KB Output is correct
10 Correct 33 ms 69972 KB Output is correct
11 Correct 32 ms 69924 KB Output is correct
12 Correct 32 ms 70036 KB Output is correct
13 Correct 32 ms 69972 KB Output is correct
14 Correct 32 ms 69968 KB Output is correct
15 Correct 34 ms 69972 KB Output is correct
16 Correct 33 ms 69972 KB Output is correct
17 Correct 34 ms 69976 KB Output is correct
18 Correct 33 ms 69916 KB Output is correct
19 Correct 41 ms 69968 KB Output is correct
20 Correct 34 ms 69968 KB Output is correct
21 Correct 33 ms 69944 KB Output is correct
22 Correct 34 ms 69980 KB Output is correct
23 Correct 34 ms 69884 KB Output is correct
24 Correct 34 ms 69972 KB Output is correct
25 Correct 35 ms 69968 KB Output is correct
26 Correct 34 ms 70032 KB Output is correct
27 Correct 151 ms 72904 KB Output is correct
28 Correct 165 ms 72932 KB Output is correct
29 Correct 123 ms 73260 KB Output is correct
30 Correct 121 ms 73416 KB Output is correct
31 Correct 132 ms 72900 KB Output is correct
32 Correct 153 ms 72904 KB Output is correct
33 Correct 134 ms 72916 KB Output is correct
34 Correct 136 ms 72904 KB Output is correct
35 Correct 134 ms 72908 KB Output is correct
36 Correct 134 ms 72696 KB Output is correct
37 Correct 118 ms 73408 KB Output is correct
38 Correct 125 ms 73420 KB Output is correct
39 Correct 126 ms 72908 KB Output is correct
40 Correct 136 ms 72904 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 33 ms 69972 KB Output is correct
2 Correct 30 ms 69968 KB Output is correct
3 Correct 29 ms 69972 KB Output is correct
4 Correct 31 ms 70012 KB Output is correct
5 Correct 31 ms 69968 KB Output is correct
6 Correct 30 ms 69968 KB Output is correct
7 Correct 32 ms 70024 KB Output is correct
8 Correct 38 ms 69972 KB Output is correct
9 Correct 33 ms 69968 KB Output is correct
10 Correct 30 ms 69980 KB Output is correct
11 Correct 31 ms 69972 KB Output is correct
12 Correct 33 ms 69960 KB Output is correct
13 Correct 33 ms 69896 KB Output is correct
14 Correct 35 ms 69972 KB Output is correct
15 Correct 33 ms 69980 KB Output is correct
16 Correct 35 ms 69972 KB Output is correct
17 Correct 33 ms 69972 KB Output is correct
18 Correct 33 ms 69872 KB Output is correct
19 Correct 34 ms 69980 KB Output is correct
20 Correct 32 ms 69972 KB Output is correct
21 Correct 33 ms 69968 KB Output is correct
22 Correct 33 ms 69972 KB Output is correct
23 Correct 33 ms 69872 KB Output is correct
24 Correct 33 ms 69968 KB Output is correct
25 Correct 33 ms 69968 KB Output is correct
26 Correct 32 ms 69976 KB Output is correct
27 Correct 38 ms 69972 KB Output is correct
28 Correct 37 ms 69968 KB Output is correct
29 Correct 31 ms 69968 KB Output is correct
30 Correct 36 ms 69968 KB Output is correct
31 Correct 33 ms 69976 KB Output is correct
32 Correct 33 ms 69972 KB Output is correct
33 Correct 32 ms 69924 KB Output is correct
34 Correct 32 ms 70036 KB Output is correct
35 Correct 32 ms 69972 KB Output is correct
36 Correct 32 ms 69968 KB Output is correct
37 Correct 34 ms 69972 KB Output is correct
38 Correct 33 ms 69972 KB Output is correct
39 Correct 34 ms 69976 KB Output is correct
40 Correct 33 ms 69916 KB Output is correct
41 Correct 41 ms 69968 KB Output is correct
42 Correct 34 ms 69968 KB Output is correct
43 Correct 33 ms 69944 KB Output is correct
44 Correct 34 ms 69980 KB Output is correct
45 Correct 34 ms 69884 KB Output is correct
46 Correct 34 ms 69972 KB Output is correct
47 Correct 35 ms 69968 KB Output is correct
48 Correct 34 ms 70032 KB Output is correct
49 Correct 151 ms 72904 KB Output is correct
50 Correct 165 ms 72932 KB Output is correct
51 Correct 123 ms 73260 KB Output is correct
52 Correct 121 ms 73416 KB Output is correct
53 Correct 132 ms 72900 KB Output is correct
54 Correct 153 ms 72904 KB Output is correct
55 Correct 134 ms 72916 KB Output is correct
56 Correct 136 ms 72904 KB Output is correct
57 Correct 134 ms 72908 KB Output is correct
58 Correct 134 ms 72696 KB Output is correct
59 Correct 118 ms 73408 KB Output is correct
60 Correct 125 ms 73420 KB Output is correct
61 Correct 126 ms 72908 KB Output is correct
62 Correct 136 ms 72904 KB Output is correct
63 Correct 157 ms 73048 KB Output is correct
64 Correct 174 ms 73076 KB Output is correct
65 Correct 129 ms 72908 KB Output is correct
66 Correct 143 ms 72904 KB Output is correct
67 Correct 124 ms 72908 KB Output is correct
68 Correct 120 ms 72904 KB Output is correct
69 Correct 134 ms 72908 KB Output is correct
70 Correct 143 ms 73160 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 33 ms 69972 KB Output is correct
2 Correct 32 ms 70012 KB Output is correct
3 Correct 33 ms 69968 KB Output is correct
4 Correct 35 ms 69980 KB Output is correct
5 Correct 34 ms 70052 KB Output is correct
6 Correct 33 ms 69924 KB Output is correct
7 Correct 33 ms 69804 KB Output is correct
8 Correct 34 ms 69968 KB Output is correct
9 Correct 33 ms 69968 KB Output is correct
10 Correct 117 ms 73420 KB Output is correct
11 Correct 156 ms 73404 KB Output is correct
12 Correct 118 ms 73408 KB Output is correct
13 Correct 120 ms 73268 KB Output is correct
14 Runtime error 153 ms 218452 KB Execution killed with signal 11
15 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 33 ms 69972 KB Output is correct
2 Correct 30 ms 69968 KB Output is correct
3 Correct 29 ms 69972 KB Output is correct
4 Correct 31 ms 70012 KB Output is correct
5 Correct 31 ms 69968 KB Output is correct
6 Correct 30 ms 69968 KB Output is correct
7 Correct 32 ms 70024 KB Output is correct
8 Correct 38 ms 69972 KB Output is correct
9 Correct 33 ms 69968 KB Output is correct
10 Correct 30 ms 69980 KB Output is correct
11 Correct 31 ms 69972 KB Output is correct
12 Correct 33 ms 69960 KB Output is correct
13 Correct 33 ms 69896 KB Output is correct
14 Correct 35 ms 69972 KB Output is correct
15 Correct 33 ms 69980 KB Output is correct
16 Correct 35 ms 69972 KB Output is correct
17 Correct 33 ms 69972 KB Output is correct
18 Correct 33 ms 69872 KB Output is correct
19 Correct 34 ms 69980 KB Output is correct
20 Correct 32 ms 69972 KB Output is correct
21 Correct 33 ms 69968 KB Output is correct
22 Correct 33 ms 69972 KB Output is correct
23 Correct 33 ms 69872 KB Output is correct
24 Correct 33 ms 69968 KB Output is correct
25 Correct 33 ms 69968 KB Output is correct
26 Correct 32 ms 69976 KB Output is correct
27 Correct 38 ms 69972 KB Output is correct
28 Correct 37 ms 69968 KB Output is correct
29 Correct 31 ms 69968 KB Output is correct
30 Correct 36 ms 69968 KB Output is correct
31 Correct 33 ms 69976 KB Output is correct
32 Correct 33 ms 69972 KB Output is correct
33 Correct 32 ms 69924 KB Output is correct
34 Correct 32 ms 70036 KB Output is correct
35 Correct 32 ms 69972 KB Output is correct
36 Correct 32 ms 69968 KB Output is correct
37 Correct 34 ms 69972 KB Output is correct
38 Correct 33 ms 69972 KB Output is correct
39 Correct 34 ms 69976 KB Output is correct
40 Correct 33 ms 69916 KB Output is correct
41 Correct 41 ms 69968 KB Output is correct
42 Correct 34 ms 69968 KB Output is correct
43 Correct 33 ms 69944 KB Output is correct
44 Correct 34 ms 69980 KB Output is correct
45 Correct 34 ms 69884 KB Output is correct
46 Correct 34 ms 69972 KB Output is correct
47 Correct 35 ms 69968 KB Output is correct
48 Correct 34 ms 70032 KB Output is correct
49 Correct 151 ms 72904 KB Output is correct
50 Correct 165 ms 72932 KB Output is correct
51 Correct 123 ms 73260 KB Output is correct
52 Correct 121 ms 73416 KB Output is correct
53 Correct 132 ms 72900 KB Output is correct
54 Correct 153 ms 72904 KB Output is correct
55 Correct 134 ms 72916 KB Output is correct
56 Correct 136 ms 72904 KB Output is correct
57 Correct 134 ms 72908 KB Output is correct
58 Correct 134 ms 72696 KB Output is correct
59 Correct 118 ms 73408 KB Output is correct
60 Correct 125 ms 73420 KB Output is correct
61 Correct 126 ms 72908 KB Output is correct
62 Correct 136 ms 72904 KB Output is correct
63 Correct 157 ms 73048 KB Output is correct
64 Correct 174 ms 73076 KB Output is correct
65 Correct 129 ms 72908 KB Output is correct
66 Correct 143 ms 72904 KB Output is correct
67 Correct 124 ms 72908 KB Output is correct
68 Correct 120 ms 72904 KB Output is correct
69 Correct 134 ms 72908 KB Output is correct
70 Correct 143 ms 73160 KB Output is correct
71 Correct 33 ms 69972 KB Output is correct
72 Correct 32 ms 70012 KB Output is correct
73 Correct 33 ms 69968 KB Output is correct
74 Correct 35 ms 69980 KB Output is correct
75 Correct 34 ms 70052 KB Output is correct
76 Correct 33 ms 69924 KB Output is correct
77 Correct 33 ms 69804 KB Output is correct
78 Correct 34 ms 69968 KB Output is correct
79 Correct 33 ms 69968 KB Output is correct
80 Correct 117 ms 73420 KB Output is correct
81 Correct 156 ms 73404 KB Output is correct
82 Correct 118 ms 73408 KB Output is correct
83 Correct 120 ms 73268 KB Output is correct
84 Runtime error 153 ms 218452 KB Execution killed with signal 11
85 Halted 0 ms 0 KB -