답안 #1004909

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1004909 2024-06-22T02:34:18 Z jonathanirvings Tiles (BOI24_tiles) C++17
100 / 100
199 ms 36176 KB
#include <bits/stdc++.h>
using namespace std;

int max_line(int N, int, std::vector<int> X, std::vector<int> Y) {
  map<int, vector<pair<int, int>>> lines_at_x;
  for (int i = 0; i < N; ++i) {
    int j = (i + 1) % N;
    if (X[i] == X[j]) {
      if (X[i] > 0) {
        lines_at_x[X[i] - 1];
      }
      lines_at_x[X[i]].push_back(make_pair(min(Y[i], Y[j]), max(Y[i], Y[j])));
    }
  }
  int answer = 0;
  vector<int> parity_cnt(2);
  int odd_lines_cnt = 0;
  set<tuple<int, int, int>> current_lines;
  map<int, set<tuple<int, int, int>>::iterator> line_ends_at, line_starts_at;

  auto erase_current_line = [&] (set<tuple<int, int, int>>::iterator it) {
    --parity_cnt[get<2>(*it)];
    line_starts_at.erase(get<0>(*it));
    line_ends_at.erase(get<1>(*it));
    if ((get<1>(*it) - get<0>(*it)) % 2 == 1) {
      --odd_lines_cnt;
    }
    current_lines.erase(it);
  };

  auto insert_current_line = [&] (int start_line, int end_line, int parity) {
    if (line_ends_at.count(start_line)) {
      auto it = line_ends_at[start_line];
      if (get<2>(*it) == parity) {
        start_line = get<0>(*it);
        erase_current_line(it);
      }
    }
    if (line_starts_at.count(end_line)) {
      auto it = line_starts_at[end_line];
      if (get<2>(*it) == parity) {
        end_line = get<1>(*it);
        erase_current_line(it);
      }
    }

    auto it = current_lines.insert(
        make_tuple(start_line, end_line, parity)).first;
    ++parity_cnt[parity];
    line_starts_at[start_line] = it;
    line_ends_at[end_line] = it;
    if ((end_line - start_line) % 2 == 1) {
      ++odd_lines_cnt;
    }
  };

  for (auto [x, lines] : lines_at_x) {
    if (parity_cnt[1 - x % 2] == 0) {
      answer = x;
    }
    if (lines.size() == 0) {
      continue;
    }
    sort(lines.begin(), lines.end());
    int start_line = lines[0].first;
    for (int i = 0; i < static_cast<int>(lines.size()); ++i) {
      if (i + 1 == static_cast<int>(lines.size()) ||
          lines[i].second != lines[i + 1].first) {
        int end_line = lines[i].second;

        while (start_line < end_line) {
          auto it = current_lines.upper_bound(
              make_tuple(start_line, INT_MAX, INT_MAX));
          
          bool entering_polygon = false;
          if (it == current_lines.begin()) {
            entering_polygon = true;
          } else {
            --it;
            if (get<1>(*it) <= start_line) {
              entering_polygon = true;
            }
          }
          if (entering_polygon) {
            insert_current_line(start_line, end_line, x % 2);
            break;
          }
          
          int start_cur_line = get<0>(*it);
          int end_cur_line = get<1>(*it);
          int parity_cur_line = get<2>(*it);
          erase_current_line(it);

          if (x % 2 != parity_cur_line) {
            return answer;
          }
          
          if (start_cur_line < start_line) {
            insert_current_line(start_cur_line, start_line, x % 2);
          }
          if (end_line < end_cur_line) {
            insert_current_line(end_line, end_cur_line, x % 2);
          }
          start_line = end_cur_line;
        }

        if (i + 1 < static_cast<int>(lines.size())) {
          start_line = lines[i + 1].first;
        }
      }
    }
    if (odd_lines_cnt > 0) {
      return answer;
    }
  }
  return answer;
}

#include <cassert>
#include <cstdio>

#include <vector>

int main() {
  int N, M;
  assert(2 == scanf("%d %d", &N, &M));

  std::vector<int> X(N), Y(N);
  for (int i = 0; i < N; ++i) {
    assert(2 == scanf("%d %d", &X[i], &Y[i]));
  }

  int result = max_line(N, M, X, Y);
  printf("%d\n", result);
  return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 344 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 344 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 0 ms 428 KB Output is correct
26 Correct 0 ms 348 KB Output is correct
27 Correct 0 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 348 KB Output is correct
30 Correct 0 ms 348 KB Output is correct
31 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 11 ms 4316 KB Output is correct
3 Correct 75 ms 21412 KB Output is correct
4 Correct 39 ms 11208 KB Output is correct
5 Correct 38 ms 11348 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 69 ms 22096 KB Output is correct
9 Correct 55 ms 12880 KB Output is correct
10 Correct 67 ms 22056 KB Output is correct
11 Correct 35 ms 10120 KB Output is correct
12 Correct 0 ms 344 KB Output is correct
13 Correct 74 ms 21976 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 18 ms 4576 KB Output is correct
6 Correct 39 ms 4440 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 2 ms 604 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 344 KB Output is correct
13 Correct 1 ms 348 KB Output is correct
14 Correct 0 ms 348 KB Output is correct
15 Correct 1 ms 348 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 44 ms 4580 KB Output is correct
18 Correct 43 ms 4444 KB Output is correct
19 Correct 1 ms 604 KB Output is correct
20 Correct 1 ms 440 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 1 ms 344 KB Output is correct
25 Correct 0 ms 348 KB Output is correct
26 Correct 0 ms 348 KB Output is correct
27 Correct 0 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 348 KB Output is correct
30 Correct 0 ms 348 KB Output is correct
31 Correct 0 ms 348 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 0 ms 348 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 0 ms 344 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 0 ms 348 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 0 ms 432 KB Output is correct
43 Correct 0 ms 344 KB Output is correct
44 Correct 1 ms 348 KB Output is correct
45 Correct 0 ms 348 KB Output is correct
46 Correct 0 ms 348 KB Output is correct
47 Correct 0 ms 348 KB Output is correct
48 Correct 0 ms 348 KB Output is correct
49 Correct 44 ms 6244 KB Output is correct
50 Correct 42 ms 6236 KB Output is correct
51 Correct 44 ms 5980 KB Output is correct
52 Correct 45 ms 5980 KB Output is correct
53 Correct 0 ms 348 KB Output is correct
54 Correct 0 ms 432 KB Output is correct
55 Correct 2 ms 860 KB Output is correct
56 Correct 2 ms 604 KB Output is correct
57 Correct 1 ms 348 KB Output is correct
58 Correct 0 ms 348 KB Output is correct
59 Correct 0 ms 348 KB Output is correct
60 Correct 0 ms 348 KB Output is correct
61 Correct 0 ms 348 KB Output is correct
62 Correct 0 ms 360 KB Output is correct
63 Correct 2 ms 604 KB Output is correct
64 Correct 2 ms 604 KB Output is correct
65 Correct 0 ms 348 KB Output is correct
66 Correct 1 ms 348 KB Output is correct
67 Correct 0 ms 348 KB Output is correct
68 Correct 0 ms 348 KB Output is correct
69 Correct 1 ms 348 KB Output is correct
70 Correct 0 ms 348 KB Output is correct
71 Correct 1 ms 348 KB Output is correct
72 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 40 ms 13060 KB Output is correct
3 Correct 38 ms 13236 KB Output is correct
4 Correct 25 ms 6232 KB Output is correct
5 Correct 47 ms 5980 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 30 ms 8116 KB Output is correct
9 Correct 31 ms 8276 KB Output is correct
10 Correct 65 ms 8272 KB Output is correct
11 Correct 68 ms 8276 KB Output is correct
12 Correct 131 ms 29000 KB Output is correct
13 Correct 142 ms 29776 KB Output is correct
14 Correct 68 ms 26052 KB Output is correct
15 Correct 44 ms 9016 KB Output is correct
16 Correct 53 ms 16724 KB Output is correct
17 Correct 55 ms 8788 KB Output is correct
18 Correct 170 ms 30844 KB Output is correct
19 Correct 55 ms 8532 KB Output is correct
20 Correct 43 ms 8504 KB Output is correct
21 Correct 42 ms 8276 KB Output is correct
22 Correct 55 ms 8516 KB Output is correct
23 Correct 146 ms 34968 KB Output is correct
24 Correct 134 ms 35100 KB Output is correct
25 Correct 147 ms 35140 KB Output is correct
26 Correct 199 ms 35636 KB Output is correct
27 Correct 141 ms 35568 KB Output is correct
28 Correct 153 ms 36176 KB Output is correct
29 Correct 56 ms 9044 KB Output is correct
30 Correct 61 ms 8532 KB Output is correct
31 Correct 47 ms 8908 KB Output is correct
32 Correct 65 ms 8532 KB Output is correct
33 Correct 63 ms 25944 KB Output is correct
34 Correct 33 ms 12016 KB Output is correct
35 Correct 0 ms 344 KB Output is correct
36 Correct 1 ms 344 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 0 ms 348 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 0 ms 348 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 1 ms 348 KB Output is correct
43 Correct 0 ms 348 KB Output is correct
44 Correct 0 ms 348 KB Output is correct
45 Correct 0 ms 348 KB Output is correct
46 Correct 0 ms 348 KB Output is correct
47 Correct 0 ms 348 KB Output is correct
48 Correct 0 ms 348 KB Output is correct
49 Correct 193 ms 30880 KB Output is correct
50 Correct 0 ms 344 KB Output is correct
51 Correct 0 ms 348 KB Output is correct
52 Correct 47 ms 11336 KB Output is correct
53 Correct 44 ms 6092 KB Output is correct
54 Correct 43 ms 5968 KB Output is correct
55 Correct 59 ms 5968 KB Output is correct
56 Correct 45 ms 5980 KB Output is correct
57 Correct 0 ms 348 KB Output is correct
58 Correct 0 ms 348 KB Output is correct
59 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 77 ms 25112 KB Output is correct
2 Correct 37 ms 13244 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 68 ms 25864 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 48 ms 9144 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 135 ms 28992 KB Output is correct
9 Correct 63 ms 8528 KB Output is correct
10 Correct 58 ms 16724 KB Output is correct
11 Correct 67 ms 26060 KB Output is correct
12 Correct 75 ms 25936 KB Output is correct
13 Correct 61 ms 8280 KB Output is correct
14 Correct 61 ms 8260 KB Output is correct
15 Correct 62 ms 8480 KB Output is correct
16 Correct 140 ms 35032 KB Output is correct
17 Correct 136 ms 35136 KB Output is correct
18 Correct 144 ms 34900 KB Output is correct
19 Correct 32 ms 8532 KB Output is correct
20 Correct 1 ms 348 KB Output is correct
21 Correct 73 ms 25972 KB Output is correct
22 Correct 44 ms 14932 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 0 ms 348 KB Output is correct
26 Correct 0 ms 348 KB Output is correct
27 Correct 0 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 348 KB Output is correct
30 Correct 0 ms 348 KB Output is correct
31 Correct 0 ms 348 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 348 KB Output is correct
34 Correct 0 ms 348 KB Output is correct
35 Correct 0 ms 432 KB Output is correct
36 Correct 33 ms 8528 KB Output is correct
37 Correct 45 ms 6232 KB Output is correct
38 Correct 43 ms 5972 KB Output is correct
39 Correct 48 ms 6080 KB Output is correct
40 Correct 47 ms 5980 KB Output is correct
41 Correct 0 ms 344 KB Output is correct
42 Correct 0 ms 348 KB Output is correct
43 Correct 0 ms 348 KB Output is correct
44 Correct 0 ms 348 KB Output is correct
45 Correct 0 ms 348 KB Output is correct
46 Correct 1 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 0 ms 344 KB Output is correct
15 Correct 0 ms 348 KB Output is correct
16 Correct 0 ms 344 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 ms 348 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 0 ms 428 KB Output is correct
26 Correct 0 ms 348 KB Output is correct
27 Correct 0 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 0 ms 348 KB Output is correct
30 Correct 0 ms 348 KB Output is correct
31 Correct 0 ms 348 KB Output is correct
32 Correct 1 ms 348 KB Output is correct
33 Correct 11 ms 4316 KB Output is correct
34 Correct 75 ms 21412 KB Output is correct
35 Correct 39 ms 11208 KB Output is correct
36 Correct 38 ms 11348 KB Output is correct
37 Correct 0 ms 344 KB Output is correct
38 Correct 0 ms 348 KB Output is correct
39 Correct 69 ms 22096 KB Output is correct
40 Correct 55 ms 12880 KB Output is correct
41 Correct 67 ms 22056 KB Output is correct
42 Correct 35 ms 10120 KB Output is correct
43 Correct 0 ms 344 KB Output is correct
44 Correct 74 ms 21976 KB Output is correct
45 Correct 0 ms 348 KB Output is correct
46 Correct 0 ms 348 KB Output is correct
47 Correct 0 ms 348 KB Output is correct
48 Correct 0 ms 348 KB Output is correct
49 Correct 0 ms 348 KB Output is correct
50 Correct 0 ms 348 KB Output is correct
51 Correct 0 ms 348 KB Output is correct
52 Correct 0 ms 348 KB Output is correct
53 Correct 18 ms 4576 KB Output is correct
54 Correct 39 ms 4440 KB Output is correct
55 Correct 0 ms 348 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 0 ms 348 KB Output is correct
58 Correct 2 ms 604 KB Output is correct
59 Correct 0 ms 348 KB Output is correct
60 Correct 0 ms 344 KB Output is correct
61 Correct 1 ms 348 KB Output is correct
62 Correct 0 ms 348 KB Output is correct
63 Correct 1 ms 348 KB Output is correct
64 Correct 0 ms 348 KB Output is correct
65 Correct 44 ms 4580 KB Output is correct
66 Correct 43 ms 4444 KB Output is correct
67 Correct 1 ms 604 KB Output is correct
68 Correct 1 ms 440 KB Output is correct
69 Correct 0 ms 348 KB Output is correct
70 Correct 0 ms 348 KB Output is correct
71 Correct 0 ms 348 KB Output is correct
72 Correct 1 ms 344 KB Output is correct
73 Correct 0 ms 348 KB Output is correct
74 Correct 0 ms 348 KB Output is correct
75 Correct 0 ms 348 KB Output is correct
76 Correct 0 ms 348 KB Output is correct
77 Correct 0 ms 348 KB Output is correct
78 Correct 0 ms 348 KB Output is correct
79 Correct 0 ms 348 KB Output is correct
80 Correct 0 ms 348 KB Output is correct
81 Correct 0 ms 348 KB Output is correct
82 Correct 0 ms 348 KB Output is correct
83 Correct 0 ms 348 KB Output is correct
84 Correct 0 ms 348 KB Output is correct
85 Correct 0 ms 348 KB Output is correct
86 Correct 0 ms 344 KB Output is correct
87 Correct 0 ms 348 KB Output is correct
88 Correct 0 ms 348 KB Output is correct
89 Correct 0 ms 348 KB Output is correct
90 Correct 0 ms 432 KB Output is correct
91 Correct 0 ms 344 KB Output is correct
92 Correct 1 ms 348 KB Output is correct
93 Correct 0 ms 348 KB Output is correct
94 Correct 0 ms 348 KB Output is correct
95 Correct 0 ms 348 KB Output is correct
96 Correct 0 ms 348 KB Output is correct
97 Correct 44 ms 6244 KB Output is correct
98 Correct 42 ms 6236 KB Output is correct
99 Correct 44 ms 5980 KB Output is correct
100 Correct 45 ms 5980 KB Output is correct
101 Correct 0 ms 348 KB Output is correct
102 Correct 0 ms 432 KB Output is correct
103 Correct 2 ms 860 KB Output is correct
104 Correct 2 ms 604 KB Output is correct
105 Correct 1 ms 348 KB Output is correct
106 Correct 0 ms 348 KB Output is correct
107 Correct 0 ms 348 KB Output is correct
108 Correct 0 ms 348 KB Output is correct
109 Correct 0 ms 348 KB Output is correct
110 Correct 0 ms 360 KB Output is correct
111 Correct 2 ms 604 KB Output is correct
112 Correct 2 ms 604 KB Output is correct
113 Correct 0 ms 348 KB Output is correct
114 Correct 1 ms 348 KB Output is correct
115 Correct 0 ms 348 KB Output is correct
116 Correct 0 ms 348 KB Output is correct
117 Correct 1 ms 348 KB Output is correct
118 Correct 0 ms 348 KB Output is correct
119 Correct 1 ms 348 KB Output is correct
120 Correct 0 ms 348 KB Output is correct
121 Correct 0 ms 348 KB Output is correct
122 Correct 40 ms 13060 KB Output is correct
123 Correct 38 ms 13236 KB Output is correct
124 Correct 25 ms 6232 KB Output is correct
125 Correct 47 ms 5980 KB Output is correct
126 Correct 0 ms 348 KB Output is correct
127 Correct 0 ms 348 KB Output is correct
128 Correct 30 ms 8116 KB Output is correct
129 Correct 31 ms 8276 KB Output is correct
130 Correct 65 ms 8272 KB Output is correct
131 Correct 68 ms 8276 KB Output is correct
132 Correct 131 ms 29000 KB Output is correct
133 Correct 142 ms 29776 KB Output is correct
134 Correct 68 ms 26052 KB Output is correct
135 Correct 44 ms 9016 KB Output is correct
136 Correct 53 ms 16724 KB Output is correct
137 Correct 55 ms 8788 KB Output is correct
138 Correct 170 ms 30844 KB Output is correct
139 Correct 55 ms 8532 KB Output is correct
140 Correct 43 ms 8504 KB Output is correct
141 Correct 42 ms 8276 KB Output is correct
142 Correct 55 ms 8516 KB Output is correct
143 Correct 146 ms 34968 KB Output is correct
144 Correct 134 ms 35100 KB Output is correct
145 Correct 147 ms 35140 KB Output is correct
146 Correct 199 ms 35636 KB Output is correct
147 Correct 141 ms 35568 KB Output is correct
148 Correct 153 ms 36176 KB Output is correct
149 Correct 56 ms 9044 KB Output is correct
150 Correct 61 ms 8532 KB Output is correct
151 Correct 47 ms 8908 KB Output is correct
152 Correct 65 ms 8532 KB Output is correct
153 Correct 63 ms 25944 KB Output is correct
154 Correct 33 ms 12016 KB Output is correct
155 Correct 0 ms 344 KB Output is correct
156 Correct 1 ms 344 KB Output is correct
157 Correct 0 ms 348 KB Output is correct
158 Correct 0 ms 348 KB Output is correct
159 Correct 0 ms 348 KB Output is correct
160 Correct 0 ms 348 KB Output is correct
161 Correct 0 ms 348 KB Output is correct
162 Correct 1 ms 348 KB Output is correct
163 Correct 0 ms 348 KB Output is correct
164 Correct 0 ms 348 KB Output is correct
165 Correct 0 ms 348 KB Output is correct
166 Correct 0 ms 348 KB Output is correct
167 Correct 0 ms 348 KB Output is correct
168 Correct 0 ms 348 KB Output is correct
169 Correct 193 ms 30880 KB Output is correct
170 Correct 0 ms 344 KB Output is correct
171 Correct 0 ms 348 KB Output is correct
172 Correct 47 ms 11336 KB Output is correct
173 Correct 44 ms 6092 KB Output is correct
174 Correct 43 ms 5968 KB Output is correct
175 Correct 59 ms 5968 KB Output is correct
176 Correct 45 ms 5980 KB Output is correct
177 Correct 0 ms 348 KB Output is correct
178 Correct 0 ms 348 KB Output is correct
179 Correct 0 ms 348 KB Output is correct
180 Correct 77 ms 25112 KB Output is correct
181 Correct 37 ms 13244 KB Output is correct
182 Correct 0 ms 348 KB Output is correct
183 Correct 68 ms 25864 KB Output is correct
184 Correct 0 ms 348 KB Output is correct
185 Correct 48 ms 9144 KB Output is correct
186 Correct 0 ms 348 KB Output is correct
187 Correct 135 ms 28992 KB Output is correct
188 Correct 63 ms 8528 KB Output is correct
189 Correct 58 ms 16724 KB Output is correct
190 Correct 67 ms 26060 KB Output is correct
191 Correct 75 ms 25936 KB Output is correct
192 Correct 61 ms 8280 KB Output is correct
193 Correct 61 ms 8260 KB Output is correct
194 Correct 62 ms 8480 KB Output is correct
195 Correct 140 ms 35032 KB Output is correct
196 Correct 136 ms 35136 KB Output is correct
197 Correct 144 ms 34900 KB Output is correct
198 Correct 32 ms 8532 KB Output is correct
199 Correct 1 ms 348 KB Output is correct
200 Correct 73 ms 25972 KB Output is correct
201 Correct 44 ms 14932 KB Output is correct
202 Correct 0 ms 348 KB Output is correct
203 Correct 0 ms 348 KB Output is correct
204 Correct 0 ms 348 KB Output is correct
205 Correct 0 ms 348 KB Output is correct
206 Correct 0 ms 348 KB Output is correct
207 Correct 0 ms 348 KB Output is correct
208 Correct 0 ms 348 KB Output is correct
209 Correct 0 ms 348 KB Output is correct
210 Correct 0 ms 348 KB Output is correct
211 Correct 0 ms 348 KB Output is correct
212 Correct 0 ms 348 KB Output is correct
213 Correct 0 ms 348 KB Output is correct
214 Correct 0 ms 432 KB Output is correct
215 Correct 33 ms 8528 KB Output is correct
216 Correct 45 ms 6232 KB Output is correct
217 Correct 43 ms 5972 KB Output is correct
218 Correct 48 ms 6080 KB Output is correct
219 Correct 47 ms 5980 KB Output is correct
220 Correct 0 ms 344 KB Output is correct
221 Correct 0 ms 348 KB Output is correct
222 Correct 0 ms 348 KB Output is correct
223 Correct 0 ms 348 KB Output is correct
224 Correct 0 ms 348 KB Output is correct
225 Correct 1 ms 348 KB Output is correct
226 Correct 67 ms 8272 KB Output is correct
227 Correct 78 ms 25908 KB Output is correct
228 Correct 64 ms 16724 KB Output is correct
229 Correct 52 ms 9044 KB Output is correct
230 Correct 197 ms 30804 KB Output is correct
231 Correct 72 ms 25792 KB Output is correct
232 Correct 65 ms 8004 KB Output is correct
233 Correct 35 ms 8536 KB Output is correct
234 Correct 84 ms 25940 KB Output is correct
235 Correct 78 ms 25936 KB Output is correct
236 Correct 178 ms 30292 KB Output is correct
237 Correct 76 ms 25800 KB Output is correct
238 Correct 50 ms 15064 KB Output is correct
239 Correct 175 ms 30772 KB Output is correct
240 Correct 58 ms 16724 KB Output is correct
241 Correct 75 ms 26192 KB Output is correct
242 Correct 27 ms 8536 KB Output is correct