Submission #807672

# Submission time Handle Problem Language Result Execution time Memory
807672 2023-08-04T21:24:12 Z dong_liu Food Court (JOI21_foodcourt) C++17
100 / 100
340 ms 41692 KB
#include <bits/stdc++.h>
using namespace std;

using LL = long long;
const int N = 250000, N_ = 1 << 18, INF = 0x3f3f3f3f;

int n_;

array<LL, 2> st1[N_ * 2];

array<LL, 2> join(array<LL, 2> a, array<LL, 2> b) {
  return {a[0] + b[0], max(a[1] + b[0], b[1])};
}

void update1(int i, int x) {
  i |= n_;
  st1[i][0] = x;
  st1[i][1] = max(0, x);
  while (i >>= 1) st1[i] = join(st1[i << 1 | 0], st1[i << 1 | 1]);
}

LL query1(int l, int r) {
  vector<int> ll, rr;
  array<LL, 2> v = {0, 0};

  for (l |= n_, r |= n_; l <= r; l >>= 1, r >>= 1) {
    if ((l & 1) == 1) ll.push_back(l++);
    if ((r & 1) == 0) rr.push_back(r--);
  } 
  for (int i : ll) v = join(v, st1[i]);
  reverse(rr.begin(), rr.end());
  for (int i : rr) v = join(v, st1[i]);
  return v[1];
}

LL st2[N_ * 2];

void update2(int i, int x) {
  st2[i |= n_] = x;
  while (i >>= 1) st2[i] = st2[i << 1 | 0] + st2[i << 1 | 1];
}

LL query2(int l, int r) {
  LL sum = 0;

  for (l |= n_, r |= n_; l <= r; l >>= 1, r >>= 1) {
    if ((l & 1) == 1) sum += st2[l++];
    if ((r & 1) == 0) sum += st2[r--];
  }
  return sum;
}

int query3(LL x) {
  int i = 1;

  while (i < n_) {
    if (x <= st2[i << 1 | 0])
      i = i << 1 | 0;
    else {
      x -= st2[i << 1 | 0];
      i = i << 1 | 1;
    }
  }
  return i ^ n_;
}

vector<pair<int, int>> uu[N + 1];
vector<pair<int, LL>> qq[N];

void run() {
  static int cc[N], ans[N];
  int n, m, q;

  scanf("%d%d%d", &n, &m, &q);
  n_ = 1;
  while (n_ < q) n_ <<= 1;
  for (int h = 0; h < q; h++) {
    int t;

    scanf("%d", &t);
    if (t == 1) {
      int l, r, k;

      scanf("%d%d%d%d", &l, &r, &cc[h], &k), l--;
      uu[l].push_back({h << 1 | 0, k});
      uu[r].push_back({h << 1 | 0, 0});
    } else if (t == 2) {
      int l, r, k;

      scanf("%d%d%d", &l, &r, &k), l--;
      uu[l].push_back({h << 1 | 1, -k});
      uu[r].push_back({h << 1 | 1, 0});
    } else {
      long long k;
      int i;

      scanf("%d%lld", &i, &k), i--;
      qq[i].push_back({h, k});
    }
  }
  memset(ans, -1, q * sizeof *ans);
  for (int i = 0; i < n; i++) {
    for (auto [h2, k] : uu[i]) {
      int h = h2 >> 1;

      update1(h, k);
      if ((h2 & 1) == 0) update2(h, k);
    }
    for (auto [h, k] : qq[i]) {
      LL x = query1(0, h);

      ans[h] = x < k ? 0 : cc[query3(query2(0, h) - x + k)];
    }
  }
  for (int h = 0; h < q; h++)
    if (ans[h] != -1) printf("%d\n", ans[h]);
}

int main() {
  run();
  return 0;
}

Compilation message

foodcourt.cpp: In function 'void run()':
foodcourt.cpp:74:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   74 |   scanf("%d%d%d", &n, &m, &q);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:80:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   80 |     scanf("%d", &t);
      |     ~~~~~^~~~~~~~~~
foodcourt.cpp:84:12: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   84 |       scanf("%d%d%d%d", &l, &r, &cc[h], &k), l--;
      |       ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:90:12: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   90 |       scanf("%d%d%d", &l, &r, &k), l--;
      |       ~~~~~^~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:97:12: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   97 |       scanf("%d%lld", &i, &k), i--;
      |       ~~~~~^~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 8 ms 12244 KB Output is correct
2 Correct 10 ms 12256 KB Output is correct
3 Correct 9 ms 12116 KB Output is correct
4 Correct 6 ms 12188 KB Output is correct
5 Correct 6 ms 12188 KB Output is correct
6 Correct 6 ms 12200 KB Output is correct
7 Correct 6 ms 12192 KB Output is correct
8 Correct 6 ms 12244 KB Output is correct
9 Correct 6 ms 12244 KB Output is correct
10 Correct 8 ms 12244 KB Output is correct
11 Correct 6 ms 12244 KB Output is correct
12 Correct 6 ms 12244 KB Output is correct
13 Correct 7 ms 12196 KB Output is correct
14 Correct 7 ms 12268 KB Output is correct
15 Correct 6 ms 12116 KB Output is correct
16 Correct 6 ms 12192 KB Output is correct
17 Correct 6 ms 12192 KB Output is correct
18 Correct 6 ms 12244 KB Output is correct
19 Correct 8 ms 12300 KB Output is correct
20 Correct 7 ms 12244 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 8 ms 12244 KB Output is correct
2 Correct 10 ms 12256 KB Output is correct
3 Correct 9 ms 12116 KB Output is correct
4 Correct 6 ms 12188 KB Output is correct
5 Correct 6 ms 12188 KB Output is correct
6 Correct 6 ms 12200 KB Output is correct
7 Correct 6 ms 12192 KB Output is correct
8 Correct 6 ms 12244 KB Output is correct
9 Correct 6 ms 12244 KB Output is correct
10 Correct 8 ms 12244 KB Output is correct
11 Correct 6 ms 12244 KB Output is correct
12 Correct 6 ms 12244 KB Output is correct
13 Correct 7 ms 12196 KB Output is correct
14 Correct 7 ms 12268 KB Output is correct
15 Correct 6 ms 12116 KB Output is correct
16 Correct 6 ms 12192 KB Output is correct
17 Correct 6 ms 12192 KB Output is correct
18 Correct 6 ms 12244 KB Output is correct
19 Correct 8 ms 12300 KB Output is correct
20 Correct 7 ms 12244 KB Output is correct
21 Correct 7 ms 12176 KB Output is correct
22 Correct 7 ms 12192 KB Output is correct
23 Correct 7 ms 12244 KB Output is correct
24 Correct 8 ms 12192 KB Output is correct
25 Correct 6 ms 12188 KB Output is correct
26 Correct 6 ms 12248 KB Output is correct
27 Correct 9 ms 12192 KB Output is correct
28 Correct 7 ms 12192 KB Output is correct
29 Correct 7 ms 12192 KB Output is correct
30 Correct 8 ms 12188 KB Output is correct
31 Correct 8 ms 12296 KB Output is correct
32 Correct 7 ms 12244 KB Output is correct
33 Correct 7 ms 12192 KB Output is correct
34 Correct 7 ms 12192 KB Output is correct
35 Correct 9 ms 12156 KB Output is correct
36 Correct 7 ms 12276 KB Output is correct
37 Correct 8 ms 12180 KB Output is correct
38 Correct 7 ms 12244 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 47 ms 19116 KB Output is correct
2 Correct 51 ms 19148 KB Output is correct
3 Correct 46 ms 19104 KB Output is correct
4 Correct 48 ms 19100 KB Output is correct
5 Correct 46 ms 19180 KB Output is correct
6 Correct 47 ms 19148 KB Output is correct
7 Correct 31 ms 17244 KB Output is correct
8 Correct 33 ms 17444 KB Output is correct
9 Correct 47 ms 18764 KB Output is correct
10 Correct 51 ms 19160 KB Output is correct
11 Correct 50 ms 18932 KB Output is correct
12 Correct 46 ms 19100 KB Output is correct
13 Correct 41 ms 18200 KB Output is correct
14 Correct 59 ms 19028 KB Output is correct
15 Correct 45 ms 18908 KB Output is correct
16 Correct 46 ms 19056 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 265 ms 38276 KB Output is correct
2 Correct 171 ms 33052 KB Output is correct
3 Correct 250 ms 40656 KB Output is correct
4 Correct 178 ms 33304 KB Output is correct
5 Correct 178 ms 33304 KB Output is correct
6 Correct 268 ms 40980 KB Output is correct
7 Correct 117 ms 34096 KB Output is correct
8 Correct 119 ms 34324 KB Output is correct
9 Correct 275 ms 40764 KB Output is correct
10 Correct 262 ms 40724 KB Output is correct
11 Correct 239 ms 38224 KB Output is correct
12 Correct 272 ms 40844 KB Output is correct
13 Correct 300 ms 38468 KB Output is correct
14 Correct 262 ms 40704 KB Output is correct
15 Correct 260 ms 40540 KB Output is correct
16 Correct 266 ms 40508 KB Output is correct
17 Correct 302 ms 40660 KB Output is correct
18 Correct 247 ms 39468 KB Output is correct
19 Correct 258 ms 40580 KB Output is correct
20 Correct 258 ms 39572 KB Output is correct
21 Correct 260 ms 40652 KB Output is correct
22 Correct 258 ms 40740 KB Output is correct
23 Correct 245 ms 40548 KB Output is correct
24 Correct 250 ms 40580 KB Output is correct
25 Correct 196 ms 38076 KB Output is correct
26 Correct 236 ms 38620 KB Output is correct
27 Correct 197 ms 39780 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 8 ms 12244 KB Output is correct
2 Correct 10 ms 12256 KB Output is correct
3 Correct 9 ms 12116 KB Output is correct
4 Correct 6 ms 12188 KB Output is correct
5 Correct 6 ms 12188 KB Output is correct
6 Correct 6 ms 12200 KB Output is correct
7 Correct 6 ms 12192 KB Output is correct
8 Correct 6 ms 12244 KB Output is correct
9 Correct 6 ms 12244 KB Output is correct
10 Correct 8 ms 12244 KB Output is correct
11 Correct 6 ms 12244 KB Output is correct
12 Correct 6 ms 12244 KB Output is correct
13 Correct 7 ms 12196 KB Output is correct
14 Correct 7 ms 12268 KB Output is correct
15 Correct 6 ms 12116 KB Output is correct
16 Correct 6 ms 12192 KB Output is correct
17 Correct 6 ms 12192 KB Output is correct
18 Correct 6 ms 12244 KB Output is correct
19 Correct 8 ms 12300 KB Output is correct
20 Correct 7 ms 12244 KB Output is correct
21 Correct 47 ms 19116 KB Output is correct
22 Correct 51 ms 19148 KB Output is correct
23 Correct 46 ms 19104 KB Output is correct
24 Correct 48 ms 19100 KB Output is correct
25 Correct 46 ms 19180 KB Output is correct
26 Correct 47 ms 19148 KB Output is correct
27 Correct 31 ms 17244 KB Output is correct
28 Correct 33 ms 17444 KB Output is correct
29 Correct 47 ms 18764 KB Output is correct
30 Correct 51 ms 19160 KB Output is correct
31 Correct 50 ms 18932 KB Output is correct
32 Correct 46 ms 19100 KB Output is correct
33 Correct 41 ms 18200 KB Output is correct
34 Correct 59 ms 19028 KB Output is correct
35 Correct 45 ms 18908 KB Output is correct
36 Correct 46 ms 19056 KB Output is correct
37 Correct 43 ms 18268 KB Output is correct
38 Correct 45 ms 17664 KB Output is correct
39 Correct 27 ms 16500 KB Output is correct
40 Correct 31 ms 17200 KB Output is correct
41 Correct 46 ms 18364 KB Output is correct
42 Correct 65 ms 18988 KB Output is correct
43 Correct 47 ms 18932 KB Output is correct
44 Correct 47 ms 18728 KB Output is correct
45 Correct 48 ms 18964 KB Output is correct
46 Correct 46 ms 19020 KB Output is correct
47 Correct 38 ms 17912 KB Output is correct
48 Correct 44 ms 18408 KB Output is correct
49 Correct 35 ms 16992 KB Output is correct
50 Correct 39 ms 17972 KB Output is correct
51 Correct 46 ms 19036 KB Output is correct
52 Correct 46 ms 18928 KB Output is correct
53 Correct 36 ms 17664 KB Output is correct
54 Correct 46 ms 19096 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 47 ms 18892 KB Output is correct
2 Correct 55 ms 19504 KB Output is correct
3 Correct 55 ms 19600 KB Output is correct
4 Correct 39 ms 17464 KB Output is correct
5 Correct 60 ms 18576 KB Output is correct
6 Correct 60 ms 19580 KB Output is correct
7 Correct 35 ms 17468 KB Output is correct
8 Correct 34 ms 17300 KB Output is correct
9 Correct 44 ms 18732 KB Output is correct
10 Correct 36 ms 16944 KB Output is correct
11 Correct 50 ms 19012 KB Output is correct
12 Correct 49 ms 18980 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 8 ms 12244 KB Output is correct
2 Correct 10 ms 12256 KB Output is correct
3 Correct 9 ms 12116 KB Output is correct
4 Correct 6 ms 12188 KB Output is correct
5 Correct 6 ms 12188 KB Output is correct
6 Correct 6 ms 12200 KB Output is correct
7 Correct 6 ms 12192 KB Output is correct
8 Correct 6 ms 12244 KB Output is correct
9 Correct 6 ms 12244 KB Output is correct
10 Correct 8 ms 12244 KB Output is correct
11 Correct 6 ms 12244 KB Output is correct
12 Correct 6 ms 12244 KB Output is correct
13 Correct 7 ms 12196 KB Output is correct
14 Correct 7 ms 12268 KB Output is correct
15 Correct 6 ms 12116 KB Output is correct
16 Correct 6 ms 12192 KB Output is correct
17 Correct 6 ms 12192 KB Output is correct
18 Correct 6 ms 12244 KB Output is correct
19 Correct 8 ms 12300 KB Output is correct
20 Correct 7 ms 12244 KB Output is correct
21 Correct 7 ms 12176 KB Output is correct
22 Correct 7 ms 12192 KB Output is correct
23 Correct 7 ms 12244 KB Output is correct
24 Correct 8 ms 12192 KB Output is correct
25 Correct 6 ms 12188 KB Output is correct
26 Correct 6 ms 12248 KB Output is correct
27 Correct 9 ms 12192 KB Output is correct
28 Correct 7 ms 12192 KB Output is correct
29 Correct 7 ms 12192 KB Output is correct
30 Correct 8 ms 12188 KB Output is correct
31 Correct 8 ms 12296 KB Output is correct
32 Correct 7 ms 12244 KB Output is correct
33 Correct 7 ms 12192 KB Output is correct
34 Correct 7 ms 12192 KB Output is correct
35 Correct 9 ms 12156 KB Output is correct
36 Correct 7 ms 12276 KB Output is correct
37 Correct 8 ms 12180 KB Output is correct
38 Correct 7 ms 12244 KB Output is correct
39 Correct 47 ms 19116 KB Output is correct
40 Correct 51 ms 19148 KB Output is correct
41 Correct 46 ms 19104 KB Output is correct
42 Correct 48 ms 19100 KB Output is correct
43 Correct 46 ms 19180 KB Output is correct
44 Correct 47 ms 19148 KB Output is correct
45 Correct 31 ms 17244 KB Output is correct
46 Correct 33 ms 17444 KB Output is correct
47 Correct 47 ms 18764 KB Output is correct
48 Correct 51 ms 19160 KB Output is correct
49 Correct 50 ms 18932 KB Output is correct
50 Correct 46 ms 19100 KB Output is correct
51 Correct 41 ms 18200 KB Output is correct
52 Correct 59 ms 19028 KB Output is correct
53 Correct 45 ms 18908 KB Output is correct
54 Correct 46 ms 19056 KB Output is correct
55 Correct 43 ms 18268 KB Output is correct
56 Correct 45 ms 17664 KB Output is correct
57 Correct 27 ms 16500 KB Output is correct
58 Correct 31 ms 17200 KB Output is correct
59 Correct 46 ms 18364 KB Output is correct
60 Correct 65 ms 18988 KB Output is correct
61 Correct 47 ms 18932 KB Output is correct
62 Correct 47 ms 18728 KB Output is correct
63 Correct 48 ms 18964 KB Output is correct
64 Correct 46 ms 19020 KB Output is correct
65 Correct 38 ms 17912 KB Output is correct
66 Correct 44 ms 18408 KB Output is correct
67 Correct 35 ms 16992 KB Output is correct
68 Correct 39 ms 17972 KB Output is correct
69 Correct 46 ms 19036 KB Output is correct
70 Correct 46 ms 18928 KB Output is correct
71 Correct 36 ms 17664 KB Output is correct
72 Correct 46 ms 19096 KB Output is correct
73 Correct 47 ms 18892 KB Output is correct
74 Correct 55 ms 19504 KB Output is correct
75 Correct 55 ms 19600 KB Output is correct
76 Correct 39 ms 17464 KB Output is correct
77 Correct 60 ms 18576 KB Output is correct
78 Correct 60 ms 19580 KB Output is correct
79 Correct 35 ms 17468 KB Output is correct
80 Correct 34 ms 17300 KB Output is correct
81 Correct 44 ms 18732 KB Output is correct
82 Correct 36 ms 16944 KB Output is correct
83 Correct 50 ms 19012 KB Output is correct
84 Correct 49 ms 18980 KB Output is correct
85 Correct 56 ms 18816 KB Output is correct
86 Correct 52 ms 19488 KB Output is correct
87 Correct 50 ms 18620 KB Output is correct
88 Correct 51 ms 19600 KB Output is correct
89 Correct 34 ms 16736 KB Output is correct
90 Correct 49 ms 19532 KB Output is correct
91 Correct 41 ms 18100 KB Output is correct
92 Correct 41 ms 17768 KB Output is correct
93 Correct 68 ms 19556 KB Output is correct
94 Correct 49 ms 19144 KB Output is correct
95 Correct 47 ms 19328 KB Output is correct
96 Correct 53 ms 19508 KB Output is correct
97 Correct 60 ms 19460 KB Output is correct
98 Correct 45 ms 18380 KB Output is correct
99 Correct 43 ms 18348 KB Output is correct
100 Correct 39 ms 17684 KB Output is correct
101 Correct 44 ms 18964 KB Output is correct
102 Correct 45 ms 19408 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 8 ms 12244 KB Output is correct
2 Correct 10 ms 12256 KB Output is correct
3 Correct 9 ms 12116 KB Output is correct
4 Correct 6 ms 12188 KB Output is correct
5 Correct 6 ms 12188 KB Output is correct
6 Correct 6 ms 12200 KB Output is correct
7 Correct 6 ms 12192 KB Output is correct
8 Correct 6 ms 12244 KB Output is correct
9 Correct 6 ms 12244 KB Output is correct
10 Correct 8 ms 12244 KB Output is correct
11 Correct 6 ms 12244 KB Output is correct
12 Correct 6 ms 12244 KB Output is correct
13 Correct 7 ms 12196 KB Output is correct
14 Correct 7 ms 12268 KB Output is correct
15 Correct 6 ms 12116 KB Output is correct
16 Correct 6 ms 12192 KB Output is correct
17 Correct 6 ms 12192 KB Output is correct
18 Correct 6 ms 12244 KB Output is correct
19 Correct 8 ms 12300 KB Output is correct
20 Correct 7 ms 12244 KB Output is correct
21 Correct 7 ms 12176 KB Output is correct
22 Correct 7 ms 12192 KB Output is correct
23 Correct 7 ms 12244 KB Output is correct
24 Correct 8 ms 12192 KB Output is correct
25 Correct 6 ms 12188 KB Output is correct
26 Correct 6 ms 12248 KB Output is correct
27 Correct 9 ms 12192 KB Output is correct
28 Correct 7 ms 12192 KB Output is correct
29 Correct 7 ms 12192 KB Output is correct
30 Correct 8 ms 12188 KB Output is correct
31 Correct 8 ms 12296 KB Output is correct
32 Correct 7 ms 12244 KB Output is correct
33 Correct 7 ms 12192 KB Output is correct
34 Correct 7 ms 12192 KB Output is correct
35 Correct 9 ms 12156 KB Output is correct
36 Correct 7 ms 12276 KB Output is correct
37 Correct 8 ms 12180 KB Output is correct
38 Correct 7 ms 12244 KB Output is correct
39 Correct 47 ms 19116 KB Output is correct
40 Correct 51 ms 19148 KB Output is correct
41 Correct 46 ms 19104 KB Output is correct
42 Correct 48 ms 19100 KB Output is correct
43 Correct 46 ms 19180 KB Output is correct
44 Correct 47 ms 19148 KB Output is correct
45 Correct 31 ms 17244 KB Output is correct
46 Correct 33 ms 17444 KB Output is correct
47 Correct 47 ms 18764 KB Output is correct
48 Correct 51 ms 19160 KB Output is correct
49 Correct 50 ms 18932 KB Output is correct
50 Correct 46 ms 19100 KB Output is correct
51 Correct 41 ms 18200 KB Output is correct
52 Correct 59 ms 19028 KB Output is correct
53 Correct 45 ms 18908 KB Output is correct
54 Correct 46 ms 19056 KB Output is correct
55 Correct 265 ms 38276 KB Output is correct
56 Correct 171 ms 33052 KB Output is correct
57 Correct 250 ms 40656 KB Output is correct
58 Correct 178 ms 33304 KB Output is correct
59 Correct 178 ms 33304 KB Output is correct
60 Correct 268 ms 40980 KB Output is correct
61 Correct 117 ms 34096 KB Output is correct
62 Correct 119 ms 34324 KB Output is correct
63 Correct 275 ms 40764 KB Output is correct
64 Correct 262 ms 40724 KB Output is correct
65 Correct 239 ms 38224 KB Output is correct
66 Correct 272 ms 40844 KB Output is correct
67 Correct 300 ms 38468 KB Output is correct
68 Correct 262 ms 40704 KB Output is correct
69 Correct 260 ms 40540 KB Output is correct
70 Correct 266 ms 40508 KB Output is correct
71 Correct 302 ms 40660 KB Output is correct
72 Correct 247 ms 39468 KB Output is correct
73 Correct 258 ms 40580 KB Output is correct
74 Correct 258 ms 39572 KB Output is correct
75 Correct 260 ms 40652 KB Output is correct
76 Correct 258 ms 40740 KB Output is correct
77 Correct 245 ms 40548 KB Output is correct
78 Correct 250 ms 40580 KB Output is correct
79 Correct 196 ms 38076 KB Output is correct
80 Correct 236 ms 38620 KB Output is correct
81 Correct 197 ms 39780 KB Output is correct
82 Correct 43 ms 18268 KB Output is correct
83 Correct 45 ms 17664 KB Output is correct
84 Correct 27 ms 16500 KB Output is correct
85 Correct 31 ms 17200 KB Output is correct
86 Correct 46 ms 18364 KB Output is correct
87 Correct 65 ms 18988 KB Output is correct
88 Correct 47 ms 18932 KB Output is correct
89 Correct 47 ms 18728 KB Output is correct
90 Correct 48 ms 18964 KB Output is correct
91 Correct 46 ms 19020 KB Output is correct
92 Correct 38 ms 17912 KB Output is correct
93 Correct 44 ms 18408 KB Output is correct
94 Correct 35 ms 16992 KB Output is correct
95 Correct 39 ms 17972 KB Output is correct
96 Correct 46 ms 19036 KB Output is correct
97 Correct 46 ms 18928 KB Output is correct
98 Correct 36 ms 17664 KB Output is correct
99 Correct 46 ms 19096 KB Output is correct
100 Correct 47 ms 18892 KB Output is correct
101 Correct 55 ms 19504 KB Output is correct
102 Correct 55 ms 19600 KB Output is correct
103 Correct 39 ms 17464 KB Output is correct
104 Correct 60 ms 18576 KB Output is correct
105 Correct 60 ms 19580 KB Output is correct
106 Correct 35 ms 17468 KB Output is correct
107 Correct 34 ms 17300 KB Output is correct
108 Correct 44 ms 18732 KB Output is correct
109 Correct 36 ms 16944 KB Output is correct
110 Correct 50 ms 19012 KB Output is correct
111 Correct 49 ms 18980 KB Output is correct
112 Correct 56 ms 18816 KB Output is correct
113 Correct 52 ms 19488 KB Output is correct
114 Correct 50 ms 18620 KB Output is correct
115 Correct 51 ms 19600 KB Output is correct
116 Correct 34 ms 16736 KB Output is correct
117 Correct 49 ms 19532 KB Output is correct
118 Correct 41 ms 18100 KB Output is correct
119 Correct 41 ms 17768 KB Output is correct
120 Correct 68 ms 19556 KB Output is correct
121 Correct 49 ms 19144 KB Output is correct
122 Correct 47 ms 19328 KB Output is correct
123 Correct 53 ms 19508 KB Output is correct
124 Correct 60 ms 19460 KB Output is correct
125 Correct 45 ms 18380 KB Output is correct
126 Correct 43 ms 18348 KB Output is correct
127 Correct 39 ms 17684 KB Output is correct
128 Correct 44 ms 18964 KB Output is correct
129 Correct 45 ms 19408 KB Output is correct
130 Correct 256 ms 41272 KB Output is correct
131 Correct 172 ms 33392 KB Output is correct
132 Correct 325 ms 41292 KB Output is correct
133 Correct 293 ms 40244 KB Output is correct
134 Correct 207 ms 37364 KB Output is correct
135 Correct 285 ms 41616 KB Output is correct
136 Correct 312 ms 41692 KB Output is correct
137 Correct 339 ms 41652 KB Output is correct
138 Correct 271 ms 38940 KB Output is correct
139 Correct 281 ms 41296 KB Output is correct
140 Correct 283 ms 39512 KB Output is correct
141 Correct 263 ms 41188 KB Output is correct
142 Correct 276 ms 41188 KB Output is correct
143 Correct 307 ms 41240 KB Output is correct
144 Correct 255 ms 40028 KB Output is correct
145 Correct 246 ms 41216 KB Output is correct
146 Correct 277 ms 40680 KB Output is correct
147 Correct 285 ms 41188 KB Output is correct
148 Correct 340 ms 41292 KB Output is correct
149 Correct 267 ms 41252 KB Output is correct
150 Correct 159 ms 36792 KB Output is correct
151 Correct 212 ms 39224 KB Output is correct
152 Correct 191 ms 39184 KB Output is correct
153 Correct 197 ms 40632 KB Output is correct