Submission #971476

# Submission time Handle Problem Language Result Execution time Memory
971476 2024-04-28T15:40:15 Z huutuan Food Court (JOI21_foodcourt) C++14
100 / 100
313 ms 66356 KB
#include<bits/stdc++.h>

using namespace std;

#define int long long

const int inf=1e18;

struct Node{
   int x, y;
   Node (){
      x=-inf, y=0;
   }
};

struct SegmentTree{
   int n;
   vector<Node> t;
   void init(int _n){
      n=_n;
      t.assign(4*n+1, Node());
   }
   void apply(int k, int x, int y){
      t[k].x=max(x, t[k].x+y);
      t[k].y+=y;
   }
   void push(int k){
      if (t[k].x!=-inf || t[k].y!=0){
         apply(k<<1, t[k].x, t[k].y);
         apply(k<<1|1, t[k].x, t[k].y);
         t[k]=Node();
      }
   }
   void update(int k, int l, int r, int L, int R, int x, int y){
      if (r<L || R<l) return;
      if (L<=l && r<=R){
         apply(k, x, y);
         return;
      }
      push(k);
      int mid=(l+r)>>1;
      update(k<<1, l, mid, L, R, x, y);
      update(k<<1|1, mid+1, r, L, R, x, y);
   }
   int get(int k, int l, int r, int pos){
      if (l==r) return max(t[k].x, t[k].y);
      push(k);
      int mid=(l+r)>>1;
      if (pos<=mid) return get(k<<1, l, mid, pos);
      return get(k<<1|1, mid+1, r, pos);
   }
} st;

struct FenwickTree{
   int n;
   vector<int> t;
   void init(int _n){
      n=_n;
      t.assign(n+1, 0);
   }
   void update(int pos, int val){
      for (int i=pos; i<=n; i+=i&(-i)) t[i]+=val;
   }
   void update(int l, int r, int val){
      update(l, val);
      if (r<n) update(r+1, -val);
   }
   int get(int pos){
      int ans=0;
      for (int i=pos; i; i-=i&(-i)) ans+=t[i];
      return ans;
   }
   int lower_bound(int val){
      int ans=0;
      for (int i=17; i>=0; --i){
         if (ans+(1<<i)<=n && val>t[ans+(1<<i)]){
            ans+=1<<i;
            val-=t[ans];
         }
      }
      return ans+1;
   }
} bit1, bit2;

struct Query{
   int l, r, c, k, i;
   Query (int _l=0, int _r=0, int _c=0, int _k=0, int _i=0){
      l=_l, r=_r, c=_c, k=_k, i=_i;
   }
};

const int N=25e4+10;
int n, m, q, ans[N];
Query a[N];
vector<pair<int, int>> v[N];
vector<Query> event[N];

int32_t main(){
   ios_base::sync_with_stdio(false);
   cin.tie(nullptr);
   cin >> n >> m >> q;
   st.init(n);
   bit1.init(n);
   int n1=0, n2=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;
         ++n1;
         a[n1]=Query(l, r, c, k, n1);
         st.update(1, 1, n, l, r, -inf, k);
         bit1.update(l, r, k);
      }else if (type==2){
         int l, r, k; cin >> l >> r >> k;
         st.update(1, 1, n, l, r, 0, -k);
      }else{
         int x, y; cin >> x >> y;
         int sz=st.get(1, 1, n, x);
         int r=bit1.get(x);
         int l=r-sz;
         ++n2;
         if (y<=sz) v[x].emplace_back(l+y-1, n2);
      }
   }
   bit2.init(n1);
   for (int i=1; i<=n1; ++i) event[a[i].l].push_back(a[i]), event[a[i].r+1].push_back(a[i]);
   for (int i=1; i<=n; ++i){
      for (auto &j:event[i]){
         if (j.l==i){
            bit2.update(j.i, j.k);
         }else{
            bit2.update(j.i, -j.k);
         }
      }
      for (auto &j:v[i]){
         ans[j.second]=a[bit2.lower_bound(j.first+1)].c;
      }
   }
   for (int i=1; i<=n2; ++i) cout << ans[i] << '\n';
   return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 10 ms 22108 KB Output is correct
2 Correct 10 ms 22108 KB Output is correct
3 Correct 10 ms 22108 KB Output is correct
4 Correct 11 ms 22108 KB Output is correct
5 Correct 10 ms 22108 KB Output is correct
6 Correct 13 ms 22108 KB Output is correct
7 Correct 10 ms 22104 KB Output is correct
8 Correct 11 ms 22264 KB Output is correct
9 Correct 10 ms 22108 KB Output is correct
10 Correct 10 ms 22108 KB Output is correct
11 Correct 10 ms 22108 KB Output is correct
12 Correct 10 ms 22108 KB Output is correct
13 Correct 10 ms 22108 KB Output is correct
14 Correct 11 ms 22256 KB Output is correct
15 Correct 10 ms 22152 KB Output is correct
16 Correct 10 ms 22048 KB Output is correct
17 Correct 10 ms 22084 KB Output is correct
18 Correct 11 ms 22236 KB Output is correct
19 Correct 11 ms 22108 KB Output is correct
20 Correct 11 ms 22364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 10 ms 22108 KB Output is correct
2 Correct 10 ms 22108 KB Output is correct
3 Correct 10 ms 22108 KB Output is correct
4 Correct 11 ms 22108 KB Output is correct
5 Correct 10 ms 22108 KB Output is correct
6 Correct 13 ms 22108 KB Output is correct
7 Correct 10 ms 22104 KB Output is correct
8 Correct 11 ms 22264 KB Output is correct
9 Correct 10 ms 22108 KB Output is correct
10 Correct 10 ms 22108 KB Output is correct
11 Correct 10 ms 22108 KB Output is correct
12 Correct 10 ms 22108 KB Output is correct
13 Correct 10 ms 22108 KB Output is correct
14 Correct 11 ms 22256 KB Output is correct
15 Correct 10 ms 22152 KB Output is correct
16 Correct 10 ms 22048 KB Output is correct
17 Correct 10 ms 22084 KB Output is correct
18 Correct 11 ms 22236 KB Output is correct
19 Correct 11 ms 22108 KB Output is correct
20 Correct 11 ms 22364 KB Output is correct
21 Correct 10 ms 22108 KB Output is correct
22 Correct 11 ms 22260 KB Output is correct
23 Correct 12 ms 22108 KB Output is correct
24 Correct 11 ms 22104 KB Output is correct
25 Correct 9 ms 22108 KB Output is correct
26 Correct 10 ms 22108 KB Output is correct
27 Correct 13 ms 22192 KB Output is correct
28 Correct 12 ms 22108 KB Output is correct
29 Correct 11 ms 22264 KB Output is correct
30 Correct 12 ms 22268 KB Output is correct
31 Correct 10 ms 22108 KB Output is correct
32 Correct 10 ms 22108 KB Output is correct
33 Correct 10 ms 22108 KB Output is correct
34 Correct 11 ms 22108 KB Output is correct
35 Correct 14 ms 22364 KB Output is correct
36 Correct 10 ms 22108 KB Output is correct
37 Correct 10 ms 22108 KB Output is correct
38 Correct 10 ms 22364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 47 ms 30056 KB Output is correct
2 Correct 50 ms 31300 KB Output is correct
3 Correct 52 ms 30036 KB Output is correct
4 Correct 46 ms 30032 KB Output is correct
5 Correct 49 ms 31128 KB Output is correct
6 Correct 48 ms 31316 KB Output is correct
7 Correct 25 ms 25088 KB Output is correct
8 Correct 27 ms 25156 KB Output is correct
9 Correct 47 ms 30292 KB Output is correct
10 Correct 47 ms 30368 KB Output is correct
11 Correct 51 ms 30392 KB Output is correct
12 Correct 48 ms 30292 KB Output is correct
13 Correct 45 ms 29780 KB Output is correct
14 Correct 52 ms 31568 KB Output is correct
15 Correct 51 ms 32592 KB Output is correct
16 Correct 53 ms 33724 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 212 ms 53336 KB Output is correct
2 Correct 165 ms 47896 KB Output is correct
3 Correct 259 ms 56612 KB Output is correct
4 Correct 201 ms 54716 KB Output is correct
5 Correct 182 ms 50868 KB Output is correct
6 Correct 276 ms 61040 KB Output is correct
7 Correct 76 ms 36324 KB Output is correct
8 Correct 77 ms 34948 KB Output is correct
9 Correct 264 ms 62540 KB Output is correct
10 Correct 246 ms 62292 KB Output is correct
11 Correct 235 ms 57428 KB Output is correct
12 Correct 261 ms 57220 KB Output is correct
13 Correct 230 ms 57164 KB Output is correct
14 Correct 250 ms 57320 KB Output is correct
15 Correct 258 ms 57128 KB Output is correct
16 Correct 243 ms 57576 KB Output is correct
17 Correct 265 ms 57184 KB Output is correct
18 Correct 247 ms 57276 KB Output is correct
19 Correct 236 ms 57396 KB Output is correct
20 Correct 252 ms 57324 KB Output is correct
21 Correct 240 ms 57168 KB Output is correct
22 Correct 227 ms 57428 KB Output is correct
23 Correct 272 ms 57172 KB Output is correct
24 Correct 241 ms 57432 KB Output is correct
25 Correct 180 ms 55000 KB Output is correct
26 Correct 196 ms 59552 KB Output is correct
27 Correct 199 ms 65448 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 10 ms 22108 KB Output is correct
2 Correct 10 ms 22108 KB Output is correct
3 Correct 10 ms 22108 KB Output is correct
4 Correct 11 ms 22108 KB Output is correct
5 Correct 10 ms 22108 KB Output is correct
6 Correct 13 ms 22108 KB Output is correct
7 Correct 10 ms 22104 KB Output is correct
8 Correct 11 ms 22264 KB Output is correct
9 Correct 10 ms 22108 KB Output is correct
10 Correct 10 ms 22108 KB Output is correct
11 Correct 10 ms 22108 KB Output is correct
12 Correct 10 ms 22108 KB Output is correct
13 Correct 10 ms 22108 KB Output is correct
14 Correct 11 ms 22256 KB Output is correct
15 Correct 10 ms 22152 KB Output is correct
16 Correct 10 ms 22048 KB Output is correct
17 Correct 10 ms 22084 KB Output is correct
18 Correct 11 ms 22236 KB Output is correct
19 Correct 11 ms 22108 KB Output is correct
20 Correct 11 ms 22364 KB Output is correct
21 Correct 47 ms 30056 KB Output is correct
22 Correct 50 ms 31300 KB Output is correct
23 Correct 52 ms 30036 KB Output is correct
24 Correct 46 ms 30032 KB Output is correct
25 Correct 49 ms 31128 KB Output is correct
26 Correct 48 ms 31316 KB Output is correct
27 Correct 25 ms 25088 KB Output is correct
28 Correct 27 ms 25156 KB Output is correct
29 Correct 47 ms 30292 KB Output is correct
30 Correct 47 ms 30368 KB Output is correct
31 Correct 51 ms 30392 KB Output is correct
32 Correct 48 ms 30292 KB Output is correct
33 Correct 45 ms 29780 KB Output is correct
34 Correct 52 ms 31568 KB Output is correct
35 Correct 51 ms 32592 KB Output is correct
36 Correct 53 ms 33724 KB Output is correct
37 Correct 47 ms 29520 KB Output is correct
38 Correct 50 ms 30036 KB Output is correct
39 Correct 22 ms 24880 KB Output is correct
40 Correct 26 ms 25440 KB Output is correct
41 Correct 53 ms 30556 KB Output is correct
42 Correct 55 ms 30544 KB Output is correct
43 Correct 54 ms 30512 KB Output is correct
44 Correct 54 ms 30536 KB Output is correct
45 Correct 56 ms 30512 KB Output is correct
46 Correct 56 ms 30544 KB Output is correct
47 Correct 34 ms 30120 KB Output is correct
48 Correct 49 ms 31260 KB Output is correct
49 Correct 40 ms 27984 KB Output is correct
50 Correct 48 ms 30036 KB Output is correct
51 Correct 54 ms 30792 KB Output is correct
52 Correct 54 ms 30544 KB Output is correct
53 Correct 44 ms 31576 KB Output is correct
54 Correct 53 ms 33876 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 64 ms 31864 KB Output is correct
2 Correct 61 ms 31832 KB Output is correct
3 Correct 69 ms 32596 KB Output is correct
4 Correct 44 ms 30548 KB Output is correct
5 Correct 54 ms 31680 KB Output is correct
6 Correct 74 ms 32524 KB Output is correct
7 Correct 28 ms 26364 KB Output is correct
8 Correct 29 ms 26096 KB Output is correct
9 Correct 45 ms 31976 KB Output is correct
10 Correct 40 ms 30844 KB Output is correct
11 Correct 64 ms 33104 KB Output is correct
12 Correct 53 ms 33104 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 10 ms 22108 KB Output is correct
2 Correct 10 ms 22108 KB Output is correct
3 Correct 10 ms 22108 KB Output is correct
4 Correct 11 ms 22108 KB Output is correct
5 Correct 10 ms 22108 KB Output is correct
6 Correct 13 ms 22108 KB Output is correct
7 Correct 10 ms 22104 KB Output is correct
8 Correct 11 ms 22264 KB Output is correct
9 Correct 10 ms 22108 KB Output is correct
10 Correct 10 ms 22108 KB Output is correct
11 Correct 10 ms 22108 KB Output is correct
12 Correct 10 ms 22108 KB Output is correct
13 Correct 10 ms 22108 KB Output is correct
14 Correct 11 ms 22256 KB Output is correct
15 Correct 10 ms 22152 KB Output is correct
16 Correct 10 ms 22048 KB Output is correct
17 Correct 10 ms 22084 KB Output is correct
18 Correct 11 ms 22236 KB Output is correct
19 Correct 11 ms 22108 KB Output is correct
20 Correct 11 ms 22364 KB Output is correct
21 Correct 10 ms 22108 KB Output is correct
22 Correct 11 ms 22260 KB Output is correct
23 Correct 12 ms 22108 KB Output is correct
24 Correct 11 ms 22104 KB Output is correct
25 Correct 9 ms 22108 KB Output is correct
26 Correct 10 ms 22108 KB Output is correct
27 Correct 13 ms 22192 KB Output is correct
28 Correct 12 ms 22108 KB Output is correct
29 Correct 11 ms 22264 KB Output is correct
30 Correct 12 ms 22268 KB Output is correct
31 Correct 10 ms 22108 KB Output is correct
32 Correct 10 ms 22108 KB Output is correct
33 Correct 10 ms 22108 KB Output is correct
34 Correct 11 ms 22108 KB Output is correct
35 Correct 14 ms 22364 KB Output is correct
36 Correct 10 ms 22108 KB Output is correct
37 Correct 10 ms 22108 KB Output is correct
38 Correct 10 ms 22364 KB Output is correct
39 Correct 47 ms 30056 KB Output is correct
40 Correct 50 ms 31300 KB Output is correct
41 Correct 52 ms 30036 KB Output is correct
42 Correct 46 ms 30032 KB Output is correct
43 Correct 49 ms 31128 KB Output is correct
44 Correct 48 ms 31316 KB Output is correct
45 Correct 25 ms 25088 KB Output is correct
46 Correct 27 ms 25156 KB Output is correct
47 Correct 47 ms 30292 KB Output is correct
48 Correct 47 ms 30368 KB Output is correct
49 Correct 51 ms 30392 KB Output is correct
50 Correct 48 ms 30292 KB Output is correct
51 Correct 45 ms 29780 KB Output is correct
52 Correct 52 ms 31568 KB Output is correct
53 Correct 51 ms 32592 KB Output is correct
54 Correct 53 ms 33724 KB Output is correct
55 Correct 47 ms 29520 KB Output is correct
56 Correct 50 ms 30036 KB Output is correct
57 Correct 22 ms 24880 KB Output is correct
58 Correct 26 ms 25440 KB Output is correct
59 Correct 53 ms 30556 KB Output is correct
60 Correct 55 ms 30544 KB Output is correct
61 Correct 54 ms 30512 KB Output is correct
62 Correct 54 ms 30536 KB Output is correct
63 Correct 56 ms 30512 KB Output is correct
64 Correct 56 ms 30544 KB Output is correct
65 Correct 34 ms 30120 KB Output is correct
66 Correct 49 ms 31260 KB Output is correct
67 Correct 40 ms 27984 KB Output is correct
68 Correct 48 ms 30036 KB Output is correct
69 Correct 54 ms 30792 KB Output is correct
70 Correct 54 ms 30544 KB Output is correct
71 Correct 44 ms 31576 KB Output is correct
72 Correct 53 ms 33876 KB Output is correct
73 Correct 64 ms 31864 KB Output is correct
74 Correct 61 ms 31832 KB Output is correct
75 Correct 69 ms 32596 KB Output is correct
76 Correct 44 ms 30548 KB Output is correct
77 Correct 54 ms 31680 KB Output is correct
78 Correct 74 ms 32524 KB Output is correct
79 Correct 28 ms 26364 KB Output is correct
80 Correct 29 ms 26096 KB Output is correct
81 Correct 45 ms 31976 KB Output is correct
82 Correct 40 ms 30844 KB Output is correct
83 Correct 64 ms 33104 KB Output is correct
84 Correct 53 ms 33104 KB Output is correct
85 Correct 49 ms 29456 KB Output is correct
86 Correct 56 ms 30868 KB Output is correct
87 Correct 55 ms 30996 KB Output is correct
88 Correct 61 ms 32196 KB Output is correct
89 Correct 41 ms 28696 KB Output is correct
90 Correct 57 ms 31056 KB Output is correct
91 Correct 48 ms 28756 KB Output is correct
92 Correct 48 ms 28500 KB Output is correct
93 Correct 69 ms 31092 KB Output is correct
94 Correct 56 ms 31072 KB Output is correct
95 Correct 55 ms 30852 KB Output is correct
96 Correct 56 ms 31068 KB Output is correct
97 Correct 57 ms 31208 KB Output is correct
98 Correct 60 ms 29264 KB Output is correct
99 Correct 38 ms 30712 KB Output is correct
100 Correct 45 ms 30036 KB Output is correct
101 Correct 53 ms 31728 KB Output is correct
102 Correct 54 ms 33476 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 10 ms 22108 KB Output is correct
2 Correct 10 ms 22108 KB Output is correct
3 Correct 10 ms 22108 KB Output is correct
4 Correct 11 ms 22108 KB Output is correct
5 Correct 10 ms 22108 KB Output is correct
6 Correct 13 ms 22108 KB Output is correct
7 Correct 10 ms 22104 KB Output is correct
8 Correct 11 ms 22264 KB Output is correct
9 Correct 10 ms 22108 KB Output is correct
10 Correct 10 ms 22108 KB Output is correct
11 Correct 10 ms 22108 KB Output is correct
12 Correct 10 ms 22108 KB Output is correct
13 Correct 10 ms 22108 KB Output is correct
14 Correct 11 ms 22256 KB Output is correct
15 Correct 10 ms 22152 KB Output is correct
16 Correct 10 ms 22048 KB Output is correct
17 Correct 10 ms 22084 KB Output is correct
18 Correct 11 ms 22236 KB Output is correct
19 Correct 11 ms 22108 KB Output is correct
20 Correct 11 ms 22364 KB Output is correct
21 Correct 10 ms 22108 KB Output is correct
22 Correct 11 ms 22260 KB Output is correct
23 Correct 12 ms 22108 KB Output is correct
24 Correct 11 ms 22104 KB Output is correct
25 Correct 9 ms 22108 KB Output is correct
26 Correct 10 ms 22108 KB Output is correct
27 Correct 13 ms 22192 KB Output is correct
28 Correct 12 ms 22108 KB Output is correct
29 Correct 11 ms 22264 KB Output is correct
30 Correct 12 ms 22268 KB Output is correct
31 Correct 10 ms 22108 KB Output is correct
32 Correct 10 ms 22108 KB Output is correct
33 Correct 10 ms 22108 KB Output is correct
34 Correct 11 ms 22108 KB Output is correct
35 Correct 14 ms 22364 KB Output is correct
36 Correct 10 ms 22108 KB Output is correct
37 Correct 10 ms 22108 KB Output is correct
38 Correct 10 ms 22364 KB Output is correct
39 Correct 47 ms 30056 KB Output is correct
40 Correct 50 ms 31300 KB Output is correct
41 Correct 52 ms 30036 KB Output is correct
42 Correct 46 ms 30032 KB Output is correct
43 Correct 49 ms 31128 KB Output is correct
44 Correct 48 ms 31316 KB Output is correct
45 Correct 25 ms 25088 KB Output is correct
46 Correct 27 ms 25156 KB Output is correct
47 Correct 47 ms 30292 KB Output is correct
48 Correct 47 ms 30368 KB Output is correct
49 Correct 51 ms 30392 KB Output is correct
50 Correct 48 ms 30292 KB Output is correct
51 Correct 45 ms 29780 KB Output is correct
52 Correct 52 ms 31568 KB Output is correct
53 Correct 51 ms 32592 KB Output is correct
54 Correct 53 ms 33724 KB Output is correct
55 Correct 212 ms 53336 KB Output is correct
56 Correct 165 ms 47896 KB Output is correct
57 Correct 259 ms 56612 KB Output is correct
58 Correct 201 ms 54716 KB Output is correct
59 Correct 182 ms 50868 KB Output is correct
60 Correct 276 ms 61040 KB Output is correct
61 Correct 76 ms 36324 KB Output is correct
62 Correct 77 ms 34948 KB Output is correct
63 Correct 264 ms 62540 KB Output is correct
64 Correct 246 ms 62292 KB Output is correct
65 Correct 235 ms 57428 KB Output is correct
66 Correct 261 ms 57220 KB Output is correct
67 Correct 230 ms 57164 KB Output is correct
68 Correct 250 ms 57320 KB Output is correct
69 Correct 258 ms 57128 KB Output is correct
70 Correct 243 ms 57576 KB Output is correct
71 Correct 265 ms 57184 KB Output is correct
72 Correct 247 ms 57276 KB Output is correct
73 Correct 236 ms 57396 KB Output is correct
74 Correct 252 ms 57324 KB Output is correct
75 Correct 240 ms 57168 KB Output is correct
76 Correct 227 ms 57428 KB Output is correct
77 Correct 272 ms 57172 KB Output is correct
78 Correct 241 ms 57432 KB Output is correct
79 Correct 180 ms 55000 KB Output is correct
80 Correct 196 ms 59552 KB Output is correct
81 Correct 199 ms 65448 KB Output is correct
82 Correct 47 ms 29520 KB Output is correct
83 Correct 50 ms 30036 KB Output is correct
84 Correct 22 ms 24880 KB Output is correct
85 Correct 26 ms 25440 KB Output is correct
86 Correct 53 ms 30556 KB Output is correct
87 Correct 55 ms 30544 KB Output is correct
88 Correct 54 ms 30512 KB Output is correct
89 Correct 54 ms 30536 KB Output is correct
90 Correct 56 ms 30512 KB Output is correct
91 Correct 56 ms 30544 KB Output is correct
92 Correct 34 ms 30120 KB Output is correct
93 Correct 49 ms 31260 KB Output is correct
94 Correct 40 ms 27984 KB Output is correct
95 Correct 48 ms 30036 KB Output is correct
96 Correct 54 ms 30792 KB Output is correct
97 Correct 54 ms 30544 KB Output is correct
98 Correct 44 ms 31576 KB Output is correct
99 Correct 53 ms 33876 KB Output is correct
100 Correct 64 ms 31864 KB Output is correct
101 Correct 61 ms 31832 KB Output is correct
102 Correct 69 ms 32596 KB Output is correct
103 Correct 44 ms 30548 KB Output is correct
104 Correct 54 ms 31680 KB Output is correct
105 Correct 74 ms 32524 KB Output is correct
106 Correct 28 ms 26364 KB Output is correct
107 Correct 29 ms 26096 KB Output is correct
108 Correct 45 ms 31976 KB Output is correct
109 Correct 40 ms 30844 KB Output is correct
110 Correct 64 ms 33104 KB Output is correct
111 Correct 53 ms 33104 KB Output is correct
112 Correct 49 ms 29456 KB Output is correct
113 Correct 56 ms 30868 KB Output is correct
114 Correct 55 ms 30996 KB Output is correct
115 Correct 61 ms 32196 KB Output is correct
116 Correct 41 ms 28696 KB Output is correct
117 Correct 57 ms 31056 KB Output is correct
118 Correct 48 ms 28756 KB Output is correct
119 Correct 48 ms 28500 KB Output is correct
120 Correct 69 ms 31092 KB Output is correct
121 Correct 56 ms 31072 KB Output is correct
122 Correct 55 ms 30852 KB Output is correct
123 Correct 56 ms 31068 KB Output is correct
124 Correct 57 ms 31208 KB Output is correct
125 Correct 60 ms 29264 KB Output is correct
126 Correct 38 ms 30712 KB Output is correct
127 Correct 45 ms 30036 KB Output is correct
128 Correct 53 ms 31728 KB Output is correct
129 Correct 54 ms 33476 KB Output is correct
130 Correct 270 ms 56696 KB Output is correct
131 Correct 184 ms 47696 KB Output is correct
132 Correct 233 ms 57048 KB Output is correct
133 Correct 261 ms 60240 KB Output is correct
134 Correct 229 ms 57520 KB Output is correct
135 Correct 313 ms 61700 KB Output is correct
136 Correct 258 ms 63056 KB Output is correct
137 Correct 276 ms 63124 KB Output is correct
138 Correct 246 ms 58024 KB Output is correct
139 Correct 249 ms 57856 KB Output is correct
140 Correct 239 ms 58100 KB Output is correct
141 Correct 238 ms 57820 KB Output is correct
142 Correct 238 ms 57796 KB Output is correct
143 Correct 262 ms 57964 KB Output is correct
144 Correct 239 ms 57876 KB Output is correct
145 Correct 257 ms 57936 KB Output is correct
146 Correct 233 ms 57788 KB Output is correct
147 Correct 245 ms 57864 KB Output is correct
148 Correct 235 ms 57744 KB Output is correct
149 Correct 253 ms 57944 KB Output is correct
150 Correct 127 ms 55380 KB Output is correct
151 Correct 210 ms 59984 KB Output is correct
152 Correct 194 ms 60116 KB Output is correct
153 Correct 234 ms 66356 KB Output is correct