답안 #1007093

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1007093 2024-06-24T11:45:53 Z Unforgettablepl 푸드 코트 (JOI21_foodcourt) C++17
100 / 100
338 ms 45400 KB
#include <bits/stdc++.h>
using namespace std;

// #define x first
// #define y second

#define int long long

void solve1(int n,int m,int q){
    vector<deque<pair<int,int>>> queues(n+1);
    for(int i=1;i<=q;i++){
        int type;cin>>type;
        if(type==1){
            int l,r,c,k;cin>>l>>r>>c>>k;
            for(int x=l;x<=r;x++)queues[x].emplace_back(k,c);
        } else if(type==2){
            int l,r,k;cin>>l>>r>>k;
            for(int x=l;x<=r;x++){
                int tar = k;
                while(tar and !queues[x].empty()){
                    if(queues[x].front().first<=tar){
                        tar-=queues[x].front().first;
                        queues[x].pop_front();
                    } else {
                        queues[x].front().first-=tar;
                        tar = 0;
                    }
                }
            }
        } else {
            int a,b;cin>>a>>b;
            int curr = 0;
            for(int i=0;i<queues[a].size();i++){
                curr+=queues[a][i].first;
                if(curr>=b){cout<<queues[a][i].second<<'\n';break;}
            }
            if(curr<b)cout<<"0\n";
        }
    }
    exit(0);
}

pair<int,int> tree[2000000];

void merge(pair<int,int> &a,pair<int,int> b){
    int cut = min(a.second,b.first);
    a.second-=cut;
    b.first-=cut;
    a.first+=b.first;
    a.second+=b.second;
}
int n;

void update(int qL,int qR,pair<int,int> qu,int x=1,int l=1,int r=n){
    if(qR<l or r<qL)return;
    if(qL<=l and r<=qR){
        merge(tree[x],qu);
        return;
    }
    merge(tree[2*x],tree[x]);
    merge(tree[2*x+1],tree[x]);
    tree[x] = {0,0};
    int mid = (l+r)/2;
    update(qL,qR,qu,2*x,l,mid);
    update(qL,qR,qu,2*x+1,mid+1,r);
}

int get(int qu,int x=1,int l=1,int r=n){
    if(qu<l or r<qu)return 0;
    if(l==r){
        return tree[x].second;
    }
    merge(tree[2*x],tree[x]);
    merge(tree[2*x+1],tree[x]);
    tree[x] = {0,0};
    int mid = (l+r)/2;
    return get(qu,2*x,l,mid)+get(qu,2*x+1,mid+1,r);
}

void solve2(int n,int m,int q){
    for(int i=1;i<=q;i++){
        int type;cin>>type;
        if(type==1){
            int l,r,c,k;cin>>l>>r>>c>>k;
            update(l,r,{0,k});
        } else if(type==2){
            int l,r,k;cin>>l>>r>>k;
            update(l,r,{k,0});
        } else {
            int a,b;cin>>a>>b;
            if(get(a)<b)cout<<"0\n";
            else cout<<"1\n";
        }
    }
    exit(0);
}

struct fenwick{
    vector<int> tree;
    fenwick(int n):tree(n+1){}
    int get(int x){
        int ans = 0;
        while(x){
            ans+=tree[x];
            x-=x&-x;
        }
        return ans;
    }
    void update(int x,int k){
        while(x<tree.size()){
            tree[x]+=k;
            x+=x&-x;
        }
    }
};

int32_t main(){
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int m,q;
    cin >> n >> m >> q;
    // if(n<=2000 and q<=2000)solve1(n,m,q);
    // if(m==1)solve2(n,m,q);
    
    fenwick addedamt(n);
    vector<vector<pair<int,int>>> queries(n+1);
    vector<vector<pair<int,bool>>> events(n+2);
    vector<pair<int,int>> addq(q+1);
    int out = 0;
    for(int i=1;i<=q;i++){
        int type;cin>>type;
        if(type==1){
            int l,r,c,k;cin>>l>>r>>c>>k;
            update(l,r,{0,k});
            addedamt.update(l,k);
            addedamt.update(r+1,-k);
            events[l].emplace_back(i,true);
            events[r+1].emplace_back(i,false);
            addq[i] = {c,k};
        } else if(type==2){
            int l,r,k;cin>>l>>r>>k;
            update(l,r,{k,0});
        } else {
            int a,b;cin>>a>>b;
            int act = b+addedamt.get(a)-get(a);
            if(act>addedamt.get(a))++out;
            else queries[a].emplace_back(act,++out);
        }
    }
    vector<int> ans(out+1);
    fenwick curr(q+1);
    for(int i=1;i<=n;i++){
        for(auto&[idx,type]:events[i]){
            if(type){
                curr.update(idx,addq[idx].second);
            } else {
                curr.update(idx,-addq[idx].second);
            }
        }
        for(auto&[act,idx]:queries[i]){
            int last = 0;
            for(int jump = 131072;jump;jump/=2){
                if(last+jump>q)continue;    
                if(curr.get(last+jump)<act)last+=jump;
            }
            last++;
            ans[idx] = addq[last].first;
        }
    }
    for(int i=1;i<=out;i++)cout<<ans[i]<<'\n';
}

Compilation message

foodcourt.cpp: In function 'void solve1(long long int, long long int, long long int)':
foodcourt.cpp:33:26: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::deque<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   33 |             for(int i=0;i<queues[a].size();i++){
      |                         ~^~~~~~~~~~~~~~~~~
foodcourt.cpp: In member function 'void fenwick::update(long long int, long long int)':
foodcourt.cpp:110:16: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  110 |         while(x<tree.size()){
      |               ~^~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 604 KB Output is correct
2 Correct 1 ms 604 KB Output is correct
3 Correct 1 ms 604 KB Output is correct
4 Correct 2 ms 604 KB Output is correct
5 Correct 2 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 2 ms 604 KB Output is correct
8 Correct 1 ms 604 KB Output is correct
9 Correct 2 ms 680 KB Output is correct
10 Correct 1 ms 600 KB Output is correct
11 Correct 2 ms 604 KB Output is correct
12 Correct 2 ms 604 KB Output is correct
13 Correct 2 ms 604 KB Output is correct
14 Correct 1 ms 604 KB Output is correct
15 Correct 1 ms 716 KB Output is correct
16 Correct 1 ms 604 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 1 ms 604 KB Output is correct
19 Correct 1 ms 604 KB Output is correct
20 Correct 2 ms 692 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 604 KB Output is correct
2 Correct 1 ms 604 KB Output is correct
3 Correct 1 ms 604 KB Output is correct
4 Correct 2 ms 604 KB Output is correct
5 Correct 2 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 2 ms 604 KB Output is correct
8 Correct 1 ms 604 KB Output is correct
9 Correct 2 ms 680 KB Output is correct
10 Correct 1 ms 600 KB Output is correct
11 Correct 2 ms 604 KB Output is correct
12 Correct 2 ms 604 KB Output is correct
13 Correct 2 ms 604 KB Output is correct
14 Correct 1 ms 604 KB Output is correct
15 Correct 1 ms 716 KB Output is correct
16 Correct 1 ms 604 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 1 ms 604 KB Output is correct
19 Correct 1 ms 604 KB Output is correct
20 Correct 2 ms 692 KB Output is correct
21 Correct 2 ms 604 KB Output is correct
22 Correct 2 ms 680 KB Output is correct
23 Correct 1 ms 604 KB Output is correct
24 Correct 2 ms 604 KB Output is correct
25 Correct 1 ms 348 KB Output is correct
26 Correct 1 ms 348 KB Output is correct
27 Correct 2 ms 604 KB Output is correct
28 Correct 2 ms 600 KB Output is correct
29 Correct 2 ms 604 KB Output is correct
30 Correct 1 ms 604 KB Output is correct
31 Correct 2 ms 604 KB Output is correct
32 Correct 1 ms 720 KB Output is correct
33 Correct 1 ms 600 KB Output is correct
34 Correct 1 ms 604 KB Output is correct
35 Correct 1 ms 604 KB Output is correct
36 Correct 1 ms 604 KB Output is correct
37 Correct 1 ms 604 KB Output is correct
38 Correct 2 ms 604 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 38 ms 8788 KB Output is correct
2 Correct 40 ms 9356 KB Output is correct
3 Correct 46 ms 8916 KB Output is correct
4 Correct 38 ms 8784 KB Output is correct
5 Correct 51 ms 9296 KB Output is correct
6 Correct 41 ms 9328 KB Output is correct
7 Correct 13 ms 2832 KB Output is correct
8 Correct 13 ms 2828 KB Output is correct
9 Correct 38 ms 9088 KB Output is correct
10 Correct 49 ms 8900 KB Output is correct
11 Correct 40 ms 9048 KB Output is correct
12 Correct 43 ms 9052 KB Output is correct
13 Correct 34 ms 8016 KB Output is correct
14 Correct 40 ms 9552 KB Output is correct
15 Correct 47 ms 9084 KB Output is correct
16 Correct 43 ms 10320 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 243 ms 32848 KB Output is correct
2 Correct 215 ms 28764 KB Output is correct
3 Correct 276 ms 35224 KB Output is correct
4 Correct 214 ms 32592 KB Output is correct
5 Correct 225 ms 29524 KB Output is correct
6 Correct 284 ms 36656 KB Output is correct
7 Correct 65 ms 10616 KB Output is correct
8 Correct 68 ms 10932 KB Output is correct
9 Correct 329 ms 38224 KB Output is correct
10 Correct 318 ms 38164 KB Output is correct
11 Correct 244 ms 35064 KB Output is correct
12 Correct 307 ms 35152 KB Output is correct
13 Correct 281 ms 35156 KB Output is correct
14 Correct 256 ms 35140 KB Output is correct
15 Correct 270 ms 35152 KB Output is correct
16 Correct 270 ms 35156 KB Output is correct
17 Correct 287 ms 35156 KB Output is correct
18 Correct 270 ms 35076 KB Output is correct
19 Correct 264 ms 35152 KB Output is correct
20 Correct 295 ms 35408 KB Output is correct
21 Correct 259 ms 35156 KB Output is correct
22 Correct 266 ms 35244 KB Output is correct
23 Correct 338 ms 35152 KB Output is correct
24 Correct 305 ms 35156 KB Output is correct
25 Correct 233 ms 31568 KB Output is correct
26 Correct 234 ms 35056 KB Output is correct
27 Correct 209 ms 38144 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 604 KB Output is correct
2 Correct 1 ms 604 KB Output is correct
3 Correct 1 ms 604 KB Output is correct
4 Correct 2 ms 604 KB Output is correct
5 Correct 2 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 2 ms 604 KB Output is correct
8 Correct 1 ms 604 KB Output is correct
9 Correct 2 ms 680 KB Output is correct
10 Correct 1 ms 600 KB Output is correct
11 Correct 2 ms 604 KB Output is correct
12 Correct 2 ms 604 KB Output is correct
13 Correct 2 ms 604 KB Output is correct
14 Correct 1 ms 604 KB Output is correct
15 Correct 1 ms 716 KB Output is correct
16 Correct 1 ms 604 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 1 ms 604 KB Output is correct
19 Correct 1 ms 604 KB Output is correct
20 Correct 2 ms 692 KB Output is correct
21 Correct 38 ms 8788 KB Output is correct
22 Correct 40 ms 9356 KB Output is correct
23 Correct 46 ms 8916 KB Output is correct
24 Correct 38 ms 8784 KB Output is correct
25 Correct 51 ms 9296 KB Output is correct
26 Correct 41 ms 9328 KB Output is correct
27 Correct 13 ms 2832 KB Output is correct
28 Correct 13 ms 2828 KB Output is correct
29 Correct 38 ms 9088 KB Output is correct
30 Correct 49 ms 8900 KB Output is correct
31 Correct 40 ms 9048 KB Output is correct
32 Correct 43 ms 9052 KB Output is correct
33 Correct 34 ms 8016 KB Output is correct
34 Correct 40 ms 9552 KB Output is correct
35 Correct 47 ms 9084 KB Output is correct
36 Correct 43 ms 10320 KB Output is correct
37 Correct 46 ms 9308 KB Output is correct
38 Correct 56 ms 9556 KB Output is correct
39 Correct 10 ms 3368 KB Output is correct
40 Correct 11 ms 3440 KB Output is correct
41 Correct 79 ms 10328 KB Output is correct
42 Correct 51 ms 10324 KB Output is correct
43 Correct 69 ms 10516 KB Output is correct
44 Correct 55 ms 10544 KB Output is correct
45 Correct 50 ms 10328 KB Output is correct
46 Correct 55 ms 10448 KB Output is correct
47 Correct 25 ms 9860 KB Output is correct
48 Correct 42 ms 10324 KB Output is correct
49 Correct 36 ms 8028 KB Output is correct
50 Correct 52 ms 9812 KB Output is correct
51 Correct 49 ms 10324 KB Output is correct
52 Correct 62 ms 10396 KB Output is correct
53 Correct 40 ms 10068 KB Output is correct
54 Correct 42 ms 11604 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 64 ms 9808 KB Output is correct
2 Correct 59 ms 11096 KB Output is correct
3 Correct 72 ms 11876 KB Output is correct
4 Correct 39 ms 10068 KB Output is correct
5 Correct 53 ms 10900 KB Output is correct
6 Correct 67 ms 12032 KB Output is correct
7 Correct 16 ms 4556 KB Output is correct
8 Correct 21 ms 4536 KB Output is correct
9 Correct 43 ms 11128 KB Output is correct
10 Correct 45 ms 9616 KB Output is correct
11 Correct 59 ms 11608 KB Output is correct
12 Correct 51 ms 11592 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 604 KB Output is correct
2 Correct 1 ms 604 KB Output is correct
3 Correct 1 ms 604 KB Output is correct
4 Correct 2 ms 604 KB Output is correct
5 Correct 2 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 2 ms 604 KB Output is correct
8 Correct 1 ms 604 KB Output is correct
9 Correct 2 ms 680 KB Output is correct
10 Correct 1 ms 600 KB Output is correct
11 Correct 2 ms 604 KB Output is correct
12 Correct 2 ms 604 KB Output is correct
13 Correct 2 ms 604 KB Output is correct
14 Correct 1 ms 604 KB Output is correct
15 Correct 1 ms 716 KB Output is correct
16 Correct 1 ms 604 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 1 ms 604 KB Output is correct
19 Correct 1 ms 604 KB Output is correct
20 Correct 2 ms 692 KB Output is correct
21 Correct 2 ms 604 KB Output is correct
22 Correct 2 ms 680 KB Output is correct
23 Correct 1 ms 604 KB Output is correct
24 Correct 2 ms 604 KB Output is correct
25 Correct 1 ms 348 KB Output is correct
26 Correct 1 ms 348 KB Output is correct
27 Correct 2 ms 604 KB Output is correct
28 Correct 2 ms 600 KB Output is correct
29 Correct 2 ms 604 KB Output is correct
30 Correct 1 ms 604 KB Output is correct
31 Correct 2 ms 604 KB Output is correct
32 Correct 1 ms 720 KB Output is correct
33 Correct 1 ms 600 KB Output is correct
34 Correct 1 ms 604 KB Output is correct
35 Correct 1 ms 604 KB Output is correct
36 Correct 1 ms 604 KB Output is correct
37 Correct 1 ms 604 KB Output is correct
38 Correct 2 ms 604 KB Output is correct
39 Correct 38 ms 8788 KB Output is correct
40 Correct 40 ms 9356 KB Output is correct
41 Correct 46 ms 8916 KB Output is correct
42 Correct 38 ms 8784 KB Output is correct
43 Correct 51 ms 9296 KB Output is correct
44 Correct 41 ms 9328 KB Output is correct
45 Correct 13 ms 2832 KB Output is correct
46 Correct 13 ms 2828 KB Output is correct
47 Correct 38 ms 9088 KB Output is correct
48 Correct 49 ms 8900 KB Output is correct
49 Correct 40 ms 9048 KB Output is correct
50 Correct 43 ms 9052 KB Output is correct
51 Correct 34 ms 8016 KB Output is correct
52 Correct 40 ms 9552 KB Output is correct
53 Correct 47 ms 9084 KB Output is correct
54 Correct 43 ms 10320 KB Output is correct
55 Correct 46 ms 9308 KB Output is correct
56 Correct 56 ms 9556 KB Output is correct
57 Correct 10 ms 3368 KB Output is correct
58 Correct 11 ms 3440 KB Output is correct
59 Correct 79 ms 10328 KB Output is correct
60 Correct 51 ms 10324 KB Output is correct
61 Correct 69 ms 10516 KB Output is correct
62 Correct 55 ms 10544 KB Output is correct
63 Correct 50 ms 10328 KB Output is correct
64 Correct 55 ms 10448 KB Output is correct
65 Correct 25 ms 9860 KB Output is correct
66 Correct 42 ms 10324 KB Output is correct
67 Correct 36 ms 8028 KB Output is correct
68 Correct 52 ms 9812 KB Output is correct
69 Correct 49 ms 10324 KB Output is correct
70 Correct 62 ms 10396 KB Output is correct
71 Correct 40 ms 10068 KB Output is correct
72 Correct 42 ms 11604 KB Output is correct
73 Correct 64 ms 9808 KB Output is correct
74 Correct 59 ms 11096 KB Output is correct
75 Correct 72 ms 11876 KB Output is correct
76 Correct 39 ms 10068 KB Output is correct
77 Correct 53 ms 10900 KB Output is correct
78 Correct 67 ms 12032 KB Output is correct
79 Correct 16 ms 4556 KB Output is correct
80 Correct 21 ms 4536 KB Output is correct
81 Correct 43 ms 11128 KB Output is correct
82 Correct 45 ms 9616 KB Output is correct
83 Correct 59 ms 11608 KB Output is correct
84 Correct 51 ms 11592 KB Output is correct
85 Correct 56 ms 9808 KB Output is correct
86 Correct 59 ms 11032 KB Output is correct
87 Correct 64 ms 10588 KB Output is correct
88 Correct 59 ms 11348 KB Output is correct
89 Correct 36 ms 8536 KB Output is correct
90 Correct 54 ms 11064 KB Output is correct
91 Correct 46 ms 8876 KB Output is correct
92 Correct 44 ms 8588 KB Output is correct
93 Correct 58 ms 10836 KB Output is correct
94 Correct 62 ms 10836 KB Output is correct
95 Correct 59 ms 10716 KB Output is correct
96 Correct 80 ms 10836 KB Output is correct
97 Correct 56 ms 10976 KB Output is correct
98 Correct 48 ms 9044 KB Output is correct
99 Correct 29 ms 10348 KB Output is correct
100 Correct 43 ms 9556 KB Output is correct
101 Correct 60 ms 10836 KB Output is correct
102 Correct 45 ms 11860 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 604 KB Output is correct
2 Correct 1 ms 604 KB Output is correct
3 Correct 1 ms 604 KB Output is correct
4 Correct 2 ms 604 KB Output is correct
5 Correct 2 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 2 ms 604 KB Output is correct
8 Correct 1 ms 604 KB Output is correct
9 Correct 2 ms 680 KB Output is correct
10 Correct 1 ms 600 KB Output is correct
11 Correct 2 ms 604 KB Output is correct
12 Correct 2 ms 604 KB Output is correct
13 Correct 2 ms 604 KB Output is correct
14 Correct 1 ms 604 KB Output is correct
15 Correct 1 ms 716 KB Output is correct
16 Correct 1 ms 604 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 1 ms 604 KB Output is correct
19 Correct 1 ms 604 KB Output is correct
20 Correct 2 ms 692 KB Output is correct
21 Correct 2 ms 604 KB Output is correct
22 Correct 2 ms 680 KB Output is correct
23 Correct 1 ms 604 KB Output is correct
24 Correct 2 ms 604 KB Output is correct
25 Correct 1 ms 348 KB Output is correct
26 Correct 1 ms 348 KB Output is correct
27 Correct 2 ms 604 KB Output is correct
28 Correct 2 ms 600 KB Output is correct
29 Correct 2 ms 604 KB Output is correct
30 Correct 1 ms 604 KB Output is correct
31 Correct 2 ms 604 KB Output is correct
32 Correct 1 ms 720 KB Output is correct
33 Correct 1 ms 600 KB Output is correct
34 Correct 1 ms 604 KB Output is correct
35 Correct 1 ms 604 KB Output is correct
36 Correct 1 ms 604 KB Output is correct
37 Correct 1 ms 604 KB Output is correct
38 Correct 2 ms 604 KB Output is correct
39 Correct 38 ms 8788 KB Output is correct
40 Correct 40 ms 9356 KB Output is correct
41 Correct 46 ms 8916 KB Output is correct
42 Correct 38 ms 8784 KB Output is correct
43 Correct 51 ms 9296 KB Output is correct
44 Correct 41 ms 9328 KB Output is correct
45 Correct 13 ms 2832 KB Output is correct
46 Correct 13 ms 2828 KB Output is correct
47 Correct 38 ms 9088 KB Output is correct
48 Correct 49 ms 8900 KB Output is correct
49 Correct 40 ms 9048 KB Output is correct
50 Correct 43 ms 9052 KB Output is correct
51 Correct 34 ms 8016 KB Output is correct
52 Correct 40 ms 9552 KB Output is correct
53 Correct 47 ms 9084 KB Output is correct
54 Correct 43 ms 10320 KB Output is correct
55 Correct 243 ms 32848 KB Output is correct
56 Correct 215 ms 28764 KB Output is correct
57 Correct 276 ms 35224 KB Output is correct
58 Correct 214 ms 32592 KB Output is correct
59 Correct 225 ms 29524 KB Output is correct
60 Correct 284 ms 36656 KB Output is correct
61 Correct 65 ms 10616 KB Output is correct
62 Correct 68 ms 10932 KB Output is correct
63 Correct 329 ms 38224 KB Output is correct
64 Correct 318 ms 38164 KB Output is correct
65 Correct 244 ms 35064 KB Output is correct
66 Correct 307 ms 35152 KB Output is correct
67 Correct 281 ms 35156 KB Output is correct
68 Correct 256 ms 35140 KB Output is correct
69 Correct 270 ms 35152 KB Output is correct
70 Correct 270 ms 35156 KB Output is correct
71 Correct 287 ms 35156 KB Output is correct
72 Correct 270 ms 35076 KB Output is correct
73 Correct 264 ms 35152 KB Output is correct
74 Correct 295 ms 35408 KB Output is correct
75 Correct 259 ms 35156 KB Output is correct
76 Correct 266 ms 35244 KB Output is correct
77 Correct 338 ms 35152 KB Output is correct
78 Correct 305 ms 35156 KB Output is correct
79 Correct 233 ms 31568 KB Output is correct
80 Correct 234 ms 35056 KB Output is correct
81 Correct 209 ms 38144 KB Output is correct
82 Correct 46 ms 9308 KB Output is correct
83 Correct 56 ms 9556 KB Output is correct
84 Correct 10 ms 3368 KB Output is correct
85 Correct 11 ms 3440 KB Output is correct
86 Correct 79 ms 10328 KB Output is correct
87 Correct 51 ms 10324 KB Output is correct
88 Correct 69 ms 10516 KB Output is correct
89 Correct 55 ms 10544 KB Output is correct
90 Correct 50 ms 10328 KB Output is correct
91 Correct 55 ms 10448 KB Output is correct
92 Correct 25 ms 9860 KB Output is correct
93 Correct 42 ms 10324 KB Output is correct
94 Correct 36 ms 8028 KB Output is correct
95 Correct 52 ms 9812 KB Output is correct
96 Correct 49 ms 10324 KB Output is correct
97 Correct 62 ms 10396 KB Output is correct
98 Correct 40 ms 10068 KB Output is correct
99 Correct 42 ms 11604 KB Output is correct
100 Correct 64 ms 9808 KB Output is correct
101 Correct 59 ms 11096 KB Output is correct
102 Correct 72 ms 11876 KB Output is correct
103 Correct 39 ms 10068 KB Output is correct
104 Correct 53 ms 10900 KB Output is correct
105 Correct 67 ms 12032 KB Output is correct
106 Correct 16 ms 4556 KB Output is correct
107 Correct 21 ms 4536 KB Output is correct
108 Correct 43 ms 11128 KB Output is correct
109 Correct 45 ms 9616 KB Output is correct
110 Correct 59 ms 11608 KB Output is correct
111 Correct 51 ms 11592 KB Output is correct
112 Correct 56 ms 9808 KB Output is correct
113 Correct 59 ms 11032 KB Output is correct
114 Correct 64 ms 10588 KB Output is correct
115 Correct 59 ms 11348 KB Output is correct
116 Correct 36 ms 8536 KB Output is correct
117 Correct 54 ms 11064 KB Output is correct
118 Correct 46 ms 8876 KB Output is correct
119 Correct 44 ms 8588 KB Output is correct
120 Correct 58 ms 10836 KB Output is correct
121 Correct 62 ms 10836 KB Output is correct
122 Correct 59 ms 10716 KB Output is correct
123 Correct 80 ms 10836 KB Output is correct
124 Correct 56 ms 10976 KB Output is correct
125 Correct 48 ms 9044 KB Output is correct
126 Correct 29 ms 10348 KB Output is correct
127 Correct 43 ms 9556 KB Output is correct
128 Correct 60 ms 10836 KB Output is correct
129 Correct 45 ms 11860 KB Output is correct
130 Correct 279 ms 41300 KB Output is correct
131 Correct 213 ms 32848 KB Output is correct
132 Correct 265 ms 41760 KB Output is correct
133 Correct 293 ms 42072 KB Output is correct
134 Correct 264 ms 39988 KB Output is correct
135 Correct 304 ms 43604 KB Output is correct
136 Correct 293 ms 45400 KB Output is correct
137 Correct 324 ms 45340 KB Output is correct
138 Correct 288 ms 41852 KB Output is correct
139 Correct 330 ms 42008 KB Output is correct
140 Correct 285 ms 41848 KB Output is correct
141 Correct 274 ms 41808 KB Output is correct
142 Correct 322 ms 41984 KB Output is correct
143 Correct 276 ms 41812 KB Output is correct
144 Correct 274 ms 41696 KB Output is correct
145 Correct 332 ms 41812 KB Output is correct
146 Correct 299 ms 41872 KB Output is correct
147 Correct 271 ms 41812 KB Output is correct
148 Correct 298 ms 41812 KB Output is correct
149 Correct 290 ms 41844 KB Output is correct
150 Correct 131 ms 39008 KB Output is correct
151 Correct 275 ms 41300 KB Output is correct
152 Correct 265 ms 41300 KB Output is correct
153 Correct 205 ms 44664 KB Output is correct