답안 #839448

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
839448 2023-08-30T04:06:14 Z dong_liu Maze (JOI23_ho_t3) C++17
100 / 100
1994 ms 852460 KB
#pragma GCC optimize("O3,unroll-loops")

#include "bits/stdc++.h"

using namespace std;

#ifdef LOCAL
#include "debug.h"
#else
#define debug(...)
#endif

typedef pair<int, int> pi;

struct Range {
  vector<int> p;
  vector<bool> rem;

  Range(int n) : p(n), rem(n, false) {
    for (int i = 0; i < n; i++) p[i] = i;
  }
  int dsf(int i) {
    return p[i] == i ? i : p[i] = dsf(p[i]);
  }
  void dsj(int i, int j) { p[dsf(i)] = dsf(j); }
  bool has(int i) { return !rem[i]; }
  void remove(int i) {
    if (i > 0 && rem[i-1]) dsj(i-1, i);
    if (i+1 < int(p.size()) && rem[i+1]) dsj(i, i+1);
    rem[i] = 1;
  }
  int next(int i) {
    return i == int(p.size()) ? p.size() : !rem[i] ? i : dsf(i)+1;
  }
};

int main() {
  ios::sync_with_stdio(false);
  cin.exceptions(cin.failbit);
  cin.tie(NULL);
  int k, n, m;
  cin >> n >> m >> k;
  int i1, j1, i2, j2;
  cin >> i1 >> j1 >> i2 >> j2, i1--, j1--, i2--, j2--;
  vector<string> g(n);
  for (int i = 0; i < n; i++) cin >> g[i];
  vector<Range> row, col;
  for (int i = 0; i < n; i++) row.push_back(Range(m));
  for (int i = 0; i < m; i++) col.push_back(Range(n));
  vector d(n, vector<int>(m, -1));
  vector<pi> f;
  vector fl(n, vector<int>(m, false));
  d[i1][j1] = 0, f.push_back({i1, j1}), row[i1].remove(j1), col[j1].remove(i1);
  for (int x = 0; ; x++) {
    for (int p = 0; p < int(f.size()); p++) {
      auto [i,j] = f[p];
      fl[i][j] = true;
      if (i == i2 && j == j2) {
        cout << x << '\n';
        return 0;
      }
      if (i > 0 && g[i-1][j] == '.' && d[i-1][j] == -1)
        d[i-1][j] = x, f.push_back({i-1,j}), row[i-1].remove(j), col[j].remove(i-1);
      if (i+1 < n && g[i+1][j] == '.' && d[i+1][j] == -1)
        d[i+1][j] = x, f.push_back({i+1,j}), row[i+1].remove(j), col[j].remove(i+1);
      if (j > 0 && g[i][j-1] == '.' && d[i][j-1] == -1)
        d[i][j-1] = x, f.push_back({i,j-1}), row[i].remove(j-1), col[j-1].remove(i);
      if (j+1 < m && g[i][j+1] == '.' && d[i][j+1] == -1)
        d[i][j+1] = x, f.push_back({i,j+1}), row[i].remove(j+1), col[j+1].remove(i);
    }
    vector<pi> half = f, g;
    for (auto [i,j] : f) {
      int p = row[i].next(max(0,j-k));
      while (p < m && p <= j+k) {
        d[i][p] = x+1;
        if (abs(p-j) != k) {
          row[i].remove(p), col[p].remove(i);
          fl[i][p] = true;
        }
        half.push_back({i,p}), g.push_back({i,p});
        p = row[i].next(p+1);
      }
    }
    for (auto [i,j] : half) if (row[i].has(j))
      row[i].remove(j), col[j].remove(i);
    for (auto [i,j] : half) {
      int bound = k - (fl[i][j]?0:1);
      int p = col[j].next(max(0,i-bound));
      while (p < n && p <= i+bound) {
        d[p][j] = x+1;
        g.push_back({p,j});
        row[p].remove(j), col[j].remove(p);
        p = col[j].next(p+1);
      }
    }
    swap(f,g);
  }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 340 KB Output is correct
4 Correct 0 ms 340 KB Output is correct
5 Correct 0 ms 340 KB Output is correct
6 Correct 0 ms 340 KB Output is correct
7 Correct 0 ms 340 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 0 ms 212 KB Output is correct
13 Correct 0 ms 340 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 0 ms 212 KB Output is correct
16 Correct 0 ms 340 KB Output is correct
17 Correct 0 ms 340 KB Output is correct
18 Correct 0 ms 340 KB Output is correct
19 Correct 6 ms 1364 KB Output is correct
20 Correct 13 ms 6848 KB Output is correct
21 Correct 3 ms 2004 KB Output is correct
22 Correct 6 ms 1492 KB Output is correct
23 Correct 6 ms 1364 KB Output is correct
24 Correct 9 ms 8768 KB Output is correct
25 Correct 12 ms 8836 KB Output is correct
26 Correct 1 ms 1364 KB Output is correct
27 Correct 1 ms 1364 KB Output is correct
28 Correct 3 ms 1364 KB Output is correct
29 Correct 16 ms 3028 KB Output is correct
30 Correct 9 ms 5060 KB Output is correct
31 Correct 6 ms 5072 KB Output is correct
32 Correct 20 ms 3028 KB Output is correct
33 Correct 14 ms 3028 KB Output is correct
34 Correct 28 ms 25624 KB Output is correct
35 Correct 34 ms 25676 KB Output is correct
36 Correct 11 ms 3536 KB Output is correct
37 Correct 16 ms 3328 KB Output is correct
38 Correct 2 ms 3028 KB Output is correct
39 Correct 236 ms 26252 KB Output is correct
40 Correct 8 ms 4424 KB Output is correct
41 Correct 33 ms 26516 KB Output is correct
42 Correct 25 ms 4164 KB Output is correct
43 Correct 36 ms 19004 KB Output is correct
44 Correct 48 ms 25788 KB Output is correct
45 Correct 66 ms 31300 KB Output is correct
46 Correct 33 ms 30276 KB Output is correct
47 Correct 271 ms 26500 KB Output is correct
48 Correct 179 ms 26216 KB Output is correct
49 Correct 276 ms 213348 KB Output is correct
50 Correct 317 ms 213256 KB Output is correct
51 Correct 187 ms 29032 KB Output is correct
52 Correct 132 ms 26784 KB Output is correct
53 Correct 172 ms 26444 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 340 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 340 KB Output is correct
9 Correct 0 ms 340 KB Output is correct
10 Correct 0 ms 340 KB Output is correct
11 Correct 1 ms 384 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 0 ms 340 KB Output is correct
15 Correct 0 ms 468 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 1 ms 340 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 340 KB Output is correct
20 Correct 0 ms 340 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 0 ms 340 KB Output is correct
23 Correct 0 ms 212 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 0 ms 212 KB Output is correct
26 Correct 0 ms 340 KB Output is correct
27 Correct 0 ms 212 KB Output is correct
28 Correct 0 ms 340 KB Output is correct
29 Correct 1 ms 212 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 0 ms 340 KB Output is correct
32 Correct 0 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 0 ms 340 KB Output is correct
8 Correct 0 ms 340 KB Output is correct
9 Correct 0 ms 340 KB Output is correct
10 Correct 0 ms 340 KB Output is correct
11 Correct 0 ms 340 KB Output is correct
12 Correct 0 ms 340 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 0 ms 340 KB Output is correct
15 Correct 0 ms 212 KB Output is correct
16 Correct 0 ms 340 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 212 KB Output is correct
20 Correct 0 ms 340 KB Output is correct
21 Correct 0 ms 340 KB Output is correct
22 Correct 0 ms 340 KB Output is correct
23 Correct 0 ms 340 KB Output is correct
24 Correct 0 ms 340 KB Output is correct
25 Correct 1 ms 980 KB Output is correct
26 Correct 3 ms 1752 KB Output is correct
27 Correct 3 ms 2004 KB Output is correct
28 Correct 3 ms 2004 KB Output is correct
29 Correct 2 ms 2000 KB Output is correct
30 Correct 2 ms 2004 KB Output is correct
31 Correct 5 ms 2656 KB Output is correct
32 Correct 1 ms 1364 KB Output is correct
33 Correct 1 ms 1364 KB Output is correct
34 Correct 5 ms 3532 KB Output is correct
35 Correct 6 ms 5116 KB Output is correct
36 Correct 9 ms 4052 KB Output is correct
37 Correct 6 ms 5192 KB Output is correct
38 Correct 6 ms 5192 KB Output is correct
39 Correct 16 ms 10056 KB Output is correct
40 Correct 64 ms 31584 KB Output is correct
41 Correct 34 ms 30340 KB Output is correct
42 Correct 96 ms 42748 KB Output is correct
43 Correct 70 ms 42732 KB Output is correct
44 Correct 63 ms 42572 KB Output is correct
45 Correct 59 ms 36336 KB Output is correct
46 Correct 56 ms 35412 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 340 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 340 KB Output is correct
9 Correct 0 ms 340 KB Output is correct
10 Correct 0 ms 340 KB Output is correct
11 Correct 1 ms 384 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 0 ms 340 KB Output is correct
15 Correct 0 ms 468 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 1 ms 340 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 340 KB Output is correct
20 Correct 0 ms 340 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 0 ms 340 KB Output is correct
23 Correct 0 ms 212 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 0 ms 212 KB Output is correct
26 Correct 0 ms 340 KB Output is correct
27 Correct 0 ms 212 KB Output is correct
28 Correct 0 ms 340 KB Output is correct
29 Correct 1 ms 212 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 0 ms 340 KB Output is correct
32 Correct 0 ms 340 KB Output is correct
33 Correct 5 ms 1364 KB Output is correct
34 Correct 0 ms 340 KB Output is correct
35 Correct 1 ms 724 KB Output is correct
36 Correct 1 ms 1108 KB Output is correct
37 Correct 11 ms 6848 KB Output is correct
38 Correct 3 ms 1752 KB Output is correct
39 Correct 3 ms 2004 KB Output is correct
40 Correct 7 ms 1492 KB Output is correct
41 Correct 5 ms 1364 KB Output is correct
42 Correct 3 ms 2004 KB Output is correct
43 Correct 2 ms 2000 KB Output is correct
44 Correct 3 ms 2004 KB Output is correct
45 Correct 10 ms 8796 KB Output is correct
46 Correct 11 ms 8792 KB Output is correct
47 Correct 10 ms 4932 KB Output is correct
48 Correct 7 ms 1872 KB Output is correct
49 Correct 6 ms 1856 KB Output is correct
50 Correct 13 ms 2152 KB Output is correct
51 Correct 5 ms 2656 KB Output is correct
52 Correct 1 ms 1364 KB Output is correct
53 Correct 1 ms 1364 KB Output is correct
54 Correct 2 ms 1364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 1 ms 340 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 0 ms 340 KB Output is correct
9 Correct 0 ms 340 KB Output is correct
10 Correct 0 ms 340 KB Output is correct
11 Correct 1 ms 384 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 0 ms 340 KB Output is correct
15 Correct 0 ms 468 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 1 ms 340 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 0 ms 340 KB Output is correct
20 Correct 0 ms 340 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 0 ms 340 KB Output is correct
23 Correct 0 ms 212 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 0 ms 212 KB Output is correct
26 Correct 0 ms 340 KB Output is correct
27 Correct 0 ms 212 KB Output is correct
28 Correct 0 ms 340 KB Output is correct
29 Correct 1 ms 212 KB Output is correct
30 Correct 1 ms 340 KB Output is correct
31 Correct 0 ms 340 KB Output is correct
32 Correct 0 ms 340 KB Output is correct
33 Correct 5 ms 1364 KB Output is correct
34 Correct 0 ms 340 KB Output is correct
35 Correct 1 ms 724 KB Output is correct
36 Correct 1 ms 1108 KB Output is correct
37 Correct 11 ms 6848 KB Output is correct
38 Correct 3 ms 1752 KB Output is correct
39 Correct 3 ms 2004 KB Output is correct
40 Correct 7 ms 1492 KB Output is correct
41 Correct 5 ms 1364 KB Output is correct
42 Correct 3 ms 2004 KB Output is correct
43 Correct 2 ms 2000 KB Output is correct
44 Correct 3 ms 2004 KB Output is correct
45 Correct 10 ms 8796 KB Output is correct
46 Correct 11 ms 8792 KB Output is correct
47 Correct 10 ms 4932 KB Output is correct
48 Correct 7 ms 1872 KB Output is correct
49 Correct 6 ms 1856 KB Output is correct
50 Correct 13 ms 2152 KB Output is correct
51 Correct 5 ms 2656 KB Output is correct
52 Correct 1 ms 1364 KB Output is correct
53 Correct 1 ms 1364 KB Output is correct
54 Correct 2 ms 1364 KB Output is correct
55 Correct 16 ms 3044 KB Output is correct
56 Correct 9 ms 5060 KB Output is correct
57 Correct 5 ms 3600 KB Output is correct
58 Correct 16 ms 3784 KB Output is correct
59 Correct 6 ms 5096 KB Output is correct
60 Correct 20 ms 3028 KB Output is correct
61 Correct 14 ms 3028 KB Output is correct
62 Correct 6 ms 4052 KB Output is correct
63 Correct 6 ms 5192 KB Output is correct
64 Correct 5 ms 5192 KB Output is correct
65 Correct 27 ms 25676 KB Output is correct
66 Correct 33 ms 25644 KB Output is correct
67 Correct 28 ms 13384 KB Output is correct
68 Correct 24 ms 3788 KB Output is correct
69 Correct 28 ms 3848 KB Output is correct
70 Correct 17 ms 3804 KB Output is correct
71 Correct 23 ms 5964 KB Output is correct
72 Correct 12 ms 3548 KB Output is correct
73 Correct 16 ms 3284 KB Output is correct
74 Correct 2 ms 2972 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 340 KB Output is correct
4 Correct 0 ms 340 KB Output is correct
5 Correct 0 ms 340 KB Output is correct
6 Correct 0 ms 340 KB Output is correct
7 Correct 0 ms 340 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 0 ms 212 KB Output is correct
13 Correct 0 ms 340 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 0 ms 212 KB Output is correct
16 Correct 0 ms 340 KB Output is correct
17 Correct 0 ms 340 KB Output is correct
18 Correct 0 ms 340 KB Output is correct
19 Correct 6 ms 1364 KB Output is correct
20 Correct 13 ms 6848 KB Output is correct
21 Correct 3 ms 2004 KB Output is correct
22 Correct 6 ms 1492 KB Output is correct
23 Correct 6 ms 1364 KB Output is correct
24 Correct 9 ms 8768 KB Output is correct
25 Correct 12 ms 8836 KB Output is correct
26 Correct 1 ms 1364 KB Output is correct
27 Correct 1 ms 1364 KB Output is correct
28 Correct 3 ms 1364 KB Output is correct
29 Correct 16 ms 3028 KB Output is correct
30 Correct 9 ms 5060 KB Output is correct
31 Correct 6 ms 5072 KB Output is correct
32 Correct 20 ms 3028 KB Output is correct
33 Correct 14 ms 3028 KB Output is correct
34 Correct 28 ms 25624 KB Output is correct
35 Correct 34 ms 25676 KB Output is correct
36 Correct 11 ms 3536 KB Output is correct
37 Correct 16 ms 3328 KB Output is correct
38 Correct 2 ms 3028 KB Output is correct
39 Correct 236 ms 26252 KB Output is correct
40 Correct 8 ms 4424 KB Output is correct
41 Correct 33 ms 26516 KB Output is correct
42 Correct 25 ms 4164 KB Output is correct
43 Correct 36 ms 19004 KB Output is correct
44 Correct 48 ms 25788 KB Output is correct
45 Correct 66 ms 31300 KB Output is correct
46 Correct 33 ms 30276 KB Output is correct
47 Correct 271 ms 26500 KB Output is correct
48 Correct 179 ms 26216 KB Output is correct
49 Correct 276 ms 213348 KB Output is correct
50 Correct 317 ms 213256 KB Output is correct
51 Correct 187 ms 29032 KB Output is correct
52 Correct 132 ms 26784 KB Output is correct
53 Correct 172 ms 26444 KB Output is correct
54 Correct 0 ms 212 KB Output is correct
55 Correct 0 ms 212 KB Output is correct
56 Correct 0 ms 212 KB Output is correct
57 Correct 0 ms 212 KB Output is correct
58 Correct 1 ms 340 KB Output is correct
59 Correct 0 ms 212 KB Output is correct
60 Correct 1 ms 212 KB Output is correct
61 Correct 0 ms 340 KB Output is correct
62 Correct 0 ms 340 KB Output is correct
63 Correct 0 ms 340 KB Output is correct
64 Correct 1 ms 384 KB Output is correct
65 Correct 1 ms 340 KB Output is correct
66 Correct 1 ms 340 KB Output is correct
67 Correct 0 ms 340 KB Output is correct
68 Correct 0 ms 468 KB Output is correct
69 Correct 1 ms 340 KB Output is correct
70 Correct 1 ms 340 KB Output is correct
71 Correct 0 ms 212 KB Output is correct
72 Correct 0 ms 340 KB Output is correct
73 Correct 0 ms 340 KB Output is correct
74 Correct 0 ms 212 KB Output is correct
75 Correct 0 ms 340 KB Output is correct
76 Correct 0 ms 212 KB Output is correct
77 Correct 0 ms 212 KB Output is correct
78 Correct 0 ms 212 KB Output is correct
79 Correct 0 ms 340 KB Output is correct
80 Correct 0 ms 212 KB Output is correct
81 Correct 0 ms 340 KB Output is correct
82 Correct 1 ms 212 KB Output is correct
83 Correct 1 ms 340 KB Output is correct
84 Correct 0 ms 340 KB Output is correct
85 Correct 0 ms 340 KB Output is correct
86 Correct 0 ms 212 KB Output is correct
87 Correct 0 ms 212 KB Output is correct
88 Correct 1 ms 212 KB Output is correct
89 Correct 0 ms 212 KB Output is correct
90 Correct 0 ms 212 KB Output is correct
91 Correct 1 ms 212 KB Output is correct
92 Correct 0 ms 340 KB Output is correct
93 Correct 0 ms 340 KB Output is correct
94 Correct 0 ms 340 KB Output is correct
95 Correct 0 ms 340 KB Output is correct
96 Correct 0 ms 340 KB Output is correct
97 Correct 0 ms 340 KB Output is correct
98 Correct 0 ms 212 KB Output is correct
99 Correct 0 ms 340 KB Output is correct
100 Correct 0 ms 212 KB Output is correct
101 Correct 0 ms 340 KB Output is correct
102 Correct 0 ms 212 KB Output is correct
103 Correct 0 ms 212 KB Output is correct
104 Correct 0 ms 212 KB Output is correct
105 Correct 0 ms 340 KB Output is correct
106 Correct 0 ms 340 KB Output is correct
107 Correct 0 ms 340 KB Output is correct
108 Correct 0 ms 340 KB Output is correct
109 Correct 0 ms 340 KB Output is correct
110 Correct 1 ms 980 KB Output is correct
111 Correct 3 ms 1752 KB Output is correct
112 Correct 3 ms 2004 KB Output is correct
113 Correct 3 ms 2004 KB Output is correct
114 Correct 2 ms 2000 KB Output is correct
115 Correct 2 ms 2004 KB Output is correct
116 Correct 5 ms 2656 KB Output is correct
117 Correct 1 ms 1364 KB Output is correct
118 Correct 1 ms 1364 KB Output is correct
119 Correct 5 ms 3532 KB Output is correct
120 Correct 6 ms 5116 KB Output is correct
121 Correct 9 ms 4052 KB Output is correct
122 Correct 6 ms 5192 KB Output is correct
123 Correct 6 ms 5192 KB Output is correct
124 Correct 16 ms 10056 KB Output is correct
125 Correct 64 ms 31584 KB Output is correct
126 Correct 34 ms 30340 KB Output is correct
127 Correct 96 ms 42748 KB Output is correct
128 Correct 70 ms 42732 KB Output is correct
129 Correct 63 ms 42572 KB Output is correct
130 Correct 59 ms 36336 KB Output is correct
131 Correct 56 ms 35412 KB Output is correct
132 Correct 5 ms 1364 KB Output is correct
133 Correct 0 ms 340 KB Output is correct
134 Correct 1 ms 724 KB Output is correct
135 Correct 1 ms 1108 KB Output is correct
136 Correct 11 ms 6848 KB Output is correct
137 Correct 3 ms 1752 KB Output is correct
138 Correct 3 ms 2004 KB Output is correct
139 Correct 7 ms 1492 KB Output is correct
140 Correct 5 ms 1364 KB Output is correct
141 Correct 3 ms 2004 KB Output is correct
142 Correct 2 ms 2000 KB Output is correct
143 Correct 3 ms 2004 KB Output is correct
144 Correct 10 ms 8796 KB Output is correct
145 Correct 11 ms 8792 KB Output is correct
146 Correct 10 ms 4932 KB Output is correct
147 Correct 7 ms 1872 KB Output is correct
148 Correct 6 ms 1856 KB Output is correct
149 Correct 13 ms 2152 KB Output is correct
150 Correct 5 ms 2656 KB Output is correct
151 Correct 1 ms 1364 KB Output is correct
152 Correct 1 ms 1364 KB Output is correct
153 Correct 2 ms 1364 KB Output is correct
154 Correct 16 ms 3044 KB Output is correct
155 Correct 9 ms 5060 KB Output is correct
156 Correct 5 ms 3600 KB Output is correct
157 Correct 16 ms 3784 KB Output is correct
158 Correct 6 ms 5096 KB Output is correct
159 Correct 20 ms 3028 KB Output is correct
160 Correct 14 ms 3028 KB Output is correct
161 Correct 6 ms 4052 KB Output is correct
162 Correct 6 ms 5192 KB Output is correct
163 Correct 5 ms 5192 KB Output is correct
164 Correct 27 ms 25676 KB Output is correct
165 Correct 33 ms 25644 KB Output is correct
166 Correct 28 ms 13384 KB Output is correct
167 Correct 24 ms 3788 KB Output is correct
168 Correct 28 ms 3848 KB Output is correct
169 Correct 17 ms 3804 KB Output is correct
170 Correct 23 ms 5964 KB Output is correct
171 Correct 12 ms 3548 KB Output is correct
172 Correct 16 ms 3284 KB Output is correct
173 Correct 2 ms 2972 KB Output is correct
174 Correct 9 ms 5192 KB Output is correct
175 Correct 66 ms 7400 KB Output is correct
176 Correct 69 ms 42868 KB Output is correct
177 Correct 113 ms 22064 KB Output is correct
178 Correct 23 ms 26304 KB Output is correct
179 Correct 179 ms 30268 KB Output is correct
180 Correct 324 ms 32176 KB Output is correct
181 Correct 317 ms 39664 KB Output is correct
182 Correct 321 ms 53400 KB Output is correct
183 Correct 171 ms 37028 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 340 KB Output is correct
4 Correct 0 ms 340 KB Output is correct
5 Correct 0 ms 340 KB Output is correct
6 Correct 0 ms 340 KB Output is correct
7 Correct 0 ms 340 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 0 ms 212 KB Output is correct
13 Correct 0 ms 340 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 0 ms 212 KB Output is correct
16 Correct 0 ms 340 KB Output is correct
17 Correct 0 ms 340 KB Output is correct
18 Correct 0 ms 340 KB Output is correct
19 Correct 6 ms 1364 KB Output is correct
20 Correct 13 ms 6848 KB Output is correct
21 Correct 3 ms 2004 KB Output is correct
22 Correct 6 ms 1492 KB Output is correct
23 Correct 6 ms 1364 KB Output is correct
24 Correct 9 ms 8768 KB Output is correct
25 Correct 12 ms 8836 KB Output is correct
26 Correct 1 ms 1364 KB Output is correct
27 Correct 1 ms 1364 KB Output is correct
28 Correct 3 ms 1364 KB Output is correct
29 Correct 16 ms 3028 KB Output is correct
30 Correct 9 ms 5060 KB Output is correct
31 Correct 6 ms 5072 KB Output is correct
32 Correct 20 ms 3028 KB Output is correct
33 Correct 14 ms 3028 KB Output is correct
34 Correct 28 ms 25624 KB Output is correct
35 Correct 34 ms 25676 KB Output is correct
36 Correct 11 ms 3536 KB Output is correct
37 Correct 16 ms 3328 KB Output is correct
38 Correct 2 ms 3028 KB Output is correct
39 Correct 236 ms 26252 KB Output is correct
40 Correct 8 ms 4424 KB Output is correct
41 Correct 33 ms 26516 KB Output is correct
42 Correct 25 ms 4164 KB Output is correct
43 Correct 36 ms 19004 KB Output is correct
44 Correct 48 ms 25788 KB Output is correct
45 Correct 66 ms 31300 KB Output is correct
46 Correct 33 ms 30276 KB Output is correct
47 Correct 271 ms 26500 KB Output is correct
48 Correct 179 ms 26216 KB Output is correct
49 Correct 276 ms 213348 KB Output is correct
50 Correct 317 ms 213256 KB Output is correct
51 Correct 187 ms 29032 KB Output is correct
52 Correct 132 ms 26784 KB Output is correct
53 Correct 172 ms 26444 KB Output is correct
54 Correct 0 ms 212 KB Output is correct
55 Correct 0 ms 212 KB Output is correct
56 Correct 0 ms 212 KB Output is correct
57 Correct 0 ms 212 KB Output is correct
58 Correct 1 ms 340 KB Output is correct
59 Correct 0 ms 212 KB Output is correct
60 Correct 1 ms 212 KB Output is correct
61 Correct 0 ms 340 KB Output is correct
62 Correct 0 ms 340 KB Output is correct
63 Correct 0 ms 340 KB Output is correct
64 Correct 1 ms 384 KB Output is correct
65 Correct 1 ms 340 KB Output is correct
66 Correct 1 ms 340 KB Output is correct
67 Correct 0 ms 340 KB Output is correct
68 Correct 0 ms 468 KB Output is correct
69 Correct 1 ms 340 KB Output is correct
70 Correct 1 ms 340 KB Output is correct
71 Correct 0 ms 212 KB Output is correct
72 Correct 0 ms 340 KB Output is correct
73 Correct 0 ms 340 KB Output is correct
74 Correct 0 ms 212 KB Output is correct
75 Correct 0 ms 340 KB Output is correct
76 Correct 0 ms 212 KB Output is correct
77 Correct 0 ms 212 KB Output is correct
78 Correct 0 ms 212 KB Output is correct
79 Correct 0 ms 340 KB Output is correct
80 Correct 0 ms 212 KB Output is correct
81 Correct 0 ms 340 KB Output is correct
82 Correct 1 ms 212 KB Output is correct
83 Correct 1 ms 340 KB Output is correct
84 Correct 0 ms 340 KB Output is correct
85 Correct 0 ms 340 KB Output is correct
86 Correct 0 ms 212 KB Output is correct
87 Correct 0 ms 212 KB Output is correct
88 Correct 1 ms 212 KB Output is correct
89 Correct 0 ms 212 KB Output is correct
90 Correct 0 ms 212 KB Output is correct
91 Correct 1 ms 212 KB Output is correct
92 Correct 0 ms 340 KB Output is correct
93 Correct 0 ms 340 KB Output is correct
94 Correct 0 ms 340 KB Output is correct
95 Correct 0 ms 340 KB Output is correct
96 Correct 0 ms 340 KB Output is correct
97 Correct 0 ms 340 KB Output is correct
98 Correct 0 ms 212 KB Output is correct
99 Correct 0 ms 340 KB Output is correct
100 Correct 0 ms 212 KB Output is correct
101 Correct 0 ms 340 KB Output is correct
102 Correct 0 ms 212 KB Output is correct
103 Correct 0 ms 212 KB Output is correct
104 Correct 0 ms 212 KB Output is correct
105 Correct 0 ms 340 KB Output is correct
106 Correct 0 ms 340 KB Output is correct
107 Correct 0 ms 340 KB Output is correct
108 Correct 0 ms 340 KB Output is correct
109 Correct 0 ms 340 KB Output is correct
110 Correct 1 ms 980 KB Output is correct
111 Correct 3 ms 1752 KB Output is correct
112 Correct 3 ms 2004 KB Output is correct
113 Correct 3 ms 2004 KB Output is correct
114 Correct 2 ms 2000 KB Output is correct
115 Correct 2 ms 2004 KB Output is correct
116 Correct 5 ms 2656 KB Output is correct
117 Correct 1 ms 1364 KB Output is correct
118 Correct 1 ms 1364 KB Output is correct
119 Correct 5 ms 3532 KB Output is correct
120 Correct 6 ms 5116 KB Output is correct
121 Correct 9 ms 4052 KB Output is correct
122 Correct 6 ms 5192 KB Output is correct
123 Correct 6 ms 5192 KB Output is correct
124 Correct 16 ms 10056 KB Output is correct
125 Correct 64 ms 31584 KB Output is correct
126 Correct 34 ms 30340 KB Output is correct
127 Correct 96 ms 42748 KB Output is correct
128 Correct 70 ms 42732 KB Output is correct
129 Correct 63 ms 42572 KB Output is correct
130 Correct 59 ms 36336 KB Output is correct
131 Correct 56 ms 35412 KB Output is correct
132 Correct 5 ms 1364 KB Output is correct
133 Correct 0 ms 340 KB Output is correct
134 Correct 1 ms 724 KB Output is correct
135 Correct 1 ms 1108 KB Output is correct
136 Correct 11 ms 6848 KB Output is correct
137 Correct 3 ms 1752 KB Output is correct
138 Correct 3 ms 2004 KB Output is correct
139 Correct 7 ms 1492 KB Output is correct
140 Correct 5 ms 1364 KB Output is correct
141 Correct 3 ms 2004 KB Output is correct
142 Correct 2 ms 2000 KB Output is correct
143 Correct 3 ms 2004 KB Output is correct
144 Correct 10 ms 8796 KB Output is correct
145 Correct 11 ms 8792 KB Output is correct
146 Correct 10 ms 4932 KB Output is correct
147 Correct 7 ms 1872 KB Output is correct
148 Correct 6 ms 1856 KB Output is correct
149 Correct 13 ms 2152 KB Output is correct
150 Correct 5 ms 2656 KB Output is correct
151 Correct 1 ms 1364 KB Output is correct
152 Correct 1 ms 1364 KB Output is correct
153 Correct 2 ms 1364 KB Output is correct
154 Correct 16 ms 3044 KB Output is correct
155 Correct 9 ms 5060 KB Output is correct
156 Correct 5 ms 3600 KB Output is correct
157 Correct 16 ms 3784 KB Output is correct
158 Correct 6 ms 5096 KB Output is correct
159 Correct 20 ms 3028 KB Output is correct
160 Correct 14 ms 3028 KB Output is correct
161 Correct 6 ms 4052 KB Output is correct
162 Correct 6 ms 5192 KB Output is correct
163 Correct 5 ms 5192 KB Output is correct
164 Correct 27 ms 25676 KB Output is correct
165 Correct 33 ms 25644 KB Output is correct
166 Correct 28 ms 13384 KB Output is correct
167 Correct 24 ms 3788 KB Output is correct
168 Correct 28 ms 3848 KB Output is correct
169 Correct 17 ms 3804 KB Output is correct
170 Correct 23 ms 5964 KB Output is correct
171 Correct 12 ms 3548 KB Output is correct
172 Correct 16 ms 3284 KB Output is correct
173 Correct 2 ms 2972 KB Output is correct
174 Correct 9 ms 5192 KB Output is correct
175 Correct 66 ms 7400 KB Output is correct
176 Correct 69 ms 42868 KB Output is correct
177 Correct 113 ms 22064 KB Output is correct
178 Correct 23 ms 26304 KB Output is correct
179 Correct 179 ms 30268 KB Output is correct
180 Correct 324 ms 32176 KB Output is correct
181 Correct 317 ms 39664 KB Output is correct
182 Correct 321 ms 53400 KB Output is correct
183 Correct 171 ms 37028 KB Output is correct
184 Correct 557 ms 51900 KB Output is correct
185 Correct 86 ms 33472 KB Output is correct
186 Correct 71 ms 38932 KB Output is correct
187 Correct 43 ms 42832 KB Output is correct
188 Correct 239 ms 84704 KB Output is correct
189 Correct 424 ms 52660 KB Output is correct
190 Correct 196 ms 51792 KB Output is correct
191 Correct 247 ms 84664 KB Output is correct
192 Correct 188 ms 84752 KB Output is correct
193 Correct 121 ms 84716 KB Output is correct
194 Correct 580 ms 426240 KB Output is correct
195 Correct 627 ms 426348 KB Output is correct
196 Correct 476 ms 58584 KB Output is correct
197 Correct 227 ms 60608 KB Output is correct
198 Correct 423 ms 69988 KB Output is correct
199 Correct 356 ms 63108 KB Output is correct
200 Correct 215 ms 55016 KB Output is correct
201 Correct 370 ms 53268 KB Output is correct
202 Correct 474 ms 52136 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 340 KB Output is correct
4 Correct 0 ms 340 KB Output is correct
5 Correct 0 ms 340 KB Output is correct
6 Correct 0 ms 340 KB Output is correct
7 Correct 0 ms 340 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 0 ms 212 KB Output is correct
13 Correct 0 ms 340 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 0 ms 212 KB Output is correct
16 Correct 0 ms 340 KB Output is correct
17 Correct 0 ms 340 KB Output is correct
18 Correct 0 ms 340 KB Output is correct
19 Correct 6 ms 1364 KB Output is correct
20 Correct 13 ms 6848 KB Output is correct
21 Correct 3 ms 2004 KB Output is correct
22 Correct 6 ms 1492 KB Output is correct
23 Correct 6 ms 1364 KB Output is correct
24 Correct 9 ms 8768 KB Output is correct
25 Correct 12 ms 8836 KB Output is correct
26 Correct 1 ms 1364 KB Output is correct
27 Correct 1 ms 1364 KB Output is correct
28 Correct 3 ms 1364 KB Output is correct
29 Correct 16 ms 3028 KB Output is correct
30 Correct 9 ms 5060 KB Output is correct
31 Correct 6 ms 5072 KB Output is correct
32 Correct 20 ms 3028 KB Output is correct
33 Correct 14 ms 3028 KB Output is correct
34 Correct 28 ms 25624 KB Output is correct
35 Correct 34 ms 25676 KB Output is correct
36 Correct 11 ms 3536 KB Output is correct
37 Correct 16 ms 3328 KB Output is correct
38 Correct 2 ms 3028 KB Output is correct
39 Correct 236 ms 26252 KB Output is correct
40 Correct 8 ms 4424 KB Output is correct
41 Correct 33 ms 26516 KB Output is correct
42 Correct 25 ms 4164 KB Output is correct
43 Correct 36 ms 19004 KB Output is correct
44 Correct 48 ms 25788 KB Output is correct
45 Correct 66 ms 31300 KB Output is correct
46 Correct 33 ms 30276 KB Output is correct
47 Correct 271 ms 26500 KB Output is correct
48 Correct 179 ms 26216 KB Output is correct
49 Correct 276 ms 213348 KB Output is correct
50 Correct 317 ms 213256 KB Output is correct
51 Correct 187 ms 29032 KB Output is correct
52 Correct 132 ms 26784 KB Output is correct
53 Correct 172 ms 26444 KB Output is correct
54 Correct 0 ms 212 KB Output is correct
55 Correct 0 ms 212 KB Output is correct
56 Correct 0 ms 212 KB Output is correct
57 Correct 0 ms 212 KB Output is correct
58 Correct 1 ms 340 KB Output is correct
59 Correct 0 ms 212 KB Output is correct
60 Correct 1 ms 212 KB Output is correct
61 Correct 0 ms 340 KB Output is correct
62 Correct 0 ms 340 KB Output is correct
63 Correct 0 ms 340 KB Output is correct
64 Correct 1 ms 384 KB Output is correct
65 Correct 1 ms 340 KB Output is correct
66 Correct 1 ms 340 KB Output is correct
67 Correct 0 ms 340 KB Output is correct
68 Correct 0 ms 468 KB Output is correct
69 Correct 1 ms 340 KB Output is correct
70 Correct 1 ms 340 KB Output is correct
71 Correct 0 ms 212 KB Output is correct
72 Correct 0 ms 340 KB Output is correct
73 Correct 0 ms 340 KB Output is correct
74 Correct 0 ms 212 KB Output is correct
75 Correct 0 ms 340 KB Output is correct
76 Correct 0 ms 212 KB Output is correct
77 Correct 0 ms 212 KB Output is correct
78 Correct 0 ms 212 KB Output is correct
79 Correct 0 ms 340 KB Output is correct
80 Correct 0 ms 212 KB Output is correct
81 Correct 0 ms 340 KB Output is correct
82 Correct 1 ms 212 KB Output is correct
83 Correct 1 ms 340 KB Output is correct
84 Correct 0 ms 340 KB Output is correct
85 Correct 0 ms 340 KB Output is correct
86 Correct 0 ms 212 KB Output is correct
87 Correct 0 ms 212 KB Output is correct
88 Correct 1 ms 212 KB Output is correct
89 Correct 0 ms 212 KB Output is correct
90 Correct 0 ms 212 KB Output is correct
91 Correct 1 ms 212 KB Output is correct
92 Correct 0 ms 340 KB Output is correct
93 Correct 0 ms 340 KB Output is correct
94 Correct 0 ms 340 KB Output is correct
95 Correct 0 ms 340 KB Output is correct
96 Correct 0 ms 340 KB Output is correct
97 Correct 0 ms 340 KB Output is correct
98 Correct 0 ms 212 KB Output is correct
99 Correct 0 ms 340 KB Output is correct
100 Correct 0 ms 212 KB Output is correct
101 Correct 0 ms 340 KB Output is correct
102 Correct 0 ms 212 KB Output is correct
103 Correct 0 ms 212 KB Output is correct
104 Correct 0 ms 212 KB Output is correct
105 Correct 0 ms 340 KB Output is correct
106 Correct 0 ms 340 KB Output is correct
107 Correct 0 ms 340 KB Output is correct
108 Correct 0 ms 340 KB Output is correct
109 Correct 0 ms 340 KB Output is correct
110 Correct 1 ms 980 KB Output is correct
111 Correct 3 ms 1752 KB Output is correct
112 Correct 3 ms 2004 KB Output is correct
113 Correct 3 ms 2004 KB Output is correct
114 Correct 2 ms 2000 KB Output is correct
115 Correct 2 ms 2004 KB Output is correct
116 Correct 5 ms 2656 KB Output is correct
117 Correct 1 ms 1364 KB Output is correct
118 Correct 1 ms 1364 KB Output is correct
119 Correct 5 ms 3532 KB Output is correct
120 Correct 6 ms 5116 KB Output is correct
121 Correct 9 ms 4052 KB Output is correct
122 Correct 6 ms 5192 KB Output is correct
123 Correct 6 ms 5192 KB Output is correct
124 Correct 16 ms 10056 KB Output is correct
125 Correct 64 ms 31584 KB Output is correct
126 Correct 34 ms 30340 KB Output is correct
127 Correct 96 ms 42748 KB Output is correct
128 Correct 70 ms 42732 KB Output is correct
129 Correct 63 ms 42572 KB Output is correct
130 Correct 59 ms 36336 KB Output is correct
131 Correct 56 ms 35412 KB Output is correct
132 Correct 5 ms 1364 KB Output is correct
133 Correct 0 ms 340 KB Output is correct
134 Correct 1 ms 724 KB Output is correct
135 Correct 1 ms 1108 KB Output is correct
136 Correct 11 ms 6848 KB Output is correct
137 Correct 3 ms 1752 KB Output is correct
138 Correct 3 ms 2004 KB Output is correct
139 Correct 7 ms 1492 KB Output is correct
140 Correct 5 ms 1364 KB Output is correct
141 Correct 3 ms 2004 KB Output is correct
142 Correct 2 ms 2000 KB Output is correct
143 Correct 3 ms 2004 KB Output is correct
144 Correct 10 ms 8796 KB Output is correct
145 Correct 11 ms 8792 KB Output is correct
146 Correct 10 ms 4932 KB Output is correct
147 Correct 7 ms 1872 KB Output is correct
148 Correct 6 ms 1856 KB Output is correct
149 Correct 13 ms 2152 KB Output is correct
150 Correct 5 ms 2656 KB Output is correct
151 Correct 1 ms 1364 KB Output is correct
152 Correct 1 ms 1364 KB Output is correct
153 Correct 2 ms 1364 KB Output is correct
154 Correct 16 ms 3044 KB Output is correct
155 Correct 9 ms 5060 KB Output is correct
156 Correct 5 ms 3600 KB Output is correct
157 Correct 16 ms 3784 KB Output is correct
158 Correct 6 ms 5096 KB Output is correct
159 Correct 20 ms 3028 KB Output is correct
160 Correct 14 ms 3028 KB Output is correct
161 Correct 6 ms 4052 KB Output is correct
162 Correct 6 ms 5192 KB Output is correct
163 Correct 5 ms 5192 KB Output is correct
164 Correct 27 ms 25676 KB Output is correct
165 Correct 33 ms 25644 KB Output is correct
166 Correct 28 ms 13384 KB Output is correct
167 Correct 24 ms 3788 KB Output is correct
168 Correct 28 ms 3848 KB Output is correct
169 Correct 17 ms 3804 KB Output is correct
170 Correct 23 ms 5964 KB Output is correct
171 Correct 12 ms 3548 KB Output is correct
172 Correct 16 ms 3284 KB Output is correct
173 Correct 2 ms 2972 KB Output is correct
174 Correct 9 ms 5192 KB Output is correct
175 Correct 66 ms 7400 KB Output is correct
176 Correct 69 ms 42868 KB Output is correct
177 Correct 113 ms 22064 KB Output is correct
178 Correct 23 ms 26304 KB Output is correct
179 Correct 179 ms 30268 KB Output is correct
180 Correct 324 ms 32176 KB Output is correct
181 Correct 317 ms 39664 KB Output is correct
182 Correct 321 ms 53400 KB Output is correct
183 Correct 171 ms 37028 KB Output is correct
184 Correct 557 ms 51900 KB Output is correct
185 Correct 86 ms 33472 KB Output is correct
186 Correct 71 ms 38932 KB Output is correct
187 Correct 43 ms 42832 KB Output is correct
188 Correct 239 ms 84704 KB Output is correct
189 Correct 424 ms 52660 KB Output is correct
190 Correct 196 ms 51792 KB Output is correct
191 Correct 247 ms 84664 KB Output is correct
192 Correct 188 ms 84752 KB Output is correct
193 Correct 121 ms 84716 KB Output is correct
194 Correct 580 ms 426240 KB Output is correct
195 Correct 627 ms 426348 KB Output is correct
196 Correct 476 ms 58584 KB Output is correct
197 Correct 227 ms 60608 KB Output is correct
198 Correct 423 ms 69988 KB Output is correct
199 Correct 356 ms 63108 KB Output is correct
200 Correct 215 ms 55016 KB Output is correct
201 Correct 370 ms 53268 KB Output is correct
202 Correct 474 ms 52136 KB Output is correct
203 Correct 1165 ms 103052 KB Output is correct
204 Correct 576 ms 156996 KB Output is correct
205 Correct 549 ms 65768 KB Output is correct
206 Correct 197 ms 120268 KB Output is correct
207 Correct 492 ms 168504 KB Output is correct
208 Correct 999 ms 103568 KB Output is correct
209 Correct 1188 ms 102924 KB Output is correct
210 Correct 335 ms 135696 KB Output is correct
211 Correct 390 ms 168672 KB Output is correct
212 Correct 355 ms 168664 KB Output is correct
213 Correct 1142 ms 852328 KB Output is correct
214 Correct 1335 ms 852460 KB Output is correct
215 Correct 1222 ms 114384 KB Output is correct
216 Correct 1442 ms 119524 KB Output is correct
217 Correct 1994 ms 136836 KB Output is correct
218 Correct 1266 ms 207684 KB Output is correct
219 Correct 568 ms 171364 KB Output is correct
220 Correct 146 ms 140924 KB Output is correct
221 Correct 262 ms 149744 KB Output is correct
222 Correct 822 ms 254808 KB Output is correct
223 Correct 877 ms 112928 KB Output is correct
224 Correct 1022 ms 111732 KB Output is correct
225 Correct 442 ms 109288 KB Output is correct