#include<bits/stdc++.h>
#define endl '\n'
using namespace std;
typedef long long ll;
void speed()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
}
const int maxn = 6e6 + 10, block = sqrt(maxn) + 10;
struct cell
{
int x, y;
cell(int _x = 0, int _y = 0)
{
x = _x;
y = _y;
}
cell add(const cell &r) const
{
cell d;
d.x = x + r.x;
d.y = y + r.y;
return d;
}
};
cell neib[4] = {{0, 1}, {1, 0}, {-1, 0}, {0, -1}};
int n, m, h;
vector < int > a[block], tr[block], tl[block];
vector < int > tu[block], td[block];
vector < int > ver_idx[block];
vector < pair < int, bool > > adj[3 * maxn];
int stx, sty, enx, eny;
int nxt;
int visit[3 * maxn], dist[3 * maxn];
void add_edges_row(int row, int i, int j, int ver)
{
if (j - i + 1 == 2 * h - 1)
{
adj[ver].push_back({tr[row][i], 1});
adj[ver].push_back({tl[row][j], 1});
}
else
{
if (i == 1)
adj[ver].push_back({tl[row][j], 1});
else
{
int to = i;
if (i % (2 * h - 1) != 0)
to = 2 * h - 1 - i % (2 * h - 1) + i;
if (to >= j)
adj[ver].push_back({tr[row][i], 1});
else
{
adj[ver].push_back({tr[row][i], 1});
adj[ver].push_back({tl[row][j], 1});
}
}
}
}
void add_edges_col(int col, int i, int j, int ver)
{
if (j - i + 1 == 2 * h - 1)
{
adj[ver].push_back({td[i][col], 1});
adj[ver].push_back({tu[j][col], 1});
}
else
{
if (i == 1)
adj[ver].push_back({tu[j][col], 1});
else
{
int to = i;
if (i % (2 * h - 1) != 0)
to = 2 * h - 1 - i % (2 * h - 1) + i;
if (to >= j)
adj[ver].push_back({td[i][col], 1});
else
{
adj[ver].push_back({td[i][col], 1});
adj[ver].push_back({tu[j][col], 1});
}
}
}
}
void solve()
{
cin >> n >> m >> h;
cin >> stx >> sty;
cin >> enx >> eny;
for (int i = 1; i <= n; i ++)
{
a[i].resize(m + 2);
tl[i].resize(m + 2);
tr[i].resize(m + 2);
td[i].resize(m + 2);
tu[i].resize(m + 2);
ver_idx[i].resize(m + 2);
for (int j = 1; j <= m; j ++)
{
char c;
cin >> c;
if (c == '.')
a[i][j] = 0;
else
a[i][j] = 1;
}
}
int cnt = 0;
nxt = n * m;
for (int i = 1; i <= n; i ++)
{
for (int j = 1; j <= m; j ++)
{
ver_idx[i][j] = ++ cnt;
}
}
for (int i = 1; i <= n; i ++)
{
for (int j = 1; j <= m; j ++)
{
tr[i][j] = ++ nxt;
tl[i][j] = ++ nxt;
}
for (int j = 1; j <= m; j ++)
{
if (j % (2 * h - 1) != 0 && j != m)
adj[tr[i][j]].push_back({tr[i][j + 1], 0});
adj[tr[i][j]].push_back({ver_idx[i][j], 0});
if ((j - 1) % (2 * h - 1) != 0)
adj[tl[i][j]].push_back({tl[i][j - 1], 0});
adj[tl[i][j]].push_back({ver_idx[i][j], 0});
}
}
for (int j = 1; j <= m; j ++)
{
for (int i = 1; i <= n; i ++)
{
tu[i][j] = ++ nxt;
td[i][j] = ++ nxt;
}
for (int i = 1; i <= n; i ++)
{
if (i % (2 * h - 1) != 0 && i != n)
adj[td[i][j]].push_back({td[i + 1][j], 0});
adj[td[i][j]].push_back({ver_idx[i][j], 0});
if ((i - 1) % (2 * h - 1) != 0)
adj[tu[i][j]].push_back({tu[i - 1][j], 0});
adj[tu[i][j]].push_back({ver_idx[i][j], 0});
}
}
///exit(0);
for (int i = 1; i <= n; i ++)
for (int j = 1; j <= m; j ++)
{
cell cur(i, j);
for (int d = 0; d < 4; d ++)
{
cell nb = cur.add(neib[d]);
if (nb.x > 0 && nb.x <= n && nb.y > 0 && nb.y <= m)
if (a[nb.x][nb.y] == 0)
{
adj[ver_idx[cur.x][cur.y]].push_back({ver_idx[nb.x][nb.y], 0});
}
}
int st_row = max(1, i - h), en_row = min(n, i + h);
int st_col = max(1, j - h), en_col = min(m, j + h);
int fs_row = st_row, ds_row = en_row;
if (fs_row == i - h)
fs_row ++;
if (ds_row == i + h)
ds_row --;
///cout << i << " " << j << " range " << st_row << " " << en_row << endl;
///add_edges(col_root[j], 1, n, fs_row, ds_row, ver_idx[i][j], 1);
/// up row
bool f1 = false, f2 = false;
if (st_row == i - h)
{
if (st_col == j - h)
st_col ++, f1 = true;
if (en_col == j + h)
en_col --, f2 = true;
}
///add_edges(row_root[st_row], 1, m, st_col, en_col, ver_idx[i][j], 1);
add_edges_row(st_row, st_col, en_col, ver_idx[i][j]);
if (st_row == i - h)
{
if (f1)
st_col --;
if (f2)
en_col ++;
}
/// down row
f1 = f2 = false;
if (en_row == i + h)
{
if (st_col == j - h)
st_col ++, f1 = true;
if (en_col == j + h)
en_col --, f2 = true;
}
////cout << i << " " << j << " range " << st_col << " " << en_col << endl;
///add_edges(row_root[en_row], 1, m, st_col, en_col, ver_idx[i][j], 1);
add_edges_row(en_row, st_col, en_col, ver_idx[i][j]);
if (en_row == i + h)
{
if (f1)
st_col --;
if (f2)
en_col ++;
}
/// left col
f1 = f2 = false;
if (st_col == j - h)
{
if (st_row == i - h)
st_row ++, f1 = true;
if (en_row == i + h)
en_row --, f2 = true;
}
///add_edges(col_root[st_col], 1, n, st_row, en_row, ver_idx[i][j], 1);
add_edges_col(st_col, st_row, en_row, ver_idx[i][j]);
if (st_col == j - h)
{
if (f1)
st_row --;
if (f2)
en_row ++;
}
/// right col
f1 = f2 = false;
if (en_col == j + h)
{
if (st_row == i - h)
st_row ++, f1 = true;
if (en_row == i + h)
en_row --, f2 = true;
}
///cout << i << " " << j << " " << "range " << st_row << " " << en_row << " col " << en_col << endl;
///add_edges(col_root[en_col], 1, n, st_row, en_row, ver_idx[i][j], 1);
add_edges_col(en_col, st_row, en_row, ver_idx[i][j]);
if (en_col == j + h)
{
if (f1)
st_row --;
if (f2)
en_row ++;
}
/**for (int row = st_row; row <= en_row; row ++)
{
if (row == i - h || row == i + h)
{
st_col ++, en_col --;
add_edges(row_root[row], 1, m, st_col, en_col, ver_idx[i][j], 1);
st_col --, en_col ++;
}
else
{
adj[ver_idx[cur.x][cur.y]].push_back({fict[row][cur.y], 1});
}
}*/
}
for (int i = 1; i <= nxt; i ++)
dist[i] = 1e9;
deque < int > dq;
dq.push_back(ver_idx[stx][sty]);
dist[ver_idx[stx][sty]] = 0;
while(!dq.empty())
{
int cur = dq.front();
dq.pop_front();
if (cur == ver_idx[enx][eny])
{
cout << dist[cur] << endl;
return;
}
for (pair < int, int > nb : adj[cur])
{
int u = nb.first;
int w = nb.second;
if (dist[u] > dist[cur] + w)
{
dist[u] = dist[cur] + w;
if (w == 0)
dq.push_front(u);
else
dq.push_back(u);
}
}
}
/**for (int i = 1; i <= n; i ++, cout << endl)
for (int j = 1; j <= m; j ++)
cout << dist[ver_idx[i][j]] << " ";*/
int ans = dist[ver_idx[enx][eny]];
for (int i = 1; i <= n; i ++)
for (int j = 1; j <= m; j ++)
{
if (abs(i - enx) <= h && abs(j - eny) <= h)
{
if (abs(i - enx) + abs(j - eny) != 2 * h)
{
ans = min(ans, dist[ver_idx[i][j]] + 1);
}
}
}
cout << ans << endl;
}
int main()
{
///freopen("test.txt", "r", stdin);
speed();
solve();
return 0;
}
/**
3 3 2
1 1
3 3
.#.
##.
...
*/
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
210 ms |
423296 KB |
Output is correct |
2 |
Correct |
175 ms |
423244 KB |
Output is correct |
3 |
Correct |
188 ms |
423624 KB |
Output is correct |
4 |
Correct |
174 ms |
423640 KB |
Output is correct |
5 |
Correct |
173 ms |
423552 KB |
Output is correct |
6 |
Correct |
177 ms |
423648 KB |
Output is correct |
7 |
Correct |
174 ms |
423580 KB |
Output is correct |
8 |
Correct |
172 ms |
423600 KB |
Output is correct |
9 |
Correct |
174 ms |
423320 KB |
Output is correct |
10 |
Correct |
174 ms |
423288 KB |
Output is correct |
11 |
Correct |
171 ms |
423348 KB |
Output is correct |
12 |
Correct |
193 ms |
423292 KB |
Output is correct |
13 |
Correct |
188 ms |
423532 KB |
Output is correct |
14 |
Correct |
178 ms |
423380 KB |
Output is correct |
15 |
Correct |
172 ms |
423272 KB |
Output is correct |
16 |
Correct |
176 ms |
423556 KB |
Output is correct |
17 |
Correct |
171 ms |
423612 KB |
Output is correct |
18 |
Correct |
173 ms |
423584 KB |
Output is correct |
19 |
Correct |
210 ms |
438992 KB |
Output is correct |
20 |
Correct |
190 ms |
434972 KB |
Output is correct |
21 |
Correct |
210 ms |
441968 KB |
Output is correct |
22 |
Correct |
211 ms |
441396 KB |
Output is correct |
23 |
Correct |
214 ms |
438352 KB |
Output is correct |
24 |
Correct |
200 ms |
442012 KB |
Output is correct |
25 |
Correct |
196 ms |
438240 KB |
Output is correct |
26 |
Correct |
205 ms |
441720 KB |
Output is correct |
27 |
Correct |
203 ms |
441520 KB |
Output is correct |
28 |
Correct |
203 ms |
438448 KB |
Output is correct |
29 |
Correct |
274 ms |
462436 KB |
Output is correct |
30 |
Correct |
206 ms |
441528 KB |
Output is correct |
31 |
Correct |
243 ms |
470092 KB |
Output is correct |
32 |
Correct |
302 ms |
468736 KB |
Output is correct |
33 |
Correct |
269 ms |
460852 KB |
Output is correct |
34 |
Correct |
249 ms |
469912 KB |
Output is correct |
35 |
Correct |
233 ms |
460628 KB |
Output is correct |
36 |
Correct |
265 ms |
469432 KB |
Output is correct |
37 |
Correct |
278 ms |
468792 KB |
Output is correct |
38 |
Correct |
235 ms |
460948 KB |
Output is correct |
39 |
Correct |
1347 ms |
813916 KB |
Output is correct |
40 |
Correct |
267 ms |
475020 KB |
Output is correct |
41 |
Correct |
258 ms |
480000 KB |
Output is correct |
42 |
Correct |
322 ms |
482868 KB |
Output is correct |
43 |
Correct |
303 ms |
492716 KB |
Output is correct |
44 |
Correct |
562 ms |
651968 KB |
Output is correct |
45 |
Correct |
533 ms |
641324 KB |
Output is correct |
46 |
Correct |
1337 ms |
910240 KB |
Output is correct |
47 |
Correct |
1278 ms |
875120 KB |
Output is correct |
48 |
Correct |
1275 ms |
797008 KB |
Output is correct |
49 |
Correct |
874 ms |
887168 KB |
Output is correct |
50 |
Correct |
734 ms |
795104 KB |
Output is correct |
51 |
Correct |
1311 ms |
882368 KB |
Output is correct |
52 |
Correct |
1187 ms |
875436 KB |
Output is correct |
53 |
Correct |
1197 ms |
797716 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
191 ms |
423324 KB |
Output is correct |
2 |
Correct |
185 ms |
423236 KB |
Output is correct |
3 |
Correct |
188 ms |
423304 KB |
Output is correct |
4 |
Correct |
190 ms |
423256 KB |
Output is correct |
5 |
Correct |
183 ms |
423536 KB |
Output is correct |
6 |
Correct |
185 ms |
423364 KB |
Output is correct |
7 |
Correct |
184 ms |
423328 KB |
Output is correct |
8 |
Correct |
188 ms |
423416 KB |
Output is correct |
9 |
Correct |
190 ms |
423604 KB |
Output is correct |
10 |
Correct |
193 ms |
423664 KB |
Output is correct |
11 |
Correct |
189 ms |
423576 KB |
Output is correct |
12 |
Correct |
188 ms |
423504 KB |
Output is correct |
13 |
Correct |
188 ms |
423524 KB |
Output is correct |
14 |
Correct |
191 ms |
423544 KB |
Output is correct |
15 |
Correct |
187 ms |
423656 KB |
Output is correct |
16 |
Correct |
184 ms |
423548 KB |
Output is correct |
17 |
Correct |
195 ms |
423600 KB |
Output is correct |
18 |
Correct |
194 ms |
423352 KB |
Output is correct |
19 |
Correct |
193 ms |
423484 KB |
Output is correct |
20 |
Correct |
193 ms |
423316 KB |
Output is correct |
21 |
Correct |
188 ms |
423256 KB |
Output is correct |
22 |
Correct |
186 ms |
423456 KB |
Output is correct |
23 |
Correct |
187 ms |
423372 KB |
Output is correct |
24 |
Correct |
190 ms |
423276 KB |
Output is correct |
25 |
Correct |
186 ms |
423280 KB |
Output is correct |
26 |
Correct |
186 ms |
423340 KB |
Output is correct |
27 |
Correct |
190 ms |
423396 KB |
Output is correct |
28 |
Correct |
197 ms |
423504 KB |
Output is correct |
29 |
Correct |
192 ms |
423364 KB |
Output is correct |
30 |
Correct |
195 ms |
423628 KB |
Output is correct |
31 |
Correct |
193 ms |
423624 KB |
Output is correct |
32 |
Correct |
190 ms |
423500 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
190 ms |
423352 KB |
Output is correct |
2 |
Correct |
189 ms |
423360 KB |
Output is correct |
3 |
Correct |
191 ms |
423396 KB |
Output is correct |
4 |
Correct |
187 ms |
423332 KB |
Output is correct |
5 |
Correct |
198 ms |
423364 KB |
Output is correct |
6 |
Correct |
215 ms |
423256 KB |
Output is correct |
7 |
Correct |
191 ms |
423636 KB |
Output is correct |
8 |
Correct |
197 ms |
423812 KB |
Output is correct |
9 |
Correct |
193 ms |
423520 KB |
Output is correct |
10 |
Correct |
190 ms |
423596 KB |
Output is correct |
11 |
Correct |
190 ms |
423504 KB |
Output is correct |
12 |
Correct |
191 ms |
423536 KB |
Output is correct |
13 |
Correct |
191 ms |
423288 KB |
Output is correct |
14 |
Correct |
193 ms |
423616 KB |
Output is correct |
15 |
Correct |
196 ms |
423432 KB |
Output is correct |
16 |
Correct |
186 ms |
423400 KB |
Output is correct |
17 |
Correct |
186 ms |
423292 KB |
Output is correct |
18 |
Correct |
189 ms |
423360 KB |
Output is correct |
19 |
Correct |
190 ms |
423300 KB |
Output is correct |
20 |
Correct |
187 ms |
423396 KB |
Output is correct |
21 |
Correct |
194 ms |
423512 KB |
Output is correct |
22 |
Correct |
191 ms |
423652 KB |
Output is correct |
23 |
Correct |
189 ms |
423628 KB |
Output is correct |
24 |
Correct |
197 ms |
423928 KB |
Output is correct |
25 |
Correct |
218 ms |
434560 KB |
Output is correct |
26 |
Correct |
224 ms |
440724 KB |
Output is correct |
27 |
Correct |
214 ms |
441804 KB |
Output is correct |
28 |
Correct |
229 ms |
438268 KB |
Output is correct |
29 |
Correct |
220 ms |
437900 KB |
Output is correct |
30 |
Correct |
215 ms |
436336 KB |
Output is correct |
31 |
Correct |
239 ms |
438712 KB |
Output is correct |
32 |
Correct |
225 ms |
441756 KB |
Output is correct |
33 |
Correct |
234 ms |
441344 KB |
Output is correct |
34 |
Correct |
273 ms |
460520 KB |
Output is correct |
35 |
Correct |
261 ms |
470044 KB |
Output is correct |
36 |
Correct |
268 ms |
460548 KB |
Output is correct |
37 |
Correct |
265 ms |
459596 KB |
Output is correct |
38 |
Correct |
256 ms |
455788 KB |
Output is correct |
39 |
Correct |
468 ms |
558584 KB |
Output is correct |
40 |
Correct |
949 ms |
792796 KB |
Output is correct |
41 |
Correct |
1178 ms |
910124 KB |
Output is correct |
42 |
Correct |
1074 ms |
795728 KB |
Output is correct |
43 |
Correct |
1033 ms |
787256 KB |
Output is correct |
44 |
Correct |
939 ms |
748280 KB |
Output is correct |
45 |
Correct |
1119 ms |
845808 KB |
Output is correct |
46 |
Correct |
1103 ms |
845236 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
191 ms |
423324 KB |
Output is correct |
2 |
Correct |
185 ms |
423236 KB |
Output is correct |
3 |
Correct |
188 ms |
423304 KB |
Output is correct |
4 |
Correct |
190 ms |
423256 KB |
Output is correct |
5 |
Correct |
183 ms |
423536 KB |
Output is correct |
6 |
Correct |
185 ms |
423364 KB |
Output is correct |
7 |
Correct |
184 ms |
423328 KB |
Output is correct |
8 |
Correct |
188 ms |
423416 KB |
Output is correct |
9 |
Correct |
190 ms |
423604 KB |
Output is correct |
10 |
Correct |
193 ms |
423664 KB |
Output is correct |
11 |
Correct |
189 ms |
423576 KB |
Output is correct |
12 |
Correct |
188 ms |
423504 KB |
Output is correct |
13 |
Correct |
188 ms |
423524 KB |
Output is correct |
14 |
Correct |
191 ms |
423544 KB |
Output is correct |
15 |
Correct |
187 ms |
423656 KB |
Output is correct |
16 |
Correct |
184 ms |
423548 KB |
Output is correct |
17 |
Correct |
195 ms |
423600 KB |
Output is correct |
18 |
Correct |
194 ms |
423352 KB |
Output is correct |
19 |
Correct |
193 ms |
423484 KB |
Output is correct |
20 |
Correct |
193 ms |
423316 KB |
Output is correct |
21 |
Correct |
188 ms |
423256 KB |
Output is correct |
22 |
Correct |
186 ms |
423456 KB |
Output is correct |
23 |
Correct |
187 ms |
423372 KB |
Output is correct |
24 |
Correct |
190 ms |
423276 KB |
Output is correct |
25 |
Correct |
186 ms |
423280 KB |
Output is correct |
26 |
Correct |
186 ms |
423340 KB |
Output is correct |
27 |
Correct |
190 ms |
423396 KB |
Output is correct |
28 |
Correct |
197 ms |
423504 KB |
Output is correct |
29 |
Correct |
192 ms |
423364 KB |
Output is correct |
30 |
Correct |
195 ms |
423628 KB |
Output is correct |
31 |
Correct |
193 ms |
423624 KB |
Output is correct |
32 |
Correct |
190 ms |
423500 KB |
Output is correct |
33 |
Correct |
227 ms |
439084 KB |
Output is correct |
34 |
Correct |
198 ms |
423848 KB |
Output is correct |
35 |
Correct |
207 ms |
424392 KB |
Output is correct |
36 |
Correct |
209 ms |
434532 KB |
Output is correct |
37 |
Correct |
218 ms |
434864 KB |
Output is correct |
38 |
Correct |
221 ms |
440556 KB |
Output is correct |
39 |
Correct |
215 ms |
441864 KB |
Output is correct |
40 |
Correct |
223 ms |
441416 KB |
Output is correct |
41 |
Correct |
225 ms |
438288 KB |
Output is correct |
42 |
Correct |
217 ms |
438256 KB |
Output is correct |
43 |
Correct |
222 ms |
437888 KB |
Output is correct |
44 |
Correct |
214 ms |
436332 KB |
Output is correct |
45 |
Correct |
212 ms |
441920 KB |
Output is correct |
46 |
Correct |
230 ms |
438420 KB |
Output is correct |
47 |
Correct |
231 ms |
438312 KB |
Output is correct |
48 |
Correct |
225 ms |
438744 KB |
Output is correct |
49 |
Correct |
228 ms |
438788 KB |
Output is correct |
50 |
Correct |
245 ms |
438768 KB |
Output is correct |
51 |
Correct |
224 ms |
438676 KB |
Output is correct |
52 |
Correct |
238 ms |
441760 KB |
Output is correct |
53 |
Correct |
217 ms |
441420 KB |
Output is correct |
54 |
Correct |
217 ms |
438308 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
191 ms |
423324 KB |
Output is correct |
2 |
Correct |
185 ms |
423236 KB |
Output is correct |
3 |
Correct |
188 ms |
423304 KB |
Output is correct |
4 |
Correct |
190 ms |
423256 KB |
Output is correct |
5 |
Correct |
183 ms |
423536 KB |
Output is correct |
6 |
Correct |
185 ms |
423364 KB |
Output is correct |
7 |
Correct |
184 ms |
423328 KB |
Output is correct |
8 |
Correct |
188 ms |
423416 KB |
Output is correct |
9 |
Correct |
190 ms |
423604 KB |
Output is correct |
10 |
Correct |
193 ms |
423664 KB |
Output is correct |
11 |
Correct |
189 ms |
423576 KB |
Output is correct |
12 |
Correct |
188 ms |
423504 KB |
Output is correct |
13 |
Correct |
188 ms |
423524 KB |
Output is correct |
14 |
Correct |
191 ms |
423544 KB |
Output is correct |
15 |
Correct |
187 ms |
423656 KB |
Output is correct |
16 |
Correct |
184 ms |
423548 KB |
Output is correct |
17 |
Correct |
195 ms |
423600 KB |
Output is correct |
18 |
Correct |
194 ms |
423352 KB |
Output is correct |
19 |
Correct |
193 ms |
423484 KB |
Output is correct |
20 |
Correct |
193 ms |
423316 KB |
Output is correct |
21 |
Correct |
188 ms |
423256 KB |
Output is correct |
22 |
Correct |
186 ms |
423456 KB |
Output is correct |
23 |
Correct |
187 ms |
423372 KB |
Output is correct |
24 |
Correct |
190 ms |
423276 KB |
Output is correct |
25 |
Correct |
186 ms |
423280 KB |
Output is correct |
26 |
Correct |
186 ms |
423340 KB |
Output is correct |
27 |
Correct |
190 ms |
423396 KB |
Output is correct |
28 |
Correct |
197 ms |
423504 KB |
Output is correct |
29 |
Correct |
192 ms |
423364 KB |
Output is correct |
30 |
Correct |
195 ms |
423628 KB |
Output is correct |
31 |
Correct |
193 ms |
423624 KB |
Output is correct |
32 |
Correct |
190 ms |
423500 KB |
Output is correct |
33 |
Correct |
227 ms |
439084 KB |
Output is correct |
34 |
Correct |
198 ms |
423848 KB |
Output is correct |
35 |
Correct |
207 ms |
424392 KB |
Output is correct |
36 |
Correct |
209 ms |
434532 KB |
Output is correct |
37 |
Correct |
218 ms |
434864 KB |
Output is correct |
38 |
Correct |
221 ms |
440556 KB |
Output is correct |
39 |
Correct |
215 ms |
441864 KB |
Output is correct |
40 |
Correct |
223 ms |
441416 KB |
Output is correct |
41 |
Correct |
225 ms |
438288 KB |
Output is correct |
42 |
Correct |
217 ms |
438256 KB |
Output is correct |
43 |
Correct |
222 ms |
437888 KB |
Output is correct |
44 |
Correct |
214 ms |
436332 KB |
Output is correct |
45 |
Correct |
212 ms |
441920 KB |
Output is correct |
46 |
Correct |
230 ms |
438420 KB |
Output is correct |
47 |
Correct |
231 ms |
438312 KB |
Output is correct |
48 |
Correct |
225 ms |
438744 KB |
Output is correct |
49 |
Correct |
228 ms |
438788 KB |
Output is correct |
50 |
Correct |
245 ms |
438768 KB |
Output is correct |
51 |
Correct |
224 ms |
438676 KB |
Output is correct |
52 |
Correct |
238 ms |
441760 KB |
Output is correct |
53 |
Correct |
217 ms |
441420 KB |
Output is correct |
54 |
Correct |
217 ms |
438308 KB |
Output is correct |
55 |
Correct |
284 ms |
462376 KB |
Output is correct |
56 |
Correct |
218 ms |
441380 KB |
Output is correct |
57 |
Correct |
264 ms |
460496 KB |
Output is correct |
58 |
Correct |
285 ms |
462376 KB |
Output is correct |
59 |
Correct |
265 ms |
470092 KB |
Output is correct |
60 |
Correct |
301 ms |
468616 KB |
Output is correct |
61 |
Correct |
280 ms |
460784 KB |
Output is correct |
62 |
Correct |
265 ms |
460676 KB |
Output is correct |
63 |
Correct |
268 ms |
459856 KB |
Output is correct |
64 |
Correct |
264 ms |
455900 KB |
Output is correct |
65 |
Correct |
262 ms |
469812 KB |
Output is correct |
66 |
Correct |
244 ms |
460692 KB |
Output is correct |
67 |
Correct |
271 ms |
461136 KB |
Output is correct |
68 |
Correct |
319 ms |
462004 KB |
Output is correct |
69 |
Correct |
278 ms |
462068 KB |
Output is correct |
70 |
Correct |
305 ms |
462032 KB |
Output is correct |
71 |
Correct |
277 ms |
461920 KB |
Output is correct |
72 |
Correct |
273 ms |
469452 KB |
Output is correct |
73 |
Correct |
324 ms |
468684 KB |
Output is correct |
74 |
Correct |
248 ms |
461020 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
210 ms |
423296 KB |
Output is correct |
2 |
Correct |
175 ms |
423244 KB |
Output is correct |
3 |
Correct |
188 ms |
423624 KB |
Output is correct |
4 |
Correct |
174 ms |
423640 KB |
Output is correct |
5 |
Correct |
173 ms |
423552 KB |
Output is correct |
6 |
Correct |
177 ms |
423648 KB |
Output is correct |
7 |
Correct |
174 ms |
423580 KB |
Output is correct |
8 |
Correct |
172 ms |
423600 KB |
Output is correct |
9 |
Correct |
174 ms |
423320 KB |
Output is correct |
10 |
Correct |
174 ms |
423288 KB |
Output is correct |
11 |
Correct |
171 ms |
423348 KB |
Output is correct |
12 |
Correct |
193 ms |
423292 KB |
Output is correct |
13 |
Correct |
188 ms |
423532 KB |
Output is correct |
14 |
Correct |
178 ms |
423380 KB |
Output is correct |
15 |
Correct |
172 ms |
423272 KB |
Output is correct |
16 |
Correct |
176 ms |
423556 KB |
Output is correct |
17 |
Correct |
171 ms |
423612 KB |
Output is correct |
18 |
Correct |
173 ms |
423584 KB |
Output is correct |
19 |
Correct |
210 ms |
438992 KB |
Output is correct |
20 |
Correct |
190 ms |
434972 KB |
Output is correct |
21 |
Correct |
210 ms |
441968 KB |
Output is correct |
22 |
Correct |
211 ms |
441396 KB |
Output is correct |
23 |
Correct |
214 ms |
438352 KB |
Output is correct |
24 |
Correct |
200 ms |
442012 KB |
Output is correct |
25 |
Correct |
196 ms |
438240 KB |
Output is correct |
26 |
Correct |
205 ms |
441720 KB |
Output is correct |
27 |
Correct |
203 ms |
441520 KB |
Output is correct |
28 |
Correct |
203 ms |
438448 KB |
Output is correct |
29 |
Correct |
274 ms |
462436 KB |
Output is correct |
30 |
Correct |
206 ms |
441528 KB |
Output is correct |
31 |
Correct |
243 ms |
470092 KB |
Output is correct |
32 |
Correct |
302 ms |
468736 KB |
Output is correct |
33 |
Correct |
269 ms |
460852 KB |
Output is correct |
34 |
Correct |
249 ms |
469912 KB |
Output is correct |
35 |
Correct |
233 ms |
460628 KB |
Output is correct |
36 |
Correct |
265 ms |
469432 KB |
Output is correct |
37 |
Correct |
278 ms |
468792 KB |
Output is correct |
38 |
Correct |
235 ms |
460948 KB |
Output is correct |
39 |
Correct |
1347 ms |
813916 KB |
Output is correct |
40 |
Correct |
267 ms |
475020 KB |
Output is correct |
41 |
Correct |
258 ms |
480000 KB |
Output is correct |
42 |
Correct |
322 ms |
482868 KB |
Output is correct |
43 |
Correct |
303 ms |
492716 KB |
Output is correct |
44 |
Correct |
562 ms |
651968 KB |
Output is correct |
45 |
Correct |
533 ms |
641324 KB |
Output is correct |
46 |
Correct |
1337 ms |
910240 KB |
Output is correct |
47 |
Correct |
1278 ms |
875120 KB |
Output is correct |
48 |
Correct |
1275 ms |
797008 KB |
Output is correct |
49 |
Correct |
874 ms |
887168 KB |
Output is correct |
50 |
Correct |
734 ms |
795104 KB |
Output is correct |
51 |
Correct |
1311 ms |
882368 KB |
Output is correct |
52 |
Correct |
1187 ms |
875436 KB |
Output is correct |
53 |
Correct |
1197 ms |
797716 KB |
Output is correct |
54 |
Correct |
191 ms |
423324 KB |
Output is correct |
55 |
Correct |
185 ms |
423236 KB |
Output is correct |
56 |
Correct |
188 ms |
423304 KB |
Output is correct |
57 |
Correct |
190 ms |
423256 KB |
Output is correct |
58 |
Correct |
183 ms |
423536 KB |
Output is correct |
59 |
Correct |
185 ms |
423364 KB |
Output is correct |
60 |
Correct |
184 ms |
423328 KB |
Output is correct |
61 |
Correct |
188 ms |
423416 KB |
Output is correct |
62 |
Correct |
190 ms |
423604 KB |
Output is correct |
63 |
Correct |
193 ms |
423664 KB |
Output is correct |
64 |
Correct |
189 ms |
423576 KB |
Output is correct |
65 |
Correct |
188 ms |
423504 KB |
Output is correct |
66 |
Correct |
188 ms |
423524 KB |
Output is correct |
67 |
Correct |
191 ms |
423544 KB |
Output is correct |
68 |
Correct |
187 ms |
423656 KB |
Output is correct |
69 |
Correct |
184 ms |
423548 KB |
Output is correct |
70 |
Correct |
195 ms |
423600 KB |
Output is correct |
71 |
Correct |
194 ms |
423352 KB |
Output is correct |
72 |
Correct |
193 ms |
423484 KB |
Output is correct |
73 |
Correct |
193 ms |
423316 KB |
Output is correct |
74 |
Correct |
188 ms |
423256 KB |
Output is correct |
75 |
Correct |
186 ms |
423456 KB |
Output is correct |
76 |
Correct |
187 ms |
423372 KB |
Output is correct |
77 |
Correct |
190 ms |
423276 KB |
Output is correct |
78 |
Correct |
186 ms |
423280 KB |
Output is correct |
79 |
Correct |
186 ms |
423340 KB |
Output is correct |
80 |
Correct |
190 ms |
423396 KB |
Output is correct |
81 |
Correct |
197 ms |
423504 KB |
Output is correct |
82 |
Correct |
192 ms |
423364 KB |
Output is correct |
83 |
Correct |
195 ms |
423628 KB |
Output is correct |
84 |
Correct |
193 ms |
423624 KB |
Output is correct |
85 |
Correct |
190 ms |
423500 KB |
Output is correct |
86 |
Correct |
190 ms |
423352 KB |
Output is correct |
87 |
Correct |
189 ms |
423360 KB |
Output is correct |
88 |
Correct |
191 ms |
423396 KB |
Output is correct |
89 |
Correct |
187 ms |
423332 KB |
Output is correct |
90 |
Correct |
198 ms |
423364 KB |
Output is correct |
91 |
Correct |
215 ms |
423256 KB |
Output is correct |
92 |
Correct |
191 ms |
423636 KB |
Output is correct |
93 |
Correct |
197 ms |
423812 KB |
Output is correct |
94 |
Correct |
193 ms |
423520 KB |
Output is correct |
95 |
Correct |
190 ms |
423596 KB |
Output is correct |
96 |
Correct |
190 ms |
423504 KB |
Output is correct |
97 |
Correct |
191 ms |
423536 KB |
Output is correct |
98 |
Correct |
191 ms |
423288 KB |
Output is correct |
99 |
Correct |
193 ms |
423616 KB |
Output is correct |
100 |
Correct |
196 ms |
423432 KB |
Output is correct |
101 |
Correct |
186 ms |
423400 KB |
Output is correct |
102 |
Correct |
186 ms |
423292 KB |
Output is correct |
103 |
Correct |
189 ms |
423360 KB |
Output is correct |
104 |
Correct |
190 ms |
423300 KB |
Output is correct |
105 |
Correct |
187 ms |
423396 KB |
Output is correct |
106 |
Correct |
194 ms |
423512 KB |
Output is correct |
107 |
Correct |
191 ms |
423652 KB |
Output is correct |
108 |
Correct |
189 ms |
423628 KB |
Output is correct |
109 |
Correct |
197 ms |
423928 KB |
Output is correct |
110 |
Correct |
218 ms |
434560 KB |
Output is correct |
111 |
Correct |
224 ms |
440724 KB |
Output is correct |
112 |
Correct |
214 ms |
441804 KB |
Output is correct |
113 |
Correct |
229 ms |
438268 KB |
Output is correct |
114 |
Correct |
220 ms |
437900 KB |
Output is correct |
115 |
Correct |
215 ms |
436336 KB |
Output is correct |
116 |
Correct |
239 ms |
438712 KB |
Output is correct |
117 |
Correct |
225 ms |
441756 KB |
Output is correct |
118 |
Correct |
234 ms |
441344 KB |
Output is correct |
119 |
Correct |
273 ms |
460520 KB |
Output is correct |
120 |
Correct |
261 ms |
470044 KB |
Output is correct |
121 |
Correct |
268 ms |
460548 KB |
Output is correct |
122 |
Correct |
265 ms |
459596 KB |
Output is correct |
123 |
Correct |
256 ms |
455788 KB |
Output is correct |
124 |
Correct |
468 ms |
558584 KB |
Output is correct |
125 |
Correct |
949 ms |
792796 KB |
Output is correct |
126 |
Correct |
1178 ms |
910124 KB |
Output is correct |
127 |
Correct |
1074 ms |
795728 KB |
Output is correct |
128 |
Correct |
1033 ms |
787256 KB |
Output is correct |
129 |
Correct |
939 ms |
748280 KB |
Output is correct |
130 |
Correct |
1119 ms |
845808 KB |
Output is correct |
131 |
Correct |
1103 ms |
845236 KB |
Output is correct |
132 |
Correct |
227 ms |
439084 KB |
Output is correct |
133 |
Correct |
198 ms |
423848 KB |
Output is correct |
134 |
Correct |
207 ms |
424392 KB |
Output is correct |
135 |
Correct |
209 ms |
434532 KB |
Output is correct |
136 |
Correct |
218 ms |
434864 KB |
Output is correct |
137 |
Correct |
221 ms |
440556 KB |
Output is correct |
138 |
Correct |
215 ms |
441864 KB |
Output is correct |
139 |
Correct |
223 ms |
441416 KB |
Output is correct |
140 |
Correct |
225 ms |
438288 KB |
Output is correct |
141 |
Correct |
217 ms |
438256 KB |
Output is correct |
142 |
Correct |
222 ms |
437888 KB |
Output is correct |
143 |
Correct |
214 ms |
436332 KB |
Output is correct |
144 |
Correct |
212 ms |
441920 KB |
Output is correct |
145 |
Correct |
230 ms |
438420 KB |
Output is correct |
146 |
Correct |
231 ms |
438312 KB |
Output is correct |
147 |
Correct |
225 ms |
438744 KB |
Output is correct |
148 |
Correct |
228 ms |
438788 KB |
Output is correct |
149 |
Correct |
245 ms |
438768 KB |
Output is correct |
150 |
Correct |
224 ms |
438676 KB |
Output is correct |
151 |
Correct |
238 ms |
441760 KB |
Output is correct |
152 |
Correct |
217 ms |
441420 KB |
Output is correct |
153 |
Correct |
217 ms |
438308 KB |
Output is correct |
154 |
Correct |
284 ms |
462376 KB |
Output is correct |
155 |
Correct |
218 ms |
441380 KB |
Output is correct |
156 |
Correct |
264 ms |
460496 KB |
Output is correct |
157 |
Correct |
285 ms |
462376 KB |
Output is correct |
158 |
Correct |
265 ms |
470092 KB |
Output is correct |
159 |
Correct |
301 ms |
468616 KB |
Output is correct |
160 |
Correct |
280 ms |
460784 KB |
Output is correct |
161 |
Correct |
265 ms |
460676 KB |
Output is correct |
162 |
Correct |
268 ms |
459856 KB |
Output is correct |
163 |
Correct |
264 ms |
455900 KB |
Output is correct |
164 |
Correct |
262 ms |
469812 KB |
Output is correct |
165 |
Correct |
244 ms |
460692 KB |
Output is correct |
166 |
Correct |
271 ms |
461136 KB |
Output is correct |
167 |
Correct |
319 ms |
462004 KB |
Output is correct |
168 |
Correct |
278 ms |
462068 KB |
Output is correct |
169 |
Correct |
305 ms |
462032 KB |
Output is correct |
170 |
Correct |
277 ms |
461920 KB |
Output is correct |
171 |
Correct |
273 ms |
469452 KB |
Output is correct |
172 |
Correct |
324 ms |
468684 KB |
Output is correct |
173 |
Correct |
248 ms |
461020 KB |
Output is correct |
174 |
Correct |
308 ms |
481512 KB |
Output is correct |
175 |
Correct |
430 ms |
515648 KB |
Output is correct |
176 |
Correct |
591 ms |
623464 KB |
Output is correct |
177 |
Correct |
826 ms |
698312 KB |
Output is correct |
178 |
Correct |
946 ms |
802216 KB |
Output is correct |
179 |
Correct |
1044 ms |
811592 KB |
Output is correct |
180 |
Correct |
1123 ms |
811160 KB |
Output is correct |
181 |
Correct |
1120 ms |
811060 KB |
Output is correct |
182 |
Correct |
1149 ms |
810472 KB |
Output is correct |
183 |
Correct |
1157 ms |
847012 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
210 ms |
423296 KB |
Output is correct |
2 |
Correct |
175 ms |
423244 KB |
Output is correct |
3 |
Correct |
188 ms |
423624 KB |
Output is correct |
4 |
Correct |
174 ms |
423640 KB |
Output is correct |
5 |
Correct |
173 ms |
423552 KB |
Output is correct |
6 |
Correct |
177 ms |
423648 KB |
Output is correct |
7 |
Correct |
174 ms |
423580 KB |
Output is correct |
8 |
Correct |
172 ms |
423600 KB |
Output is correct |
9 |
Correct |
174 ms |
423320 KB |
Output is correct |
10 |
Correct |
174 ms |
423288 KB |
Output is correct |
11 |
Correct |
171 ms |
423348 KB |
Output is correct |
12 |
Correct |
193 ms |
423292 KB |
Output is correct |
13 |
Correct |
188 ms |
423532 KB |
Output is correct |
14 |
Correct |
178 ms |
423380 KB |
Output is correct |
15 |
Correct |
172 ms |
423272 KB |
Output is correct |
16 |
Correct |
176 ms |
423556 KB |
Output is correct |
17 |
Correct |
171 ms |
423612 KB |
Output is correct |
18 |
Correct |
173 ms |
423584 KB |
Output is correct |
19 |
Correct |
210 ms |
438992 KB |
Output is correct |
20 |
Correct |
190 ms |
434972 KB |
Output is correct |
21 |
Correct |
210 ms |
441968 KB |
Output is correct |
22 |
Correct |
211 ms |
441396 KB |
Output is correct |
23 |
Correct |
214 ms |
438352 KB |
Output is correct |
24 |
Correct |
200 ms |
442012 KB |
Output is correct |
25 |
Correct |
196 ms |
438240 KB |
Output is correct |
26 |
Correct |
205 ms |
441720 KB |
Output is correct |
27 |
Correct |
203 ms |
441520 KB |
Output is correct |
28 |
Correct |
203 ms |
438448 KB |
Output is correct |
29 |
Correct |
274 ms |
462436 KB |
Output is correct |
30 |
Correct |
206 ms |
441528 KB |
Output is correct |
31 |
Correct |
243 ms |
470092 KB |
Output is correct |
32 |
Correct |
302 ms |
468736 KB |
Output is correct |
33 |
Correct |
269 ms |
460852 KB |
Output is correct |
34 |
Correct |
249 ms |
469912 KB |
Output is correct |
35 |
Correct |
233 ms |
460628 KB |
Output is correct |
36 |
Correct |
265 ms |
469432 KB |
Output is correct |
37 |
Correct |
278 ms |
468792 KB |
Output is correct |
38 |
Correct |
235 ms |
460948 KB |
Output is correct |
39 |
Correct |
1347 ms |
813916 KB |
Output is correct |
40 |
Correct |
267 ms |
475020 KB |
Output is correct |
41 |
Correct |
258 ms |
480000 KB |
Output is correct |
42 |
Correct |
322 ms |
482868 KB |
Output is correct |
43 |
Correct |
303 ms |
492716 KB |
Output is correct |
44 |
Correct |
562 ms |
651968 KB |
Output is correct |
45 |
Correct |
533 ms |
641324 KB |
Output is correct |
46 |
Correct |
1337 ms |
910240 KB |
Output is correct |
47 |
Correct |
1278 ms |
875120 KB |
Output is correct |
48 |
Correct |
1275 ms |
797008 KB |
Output is correct |
49 |
Correct |
874 ms |
887168 KB |
Output is correct |
50 |
Correct |
734 ms |
795104 KB |
Output is correct |
51 |
Correct |
1311 ms |
882368 KB |
Output is correct |
52 |
Correct |
1187 ms |
875436 KB |
Output is correct |
53 |
Correct |
1197 ms |
797716 KB |
Output is correct |
54 |
Correct |
191 ms |
423324 KB |
Output is correct |
55 |
Correct |
185 ms |
423236 KB |
Output is correct |
56 |
Correct |
188 ms |
423304 KB |
Output is correct |
57 |
Correct |
190 ms |
423256 KB |
Output is correct |
58 |
Correct |
183 ms |
423536 KB |
Output is correct |
59 |
Correct |
185 ms |
423364 KB |
Output is correct |
60 |
Correct |
184 ms |
423328 KB |
Output is correct |
61 |
Correct |
188 ms |
423416 KB |
Output is correct |
62 |
Correct |
190 ms |
423604 KB |
Output is correct |
63 |
Correct |
193 ms |
423664 KB |
Output is correct |
64 |
Correct |
189 ms |
423576 KB |
Output is correct |
65 |
Correct |
188 ms |
423504 KB |
Output is correct |
66 |
Correct |
188 ms |
423524 KB |
Output is correct |
67 |
Correct |
191 ms |
423544 KB |
Output is correct |
68 |
Correct |
187 ms |
423656 KB |
Output is correct |
69 |
Correct |
184 ms |
423548 KB |
Output is correct |
70 |
Correct |
195 ms |
423600 KB |
Output is correct |
71 |
Correct |
194 ms |
423352 KB |
Output is correct |
72 |
Correct |
193 ms |
423484 KB |
Output is correct |
73 |
Correct |
193 ms |
423316 KB |
Output is correct |
74 |
Correct |
188 ms |
423256 KB |
Output is correct |
75 |
Correct |
186 ms |
423456 KB |
Output is correct |
76 |
Correct |
187 ms |
423372 KB |
Output is correct |
77 |
Correct |
190 ms |
423276 KB |
Output is correct |
78 |
Correct |
186 ms |
423280 KB |
Output is correct |
79 |
Correct |
186 ms |
423340 KB |
Output is correct |
80 |
Correct |
190 ms |
423396 KB |
Output is correct |
81 |
Correct |
197 ms |
423504 KB |
Output is correct |
82 |
Correct |
192 ms |
423364 KB |
Output is correct |
83 |
Correct |
195 ms |
423628 KB |
Output is correct |
84 |
Correct |
193 ms |
423624 KB |
Output is correct |
85 |
Correct |
190 ms |
423500 KB |
Output is correct |
86 |
Correct |
190 ms |
423352 KB |
Output is correct |
87 |
Correct |
189 ms |
423360 KB |
Output is correct |
88 |
Correct |
191 ms |
423396 KB |
Output is correct |
89 |
Correct |
187 ms |
423332 KB |
Output is correct |
90 |
Correct |
198 ms |
423364 KB |
Output is correct |
91 |
Correct |
215 ms |
423256 KB |
Output is correct |
92 |
Correct |
191 ms |
423636 KB |
Output is correct |
93 |
Correct |
197 ms |
423812 KB |
Output is correct |
94 |
Correct |
193 ms |
423520 KB |
Output is correct |
95 |
Correct |
190 ms |
423596 KB |
Output is correct |
96 |
Correct |
190 ms |
423504 KB |
Output is correct |
97 |
Correct |
191 ms |
423536 KB |
Output is correct |
98 |
Correct |
191 ms |
423288 KB |
Output is correct |
99 |
Correct |
193 ms |
423616 KB |
Output is correct |
100 |
Correct |
196 ms |
423432 KB |
Output is correct |
101 |
Correct |
186 ms |
423400 KB |
Output is correct |
102 |
Correct |
186 ms |
423292 KB |
Output is correct |
103 |
Correct |
189 ms |
423360 KB |
Output is correct |
104 |
Correct |
190 ms |
423300 KB |
Output is correct |
105 |
Correct |
187 ms |
423396 KB |
Output is correct |
106 |
Correct |
194 ms |
423512 KB |
Output is correct |
107 |
Correct |
191 ms |
423652 KB |
Output is correct |
108 |
Correct |
189 ms |
423628 KB |
Output is correct |
109 |
Correct |
197 ms |
423928 KB |
Output is correct |
110 |
Correct |
218 ms |
434560 KB |
Output is correct |
111 |
Correct |
224 ms |
440724 KB |
Output is correct |
112 |
Correct |
214 ms |
441804 KB |
Output is correct |
113 |
Correct |
229 ms |
438268 KB |
Output is correct |
114 |
Correct |
220 ms |
437900 KB |
Output is correct |
115 |
Correct |
215 ms |
436336 KB |
Output is correct |
116 |
Correct |
239 ms |
438712 KB |
Output is correct |
117 |
Correct |
225 ms |
441756 KB |
Output is correct |
118 |
Correct |
234 ms |
441344 KB |
Output is correct |
119 |
Correct |
273 ms |
460520 KB |
Output is correct |
120 |
Correct |
261 ms |
470044 KB |
Output is correct |
121 |
Correct |
268 ms |
460548 KB |
Output is correct |
122 |
Correct |
265 ms |
459596 KB |
Output is correct |
123 |
Correct |
256 ms |
455788 KB |
Output is correct |
124 |
Correct |
468 ms |
558584 KB |
Output is correct |
125 |
Correct |
949 ms |
792796 KB |
Output is correct |
126 |
Correct |
1178 ms |
910124 KB |
Output is correct |
127 |
Correct |
1074 ms |
795728 KB |
Output is correct |
128 |
Correct |
1033 ms |
787256 KB |
Output is correct |
129 |
Correct |
939 ms |
748280 KB |
Output is correct |
130 |
Correct |
1119 ms |
845808 KB |
Output is correct |
131 |
Correct |
1103 ms |
845236 KB |
Output is correct |
132 |
Correct |
227 ms |
439084 KB |
Output is correct |
133 |
Correct |
198 ms |
423848 KB |
Output is correct |
134 |
Correct |
207 ms |
424392 KB |
Output is correct |
135 |
Correct |
209 ms |
434532 KB |
Output is correct |
136 |
Correct |
218 ms |
434864 KB |
Output is correct |
137 |
Correct |
221 ms |
440556 KB |
Output is correct |
138 |
Correct |
215 ms |
441864 KB |
Output is correct |
139 |
Correct |
223 ms |
441416 KB |
Output is correct |
140 |
Correct |
225 ms |
438288 KB |
Output is correct |
141 |
Correct |
217 ms |
438256 KB |
Output is correct |
142 |
Correct |
222 ms |
437888 KB |
Output is correct |
143 |
Correct |
214 ms |
436332 KB |
Output is correct |
144 |
Correct |
212 ms |
441920 KB |
Output is correct |
145 |
Correct |
230 ms |
438420 KB |
Output is correct |
146 |
Correct |
231 ms |
438312 KB |
Output is correct |
147 |
Correct |
225 ms |
438744 KB |
Output is correct |
148 |
Correct |
228 ms |
438788 KB |
Output is correct |
149 |
Correct |
245 ms |
438768 KB |
Output is correct |
150 |
Correct |
224 ms |
438676 KB |
Output is correct |
151 |
Correct |
238 ms |
441760 KB |
Output is correct |
152 |
Correct |
217 ms |
441420 KB |
Output is correct |
153 |
Correct |
217 ms |
438308 KB |
Output is correct |
154 |
Correct |
284 ms |
462376 KB |
Output is correct |
155 |
Correct |
218 ms |
441380 KB |
Output is correct |
156 |
Correct |
264 ms |
460496 KB |
Output is correct |
157 |
Correct |
285 ms |
462376 KB |
Output is correct |
158 |
Correct |
265 ms |
470092 KB |
Output is correct |
159 |
Correct |
301 ms |
468616 KB |
Output is correct |
160 |
Correct |
280 ms |
460784 KB |
Output is correct |
161 |
Correct |
265 ms |
460676 KB |
Output is correct |
162 |
Correct |
268 ms |
459856 KB |
Output is correct |
163 |
Correct |
264 ms |
455900 KB |
Output is correct |
164 |
Correct |
262 ms |
469812 KB |
Output is correct |
165 |
Correct |
244 ms |
460692 KB |
Output is correct |
166 |
Correct |
271 ms |
461136 KB |
Output is correct |
167 |
Correct |
319 ms |
462004 KB |
Output is correct |
168 |
Correct |
278 ms |
462068 KB |
Output is correct |
169 |
Correct |
305 ms |
462032 KB |
Output is correct |
170 |
Correct |
277 ms |
461920 KB |
Output is correct |
171 |
Correct |
273 ms |
469452 KB |
Output is correct |
172 |
Correct |
324 ms |
468684 KB |
Output is correct |
173 |
Correct |
248 ms |
461020 KB |
Output is correct |
174 |
Correct |
308 ms |
481512 KB |
Output is correct |
175 |
Correct |
430 ms |
515648 KB |
Output is correct |
176 |
Correct |
591 ms |
623464 KB |
Output is correct |
177 |
Correct |
826 ms |
698312 KB |
Output is correct |
178 |
Correct |
946 ms |
802216 KB |
Output is correct |
179 |
Correct |
1044 ms |
811592 KB |
Output is correct |
180 |
Correct |
1123 ms |
811160 KB |
Output is correct |
181 |
Correct |
1120 ms |
811060 KB |
Output is correct |
182 |
Correct |
1149 ms |
810472 KB |
Output is correct |
183 |
Correct |
1157 ms |
847012 KB |
Output is correct |
184 |
Execution timed out |
2103 ms |
1206696 KB |
Time limit exceeded |
185 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
210 ms |
423296 KB |
Output is correct |
2 |
Correct |
175 ms |
423244 KB |
Output is correct |
3 |
Correct |
188 ms |
423624 KB |
Output is correct |
4 |
Correct |
174 ms |
423640 KB |
Output is correct |
5 |
Correct |
173 ms |
423552 KB |
Output is correct |
6 |
Correct |
177 ms |
423648 KB |
Output is correct |
7 |
Correct |
174 ms |
423580 KB |
Output is correct |
8 |
Correct |
172 ms |
423600 KB |
Output is correct |
9 |
Correct |
174 ms |
423320 KB |
Output is correct |
10 |
Correct |
174 ms |
423288 KB |
Output is correct |
11 |
Correct |
171 ms |
423348 KB |
Output is correct |
12 |
Correct |
193 ms |
423292 KB |
Output is correct |
13 |
Correct |
188 ms |
423532 KB |
Output is correct |
14 |
Correct |
178 ms |
423380 KB |
Output is correct |
15 |
Correct |
172 ms |
423272 KB |
Output is correct |
16 |
Correct |
176 ms |
423556 KB |
Output is correct |
17 |
Correct |
171 ms |
423612 KB |
Output is correct |
18 |
Correct |
173 ms |
423584 KB |
Output is correct |
19 |
Correct |
210 ms |
438992 KB |
Output is correct |
20 |
Correct |
190 ms |
434972 KB |
Output is correct |
21 |
Correct |
210 ms |
441968 KB |
Output is correct |
22 |
Correct |
211 ms |
441396 KB |
Output is correct |
23 |
Correct |
214 ms |
438352 KB |
Output is correct |
24 |
Correct |
200 ms |
442012 KB |
Output is correct |
25 |
Correct |
196 ms |
438240 KB |
Output is correct |
26 |
Correct |
205 ms |
441720 KB |
Output is correct |
27 |
Correct |
203 ms |
441520 KB |
Output is correct |
28 |
Correct |
203 ms |
438448 KB |
Output is correct |
29 |
Correct |
274 ms |
462436 KB |
Output is correct |
30 |
Correct |
206 ms |
441528 KB |
Output is correct |
31 |
Correct |
243 ms |
470092 KB |
Output is correct |
32 |
Correct |
302 ms |
468736 KB |
Output is correct |
33 |
Correct |
269 ms |
460852 KB |
Output is correct |
34 |
Correct |
249 ms |
469912 KB |
Output is correct |
35 |
Correct |
233 ms |
460628 KB |
Output is correct |
36 |
Correct |
265 ms |
469432 KB |
Output is correct |
37 |
Correct |
278 ms |
468792 KB |
Output is correct |
38 |
Correct |
235 ms |
460948 KB |
Output is correct |
39 |
Correct |
1347 ms |
813916 KB |
Output is correct |
40 |
Correct |
267 ms |
475020 KB |
Output is correct |
41 |
Correct |
258 ms |
480000 KB |
Output is correct |
42 |
Correct |
322 ms |
482868 KB |
Output is correct |
43 |
Correct |
303 ms |
492716 KB |
Output is correct |
44 |
Correct |
562 ms |
651968 KB |
Output is correct |
45 |
Correct |
533 ms |
641324 KB |
Output is correct |
46 |
Correct |
1337 ms |
910240 KB |
Output is correct |
47 |
Correct |
1278 ms |
875120 KB |
Output is correct |
48 |
Correct |
1275 ms |
797008 KB |
Output is correct |
49 |
Correct |
874 ms |
887168 KB |
Output is correct |
50 |
Correct |
734 ms |
795104 KB |
Output is correct |
51 |
Correct |
1311 ms |
882368 KB |
Output is correct |
52 |
Correct |
1187 ms |
875436 KB |
Output is correct |
53 |
Correct |
1197 ms |
797716 KB |
Output is correct |
54 |
Correct |
191 ms |
423324 KB |
Output is correct |
55 |
Correct |
185 ms |
423236 KB |
Output is correct |
56 |
Correct |
188 ms |
423304 KB |
Output is correct |
57 |
Correct |
190 ms |
423256 KB |
Output is correct |
58 |
Correct |
183 ms |
423536 KB |
Output is correct |
59 |
Correct |
185 ms |
423364 KB |
Output is correct |
60 |
Correct |
184 ms |
423328 KB |
Output is correct |
61 |
Correct |
188 ms |
423416 KB |
Output is correct |
62 |
Correct |
190 ms |
423604 KB |
Output is correct |
63 |
Correct |
193 ms |
423664 KB |
Output is correct |
64 |
Correct |
189 ms |
423576 KB |
Output is correct |
65 |
Correct |
188 ms |
423504 KB |
Output is correct |
66 |
Correct |
188 ms |
423524 KB |
Output is correct |
67 |
Correct |
191 ms |
423544 KB |
Output is correct |
68 |
Correct |
187 ms |
423656 KB |
Output is correct |
69 |
Correct |
184 ms |
423548 KB |
Output is correct |
70 |
Correct |
195 ms |
423600 KB |
Output is correct |
71 |
Correct |
194 ms |
423352 KB |
Output is correct |
72 |
Correct |
193 ms |
423484 KB |
Output is correct |
73 |
Correct |
193 ms |
423316 KB |
Output is correct |
74 |
Correct |
188 ms |
423256 KB |
Output is correct |
75 |
Correct |
186 ms |
423456 KB |
Output is correct |
76 |
Correct |
187 ms |
423372 KB |
Output is correct |
77 |
Correct |
190 ms |
423276 KB |
Output is correct |
78 |
Correct |
186 ms |
423280 KB |
Output is correct |
79 |
Correct |
186 ms |
423340 KB |
Output is correct |
80 |
Correct |
190 ms |
423396 KB |
Output is correct |
81 |
Correct |
197 ms |
423504 KB |
Output is correct |
82 |
Correct |
192 ms |
423364 KB |
Output is correct |
83 |
Correct |
195 ms |
423628 KB |
Output is correct |
84 |
Correct |
193 ms |
423624 KB |
Output is correct |
85 |
Correct |
190 ms |
423500 KB |
Output is correct |
86 |
Correct |
190 ms |
423352 KB |
Output is correct |
87 |
Correct |
189 ms |
423360 KB |
Output is correct |
88 |
Correct |
191 ms |
423396 KB |
Output is correct |
89 |
Correct |
187 ms |
423332 KB |
Output is correct |
90 |
Correct |
198 ms |
423364 KB |
Output is correct |
91 |
Correct |
215 ms |
423256 KB |
Output is correct |
92 |
Correct |
191 ms |
423636 KB |
Output is correct |
93 |
Correct |
197 ms |
423812 KB |
Output is correct |
94 |
Correct |
193 ms |
423520 KB |
Output is correct |
95 |
Correct |
190 ms |
423596 KB |
Output is correct |
96 |
Correct |
190 ms |
423504 KB |
Output is correct |
97 |
Correct |
191 ms |
423536 KB |
Output is correct |
98 |
Correct |
191 ms |
423288 KB |
Output is correct |
99 |
Correct |
193 ms |
423616 KB |
Output is correct |
100 |
Correct |
196 ms |
423432 KB |
Output is correct |
101 |
Correct |
186 ms |
423400 KB |
Output is correct |
102 |
Correct |
186 ms |
423292 KB |
Output is correct |
103 |
Correct |
189 ms |
423360 KB |
Output is correct |
104 |
Correct |
190 ms |
423300 KB |
Output is correct |
105 |
Correct |
187 ms |
423396 KB |
Output is correct |
106 |
Correct |
194 ms |
423512 KB |
Output is correct |
107 |
Correct |
191 ms |
423652 KB |
Output is correct |
108 |
Correct |
189 ms |
423628 KB |
Output is correct |
109 |
Correct |
197 ms |
423928 KB |
Output is correct |
110 |
Correct |
218 ms |
434560 KB |
Output is correct |
111 |
Correct |
224 ms |
440724 KB |
Output is correct |
112 |
Correct |
214 ms |
441804 KB |
Output is correct |
113 |
Correct |
229 ms |
438268 KB |
Output is correct |
114 |
Correct |
220 ms |
437900 KB |
Output is correct |
115 |
Correct |
215 ms |
436336 KB |
Output is correct |
116 |
Correct |
239 ms |
438712 KB |
Output is correct |
117 |
Correct |
225 ms |
441756 KB |
Output is correct |
118 |
Correct |
234 ms |
441344 KB |
Output is correct |
119 |
Correct |
273 ms |
460520 KB |
Output is correct |
120 |
Correct |
261 ms |
470044 KB |
Output is correct |
121 |
Correct |
268 ms |
460548 KB |
Output is correct |
122 |
Correct |
265 ms |
459596 KB |
Output is correct |
123 |
Correct |
256 ms |
455788 KB |
Output is correct |
124 |
Correct |
468 ms |
558584 KB |
Output is correct |
125 |
Correct |
949 ms |
792796 KB |
Output is correct |
126 |
Correct |
1178 ms |
910124 KB |
Output is correct |
127 |
Correct |
1074 ms |
795728 KB |
Output is correct |
128 |
Correct |
1033 ms |
787256 KB |
Output is correct |
129 |
Correct |
939 ms |
748280 KB |
Output is correct |
130 |
Correct |
1119 ms |
845808 KB |
Output is correct |
131 |
Correct |
1103 ms |
845236 KB |
Output is correct |
132 |
Correct |
227 ms |
439084 KB |
Output is correct |
133 |
Correct |
198 ms |
423848 KB |
Output is correct |
134 |
Correct |
207 ms |
424392 KB |
Output is correct |
135 |
Correct |
209 ms |
434532 KB |
Output is correct |
136 |
Correct |
218 ms |
434864 KB |
Output is correct |
137 |
Correct |
221 ms |
440556 KB |
Output is correct |
138 |
Correct |
215 ms |
441864 KB |
Output is correct |
139 |
Correct |
223 ms |
441416 KB |
Output is correct |
140 |
Correct |
225 ms |
438288 KB |
Output is correct |
141 |
Correct |
217 ms |
438256 KB |
Output is correct |
142 |
Correct |
222 ms |
437888 KB |
Output is correct |
143 |
Correct |
214 ms |
436332 KB |
Output is correct |
144 |
Correct |
212 ms |
441920 KB |
Output is correct |
145 |
Correct |
230 ms |
438420 KB |
Output is correct |
146 |
Correct |
231 ms |
438312 KB |
Output is correct |
147 |
Correct |
225 ms |
438744 KB |
Output is correct |
148 |
Correct |
228 ms |
438788 KB |
Output is correct |
149 |
Correct |
245 ms |
438768 KB |
Output is correct |
150 |
Correct |
224 ms |
438676 KB |
Output is correct |
151 |
Correct |
238 ms |
441760 KB |
Output is correct |
152 |
Correct |
217 ms |
441420 KB |
Output is correct |
153 |
Correct |
217 ms |
438308 KB |
Output is correct |
154 |
Correct |
284 ms |
462376 KB |
Output is correct |
155 |
Correct |
218 ms |
441380 KB |
Output is correct |
156 |
Correct |
264 ms |
460496 KB |
Output is correct |
157 |
Correct |
285 ms |
462376 KB |
Output is correct |
158 |
Correct |
265 ms |
470092 KB |
Output is correct |
159 |
Correct |
301 ms |
468616 KB |
Output is correct |
160 |
Correct |
280 ms |
460784 KB |
Output is correct |
161 |
Correct |
265 ms |
460676 KB |
Output is correct |
162 |
Correct |
268 ms |
459856 KB |
Output is correct |
163 |
Correct |
264 ms |
455900 KB |
Output is correct |
164 |
Correct |
262 ms |
469812 KB |
Output is correct |
165 |
Correct |
244 ms |
460692 KB |
Output is correct |
166 |
Correct |
271 ms |
461136 KB |
Output is correct |
167 |
Correct |
319 ms |
462004 KB |
Output is correct |
168 |
Correct |
278 ms |
462068 KB |
Output is correct |
169 |
Correct |
305 ms |
462032 KB |
Output is correct |
170 |
Correct |
277 ms |
461920 KB |
Output is correct |
171 |
Correct |
273 ms |
469452 KB |
Output is correct |
172 |
Correct |
324 ms |
468684 KB |
Output is correct |
173 |
Correct |
248 ms |
461020 KB |
Output is correct |
174 |
Correct |
308 ms |
481512 KB |
Output is correct |
175 |
Correct |
430 ms |
515648 KB |
Output is correct |
176 |
Correct |
591 ms |
623464 KB |
Output is correct |
177 |
Correct |
826 ms |
698312 KB |
Output is correct |
178 |
Correct |
946 ms |
802216 KB |
Output is correct |
179 |
Correct |
1044 ms |
811592 KB |
Output is correct |
180 |
Correct |
1123 ms |
811160 KB |
Output is correct |
181 |
Correct |
1120 ms |
811060 KB |
Output is correct |
182 |
Correct |
1149 ms |
810472 KB |
Output is correct |
183 |
Correct |
1157 ms |
847012 KB |
Output is correct |
184 |
Execution timed out |
2103 ms |
1206696 KB |
Time limit exceeded |
185 |
Halted |
0 ms |
0 KB |
- |