답안 #439465

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
439465 2021-06-30T04:52:28 Z fcmalkcin 푸드 코트 (JOI21_foodcourt) C++17
100 / 100
673 ms 54276 KB
#include <bits/stdc++.h>
using namespace std;
#define ll  long long
#define pll pair<ll,ll>
#define ff first
#define ss second
#define pb push_back
#define endl "\n"
const ll maxn=3e5+10;
const ll mod =998244353 ;
const ll base=3e18;
vector<pair<pll,ll>> adj[maxn];
vector<pll> p[maxn];

struct tk
{
    ll val,c;
    ll mn;
    ll ps;
};
tk st[4*maxn];
tk mer(tk a,tk b)
{
    if (a.c==-1)
        return b;
    if (b.c==-1)
        return a;
    tk c;
    c.val=a.val+b.val;
    c.mn=min(a.mn,a.val+b.mn);
    c.ps=a.ps+b.ps;
    c.c=base;
    //  cout <<c.val<<" "<<c.mn<<" "<<c.ps<<" "<<c.c<<"chkmer"<<endl;
    return c;
}
void build(ll id,ll left,ll right)
{
    st[id].val=0;
    st[id].c=0;
    st[id].mn=0;
    st[id].ps=0;
    if (left==right)
        return ;
    ll mid=(left+right)/2;
    build(id*2,left,mid);
    build(id*2+1,mid+1,right);
}
void update(ll id,ll left,ll right,ll x,ll val,ll c)
{
    if (x>right||x<left)
        return ;
    if (left==right)
    {
        st[id].val=val;
        st[id].mn=min(0ll,st[id].val);
        st[id].ps=max(0ll,st[id].val);
        st[id].c=c;
        return ;
    }
    ll mid=(left+right)/2;
    update(id*2,left,mid,x,val,c);
    update(id*2+1,mid+1,right,x,val,c);
    st[id]=mer(st[id*2],st[id*2+1]);
}
tk get(ll id,ll left,ll right,ll x,ll y)
{
    tk p;
    p.c=-1;
    if (x>right||y<left)
        return p;
    if (x<=left&&y>=right)
    {
        //cout <<st[id].c<<" "<<st[id].mn<<" "<<st[id].ps<<" "<<st[id].val<<endl;
        return st[id];
    }
    ll mid=(left+right)/2;
    return mer(get(id*2,left,mid,x,y),get(id*2+1,mid+1,right,x,y));
}
ll walk(ll id,ll left,ll right,ll val)
{
    if (left==right)
    {
        return st[id].c;
    }
    ll mid=(left+right)/2;
    if (val<st[id*2].ps)
    {
        return walk(id*2,left,mid,val);
    }
    return walk(id*2+1,mid+1,right,val-st[id*2].ps);
}
ll ans[maxn];

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    if (fopen("t.inp", "r"))
    {
        freopen("test.inp", "r", stdin);
        freopen("test.out", "w", stdout);
    }
    memset(ans,-1,sizeof(ans));
    ll n, m, q;
    cin>> n>> m>> q;
    for (int i=1; i<=q; i++)
    {
        ll t;
        cin>> t;
        if (t==1)
        {
            ll l, r, c, k;
            cin>> l>> r>> c>> k;
            adj[l].pb(make_pair(make_pair(i,c),k));
            adj[r+1].pb(make_pair(make_pair(i,0),0));
        }
        else if (t==2)
        {
            ll l, r, c, k;
            cin>> l>> r>> k;
            c=0;
            adj[l].pb(make_pair(make_pair(i,c),-k));
            adj[r+1].pb(make_pair(make_pair(i,c),0));
        }
        else
        {
            ll a, b;
            cin>> a>> b;
            p[a].pb(make_pair(i,b));
        }
    }
    build(1,1,q+1);
    update(1,1,q+1,1,-base,-1);

    for (int i=1; i<=n; i++)
    {
        for (auto p:adj[i])
        {
            update(1,1,q+1,p.ff.ff+1,p.ss,p.ff.ss);
        }

        for (auto to:p[i])
        {
            ll val=to.ss;
            ll pos=to.ff+1;
            tk h=get(1,1,q+1,1,pos);
            ll nw=h.val-h.mn;
            ans[pos-1]=0;
            if (nw>=val)
            {
                ll sl=nw-val+1;
                ll sum=get(1,1,q+1,1,pos).ps;
                ans[pos-1]=walk(1,1,q+1,sum-sl);
            }
        }
    }
    for (int i=1; i<=q; i++)
    {
        if (ans[i]==-1)
            continue;
        cout <<ans[i]<<endl;
    }
    /*3 5 5
    1 2 3 5 2
    1 1 2 2 4
    2 1 3 3
    1 2 3 4 2
    3 3 2*/

}

Compilation message

foodcourt.cpp: In function 'int main()':
foodcourt.cpp:101:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
  101 |         freopen("test.inp", "r", stdin);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:102:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
  102 |         freopen("test.out", "w", stdout);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 16972 KB Output is correct
2 Correct 15 ms 16960 KB Output is correct
3 Correct 13 ms 16844 KB Output is correct
4 Correct 13 ms 16972 KB Output is correct
5 Correct 13 ms 16972 KB Output is correct
6 Correct 13 ms 16972 KB Output is correct
7 Correct 13 ms 16972 KB Output is correct
8 Correct 12 ms 16888 KB Output is correct
9 Correct 12 ms 16972 KB Output is correct
10 Correct 13 ms 17008 KB Output is correct
11 Correct 13 ms 16964 KB Output is correct
12 Correct 12 ms 16972 KB Output is correct
13 Correct 13 ms 16972 KB Output is correct
14 Correct 14 ms 16944 KB Output is correct
15 Correct 13 ms 16972 KB Output is correct
16 Correct 15 ms 16972 KB Output is correct
17 Correct 12 ms 16972 KB Output is correct
18 Correct 12 ms 16972 KB Output is correct
19 Correct 12 ms 16996 KB Output is correct
20 Correct 13 ms 16972 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 16972 KB Output is correct
2 Correct 15 ms 16960 KB Output is correct
3 Correct 13 ms 16844 KB Output is correct
4 Correct 13 ms 16972 KB Output is correct
5 Correct 13 ms 16972 KB Output is correct
6 Correct 13 ms 16972 KB Output is correct
7 Correct 13 ms 16972 KB Output is correct
8 Correct 12 ms 16888 KB Output is correct
9 Correct 12 ms 16972 KB Output is correct
10 Correct 13 ms 17008 KB Output is correct
11 Correct 13 ms 16964 KB Output is correct
12 Correct 12 ms 16972 KB Output is correct
13 Correct 13 ms 16972 KB Output is correct
14 Correct 14 ms 16944 KB Output is correct
15 Correct 13 ms 16972 KB Output is correct
16 Correct 15 ms 16972 KB Output is correct
17 Correct 12 ms 16972 KB Output is correct
18 Correct 12 ms 16972 KB Output is correct
19 Correct 12 ms 16996 KB Output is correct
20 Correct 13 ms 16972 KB Output is correct
21 Correct 13 ms 16972 KB Output is correct
22 Correct 14 ms 17000 KB Output is correct
23 Correct 13 ms 17000 KB Output is correct
24 Correct 16 ms 16972 KB Output is correct
25 Correct 13 ms 17048 KB Output is correct
26 Correct 13 ms 16972 KB Output is correct
27 Correct 15 ms 17008 KB Output is correct
28 Correct 12 ms 17016 KB Output is correct
29 Correct 12 ms 16972 KB Output is correct
30 Correct 16 ms 16924 KB Output is correct
31 Correct 12 ms 16972 KB Output is correct
32 Correct 13 ms 16972 KB Output is correct
33 Correct 12 ms 16972 KB Output is correct
34 Correct 12 ms 16924 KB Output is correct
35 Correct 13 ms 16972 KB Output is correct
36 Correct 14 ms 16972 KB Output is correct
37 Correct 13 ms 16984 KB Output is correct
38 Correct 12 ms 17008 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 121 ms 24400 KB Output is correct
2 Correct 117 ms 24428 KB Output is correct
3 Correct 104 ms 24240 KB Output is correct
4 Correct 112 ms 24284 KB Output is correct
5 Correct 106 ms 24516 KB Output is correct
6 Correct 133 ms 24512 KB Output is correct
7 Correct 55 ms 23492 KB Output is correct
8 Correct 58 ms 23576 KB Output is correct
9 Correct 103 ms 24516 KB Output is correct
10 Correct 116 ms 24512 KB Output is correct
11 Correct 106 ms 24520 KB Output is correct
12 Correct 134 ms 24520 KB Output is correct
13 Correct 87 ms 23952 KB Output is correct
14 Correct 102 ms 24288 KB Output is correct
15 Correct 103 ms 24900 KB Output is correct
16 Correct 105 ms 24784 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 557 ms 45488 KB Output is correct
2 Correct 487 ms 47240 KB Output is correct
3 Correct 588 ms 51316 KB Output is correct
4 Correct 465 ms 47688 KB Output is correct
5 Correct 462 ms 48216 KB Output is correct
6 Correct 649 ms 52120 KB Output is correct
7 Correct 232 ms 48564 KB Output is correct
8 Correct 246 ms 47888 KB Output is correct
9 Correct 571 ms 49732 KB Output is correct
10 Correct 578 ms 49704 KB Output is correct
11 Correct 650 ms 52056 KB Output is correct
12 Correct 611 ms 52128 KB Output is correct
13 Correct 597 ms 52064 KB Output is correct
14 Correct 629 ms 52072 KB Output is correct
15 Correct 673 ms 52196 KB Output is correct
16 Correct 611 ms 51480 KB Output is correct
17 Correct 649 ms 51488 KB Output is correct
18 Correct 650 ms 51468 KB Output is correct
19 Correct 620 ms 51372 KB Output is correct
20 Correct 631 ms 51488 KB Output is correct
21 Correct 651 ms 51468 KB Output is correct
22 Correct 601 ms 51484 KB Output is correct
23 Correct 589 ms 51492 KB Output is correct
24 Correct 645 ms 51488 KB Output is correct
25 Correct 510 ms 53060 KB Output is correct
26 Correct 524 ms 53356 KB Output is correct
27 Correct 459 ms 52484 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 16972 KB Output is correct
2 Correct 15 ms 16960 KB Output is correct
3 Correct 13 ms 16844 KB Output is correct
4 Correct 13 ms 16972 KB Output is correct
5 Correct 13 ms 16972 KB Output is correct
6 Correct 13 ms 16972 KB Output is correct
7 Correct 13 ms 16972 KB Output is correct
8 Correct 12 ms 16888 KB Output is correct
9 Correct 12 ms 16972 KB Output is correct
10 Correct 13 ms 17008 KB Output is correct
11 Correct 13 ms 16964 KB Output is correct
12 Correct 12 ms 16972 KB Output is correct
13 Correct 13 ms 16972 KB Output is correct
14 Correct 14 ms 16944 KB Output is correct
15 Correct 13 ms 16972 KB Output is correct
16 Correct 15 ms 16972 KB Output is correct
17 Correct 12 ms 16972 KB Output is correct
18 Correct 12 ms 16972 KB Output is correct
19 Correct 12 ms 16996 KB Output is correct
20 Correct 13 ms 16972 KB Output is correct
21 Correct 121 ms 24400 KB Output is correct
22 Correct 117 ms 24428 KB Output is correct
23 Correct 104 ms 24240 KB Output is correct
24 Correct 112 ms 24284 KB Output is correct
25 Correct 106 ms 24516 KB Output is correct
26 Correct 133 ms 24512 KB Output is correct
27 Correct 55 ms 23492 KB Output is correct
28 Correct 58 ms 23576 KB Output is correct
29 Correct 103 ms 24516 KB Output is correct
30 Correct 116 ms 24512 KB Output is correct
31 Correct 106 ms 24520 KB Output is correct
32 Correct 134 ms 24520 KB Output is correct
33 Correct 87 ms 23952 KB Output is correct
34 Correct 102 ms 24288 KB Output is correct
35 Correct 103 ms 24900 KB Output is correct
36 Correct 105 ms 24784 KB Output is correct
37 Correct 102 ms 24004 KB Output is correct
38 Correct 96 ms 23816 KB Output is correct
39 Correct 53 ms 23136 KB Output is correct
40 Correct 69 ms 23396 KB Output is correct
41 Correct 126 ms 24560 KB Output is correct
42 Correct 143 ms 24572 KB Output is correct
43 Correct 110 ms 24544 KB Output is correct
44 Correct 116 ms 24500 KB Output is correct
45 Correct 109 ms 24480 KB Output is correct
46 Correct 143 ms 24532 KB Output is correct
47 Correct 86 ms 23532 KB Output is correct
48 Correct 90 ms 25036 KB Output is correct
49 Correct 87 ms 23536 KB Output is correct
50 Correct 104 ms 24004 KB Output is correct
51 Correct 131 ms 24612 KB Output is correct
52 Correct 119 ms 24644 KB Output is correct
53 Correct 103 ms 23952 KB Output is correct
54 Correct 105 ms 24740 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 107 ms 23572 KB Output is correct
2 Correct 148 ms 24020 KB Output is correct
3 Correct 151 ms 24004 KB Output is correct
4 Correct 99 ms 23084 KB Output is correct
5 Correct 105 ms 23532 KB Output is correct
6 Correct 126 ms 23996 KB Output is correct
7 Correct 77 ms 22944 KB Output is correct
8 Correct 72 ms 22752 KB Output is correct
9 Correct 88 ms 23444 KB Output is correct
10 Correct 90 ms 23364 KB Output is correct
11 Correct 110 ms 23944 KB Output is correct
12 Correct 113 ms 24024 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 16972 KB Output is correct
2 Correct 15 ms 16960 KB Output is correct
3 Correct 13 ms 16844 KB Output is correct
4 Correct 13 ms 16972 KB Output is correct
5 Correct 13 ms 16972 KB Output is correct
6 Correct 13 ms 16972 KB Output is correct
7 Correct 13 ms 16972 KB Output is correct
8 Correct 12 ms 16888 KB Output is correct
9 Correct 12 ms 16972 KB Output is correct
10 Correct 13 ms 17008 KB Output is correct
11 Correct 13 ms 16964 KB Output is correct
12 Correct 12 ms 16972 KB Output is correct
13 Correct 13 ms 16972 KB Output is correct
14 Correct 14 ms 16944 KB Output is correct
15 Correct 13 ms 16972 KB Output is correct
16 Correct 15 ms 16972 KB Output is correct
17 Correct 12 ms 16972 KB Output is correct
18 Correct 12 ms 16972 KB Output is correct
19 Correct 12 ms 16996 KB Output is correct
20 Correct 13 ms 16972 KB Output is correct
21 Correct 13 ms 16972 KB Output is correct
22 Correct 14 ms 17000 KB Output is correct
23 Correct 13 ms 17000 KB Output is correct
24 Correct 16 ms 16972 KB Output is correct
25 Correct 13 ms 17048 KB Output is correct
26 Correct 13 ms 16972 KB Output is correct
27 Correct 15 ms 17008 KB Output is correct
28 Correct 12 ms 17016 KB Output is correct
29 Correct 12 ms 16972 KB Output is correct
30 Correct 16 ms 16924 KB Output is correct
31 Correct 12 ms 16972 KB Output is correct
32 Correct 13 ms 16972 KB Output is correct
33 Correct 12 ms 16972 KB Output is correct
34 Correct 12 ms 16924 KB Output is correct
35 Correct 13 ms 16972 KB Output is correct
36 Correct 14 ms 16972 KB Output is correct
37 Correct 13 ms 16984 KB Output is correct
38 Correct 12 ms 17008 KB Output is correct
39 Correct 121 ms 24400 KB Output is correct
40 Correct 117 ms 24428 KB Output is correct
41 Correct 104 ms 24240 KB Output is correct
42 Correct 112 ms 24284 KB Output is correct
43 Correct 106 ms 24516 KB Output is correct
44 Correct 133 ms 24512 KB Output is correct
45 Correct 55 ms 23492 KB Output is correct
46 Correct 58 ms 23576 KB Output is correct
47 Correct 103 ms 24516 KB Output is correct
48 Correct 116 ms 24512 KB Output is correct
49 Correct 106 ms 24520 KB Output is correct
50 Correct 134 ms 24520 KB Output is correct
51 Correct 87 ms 23952 KB Output is correct
52 Correct 102 ms 24288 KB Output is correct
53 Correct 103 ms 24900 KB Output is correct
54 Correct 105 ms 24784 KB Output is correct
55 Correct 102 ms 24004 KB Output is correct
56 Correct 96 ms 23816 KB Output is correct
57 Correct 53 ms 23136 KB Output is correct
58 Correct 69 ms 23396 KB Output is correct
59 Correct 126 ms 24560 KB Output is correct
60 Correct 143 ms 24572 KB Output is correct
61 Correct 110 ms 24544 KB Output is correct
62 Correct 116 ms 24500 KB Output is correct
63 Correct 109 ms 24480 KB Output is correct
64 Correct 143 ms 24532 KB Output is correct
65 Correct 86 ms 23532 KB Output is correct
66 Correct 90 ms 25036 KB Output is correct
67 Correct 87 ms 23536 KB Output is correct
68 Correct 104 ms 24004 KB Output is correct
69 Correct 131 ms 24612 KB Output is correct
70 Correct 119 ms 24644 KB Output is correct
71 Correct 103 ms 23952 KB Output is correct
72 Correct 105 ms 24740 KB Output is correct
73 Correct 107 ms 23572 KB Output is correct
74 Correct 148 ms 24020 KB Output is correct
75 Correct 151 ms 24004 KB Output is correct
76 Correct 99 ms 23084 KB Output is correct
77 Correct 105 ms 23532 KB Output is correct
78 Correct 126 ms 23996 KB Output is correct
79 Correct 77 ms 22944 KB Output is correct
80 Correct 72 ms 22752 KB Output is correct
81 Correct 88 ms 23444 KB Output is correct
82 Correct 90 ms 23364 KB Output is correct
83 Correct 110 ms 23944 KB Output is correct
84 Correct 113 ms 24024 KB Output is correct
85 Correct 117 ms 23984 KB Output is correct
86 Correct 125 ms 24484 KB Output is correct
87 Correct 101 ms 24104 KB Output is correct
88 Correct 114 ms 24508 KB Output is correct
89 Correct 80 ms 23256 KB Output is correct
90 Correct 119 ms 24584 KB Output is correct
91 Correct 96 ms 23848 KB Output is correct
92 Correct 95 ms 23748 KB Output is correct
93 Correct 114 ms 24576 KB Output is correct
94 Correct 126 ms 24516 KB Output is correct
95 Correct 171 ms 24516 KB Output is correct
96 Correct 128 ms 24568 KB Output is correct
97 Correct 114 ms 24512 KB Output is correct
98 Correct 110 ms 24000 KB Output is correct
99 Correct 85 ms 23536 KB Output is correct
100 Correct 86 ms 23964 KB Output is correct
101 Correct 98 ms 25020 KB Output is correct
102 Correct 107 ms 24820 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 16972 KB Output is correct
2 Correct 15 ms 16960 KB Output is correct
3 Correct 13 ms 16844 KB Output is correct
4 Correct 13 ms 16972 KB Output is correct
5 Correct 13 ms 16972 KB Output is correct
6 Correct 13 ms 16972 KB Output is correct
7 Correct 13 ms 16972 KB Output is correct
8 Correct 12 ms 16888 KB Output is correct
9 Correct 12 ms 16972 KB Output is correct
10 Correct 13 ms 17008 KB Output is correct
11 Correct 13 ms 16964 KB Output is correct
12 Correct 12 ms 16972 KB Output is correct
13 Correct 13 ms 16972 KB Output is correct
14 Correct 14 ms 16944 KB Output is correct
15 Correct 13 ms 16972 KB Output is correct
16 Correct 15 ms 16972 KB Output is correct
17 Correct 12 ms 16972 KB Output is correct
18 Correct 12 ms 16972 KB Output is correct
19 Correct 12 ms 16996 KB Output is correct
20 Correct 13 ms 16972 KB Output is correct
21 Correct 13 ms 16972 KB Output is correct
22 Correct 14 ms 17000 KB Output is correct
23 Correct 13 ms 17000 KB Output is correct
24 Correct 16 ms 16972 KB Output is correct
25 Correct 13 ms 17048 KB Output is correct
26 Correct 13 ms 16972 KB Output is correct
27 Correct 15 ms 17008 KB Output is correct
28 Correct 12 ms 17016 KB Output is correct
29 Correct 12 ms 16972 KB Output is correct
30 Correct 16 ms 16924 KB Output is correct
31 Correct 12 ms 16972 KB Output is correct
32 Correct 13 ms 16972 KB Output is correct
33 Correct 12 ms 16972 KB Output is correct
34 Correct 12 ms 16924 KB Output is correct
35 Correct 13 ms 16972 KB Output is correct
36 Correct 14 ms 16972 KB Output is correct
37 Correct 13 ms 16984 KB Output is correct
38 Correct 12 ms 17008 KB Output is correct
39 Correct 121 ms 24400 KB Output is correct
40 Correct 117 ms 24428 KB Output is correct
41 Correct 104 ms 24240 KB Output is correct
42 Correct 112 ms 24284 KB Output is correct
43 Correct 106 ms 24516 KB Output is correct
44 Correct 133 ms 24512 KB Output is correct
45 Correct 55 ms 23492 KB Output is correct
46 Correct 58 ms 23576 KB Output is correct
47 Correct 103 ms 24516 KB Output is correct
48 Correct 116 ms 24512 KB Output is correct
49 Correct 106 ms 24520 KB Output is correct
50 Correct 134 ms 24520 KB Output is correct
51 Correct 87 ms 23952 KB Output is correct
52 Correct 102 ms 24288 KB Output is correct
53 Correct 103 ms 24900 KB Output is correct
54 Correct 105 ms 24784 KB Output is correct
55 Correct 557 ms 45488 KB Output is correct
56 Correct 487 ms 47240 KB Output is correct
57 Correct 588 ms 51316 KB Output is correct
58 Correct 465 ms 47688 KB Output is correct
59 Correct 462 ms 48216 KB Output is correct
60 Correct 649 ms 52120 KB Output is correct
61 Correct 232 ms 48564 KB Output is correct
62 Correct 246 ms 47888 KB Output is correct
63 Correct 571 ms 49732 KB Output is correct
64 Correct 578 ms 49704 KB Output is correct
65 Correct 650 ms 52056 KB Output is correct
66 Correct 611 ms 52128 KB Output is correct
67 Correct 597 ms 52064 KB Output is correct
68 Correct 629 ms 52072 KB Output is correct
69 Correct 673 ms 52196 KB Output is correct
70 Correct 611 ms 51480 KB Output is correct
71 Correct 649 ms 51488 KB Output is correct
72 Correct 650 ms 51468 KB Output is correct
73 Correct 620 ms 51372 KB Output is correct
74 Correct 631 ms 51488 KB Output is correct
75 Correct 651 ms 51468 KB Output is correct
76 Correct 601 ms 51484 KB Output is correct
77 Correct 589 ms 51492 KB Output is correct
78 Correct 645 ms 51488 KB Output is correct
79 Correct 510 ms 53060 KB Output is correct
80 Correct 524 ms 53356 KB Output is correct
81 Correct 459 ms 52484 KB Output is correct
82 Correct 102 ms 24004 KB Output is correct
83 Correct 96 ms 23816 KB Output is correct
84 Correct 53 ms 23136 KB Output is correct
85 Correct 69 ms 23396 KB Output is correct
86 Correct 126 ms 24560 KB Output is correct
87 Correct 143 ms 24572 KB Output is correct
88 Correct 110 ms 24544 KB Output is correct
89 Correct 116 ms 24500 KB Output is correct
90 Correct 109 ms 24480 KB Output is correct
91 Correct 143 ms 24532 KB Output is correct
92 Correct 86 ms 23532 KB Output is correct
93 Correct 90 ms 25036 KB Output is correct
94 Correct 87 ms 23536 KB Output is correct
95 Correct 104 ms 24004 KB Output is correct
96 Correct 131 ms 24612 KB Output is correct
97 Correct 119 ms 24644 KB Output is correct
98 Correct 103 ms 23952 KB Output is correct
99 Correct 105 ms 24740 KB Output is correct
100 Correct 107 ms 23572 KB Output is correct
101 Correct 148 ms 24020 KB Output is correct
102 Correct 151 ms 24004 KB Output is correct
103 Correct 99 ms 23084 KB Output is correct
104 Correct 105 ms 23532 KB Output is correct
105 Correct 126 ms 23996 KB Output is correct
106 Correct 77 ms 22944 KB Output is correct
107 Correct 72 ms 22752 KB Output is correct
108 Correct 88 ms 23444 KB Output is correct
109 Correct 90 ms 23364 KB Output is correct
110 Correct 110 ms 23944 KB Output is correct
111 Correct 113 ms 24024 KB Output is correct
112 Correct 117 ms 23984 KB Output is correct
113 Correct 125 ms 24484 KB Output is correct
114 Correct 101 ms 24104 KB Output is correct
115 Correct 114 ms 24508 KB Output is correct
116 Correct 80 ms 23256 KB Output is correct
117 Correct 119 ms 24584 KB Output is correct
118 Correct 96 ms 23848 KB Output is correct
119 Correct 95 ms 23748 KB Output is correct
120 Correct 114 ms 24576 KB Output is correct
121 Correct 126 ms 24516 KB Output is correct
122 Correct 171 ms 24516 KB Output is correct
123 Correct 128 ms 24568 KB Output is correct
124 Correct 114 ms 24512 KB Output is correct
125 Correct 110 ms 24000 KB Output is correct
126 Correct 85 ms 23536 KB Output is correct
127 Correct 86 ms 23964 KB Output is correct
128 Correct 98 ms 25020 KB Output is correct
129 Correct 107 ms 24820 KB Output is correct
130 Correct 636 ms 51428 KB Output is correct
131 Correct 425 ms 47708 KB Output is correct
132 Correct 656 ms 51444 KB Output is correct
133 Correct 648 ms 51480 KB Output is correct
134 Correct 537 ms 49948 KB Output is correct
135 Correct 630 ms 52108 KB Output is correct
136 Correct 595 ms 50016 KB Output is correct
137 Correct 632 ms 50128 KB Output is correct
138 Correct 635 ms 52196 KB Output is correct
139 Correct 578 ms 52164 KB Output is correct
140 Correct 585 ms 52140 KB Output is correct
141 Correct 601 ms 52192 KB Output is correct
142 Correct 626 ms 52296 KB Output is correct
143 Correct 628 ms 52132 KB Output is correct
144 Correct 660 ms 52128 KB Output is correct
145 Correct 665 ms 52132 KB Output is correct
146 Correct 608 ms 52136 KB Output is correct
147 Correct 652 ms 52120 KB Output is correct
148 Correct 594 ms 52140 KB Output is correct
149 Correct 576 ms 52128 KB Output is correct
150 Correct 342 ms 48492 KB Output is correct
151 Correct 480 ms 54276 KB Output is correct
152 Correct 500 ms 54260 KB Output is correct
153 Correct 521 ms 53092 KB Output is correct