답안 #387313

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
387313 2021-04-08T09:00:10 Z rama_pang 푸드 코트 (JOI21_foodcourt) C++17
100 / 100
942 ms 47596 KB
#include <bits/stdc++.h>
using namespace std;

using lint = long long;
const lint inf = 1e18;

// Build Segment Tree over queries
// We need to simulate operations fast
// Can be done with matrix-like multiplication
// O(N + Q log Q).
//
// Matrix Multiplication:
// [a, b] [e] = [min(a + e, b + f)]
// [c, d] [f] = [min(c + e, d + f)]
//
// Identity:
// [0, inf] [head]
// [inf, 0] [tail]
//
// Push Back
// [0, inf] [head]
// [inf, K] [tail]
//
// Pop Front
// [K,   0] [head]
// [inf, 0] [tail]

struct Matrix {
  array<array<lint, 2>, 2> M;

  Matrix(lint K = 0) {
    if (K == 0) { // Identity
      M[0] = {0, inf};
      M[1] = {inf, 0};
    } else if (K > 0) { // Push Back
      M[0] = {0, inf};
      M[1] = {inf, K};
    } else if (K < 0) { // Pop Front
      M[0] = {-K,  0};
      M[1] = {inf, 0};
    }
  }

  friend Matrix operator*(const Matrix &a, const Matrix &b) {
    Matrix c;
    for (int i = 0; i < 2; i++) {
      for (int j = 0; j < 2; j++) {
        c.M[i][j] = min(a.M[i][0] + b.M[0][j], a.M[i][1] + b.M[1][j]);
      }
    }
    return c;
  }
};

class SegTree {
 public:
  int sz;
  vector<Matrix> tree;

  SegTree(int n) {
    sz = 1; while (sz < n) sz *= 2;
    tree.assign(2 * sz, Matrix(0));
  }

  void Modify(int p, int K) {
    tree[p += sz] = Matrix(K);
    for (p /= 2; p > 0; p /= 2) {
      tree[p] = tree[p * 2 + 1] * tree[p * 2];
    }
  }

  pair<lint, lint> Query(int l, int r) { // (head, tail)
    Matrix L(0), R(0);
    for (l += sz, r += sz + 1; l < r; l /= 2, r /= 2) {
      if (l & 1) L = tree[l++] * L;
      if (r & 1) R = R * tree[--r];
    }
    L =  R * L;
    return pair(min(L.M[0][0], L.M[0][1]), min(L.M[1][0], L.M[1][1]));
  }


};

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);

  int N, M, Q;
  cin >> N >> M >> Q;

  vector<int> ans(Q + 1, -1);
  vector<int> color(Q + 1, -1);
  vector<vector<array<lint, 3>>> Query(N + 1);

  for (int q = 1; q <= Q; q++) {
    int T;
    cin >> T;
    if (T == 1) {
      lint L, R, K;
      cin >> L >> R >> color[q] >> K;
      Query[L - 1].push_back({0, q, K});
      Query[R].push_back({0, q, 0});
    } else if (T == 2) {
      lint L, R, K;
      cin >> L >> R >> K;
      Query[L - 1].push_back({0, q, -K});
      Query[R].push_back({0, q, 0});
    } else if (T == 3) {
      lint A, B;
      cin >> A >> B;
      Query[A - 1].push_back({1, q, B});
    }
  }

  SegTree seg(Q + 1);
  for (int S = 0; S < N; S++) { // Current shop
    for (auto [t, q, k] : Query[S]) {
      if (t == 0) {
        seg.Modify(q, k);
      } else if (t == 1) {
        auto [head, tail] = seg.Query(0, q);
        lint ans_pos = head + k - 1;
        if (ans_pos >= tail) {
          ans[q] = 0;
        } else {
          int lo = 0, hi = q;
          while (lo < hi) {
            int md = (lo + hi) / 2;
            if (ans_pos < seg.Query(0, md).second) {
              hi = md;
            } else {
              lo = md + 1;
            }
          }
          assert(color[lo] != -1);
          ans[q] = color[lo];
        }
      }
    }
  }

  for (int q = 1; q <= Q; q++) {
    if (ans[q] != -1) {
      cout << ans[q] << '\n';
    }
  }
  return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 620 KB Output is correct
2 Correct 4 ms 620 KB Output is correct
3 Correct 3 ms 620 KB Output is correct
4 Correct 5 ms 620 KB Output is correct
5 Correct 3 ms 620 KB Output is correct
6 Correct 3 ms 620 KB Output is correct
7 Correct 4 ms 620 KB Output is correct
8 Correct 4 ms 620 KB Output is correct
9 Correct 4 ms 620 KB Output is correct
10 Correct 3 ms 620 KB Output is correct
11 Correct 4 ms 620 KB Output is correct
12 Correct 3 ms 620 KB Output is correct
13 Correct 3 ms 620 KB Output is correct
14 Correct 3 ms 748 KB Output is correct
15 Correct 3 ms 620 KB Output is correct
16 Correct 4 ms 748 KB Output is correct
17 Correct 4 ms 620 KB Output is correct
18 Correct 4 ms 620 KB Output is correct
19 Correct 3 ms 620 KB Output is correct
20 Correct 3 ms 748 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 620 KB Output is correct
2 Correct 4 ms 620 KB Output is correct
3 Correct 3 ms 620 KB Output is correct
4 Correct 5 ms 620 KB Output is correct
5 Correct 3 ms 620 KB Output is correct
6 Correct 3 ms 620 KB Output is correct
7 Correct 4 ms 620 KB Output is correct
8 Correct 4 ms 620 KB Output is correct
9 Correct 4 ms 620 KB Output is correct
10 Correct 3 ms 620 KB Output is correct
11 Correct 4 ms 620 KB Output is correct
12 Correct 3 ms 620 KB Output is correct
13 Correct 3 ms 620 KB Output is correct
14 Correct 3 ms 748 KB Output is correct
15 Correct 3 ms 620 KB Output is correct
16 Correct 4 ms 748 KB Output is correct
17 Correct 4 ms 620 KB Output is correct
18 Correct 4 ms 620 KB Output is correct
19 Correct 3 ms 620 KB Output is correct
20 Correct 3 ms 748 KB Output is correct
21 Correct 4 ms 620 KB Output is correct
22 Correct 4 ms 748 KB Output is correct
23 Correct 4 ms 620 KB Output is correct
24 Correct 4 ms 748 KB Output is correct
25 Correct 3 ms 620 KB Output is correct
26 Correct 3 ms 620 KB Output is correct
27 Correct 4 ms 748 KB Output is correct
28 Correct 4 ms 748 KB Output is correct
29 Correct 4 ms 748 KB Output is correct
30 Correct 4 ms 748 KB Output is correct
31 Correct 4 ms 748 KB Output is correct
32 Correct 4 ms 748 KB Output is correct
33 Correct 3 ms 748 KB Output is correct
34 Correct 3 ms 748 KB Output is correct
35 Correct 3 ms 748 KB Output is correct
36 Correct 4 ms 748 KB Output is correct
37 Correct 3 ms 620 KB Output is correct
38 Correct 3 ms 748 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 98 ms 11364 KB Output is correct
2 Correct 101 ms 11572 KB Output is correct
3 Correct 93 ms 11372 KB Output is correct
4 Correct 104 ms 11356 KB Output is correct
5 Correct 95 ms 11628 KB Output is correct
6 Correct 105 ms 11628 KB Output is correct
7 Correct 66 ms 8276 KB Output is correct
8 Correct 70 ms 8204 KB Output is correct
9 Correct 104 ms 11628 KB Output is correct
10 Correct 108 ms 11628 KB Output is correct
11 Correct 101 ms 11628 KB Output is correct
12 Correct 105 ms 11628 KB Output is correct
13 Correct 96 ms 10388 KB Output is correct
14 Correct 123 ms 11372 KB Output is correct
15 Correct 98 ms 11500 KB Output is correct
16 Correct 108 ms 11876 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 736 ms 42348 KB Output is correct
2 Correct 574 ms 37356 KB Output is correct
3 Correct 844 ms 44660 KB Output is correct
4 Correct 523 ms 38976 KB Output is correct
5 Correct 526 ms 38124 KB Output is correct
6 Correct 778 ms 44972 KB Output is correct
7 Correct 414 ms 32988 KB Output is correct
8 Correct 457 ms 32944 KB Output is correct
9 Correct 942 ms 42860 KB Output is correct
10 Correct 928 ms 42776 KB Output is correct
11 Correct 759 ms 44784 KB Output is correct
12 Correct 750 ms 44780 KB Output is correct
13 Correct 743 ms 44780 KB Output is correct
14 Correct 762 ms 44780 KB Output is correct
15 Correct 758 ms 44832 KB Output is correct
16 Correct 769 ms 44908 KB Output is correct
17 Correct 767 ms 44896 KB Output is correct
18 Correct 770 ms 44972 KB Output is correct
19 Correct 767 ms 44896 KB Output is correct
20 Correct 792 ms 44892 KB Output is correct
21 Correct 755 ms 44736 KB Output is correct
22 Correct 749 ms 44908 KB Output is correct
23 Correct 755 ms 45036 KB Output is correct
24 Correct 759 ms 44908 KB Output is correct
25 Correct 720 ms 44908 KB Output is correct
26 Correct 711 ms 46836 KB Output is correct
27 Correct 609 ms 46572 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 620 KB Output is correct
2 Correct 4 ms 620 KB Output is correct
3 Correct 3 ms 620 KB Output is correct
4 Correct 5 ms 620 KB Output is correct
5 Correct 3 ms 620 KB Output is correct
6 Correct 3 ms 620 KB Output is correct
7 Correct 4 ms 620 KB Output is correct
8 Correct 4 ms 620 KB Output is correct
9 Correct 4 ms 620 KB Output is correct
10 Correct 3 ms 620 KB Output is correct
11 Correct 4 ms 620 KB Output is correct
12 Correct 3 ms 620 KB Output is correct
13 Correct 3 ms 620 KB Output is correct
14 Correct 3 ms 748 KB Output is correct
15 Correct 3 ms 620 KB Output is correct
16 Correct 4 ms 748 KB Output is correct
17 Correct 4 ms 620 KB Output is correct
18 Correct 4 ms 620 KB Output is correct
19 Correct 3 ms 620 KB Output is correct
20 Correct 3 ms 748 KB Output is correct
21 Correct 98 ms 11364 KB Output is correct
22 Correct 101 ms 11572 KB Output is correct
23 Correct 93 ms 11372 KB Output is correct
24 Correct 104 ms 11356 KB Output is correct
25 Correct 95 ms 11628 KB Output is correct
26 Correct 105 ms 11628 KB Output is correct
27 Correct 66 ms 8276 KB Output is correct
28 Correct 70 ms 8204 KB Output is correct
29 Correct 104 ms 11628 KB Output is correct
30 Correct 108 ms 11628 KB Output is correct
31 Correct 101 ms 11628 KB Output is correct
32 Correct 105 ms 11628 KB Output is correct
33 Correct 96 ms 10388 KB Output is correct
34 Correct 123 ms 11372 KB Output is correct
35 Correct 98 ms 11500 KB Output is correct
36 Correct 108 ms 11876 KB Output is correct
37 Correct 149 ms 10604 KB Output is correct
38 Correct 104 ms 10220 KB Output is correct
39 Correct 64 ms 7764 KB Output is correct
40 Correct 78 ms 8204 KB Output is correct
41 Correct 139 ms 11500 KB Output is correct
42 Correct 132 ms 11500 KB Output is correct
43 Correct 128 ms 11440 KB Output is correct
44 Correct 138 ms 11500 KB Output is correct
45 Correct 132 ms 11500 KB Output is correct
46 Correct 136 ms 11536 KB Output is correct
47 Correct 110 ms 10392 KB Output is correct
48 Correct 130 ms 11884 KB Output is correct
49 Correct 85 ms 9452 KB Output is correct
50 Correct 106 ms 10604 KB Output is correct
51 Correct 145 ms 11628 KB Output is correct
52 Correct 126 ms 11628 KB Output is correct
53 Correct 75 ms 10348 KB Output is correct
54 Correct 97 ms 11884 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 146 ms 11000 KB Output is correct
2 Correct 179 ms 11268 KB Output is correct
3 Correct 162 ms 11500 KB Output is correct
4 Correct 105 ms 9708 KB Output is correct
5 Correct 133 ms 10732 KB Output is correct
6 Correct 166 ms 11500 KB Output is correct
7 Correct 104 ms 8352 KB Output is correct
8 Correct 102 ms 8336 KB Output is correct
9 Correct 134 ms 10716 KB Output is correct
10 Correct 102 ms 9836 KB Output is correct
11 Correct 153 ms 11372 KB Output is correct
12 Correct 157 ms 11372 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 620 KB Output is correct
2 Correct 4 ms 620 KB Output is correct
3 Correct 3 ms 620 KB Output is correct
4 Correct 5 ms 620 KB Output is correct
5 Correct 3 ms 620 KB Output is correct
6 Correct 3 ms 620 KB Output is correct
7 Correct 4 ms 620 KB Output is correct
8 Correct 4 ms 620 KB Output is correct
9 Correct 4 ms 620 KB Output is correct
10 Correct 3 ms 620 KB Output is correct
11 Correct 4 ms 620 KB Output is correct
12 Correct 3 ms 620 KB Output is correct
13 Correct 3 ms 620 KB Output is correct
14 Correct 3 ms 748 KB Output is correct
15 Correct 3 ms 620 KB Output is correct
16 Correct 4 ms 748 KB Output is correct
17 Correct 4 ms 620 KB Output is correct
18 Correct 4 ms 620 KB Output is correct
19 Correct 3 ms 620 KB Output is correct
20 Correct 3 ms 748 KB Output is correct
21 Correct 4 ms 620 KB Output is correct
22 Correct 4 ms 748 KB Output is correct
23 Correct 4 ms 620 KB Output is correct
24 Correct 4 ms 748 KB Output is correct
25 Correct 3 ms 620 KB Output is correct
26 Correct 3 ms 620 KB Output is correct
27 Correct 4 ms 748 KB Output is correct
28 Correct 4 ms 748 KB Output is correct
29 Correct 4 ms 748 KB Output is correct
30 Correct 4 ms 748 KB Output is correct
31 Correct 4 ms 748 KB Output is correct
32 Correct 4 ms 748 KB Output is correct
33 Correct 3 ms 748 KB Output is correct
34 Correct 3 ms 748 KB Output is correct
35 Correct 3 ms 748 KB Output is correct
36 Correct 4 ms 748 KB Output is correct
37 Correct 3 ms 620 KB Output is correct
38 Correct 3 ms 748 KB Output is correct
39 Correct 98 ms 11364 KB Output is correct
40 Correct 101 ms 11572 KB Output is correct
41 Correct 93 ms 11372 KB Output is correct
42 Correct 104 ms 11356 KB Output is correct
43 Correct 95 ms 11628 KB Output is correct
44 Correct 105 ms 11628 KB Output is correct
45 Correct 66 ms 8276 KB Output is correct
46 Correct 70 ms 8204 KB Output is correct
47 Correct 104 ms 11628 KB Output is correct
48 Correct 108 ms 11628 KB Output is correct
49 Correct 101 ms 11628 KB Output is correct
50 Correct 105 ms 11628 KB Output is correct
51 Correct 96 ms 10388 KB Output is correct
52 Correct 123 ms 11372 KB Output is correct
53 Correct 98 ms 11500 KB Output is correct
54 Correct 108 ms 11876 KB Output is correct
55 Correct 149 ms 10604 KB Output is correct
56 Correct 104 ms 10220 KB Output is correct
57 Correct 64 ms 7764 KB Output is correct
58 Correct 78 ms 8204 KB Output is correct
59 Correct 139 ms 11500 KB Output is correct
60 Correct 132 ms 11500 KB Output is correct
61 Correct 128 ms 11440 KB Output is correct
62 Correct 138 ms 11500 KB Output is correct
63 Correct 132 ms 11500 KB Output is correct
64 Correct 136 ms 11536 KB Output is correct
65 Correct 110 ms 10392 KB Output is correct
66 Correct 130 ms 11884 KB Output is correct
67 Correct 85 ms 9452 KB Output is correct
68 Correct 106 ms 10604 KB Output is correct
69 Correct 145 ms 11628 KB Output is correct
70 Correct 126 ms 11628 KB Output is correct
71 Correct 75 ms 10348 KB Output is correct
72 Correct 97 ms 11884 KB Output is correct
73 Correct 146 ms 11000 KB Output is correct
74 Correct 179 ms 11268 KB Output is correct
75 Correct 162 ms 11500 KB Output is correct
76 Correct 105 ms 9708 KB Output is correct
77 Correct 133 ms 10732 KB Output is correct
78 Correct 166 ms 11500 KB Output is correct
79 Correct 104 ms 8352 KB Output is correct
80 Correct 102 ms 8336 KB Output is correct
81 Correct 134 ms 10716 KB Output is correct
82 Correct 102 ms 9836 KB Output is correct
83 Correct 153 ms 11372 KB Output is correct
84 Correct 157 ms 11372 KB Output is correct
85 Correct 143 ms 10988 KB Output is correct
86 Correct 148 ms 11756 KB Output is correct
87 Correct 117 ms 11244 KB Output is correct
88 Correct 143 ms 12012 KB Output is correct
89 Correct 83 ms 9708 KB Output is correct
90 Correct 138 ms 12012 KB Output is correct
91 Correct 107 ms 10476 KB Output is correct
92 Correct 103 ms 10220 KB Output is correct
93 Correct 142 ms 12012 KB Output is correct
94 Correct 140 ms 12012 KB Output is correct
95 Correct 135 ms 11756 KB Output is correct
96 Correct 138 ms 12012 KB Output is correct
97 Correct 134 ms 11924 KB Output is correct
98 Correct 112 ms 10732 KB Output is correct
99 Correct 114 ms 10708 KB Output is correct
100 Correct 112 ms 10604 KB Output is correct
101 Correct 153 ms 12524 KB Output is correct
102 Correct 126 ms 12396 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 620 KB Output is correct
2 Correct 4 ms 620 KB Output is correct
3 Correct 3 ms 620 KB Output is correct
4 Correct 5 ms 620 KB Output is correct
5 Correct 3 ms 620 KB Output is correct
6 Correct 3 ms 620 KB Output is correct
7 Correct 4 ms 620 KB Output is correct
8 Correct 4 ms 620 KB Output is correct
9 Correct 4 ms 620 KB Output is correct
10 Correct 3 ms 620 KB Output is correct
11 Correct 4 ms 620 KB Output is correct
12 Correct 3 ms 620 KB Output is correct
13 Correct 3 ms 620 KB Output is correct
14 Correct 3 ms 748 KB Output is correct
15 Correct 3 ms 620 KB Output is correct
16 Correct 4 ms 748 KB Output is correct
17 Correct 4 ms 620 KB Output is correct
18 Correct 4 ms 620 KB Output is correct
19 Correct 3 ms 620 KB Output is correct
20 Correct 3 ms 748 KB Output is correct
21 Correct 4 ms 620 KB Output is correct
22 Correct 4 ms 748 KB Output is correct
23 Correct 4 ms 620 KB Output is correct
24 Correct 4 ms 748 KB Output is correct
25 Correct 3 ms 620 KB Output is correct
26 Correct 3 ms 620 KB Output is correct
27 Correct 4 ms 748 KB Output is correct
28 Correct 4 ms 748 KB Output is correct
29 Correct 4 ms 748 KB Output is correct
30 Correct 4 ms 748 KB Output is correct
31 Correct 4 ms 748 KB Output is correct
32 Correct 4 ms 748 KB Output is correct
33 Correct 3 ms 748 KB Output is correct
34 Correct 3 ms 748 KB Output is correct
35 Correct 3 ms 748 KB Output is correct
36 Correct 4 ms 748 KB Output is correct
37 Correct 3 ms 620 KB Output is correct
38 Correct 3 ms 748 KB Output is correct
39 Correct 98 ms 11364 KB Output is correct
40 Correct 101 ms 11572 KB Output is correct
41 Correct 93 ms 11372 KB Output is correct
42 Correct 104 ms 11356 KB Output is correct
43 Correct 95 ms 11628 KB Output is correct
44 Correct 105 ms 11628 KB Output is correct
45 Correct 66 ms 8276 KB Output is correct
46 Correct 70 ms 8204 KB Output is correct
47 Correct 104 ms 11628 KB Output is correct
48 Correct 108 ms 11628 KB Output is correct
49 Correct 101 ms 11628 KB Output is correct
50 Correct 105 ms 11628 KB Output is correct
51 Correct 96 ms 10388 KB Output is correct
52 Correct 123 ms 11372 KB Output is correct
53 Correct 98 ms 11500 KB Output is correct
54 Correct 108 ms 11876 KB Output is correct
55 Correct 736 ms 42348 KB Output is correct
56 Correct 574 ms 37356 KB Output is correct
57 Correct 844 ms 44660 KB Output is correct
58 Correct 523 ms 38976 KB Output is correct
59 Correct 526 ms 38124 KB Output is correct
60 Correct 778 ms 44972 KB Output is correct
61 Correct 414 ms 32988 KB Output is correct
62 Correct 457 ms 32944 KB Output is correct
63 Correct 942 ms 42860 KB Output is correct
64 Correct 928 ms 42776 KB Output is correct
65 Correct 759 ms 44784 KB Output is correct
66 Correct 750 ms 44780 KB Output is correct
67 Correct 743 ms 44780 KB Output is correct
68 Correct 762 ms 44780 KB Output is correct
69 Correct 758 ms 44832 KB Output is correct
70 Correct 769 ms 44908 KB Output is correct
71 Correct 767 ms 44896 KB Output is correct
72 Correct 770 ms 44972 KB Output is correct
73 Correct 767 ms 44896 KB Output is correct
74 Correct 792 ms 44892 KB Output is correct
75 Correct 755 ms 44736 KB Output is correct
76 Correct 749 ms 44908 KB Output is correct
77 Correct 755 ms 45036 KB Output is correct
78 Correct 759 ms 44908 KB Output is correct
79 Correct 720 ms 44908 KB Output is correct
80 Correct 711 ms 46836 KB Output is correct
81 Correct 609 ms 46572 KB Output is correct
82 Correct 149 ms 10604 KB Output is correct
83 Correct 104 ms 10220 KB Output is correct
84 Correct 64 ms 7764 KB Output is correct
85 Correct 78 ms 8204 KB Output is correct
86 Correct 139 ms 11500 KB Output is correct
87 Correct 132 ms 11500 KB Output is correct
88 Correct 128 ms 11440 KB Output is correct
89 Correct 138 ms 11500 KB Output is correct
90 Correct 132 ms 11500 KB Output is correct
91 Correct 136 ms 11536 KB Output is correct
92 Correct 110 ms 10392 KB Output is correct
93 Correct 130 ms 11884 KB Output is correct
94 Correct 85 ms 9452 KB Output is correct
95 Correct 106 ms 10604 KB Output is correct
96 Correct 145 ms 11628 KB Output is correct
97 Correct 126 ms 11628 KB Output is correct
98 Correct 75 ms 10348 KB Output is correct
99 Correct 97 ms 11884 KB Output is correct
100 Correct 146 ms 11000 KB Output is correct
101 Correct 179 ms 11268 KB Output is correct
102 Correct 162 ms 11500 KB Output is correct
103 Correct 105 ms 9708 KB Output is correct
104 Correct 133 ms 10732 KB Output is correct
105 Correct 166 ms 11500 KB Output is correct
106 Correct 104 ms 8352 KB Output is correct
107 Correct 102 ms 8336 KB Output is correct
108 Correct 134 ms 10716 KB Output is correct
109 Correct 102 ms 9836 KB Output is correct
110 Correct 153 ms 11372 KB Output is correct
111 Correct 157 ms 11372 KB Output is correct
112 Correct 143 ms 10988 KB Output is correct
113 Correct 148 ms 11756 KB Output is correct
114 Correct 117 ms 11244 KB Output is correct
115 Correct 143 ms 12012 KB Output is correct
116 Correct 83 ms 9708 KB Output is correct
117 Correct 138 ms 12012 KB Output is correct
118 Correct 107 ms 10476 KB Output is correct
119 Correct 103 ms 10220 KB Output is correct
120 Correct 142 ms 12012 KB Output is correct
121 Correct 140 ms 12012 KB Output is correct
122 Correct 135 ms 11756 KB Output is correct
123 Correct 138 ms 12012 KB Output is correct
124 Correct 134 ms 11924 KB Output is correct
125 Correct 112 ms 10732 KB Output is correct
126 Correct 114 ms 10708 KB Output is correct
127 Correct 112 ms 10604 KB Output is correct
128 Correct 153 ms 12524 KB Output is correct
129 Correct 126 ms 12396 KB Output is correct
130 Correct 803 ms 45152 KB Output is correct
131 Correct 566 ms 37484 KB Output is correct
132 Correct 792 ms 45292 KB Output is correct
133 Correct 719 ms 45064 KB Output is correct
134 Correct 630 ms 42476 KB Output is correct
135 Correct 752 ms 46340 KB Output is correct
136 Correct 915 ms 44548 KB Output is correct
137 Correct 890 ms 44336 KB Output is correct
138 Correct 728 ms 46116 KB Output is correct
139 Correct 743 ms 46188 KB Output is correct
140 Correct 736 ms 46060 KB Output is correct
141 Correct 740 ms 46060 KB Output is correct
142 Correct 745 ms 46060 KB Output is correct
143 Correct 738 ms 46060 KB Output is correct
144 Correct 738 ms 46188 KB Output is correct
145 Correct 740 ms 46244 KB Output is correct
146 Correct 735 ms 46060 KB Output is correct
147 Correct 775 ms 46088 KB Output is correct
148 Correct 774 ms 46036 KB Output is correct
149 Correct 759 ms 46052 KB Output is correct
150 Correct 563 ms 41272 KB Output is correct
151 Correct 707 ms 47468 KB Output is correct
152 Correct 723 ms 47596 KB Output is correct
153 Correct 601 ms 47468 KB Output is correct