Submission #1032009

# Submission time Handle Problem Language Result Execution time Memory
1032009 2024-07-23T09:55:50 Z AdamGS Food Court (JOI21_foodcourt) C++17
100 / 100
284 ms 61008 KB
#include<bits/stdc++.h>
using namespace std;
typedef long double ld;
typedef long long ll;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
const ll INF=1e18+7;
const int LIM=25e4+7;
struct pyt {
  ll t=0, l=0, r=0, a=0, b=0;
};
pyt T[LIM];
vector<int>dodaj[LIM], usun[LIM], odp[LIM];
ll tr1[4*LIM], tr2[4*LIM], lazya[4*LIM], lazyb[4*LIM], wynik[LIM], N=1;
void upd1(int l, int r, ll x) {
  if(l>r) return;
  l+=N; r+=N;
  tr1[l]+=x;
  if(l!=r) tr1[r]+=x;
  while(l/2!=r/2) {
    if(l%2==0) tr1[l+1]+=x;
    if(r%2==1) tr1[r-1]+=x;
    l/=2; r/=2;
  }
}
ll cnt1(int v) {
  v+=N;
  ll ans=0;
  while(v) {
    ans+=tr1[v];
    v/=2;
  }
  return ans;
}
void spl(int v) {
  lazya[2*v]+=lazya[v];
  lazyb[2*v]=max(lazyb[2*v]+lazya[v], lazyb[v]);
  lazya[2*v+1]+=lazya[v];
  lazyb[2*v+1]=max(lazyb[2*v+1]+lazya[v], lazyb[v]);
  lazya[v]=0;
  lazyb[v]=-INF;
}
void upd2(int v, int l, int r, int a, int b, ll x, ll y) {
  if(r<a || b<l) return;
  if(a<=l && r<=b) {
    lazya[v]+=x;
    lazyb[v]=max(lazyb[v]+x, y);
    return;
  }
  spl(v);
  int mid=(l+r)/2;
  upd2(2*v, l, mid, a, b, x, y);
  upd2(2*v+1, mid+1, r, a, b, x, y);
}
ll cnt2(int v, int l, int r, int x) {
  if(r<x || x<l) return 0;
  if(l==r) return max(lazya[v], lazyb[v]);
  spl(v);
  int mid=(l+r)/2;
  return cnt2(2*v, l, mid, x)+cnt2(2*v+1, mid+1, r, x);
}
void upd3(int v, ll x) {
  v+=N;
  while(v) {
    tr2[v]+=x;
    v/=2;
  }
}
ll zejdz(ll k) {
  int v=1;
  while(v<N) {
    v*=2;
    if(tr2[v]<k) {
      k-=tr2[v];
      ++v;
    }
  }
  return v-N;
}
int main() {
  ios_base::sync_with_stdio(0); cin.tie(0);
  int n, m, q;
  cin >> n >> m >> q;
  while(N<max(n, q)) N*=2;
  rep(i, q) {
    cin >> T[i].t;
    if(T[i].t==1) {
      cin >> T[i].l >> T[i].r >> T[i].a >> T[i].b;
      --T[i].l; --T[i].r;
      dodaj[T[i].l].pb(i);
      usun[T[i].r].pb(i);
      upd1(T[i].l, T[i].r, T[i].b);
      upd2(1, 0, N-1, T[i].l, T[i].r, T[i].b, 0);
    } else if(T[i].t==2) {
      cin >> T[i].l >> T[i].r >> T[i].a;
      --T[i].l; --T[i].r;
      upd2(1, 0, N-1, T[i].l, T[i].r, -T[i].a, 0);
    } else {
      cin >> T[i].a >> T[i].b;
      --T[i].a;
      ll x=cnt1(T[i].a), y=cnt2(1, 0, N-1, T[i].a);
      if(y<T[i].b) continue;
      T[i].l=x-y+T[i].b;
      odp[T[i].a].pb(i);
    }
  }
  rep(i, n) {
    for(auto j : dodaj[i]) upd3(j, T[j].b);
    for(auto j : odp[i]) {
      ll x=zejdz(T[j].l);
      wynik[j]=T[x].a;
    }
    for(auto j : usun[i]) upd3(j, -T[j].b);
  }
  rep(i, q) if(T[i].t==3) cout << wynik[i] << '\n';
}
# Verdict Execution time Memory Grader output
1 Correct 7 ms 18264 KB Output is correct
2 Correct 7 ms 18268 KB Output is correct
3 Correct 7 ms 18264 KB Output is correct
4 Correct 8 ms 18268 KB Output is correct
5 Correct 7 ms 18264 KB Output is correct
6 Correct 7 ms 18156 KB Output is correct
7 Correct 8 ms 18264 KB Output is correct
8 Correct 8 ms 18268 KB Output is correct
9 Correct 7 ms 18288 KB Output is correct
10 Correct 8 ms 18268 KB Output is correct
11 Correct 8 ms 18184 KB Output is correct
12 Correct 8 ms 18268 KB Output is correct
13 Correct 7 ms 18268 KB Output is correct
14 Correct 8 ms 18264 KB Output is correct
15 Correct 7 ms 18268 KB Output is correct
16 Correct 7 ms 18268 KB Output is correct
17 Correct 8 ms 18280 KB Output is correct
18 Correct 7 ms 18264 KB Output is correct
19 Correct 10 ms 18300 KB Output is correct
20 Correct 8 ms 18268 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 7 ms 18264 KB Output is correct
2 Correct 7 ms 18268 KB Output is correct
3 Correct 7 ms 18264 KB Output is correct
4 Correct 8 ms 18268 KB Output is correct
5 Correct 7 ms 18264 KB Output is correct
6 Correct 7 ms 18156 KB Output is correct
7 Correct 8 ms 18264 KB Output is correct
8 Correct 8 ms 18268 KB Output is correct
9 Correct 7 ms 18288 KB Output is correct
10 Correct 8 ms 18268 KB Output is correct
11 Correct 8 ms 18184 KB Output is correct
12 Correct 8 ms 18268 KB Output is correct
13 Correct 7 ms 18268 KB Output is correct
14 Correct 8 ms 18264 KB Output is correct
15 Correct 7 ms 18268 KB Output is correct
16 Correct 7 ms 18268 KB Output is correct
17 Correct 8 ms 18280 KB Output is correct
18 Correct 7 ms 18264 KB Output is correct
19 Correct 10 ms 18300 KB Output is correct
20 Correct 8 ms 18268 KB Output is correct
21 Correct 7 ms 18268 KB Output is correct
22 Correct 8 ms 18268 KB Output is correct
23 Correct 8 ms 18268 KB Output is correct
24 Correct 8 ms 18356 KB Output is correct
25 Correct 7 ms 18180 KB Output is correct
26 Correct 8 ms 18204 KB Output is correct
27 Correct 9 ms 18268 KB Output is correct
28 Correct 8 ms 18268 KB Output is correct
29 Correct 8 ms 18268 KB Output is correct
30 Correct 8 ms 18268 KB Output is correct
31 Correct 8 ms 18268 KB Output is correct
32 Correct 8 ms 18268 KB Output is correct
33 Correct 7 ms 18268 KB Output is correct
34 Correct 7 ms 18360 KB Output is correct
35 Correct 8 ms 18260 KB Output is correct
36 Correct 7 ms 18268 KB Output is correct
37 Correct 8 ms 18268 KB Output is correct
38 Correct 8 ms 18336 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 44 ms 26960 KB Output is correct
2 Correct 59 ms 27400 KB Output is correct
3 Correct 44 ms 26964 KB Output is correct
4 Correct 43 ms 26912 KB Output is correct
5 Correct 49 ms 27476 KB Output is correct
6 Correct 45 ms 27476 KB Output is correct
7 Correct 28 ms 23040 KB Output is correct
8 Correct 32 ms 23072 KB Output is correct
9 Correct 47 ms 27060 KB Output is correct
10 Correct 44 ms 27220 KB Output is correct
11 Correct 48 ms 27180 KB Output is correct
12 Correct 46 ms 27228 KB Output is correct
13 Correct 45 ms 26344 KB Output is correct
14 Correct 46 ms 27948 KB Output is correct
15 Correct 49 ms 27216 KB Output is correct
16 Correct 48 ms 28596 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 230 ms 53844 KB Output is correct
2 Correct 208 ms 47444 KB Output is correct
3 Correct 251 ms 57448 KB Output is correct
4 Correct 194 ms 50512 KB Output is correct
5 Correct 176 ms 47952 KB Output is correct
6 Correct 268 ms 58192 KB Output is correct
7 Correct 106 ms 39140 KB Output is correct
8 Correct 109 ms 39240 KB Output is correct
9 Correct 274 ms 59476 KB Output is correct
10 Correct 274 ms 59216 KB Output is correct
11 Correct 249 ms 55308 KB Output is correct
12 Correct 237 ms 57240 KB Output is correct
13 Correct 235 ms 55464 KB Output is correct
14 Correct 236 ms 57168 KB Output is correct
15 Correct 236 ms 57168 KB Output is correct
16 Correct 254 ms 57168 KB Output is correct
17 Correct 229 ms 57168 KB Output is correct
18 Correct 236 ms 56048 KB Output is correct
19 Correct 253 ms 57244 KB Output is correct
20 Correct 256 ms 56404 KB Output is correct
21 Correct 237 ms 57172 KB Output is correct
22 Correct 241 ms 57172 KB Output is correct
23 Correct 230 ms 57192 KB Output is correct
24 Correct 248 ms 57328 KB Output is correct
25 Correct 188 ms 47956 KB Output is correct
26 Correct 186 ms 50260 KB Output is correct
27 Correct 198 ms 60060 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 7 ms 18264 KB Output is correct
2 Correct 7 ms 18268 KB Output is correct
3 Correct 7 ms 18264 KB Output is correct
4 Correct 8 ms 18268 KB Output is correct
5 Correct 7 ms 18264 KB Output is correct
6 Correct 7 ms 18156 KB Output is correct
7 Correct 8 ms 18264 KB Output is correct
8 Correct 8 ms 18268 KB Output is correct
9 Correct 7 ms 18288 KB Output is correct
10 Correct 8 ms 18268 KB Output is correct
11 Correct 8 ms 18184 KB Output is correct
12 Correct 8 ms 18268 KB Output is correct
13 Correct 7 ms 18268 KB Output is correct
14 Correct 8 ms 18264 KB Output is correct
15 Correct 7 ms 18268 KB Output is correct
16 Correct 7 ms 18268 KB Output is correct
17 Correct 8 ms 18280 KB Output is correct
18 Correct 7 ms 18264 KB Output is correct
19 Correct 10 ms 18300 KB Output is correct
20 Correct 8 ms 18268 KB Output is correct
21 Correct 44 ms 26960 KB Output is correct
22 Correct 59 ms 27400 KB Output is correct
23 Correct 44 ms 26964 KB Output is correct
24 Correct 43 ms 26912 KB Output is correct
25 Correct 49 ms 27476 KB Output is correct
26 Correct 45 ms 27476 KB Output is correct
27 Correct 28 ms 23040 KB Output is correct
28 Correct 32 ms 23072 KB Output is correct
29 Correct 47 ms 27060 KB Output is correct
30 Correct 44 ms 27220 KB Output is correct
31 Correct 48 ms 27180 KB Output is correct
32 Correct 46 ms 27228 KB Output is correct
33 Correct 45 ms 26344 KB Output is correct
34 Correct 46 ms 27948 KB Output is correct
35 Correct 49 ms 27216 KB Output is correct
36 Correct 48 ms 28596 KB Output is correct
37 Correct 46 ms 26704 KB Output is correct
38 Correct 44 ms 26400 KB Output is correct
39 Correct 25 ms 22288 KB Output is correct
40 Correct 27 ms 22876 KB Output is correct
41 Correct 58 ms 27220 KB Output is correct
42 Correct 52 ms 27728 KB Output is correct
43 Correct 51 ms 27728 KB Output is correct
44 Correct 55 ms 27428 KB Output is correct
45 Correct 50 ms 27732 KB Output is correct
46 Correct 49 ms 27728 KB Output is correct
47 Correct 33 ms 25680 KB Output is correct
48 Correct 48 ms 26024 KB Output is correct
49 Correct 38 ms 24824 KB Output is correct
50 Correct 43 ms 26704 KB Output is correct
51 Correct 54 ms 27732 KB Output is correct
52 Correct 51 ms 27704 KB Output is correct
53 Correct 42 ms 26616 KB Output is correct
54 Correct 48 ms 28428 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 52 ms 27972 KB Output is correct
2 Correct 57 ms 28244 KB Output is correct
3 Correct 62 ms 29012 KB Output is correct
4 Correct 46 ms 26656 KB Output is correct
5 Correct 51 ms 27732 KB Output is correct
6 Correct 61 ms 28756 KB Output is correct
7 Correct 32 ms 23440 KB Output is correct
8 Correct 30 ms 23376 KB Output is correct
9 Correct 51 ms 26708 KB Output is correct
10 Correct 38 ms 24656 KB Output is correct
11 Correct 51 ms 26784 KB Output is correct
12 Correct 53 ms 26800 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 7 ms 18264 KB Output is correct
2 Correct 7 ms 18268 KB Output is correct
3 Correct 7 ms 18264 KB Output is correct
4 Correct 8 ms 18268 KB Output is correct
5 Correct 7 ms 18264 KB Output is correct
6 Correct 7 ms 18156 KB Output is correct
7 Correct 8 ms 18264 KB Output is correct
8 Correct 8 ms 18268 KB Output is correct
9 Correct 7 ms 18288 KB Output is correct
10 Correct 8 ms 18268 KB Output is correct
11 Correct 8 ms 18184 KB Output is correct
12 Correct 8 ms 18268 KB Output is correct
13 Correct 7 ms 18268 KB Output is correct
14 Correct 8 ms 18264 KB Output is correct
15 Correct 7 ms 18268 KB Output is correct
16 Correct 7 ms 18268 KB Output is correct
17 Correct 8 ms 18280 KB Output is correct
18 Correct 7 ms 18264 KB Output is correct
19 Correct 10 ms 18300 KB Output is correct
20 Correct 8 ms 18268 KB Output is correct
21 Correct 7 ms 18268 KB Output is correct
22 Correct 8 ms 18268 KB Output is correct
23 Correct 8 ms 18268 KB Output is correct
24 Correct 8 ms 18356 KB Output is correct
25 Correct 7 ms 18180 KB Output is correct
26 Correct 8 ms 18204 KB Output is correct
27 Correct 9 ms 18268 KB Output is correct
28 Correct 8 ms 18268 KB Output is correct
29 Correct 8 ms 18268 KB Output is correct
30 Correct 8 ms 18268 KB Output is correct
31 Correct 8 ms 18268 KB Output is correct
32 Correct 8 ms 18268 KB Output is correct
33 Correct 7 ms 18268 KB Output is correct
34 Correct 7 ms 18360 KB Output is correct
35 Correct 8 ms 18260 KB Output is correct
36 Correct 7 ms 18268 KB Output is correct
37 Correct 8 ms 18268 KB Output is correct
38 Correct 8 ms 18336 KB Output is correct
39 Correct 44 ms 26960 KB Output is correct
40 Correct 59 ms 27400 KB Output is correct
41 Correct 44 ms 26964 KB Output is correct
42 Correct 43 ms 26912 KB Output is correct
43 Correct 49 ms 27476 KB Output is correct
44 Correct 45 ms 27476 KB Output is correct
45 Correct 28 ms 23040 KB Output is correct
46 Correct 32 ms 23072 KB Output is correct
47 Correct 47 ms 27060 KB Output is correct
48 Correct 44 ms 27220 KB Output is correct
49 Correct 48 ms 27180 KB Output is correct
50 Correct 46 ms 27228 KB Output is correct
51 Correct 45 ms 26344 KB Output is correct
52 Correct 46 ms 27948 KB Output is correct
53 Correct 49 ms 27216 KB Output is correct
54 Correct 48 ms 28596 KB Output is correct
55 Correct 46 ms 26704 KB Output is correct
56 Correct 44 ms 26400 KB Output is correct
57 Correct 25 ms 22288 KB Output is correct
58 Correct 27 ms 22876 KB Output is correct
59 Correct 58 ms 27220 KB Output is correct
60 Correct 52 ms 27728 KB Output is correct
61 Correct 51 ms 27728 KB Output is correct
62 Correct 55 ms 27428 KB Output is correct
63 Correct 50 ms 27732 KB Output is correct
64 Correct 49 ms 27728 KB Output is correct
65 Correct 33 ms 25680 KB Output is correct
66 Correct 48 ms 26024 KB Output is correct
67 Correct 38 ms 24824 KB Output is correct
68 Correct 43 ms 26704 KB Output is correct
69 Correct 54 ms 27732 KB Output is correct
70 Correct 51 ms 27704 KB Output is correct
71 Correct 42 ms 26616 KB Output is correct
72 Correct 48 ms 28428 KB Output is correct
73 Correct 52 ms 27972 KB Output is correct
74 Correct 57 ms 28244 KB Output is correct
75 Correct 62 ms 29012 KB Output is correct
76 Correct 46 ms 26656 KB Output is correct
77 Correct 51 ms 27732 KB Output is correct
78 Correct 61 ms 28756 KB Output is correct
79 Correct 32 ms 23440 KB Output is correct
80 Correct 30 ms 23376 KB Output is correct
81 Correct 51 ms 26708 KB Output is correct
82 Correct 38 ms 24656 KB Output is correct
83 Correct 51 ms 26784 KB Output is correct
84 Correct 53 ms 26800 KB Output is correct
85 Correct 48 ms 26964 KB Output is correct
86 Correct 61 ms 28244 KB Output is correct
87 Correct 55 ms 27472 KB Output is correct
88 Correct 57 ms 28500 KB Output is correct
89 Correct 38 ms 25104 KB Output is correct
90 Correct 53 ms 28240 KB Output is correct
91 Correct 46 ms 25940 KB Output is correct
92 Correct 46 ms 25680 KB Output is correct
93 Correct 54 ms 28268 KB Output is correct
94 Correct 59 ms 28060 KB Output is correct
95 Correct 52 ms 27812 KB Output is correct
96 Correct 53 ms 28240 KB Output is correct
97 Correct 68 ms 28240 KB Output is correct
98 Correct 48 ms 26376 KB Output is correct
99 Correct 40 ms 26392 KB Output is correct
100 Correct 48 ms 25172 KB Output is correct
101 Correct 49 ms 26468 KB Output is correct
102 Correct 51 ms 29008 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 7 ms 18264 KB Output is correct
2 Correct 7 ms 18268 KB Output is correct
3 Correct 7 ms 18264 KB Output is correct
4 Correct 8 ms 18268 KB Output is correct
5 Correct 7 ms 18264 KB Output is correct
6 Correct 7 ms 18156 KB Output is correct
7 Correct 8 ms 18264 KB Output is correct
8 Correct 8 ms 18268 KB Output is correct
9 Correct 7 ms 18288 KB Output is correct
10 Correct 8 ms 18268 KB Output is correct
11 Correct 8 ms 18184 KB Output is correct
12 Correct 8 ms 18268 KB Output is correct
13 Correct 7 ms 18268 KB Output is correct
14 Correct 8 ms 18264 KB Output is correct
15 Correct 7 ms 18268 KB Output is correct
16 Correct 7 ms 18268 KB Output is correct
17 Correct 8 ms 18280 KB Output is correct
18 Correct 7 ms 18264 KB Output is correct
19 Correct 10 ms 18300 KB Output is correct
20 Correct 8 ms 18268 KB Output is correct
21 Correct 7 ms 18268 KB Output is correct
22 Correct 8 ms 18268 KB Output is correct
23 Correct 8 ms 18268 KB Output is correct
24 Correct 8 ms 18356 KB Output is correct
25 Correct 7 ms 18180 KB Output is correct
26 Correct 8 ms 18204 KB Output is correct
27 Correct 9 ms 18268 KB Output is correct
28 Correct 8 ms 18268 KB Output is correct
29 Correct 8 ms 18268 KB Output is correct
30 Correct 8 ms 18268 KB Output is correct
31 Correct 8 ms 18268 KB Output is correct
32 Correct 8 ms 18268 KB Output is correct
33 Correct 7 ms 18268 KB Output is correct
34 Correct 7 ms 18360 KB Output is correct
35 Correct 8 ms 18260 KB Output is correct
36 Correct 7 ms 18268 KB Output is correct
37 Correct 8 ms 18268 KB Output is correct
38 Correct 8 ms 18336 KB Output is correct
39 Correct 44 ms 26960 KB Output is correct
40 Correct 59 ms 27400 KB Output is correct
41 Correct 44 ms 26964 KB Output is correct
42 Correct 43 ms 26912 KB Output is correct
43 Correct 49 ms 27476 KB Output is correct
44 Correct 45 ms 27476 KB Output is correct
45 Correct 28 ms 23040 KB Output is correct
46 Correct 32 ms 23072 KB Output is correct
47 Correct 47 ms 27060 KB Output is correct
48 Correct 44 ms 27220 KB Output is correct
49 Correct 48 ms 27180 KB Output is correct
50 Correct 46 ms 27228 KB Output is correct
51 Correct 45 ms 26344 KB Output is correct
52 Correct 46 ms 27948 KB Output is correct
53 Correct 49 ms 27216 KB Output is correct
54 Correct 48 ms 28596 KB Output is correct
55 Correct 230 ms 53844 KB Output is correct
56 Correct 208 ms 47444 KB Output is correct
57 Correct 251 ms 57448 KB Output is correct
58 Correct 194 ms 50512 KB Output is correct
59 Correct 176 ms 47952 KB Output is correct
60 Correct 268 ms 58192 KB Output is correct
61 Correct 106 ms 39140 KB Output is correct
62 Correct 109 ms 39240 KB Output is correct
63 Correct 274 ms 59476 KB Output is correct
64 Correct 274 ms 59216 KB Output is correct
65 Correct 249 ms 55308 KB Output is correct
66 Correct 237 ms 57240 KB Output is correct
67 Correct 235 ms 55464 KB Output is correct
68 Correct 236 ms 57168 KB Output is correct
69 Correct 236 ms 57168 KB Output is correct
70 Correct 254 ms 57168 KB Output is correct
71 Correct 229 ms 57168 KB Output is correct
72 Correct 236 ms 56048 KB Output is correct
73 Correct 253 ms 57244 KB Output is correct
74 Correct 256 ms 56404 KB Output is correct
75 Correct 237 ms 57172 KB Output is correct
76 Correct 241 ms 57172 KB Output is correct
77 Correct 230 ms 57192 KB Output is correct
78 Correct 248 ms 57328 KB Output is correct
79 Correct 188 ms 47956 KB Output is correct
80 Correct 186 ms 50260 KB Output is correct
81 Correct 198 ms 60060 KB Output is correct
82 Correct 46 ms 26704 KB Output is correct
83 Correct 44 ms 26400 KB Output is correct
84 Correct 25 ms 22288 KB Output is correct
85 Correct 27 ms 22876 KB Output is correct
86 Correct 58 ms 27220 KB Output is correct
87 Correct 52 ms 27728 KB Output is correct
88 Correct 51 ms 27728 KB Output is correct
89 Correct 55 ms 27428 KB Output is correct
90 Correct 50 ms 27732 KB Output is correct
91 Correct 49 ms 27728 KB Output is correct
92 Correct 33 ms 25680 KB Output is correct
93 Correct 48 ms 26024 KB Output is correct
94 Correct 38 ms 24824 KB Output is correct
95 Correct 43 ms 26704 KB Output is correct
96 Correct 54 ms 27732 KB Output is correct
97 Correct 51 ms 27704 KB Output is correct
98 Correct 42 ms 26616 KB Output is correct
99 Correct 48 ms 28428 KB Output is correct
100 Correct 52 ms 27972 KB Output is correct
101 Correct 57 ms 28244 KB Output is correct
102 Correct 62 ms 29012 KB Output is correct
103 Correct 46 ms 26656 KB Output is correct
104 Correct 51 ms 27732 KB Output is correct
105 Correct 61 ms 28756 KB Output is correct
106 Correct 32 ms 23440 KB Output is correct
107 Correct 30 ms 23376 KB Output is correct
108 Correct 51 ms 26708 KB Output is correct
109 Correct 38 ms 24656 KB Output is correct
110 Correct 51 ms 26784 KB Output is correct
111 Correct 53 ms 26800 KB Output is correct
112 Correct 48 ms 26964 KB Output is correct
113 Correct 61 ms 28244 KB Output is correct
114 Correct 55 ms 27472 KB Output is correct
115 Correct 57 ms 28500 KB Output is correct
116 Correct 38 ms 25104 KB Output is correct
117 Correct 53 ms 28240 KB Output is correct
118 Correct 46 ms 25940 KB Output is correct
119 Correct 46 ms 25680 KB Output is correct
120 Correct 54 ms 28268 KB Output is correct
121 Correct 59 ms 28060 KB Output is correct
122 Correct 52 ms 27812 KB Output is correct
123 Correct 53 ms 28240 KB Output is correct
124 Correct 68 ms 28240 KB Output is correct
125 Correct 48 ms 26376 KB Output is correct
126 Correct 40 ms 26392 KB Output is correct
127 Correct 48 ms 25172 KB Output is correct
128 Correct 49 ms 26468 KB Output is correct
129 Correct 51 ms 29008 KB Output is correct
130 Correct 238 ms 57680 KB Output is correct
131 Correct 177 ms 47444 KB Output is correct
132 Correct 260 ms 57936 KB Output is correct
133 Correct 269 ms 57424 KB Output is correct
134 Correct 275 ms 54864 KB Output is correct
135 Correct 284 ms 59212 KB Output is correct
136 Correct 272 ms 60240 KB Output is correct
137 Correct 272 ms 60060 KB Output is correct
138 Correct 231 ms 55892 KB Output is correct
139 Correct 239 ms 57868 KB Output is correct
140 Correct 242 ms 56640 KB Output is correct
141 Correct 239 ms 57800 KB Output is correct
142 Correct 257 ms 57684 KB Output is correct
143 Correct 240 ms 57688 KB Output is correct
144 Correct 225 ms 56656 KB Output is correct
145 Correct 225 ms 57776 KB Output is correct
146 Correct 251 ms 57324 KB Output is correct
147 Correct 284 ms 57684 KB Output is correct
148 Correct 246 ms 57688 KB Output is correct
149 Correct 244 ms 57812 KB Output is correct
150 Correct 137 ms 49984 KB Output is correct
151 Correct 209 ms 50840 KB Output is correct
152 Correct 195 ms 50776 KB Output is correct
153 Correct 227 ms 61008 KB Output is correct