Submission #1036328

# Submission time Handle Problem Language Result Execution time Memory
1036328 2024-07-27T08:54:20 Z aymanrs Radio Towers (IOI22_towers) C++17
58 / 100
4000 ms 24768 KB
#include "towers.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> pr, h;
const int K = 17;
vector<pair<int, int>> sp[K];
vector<int> spm[K];
vector<int> ds;
inline int msb(int x){
    return 31-__builtin_clz(x);
}
int que(int l, int r){
  int d = msb(r-l+1);
  return max(sp[d][l], sp[d][r-(1<<d)+1]).second;
}
int qum(int l, int r){
  int d = msb(r-l+1);
  return min(spm[d][l], spm[d][r-(1<<d)+1]);
}
bool sub1 = true;
int th;
void init(int N, std::vector<int> H) {
  h = H;
  pr.resize(N);
  pr[0]=0;
  auto mx = max_element(h.begin(), h.end());
  th = mx-h.begin();
  if(is_sorted(h.begin(), mx) && is_sorted(mx, h.end(), greater<int>())) {
    sub1=true;
  }
  else sub1=false;
  int l[N], r[N], p[N];
  for(int i = 0;i < K;i++) {
    sp[i].resize(N);
    spm[i].resize(N);
  }
  for(int i = 0;i < N;i++){
    l[i]=i;
    while(l[i]&&H[l[i]-1]<H[i]) l[i]=l[l[i]-1];
    sp[0][i] = {H[i], i};spm[0][i]=H[i];
  }
  for(int i = N-1;i >= 0;i--){
    r[i]=i;
    while(r[i]<N-1&&H[r[i]+1]<H[i]) r[i]=r[r[i]+1];
    if(i==th) continue;
    if(!l[i] || (r[i]<N-1&&H[l[i]-1]>H[r[i]+1])){
      p[i] = r[i]+1;
    } else {
      p[i]= l[i]-1;
    }
  }
  for(int k = 1;k < K;k++){
    for(int i = 0;i+(1<<k)<=N;i++){
      sp[k][i] = max(sp[k-1][i], sp[k-1][i+(1<<k-1)]);
      spm[k][i] = min(spm[k-1][i], spm[k-1][i+(1<<k-1)]);
    }
  }
  vector<pair<int, int>> D;
  bool mark[N] = {false};
  mark[th] = true;
  for(int i = 0;i < N;i++){
    if(i==th) continue;
    D.push_back({H[p[i]]-qum(l[i], r[i]), i});
  }
  sort(D.begin(), D.end(), greater<pair<int, int>>());
  for(auto [d, i] : D){
    mark[i] = true;
    if(mark[p[i]]) {
      mark[p[i]] = false;
    } else ds.push_back(d);
  }
  for(int i = 1;i < N-1;i++){
    pr[i]=pr[i-1];
    if(H[i] < H[i-1] && H[i] < H[i+1]) pr[i]++;
  }
}
int de;
int ans(int l, int r, int atm){
  if(l==r){
    if(h[l]<=atm) return 1;
    return 0;
  }
  int m = que(l, r);
  if(l==m) return ans(l+1, r, atm);
  if(m==r) return ans(l, r-1, atm);
  return max(ans(l, m-1, h[m]-de)+ans(m+1, r, h[m]-de), (qum(l,r) <= atm ? 1 : 0));
}
int max_towers(int L, int R, int D) {
  if(sub1){
    if(L>th || R < th) return 1;
    return (h[R] <= h[th]-D && h[L] <= h[th]-D ? 2 : 1);
  }
  if(!L && R == h.size()-1){
    return 1+lower_bound(ds.begin(), ds.end(), D-1, greater<int>())-ds.begin();
  }
  de = D;
  if(L+1>=R) return 1;
  if(D==1) return pr[R-1]-pr[L]+(h[L] < h[L+1])+(h[R]<h[R-1]);
  return ans(L, R, INT_MAX);
}

Compilation message

towers.cpp: In function 'void init(int, std::vector<int>)':
towers.cpp:54:49: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
   54 |       sp[k][i] = max(sp[k-1][i], sp[k-1][i+(1<<k-1)]);
      |                                                ~^~
towers.cpp:55:52: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
   55 |       spm[k][i] = min(spm[k-1][i], spm[k-1][i+(1<<k-1)]);
      |                                                   ~^~
towers.cpp: In function 'int max_towers(int, int, int)':
towers.cpp:93:14: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   93 |   if(!L && R == h.size()-1){
      |            ~~^~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 257 ms 14548 KB Output is correct
2 Correct 618 ms 24272 KB Output is correct
3 Correct 607 ms 24264 KB Output is correct
4 Correct 589 ms 24272 KB Output is correct
5 Correct 637 ms 24272 KB Output is correct
6 Correct 547 ms 24248 KB Output is correct
7 Correct 634 ms 24272 KB Output is correct
8 Correct 0 ms 344 KB Output is correct
9 Correct 1 ms 856 KB Output is correct
10 Correct 1 ms 856 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 856 KB Output is correct
3 Correct 1 ms 856 KB Output is correct
4 Correct 1 ms 856 KB Output is correct
5 Correct 1 ms 856 KB Output is correct
6 Correct 1 ms 856 KB Output is correct
7 Correct 1 ms 856 KB Output is correct
8 Correct 1 ms 856 KB Output is correct
9 Correct 2 ms 856 KB Output is correct
10 Correct 1 ms 856 KB Output is correct
11 Correct 1 ms 856 KB Output is correct
12 Correct 0 ms 344 KB Output is correct
13 Correct 1 ms 856 KB Output is correct
14 Correct 1 ms 856 KB Output is correct
15 Correct 1 ms 856 KB Output is correct
16 Correct 1 ms 856 KB Output is correct
17 Correct 1 ms 856 KB Output is correct
18 Correct 1 ms 856 KB Output is correct
19 Correct 1 ms 856 KB Output is correct
20 Correct 1 ms 856 KB Output is correct
21 Correct 1 ms 856 KB Output is correct
22 Correct 1 ms 856 KB Output is correct
23 Correct 1 ms 856 KB Output is correct
24 Correct 1 ms 856 KB Output is correct
25 Correct 0 ms 600 KB Output is correct
26 Correct 1 ms 856 KB Output is correct
27 Correct 1 ms 856 KB Output is correct
28 Correct 1 ms 856 KB Output is correct
29 Correct 1 ms 856 KB Output is correct
30 Correct 1 ms 856 KB Output is correct
31 Correct 1 ms 856 KB Output is correct
32 Correct 1 ms 856 KB Output is correct
33 Correct 1 ms 856 KB Output is correct
34 Correct 1 ms 856 KB Output is correct
35 Correct 1 ms 856 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 856 KB Output is correct
3 Correct 1 ms 856 KB Output is correct
4 Correct 1 ms 856 KB Output is correct
5 Correct 1 ms 856 KB Output is correct
6 Correct 1 ms 856 KB Output is correct
7 Correct 1 ms 856 KB Output is correct
8 Correct 1 ms 856 KB Output is correct
9 Correct 2 ms 856 KB Output is correct
10 Correct 1 ms 856 KB Output is correct
11 Correct 1 ms 856 KB Output is correct
12 Correct 0 ms 344 KB Output is correct
13 Correct 1 ms 856 KB Output is correct
14 Correct 1 ms 856 KB Output is correct
15 Correct 1 ms 856 KB Output is correct
16 Correct 1 ms 856 KB Output is correct
17 Correct 1 ms 856 KB Output is correct
18 Correct 1 ms 856 KB Output is correct
19 Correct 1 ms 856 KB Output is correct
20 Correct 1 ms 856 KB Output is correct
21 Correct 1 ms 856 KB Output is correct
22 Correct 1 ms 856 KB Output is correct
23 Correct 1 ms 856 KB Output is correct
24 Correct 1 ms 856 KB Output is correct
25 Correct 0 ms 600 KB Output is correct
26 Correct 1 ms 856 KB Output is correct
27 Correct 1 ms 856 KB Output is correct
28 Correct 1 ms 856 KB Output is correct
29 Correct 1 ms 856 KB Output is correct
30 Correct 1 ms 856 KB Output is correct
31 Correct 1 ms 856 KB Output is correct
32 Correct 1 ms 856 KB Output is correct
33 Correct 1 ms 856 KB Output is correct
34 Correct 1 ms 856 KB Output is correct
35 Correct 1 ms 856 KB Output is correct
36 Correct 20 ms 16080 KB Output is correct
37 Correct 32 ms 24244 KB Output is correct
38 Correct 30 ms 24328 KB Output is correct
39 Correct 36 ms 24516 KB Output is correct
40 Correct 32 ms 24524 KB Output is correct
41 Correct 31 ms 24360 KB Output is correct
42 Correct 29 ms 24512 KB Output is correct
43 Correct 21 ms 24252 KB Output is correct
44 Correct 28 ms 24260 KB Output is correct
45 Correct 24 ms 24264 KB Output is correct
46 Correct 24 ms 24272 KB Output is correct
47 Correct 30 ms 24264 KB Output is correct
48 Correct 29 ms 24288 KB Output is correct
49 Correct 35 ms 24512 KB Output is correct
50 Correct 28 ms 24336 KB Output is correct
51 Correct 22 ms 24272 KB Output is correct
52 Correct 30 ms 24272 KB Output is correct
53 Correct 29 ms 24524 KB Output is correct
54 Correct 29 ms 24468 KB Output is correct
55 Correct 22 ms 24272 KB Output is correct
56 Correct 30 ms 24272 KB Output is correct
57 Correct 29 ms 23556 KB Output is correct
58 Correct 31 ms 24272 KB Output is correct
59 Correct 38 ms 24264 KB Output is correct
60 Correct 29 ms 24524 KB Output is correct
61 Correct 36 ms 24460 KB Output is correct
62 Correct 29 ms 24524 KB Output is correct
63 Correct 29 ms 24524 KB Output is correct
64 Correct 21 ms 24384 KB Output is correct
65 Correct 21 ms 24272 KB Output is correct
66 Correct 23 ms 24272 KB Output is correct
67 Correct 23 ms 24272 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 495 ms 24008 KB Output is correct
2 Correct 567 ms 24264 KB Output is correct
3 Correct 661 ms 24272 KB Output is correct
4 Correct 635 ms 24312 KB Output is correct
5 Correct 581 ms 24768 KB Output is correct
6 Correct 656 ms 24516 KB Output is correct
7 Correct 620 ms 24516 KB Output is correct
8 Correct 556 ms 24272 KB Output is correct
9 Correct 607 ms 24264 KB Output is correct
10 Correct 602 ms 24272 KB Output is correct
11 Correct 577 ms 24272 KB Output is correct
12 Correct 620 ms 24272 KB Output is correct
13 Correct 633 ms 24272 KB Output is correct
14 Correct 0 ms 344 KB Output is correct
15 Correct 1 ms 856 KB Output is correct
16 Correct 1 ms 856 KB Output is correct
17 Correct 31 ms 24356 KB Output is correct
18 Correct 29 ms 24524 KB Output is correct
19 Correct 30 ms 24516 KB Output is correct
20 Correct 24 ms 24236 KB Output is correct
21 Correct 22 ms 24272 KB Output is correct
22 Correct 31 ms 24272 KB Output is correct
23 Correct 30 ms 24492 KB Output is correct
24 Correct 33 ms 24472 KB Output is correct
25 Correct 23 ms 24272 KB Output is correct
26 Correct 25 ms 24272 KB Output is correct
27 Correct 1 ms 856 KB Output is correct
28 Correct 1 ms 856 KB Output is correct
29 Correct 1 ms 856 KB Output is correct
30 Correct 1 ms 856 KB Output is correct
31 Correct 1 ms 856 KB Output is correct
32 Correct 1 ms 856 KB Output is correct
33 Correct 1 ms 856 KB Output is correct
34 Correct 1 ms 856 KB Output is correct
35 Correct 1 ms 856 KB Output is correct
36 Correct 1 ms 716 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 196 ms 6232 KB Output is correct
2 Correct 644 ms 24264 KB Output is correct
3 Correct 514 ms 24264 KB Output is correct
4 Correct 600 ms 24516 KB Output is correct
5 Correct 592 ms 24524 KB Output is correct
6 Correct 599 ms 24524 KB Output is correct
7 Correct 624 ms 24524 KB Output is correct
8 Correct 626 ms 24264 KB Output is correct
9 Correct 639 ms 24332 KB Output is correct
10 Correct 577 ms 24240 KB Output is correct
11 Correct 552 ms 24272 KB Output is correct
12 Correct 32 ms 24352 KB Output is correct
13 Correct 35 ms 24516 KB Output is correct
14 Correct 35 ms 24348 KB Output is correct
15 Correct 22 ms 24264 KB Output is correct
16 Correct 27 ms 24272 KB Output is correct
17 Correct 33 ms 23496 KB Output is correct
18 Correct 39 ms 24248 KB Output is correct
19 Correct 31 ms 24264 KB Output is correct
20 Correct 30 ms 24524 KB Output is correct
21 Correct 26 ms 24516 KB Output is correct
22 Correct 25 ms 24524 KB Output is correct
23 Correct 24 ms 24524 KB Output is correct
24 Correct 18 ms 24272 KB Output is correct
25 Correct 24 ms 24264 KB Output is correct
26 Correct 20 ms 24272 KB Output is correct
27 Correct 20 ms 24396 KB Output is correct
28 Correct 1 ms 856 KB Output is correct
29 Correct 0 ms 856 KB Output is correct
30 Correct 1 ms 684 KB Output is correct
31 Correct 1 ms 856 KB Output is correct
32 Correct 1 ms 856 KB Output is correct
33 Correct 0 ms 600 KB Output is correct
34 Correct 1 ms 856 KB Output is correct
35 Correct 1 ms 856 KB Output is correct
36 Correct 1 ms 856 KB Output is correct
37 Correct 1 ms 856 KB Output is correct
38 Correct 1 ms 856 KB Output is correct
39 Correct 1 ms 856 KB Output is correct
40 Correct 0 ms 856 KB Output is correct
41 Correct 0 ms 856 KB Output is correct
42 Correct 0 ms 856 KB Output is correct
43 Correct 0 ms 856 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 856 KB Output is correct
3 Correct 1 ms 856 KB Output is correct
4 Correct 1 ms 856 KB Output is correct
5 Correct 1 ms 856 KB Output is correct
6 Correct 1 ms 856 KB Output is correct
7 Correct 1 ms 856 KB Output is correct
8 Correct 1 ms 856 KB Output is correct
9 Correct 2 ms 856 KB Output is correct
10 Correct 1 ms 856 KB Output is correct
11 Correct 1 ms 856 KB Output is correct
12 Correct 0 ms 344 KB Output is correct
13 Correct 1 ms 856 KB Output is correct
14 Correct 1 ms 856 KB Output is correct
15 Correct 1 ms 856 KB Output is correct
16 Correct 1 ms 856 KB Output is correct
17 Correct 1 ms 856 KB Output is correct
18 Correct 1 ms 856 KB Output is correct
19 Correct 1 ms 856 KB Output is correct
20 Correct 1 ms 856 KB Output is correct
21 Correct 1 ms 856 KB Output is correct
22 Correct 1 ms 856 KB Output is correct
23 Correct 1 ms 856 KB Output is correct
24 Correct 1 ms 856 KB Output is correct
25 Correct 0 ms 600 KB Output is correct
26 Correct 1 ms 856 KB Output is correct
27 Correct 1 ms 856 KB Output is correct
28 Correct 1 ms 856 KB Output is correct
29 Correct 1 ms 856 KB Output is correct
30 Correct 1 ms 856 KB Output is correct
31 Correct 1 ms 856 KB Output is correct
32 Correct 1 ms 856 KB Output is correct
33 Correct 1 ms 856 KB Output is correct
34 Correct 1 ms 856 KB Output is correct
35 Correct 1 ms 856 KB Output is correct
36 Correct 20 ms 16080 KB Output is correct
37 Correct 32 ms 24244 KB Output is correct
38 Correct 30 ms 24328 KB Output is correct
39 Correct 36 ms 24516 KB Output is correct
40 Correct 32 ms 24524 KB Output is correct
41 Correct 31 ms 24360 KB Output is correct
42 Correct 29 ms 24512 KB Output is correct
43 Correct 21 ms 24252 KB Output is correct
44 Correct 28 ms 24260 KB Output is correct
45 Correct 24 ms 24264 KB Output is correct
46 Correct 24 ms 24272 KB Output is correct
47 Correct 30 ms 24264 KB Output is correct
48 Correct 29 ms 24288 KB Output is correct
49 Correct 35 ms 24512 KB Output is correct
50 Correct 28 ms 24336 KB Output is correct
51 Correct 22 ms 24272 KB Output is correct
52 Correct 30 ms 24272 KB Output is correct
53 Correct 29 ms 24524 KB Output is correct
54 Correct 29 ms 24468 KB Output is correct
55 Correct 22 ms 24272 KB Output is correct
56 Correct 30 ms 24272 KB Output is correct
57 Correct 29 ms 23556 KB Output is correct
58 Correct 31 ms 24272 KB Output is correct
59 Correct 38 ms 24264 KB Output is correct
60 Correct 29 ms 24524 KB Output is correct
61 Correct 36 ms 24460 KB Output is correct
62 Correct 29 ms 24524 KB Output is correct
63 Correct 29 ms 24524 KB Output is correct
64 Correct 21 ms 24384 KB Output is correct
65 Correct 21 ms 24272 KB Output is correct
66 Correct 23 ms 24272 KB Output is correct
67 Correct 23 ms 24272 KB Output is correct
68 Correct 495 ms 24008 KB Output is correct
69 Correct 567 ms 24264 KB Output is correct
70 Correct 661 ms 24272 KB Output is correct
71 Correct 635 ms 24312 KB Output is correct
72 Correct 581 ms 24768 KB Output is correct
73 Correct 656 ms 24516 KB Output is correct
74 Correct 620 ms 24516 KB Output is correct
75 Correct 556 ms 24272 KB Output is correct
76 Correct 607 ms 24264 KB Output is correct
77 Correct 602 ms 24272 KB Output is correct
78 Correct 577 ms 24272 KB Output is correct
79 Correct 620 ms 24272 KB Output is correct
80 Correct 633 ms 24272 KB Output is correct
81 Correct 0 ms 344 KB Output is correct
82 Correct 1 ms 856 KB Output is correct
83 Correct 1 ms 856 KB Output is correct
84 Correct 31 ms 24356 KB Output is correct
85 Correct 29 ms 24524 KB Output is correct
86 Correct 30 ms 24516 KB Output is correct
87 Correct 24 ms 24236 KB Output is correct
88 Correct 22 ms 24272 KB Output is correct
89 Correct 31 ms 24272 KB Output is correct
90 Correct 30 ms 24492 KB Output is correct
91 Correct 33 ms 24472 KB Output is correct
92 Correct 23 ms 24272 KB Output is correct
93 Correct 25 ms 24272 KB Output is correct
94 Correct 1 ms 856 KB Output is correct
95 Correct 1 ms 856 KB Output is correct
96 Correct 1 ms 856 KB Output is correct
97 Correct 1 ms 856 KB Output is correct
98 Correct 1 ms 856 KB Output is correct
99 Correct 1 ms 856 KB Output is correct
100 Correct 1 ms 856 KB Output is correct
101 Correct 1 ms 856 KB Output is correct
102 Correct 1 ms 856 KB Output is correct
103 Correct 1 ms 716 KB Output is correct
104 Execution timed out 4027 ms 21704 KB Time limit exceeded
105 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 257 ms 14548 KB Output is correct
2 Correct 618 ms 24272 KB Output is correct
3 Correct 607 ms 24264 KB Output is correct
4 Correct 589 ms 24272 KB Output is correct
5 Correct 637 ms 24272 KB Output is correct
6 Correct 547 ms 24248 KB Output is correct
7 Correct 634 ms 24272 KB Output is correct
8 Correct 0 ms 344 KB Output is correct
9 Correct 1 ms 856 KB Output is correct
10 Correct 1 ms 856 KB Output is correct
11 Correct 0 ms 344 KB Output is correct
12 Correct 1 ms 856 KB Output is correct
13 Correct 1 ms 856 KB Output is correct
14 Correct 1 ms 856 KB Output is correct
15 Correct 1 ms 856 KB Output is correct
16 Correct 1 ms 856 KB Output is correct
17 Correct 1 ms 856 KB Output is correct
18 Correct 1 ms 856 KB Output is correct
19 Correct 2 ms 856 KB Output is correct
20 Correct 1 ms 856 KB Output is correct
21 Correct 1 ms 856 KB Output is correct
22 Correct 0 ms 344 KB Output is correct
23 Correct 1 ms 856 KB Output is correct
24 Correct 1 ms 856 KB Output is correct
25 Correct 1 ms 856 KB Output is correct
26 Correct 1 ms 856 KB Output is correct
27 Correct 1 ms 856 KB Output is correct
28 Correct 1 ms 856 KB Output is correct
29 Correct 1 ms 856 KB Output is correct
30 Correct 1 ms 856 KB Output is correct
31 Correct 1 ms 856 KB Output is correct
32 Correct 1 ms 856 KB Output is correct
33 Correct 1 ms 856 KB Output is correct
34 Correct 1 ms 856 KB Output is correct
35 Correct 0 ms 600 KB Output is correct
36 Correct 1 ms 856 KB Output is correct
37 Correct 1 ms 856 KB Output is correct
38 Correct 1 ms 856 KB Output is correct
39 Correct 1 ms 856 KB Output is correct
40 Correct 1 ms 856 KB Output is correct
41 Correct 1 ms 856 KB Output is correct
42 Correct 1 ms 856 KB Output is correct
43 Correct 1 ms 856 KB Output is correct
44 Correct 1 ms 856 KB Output is correct
45 Correct 1 ms 856 KB Output is correct
46 Correct 20 ms 16080 KB Output is correct
47 Correct 32 ms 24244 KB Output is correct
48 Correct 30 ms 24328 KB Output is correct
49 Correct 36 ms 24516 KB Output is correct
50 Correct 32 ms 24524 KB Output is correct
51 Correct 31 ms 24360 KB Output is correct
52 Correct 29 ms 24512 KB Output is correct
53 Correct 21 ms 24252 KB Output is correct
54 Correct 28 ms 24260 KB Output is correct
55 Correct 24 ms 24264 KB Output is correct
56 Correct 24 ms 24272 KB Output is correct
57 Correct 30 ms 24264 KB Output is correct
58 Correct 29 ms 24288 KB Output is correct
59 Correct 35 ms 24512 KB Output is correct
60 Correct 28 ms 24336 KB Output is correct
61 Correct 22 ms 24272 KB Output is correct
62 Correct 30 ms 24272 KB Output is correct
63 Correct 29 ms 24524 KB Output is correct
64 Correct 29 ms 24468 KB Output is correct
65 Correct 22 ms 24272 KB Output is correct
66 Correct 30 ms 24272 KB Output is correct
67 Correct 29 ms 23556 KB Output is correct
68 Correct 31 ms 24272 KB Output is correct
69 Correct 38 ms 24264 KB Output is correct
70 Correct 29 ms 24524 KB Output is correct
71 Correct 36 ms 24460 KB Output is correct
72 Correct 29 ms 24524 KB Output is correct
73 Correct 29 ms 24524 KB Output is correct
74 Correct 21 ms 24384 KB Output is correct
75 Correct 21 ms 24272 KB Output is correct
76 Correct 23 ms 24272 KB Output is correct
77 Correct 23 ms 24272 KB Output is correct
78 Correct 495 ms 24008 KB Output is correct
79 Correct 567 ms 24264 KB Output is correct
80 Correct 661 ms 24272 KB Output is correct
81 Correct 635 ms 24312 KB Output is correct
82 Correct 581 ms 24768 KB Output is correct
83 Correct 656 ms 24516 KB Output is correct
84 Correct 620 ms 24516 KB Output is correct
85 Correct 556 ms 24272 KB Output is correct
86 Correct 607 ms 24264 KB Output is correct
87 Correct 602 ms 24272 KB Output is correct
88 Correct 577 ms 24272 KB Output is correct
89 Correct 620 ms 24272 KB Output is correct
90 Correct 633 ms 24272 KB Output is correct
91 Correct 0 ms 344 KB Output is correct
92 Correct 1 ms 856 KB Output is correct
93 Correct 1 ms 856 KB Output is correct
94 Correct 31 ms 24356 KB Output is correct
95 Correct 29 ms 24524 KB Output is correct
96 Correct 30 ms 24516 KB Output is correct
97 Correct 24 ms 24236 KB Output is correct
98 Correct 22 ms 24272 KB Output is correct
99 Correct 31 ms 24272 KB Output is correct
100 Correct 30 ms 24492 KB Output is correct
101 Correct 33 ms 24472 KB Output is correct
102 Correct 23 ms 24272 KB Output is correct
103 Correct 25 ms 24272 KB Output is correct
104 Correct 1 ms 856 KB Output is correct
105 Correct 1 ms 856 KB Output is correct
106 Correct 1 ms 856 KB Output is correct
107 Correct 1 ms 856 KB Output is correct
108 Correct 1 ms 856 KB Output is correct
109 Correct 1 ms 856 KB Output is correct
110 Correct 1 ms 856 KB Output is correct
111 Correct 1 ms 856 KB Output is correct
112 Correct 1 ms 856 KB Output is correct
113 Correct 1 ms 716 KB Output is correct
114 Correct 196 ms 6232 KB Output is correct
115 Correct 644 ms 24264 KB Output is correct
116 Correct 514 ms 24264 KB Output is correct
117 Correct 600 ms 24516 KB Output is correct
118 Correct 592 ms 24524 KB Output is correct
119 Correct 599 ms 24524 KB Output is correct
120 Correct 624 ms 24524 KB Output is correct
121 Correct 626 ms 24264 KB Output is correct
122 Correct 639 ms 24332 KB Output is correct
123 Correct 577 ms 24240 KB Output is correct
124 Correct 552 ms 24272 KB Output is correct
125 Correct 32 ms 24352 KB Output is correct
126 Correct 35 ms 24516 KB Output is correct
127 Correct 35 ms 24348 KB Output is correct
128 Correct 22 ms 24264 KB Output is correct
129 Correct 27 ms 24272 KB Output is correct
130 Correct 33 ms 23496 KB Output is correct
131 Correct 39 ms 24248 KB Output is correct
132 Correct 31 ms 24264 KB Output is correct
133 Correct 30 ms 24524 KB Output is correct
134 Correct 26 ms 24516 KB Output is correct
135 Correct 25 ms 24524 KB Output is correct
136 Correct 24 ms 24524 KB Output is correct
137 Correct 18 ms 24272 KB Output is correct
138 Correct 24 ms 24264 KB Output is correct
139 Correct 20 ms 24272 KB Output is correct
140 Correct 20 ms 24396 KB Output is correct
141 Correct 1 ms 856 KB Output is correct
142 Correct 0 ms 856 KB Output is correct
143 Correct 1 ms 684 KB Output is correct
144 Correct 1 ms 856 KB Output is correct
145 Correct 1 ms 856 KB Output is correct
146 Correct 0 ms 600 KB Output is correct
147 Correct 1 ms 856 KB Output is correct
148 Correct 1 ms 856 KB Output is correct
149 Correct 1 ms 856 KB Output is correct
150 Correct 1 ms 856 KB Output is correct
151 Correct 1 ms 856 KB Output is correct
152 Correct 1 ms 856 KB Output is correct
153 Correct 0 ms 856 KB Output is correct
154 Correct 0 ms 856 KB Output is correct
155 Correct 0 ms 856 KB Output is correct
156 Correct 0 ms 856 KB Output is correct
157 Execution timed out 4027 ms 21704 KB Time limit exceeded
158 Halted 0 ms 0 KB -