#include <bits/stdc++.h>
#define ii pair<int, int>
#define fi first
#define se second
using namespace std;
const int N = 6e6 + 5;
int n, m, s, rs, cs, re, ce;
int dx[4] = {0, -1, 0, 1};
int dy[4] = {-1, 0, 1, 0};
vector <int> f[N], a[N], p[2][N], ok[N];
queue <ii> q[2];
void up(int u, int v, int val) {
if(0 < u && u <= m && 0 < v && v <= n && !f[u][v]) {
q[1].push({u, v});
f[u][v] = val;
}
}
int get(int t, int id, int u) {
return p[t][id][u] == u ? u : p[t][id][u] = get(t, id, p[t][id][u]);
}
void upd(int t, int id, int i, int j, int val) {
int u = get(t, id, i);
while (u <= j) {
if(t && !f[id][u]) {
q[1].push({id, u});
f[id][u] = val;
}
if(!t && !f[u][id]) {
q[1].push({u, id});
f[u][id] = val;
}
u = get(t, id, u + 1);
p[t][id][i] = u;
}
}
main () {
cin.tie(0)->sync_with_stdio(0);
if(fopen("task.inp", "r")) {
freopen("task.inp", "r", stdin);
freopen("wa.out", "w", stdout);
}
cin >> m >> n >> s >> rs >> cs >> re >> ce;
for(int i = 1; i <= m; i++) a[i].resize(n + 1), f[i].resize(n + 1), ok[i].resize(n + 1);
for(int i = 1; i <= m; i++) {
for(int j = 0; j <= n + 1; j++) p[1][i].push_back(j);
}
for(int i = 1; i <= n; i++) {
for(int j = 0; j <= m + 1; j++) p[0][i].push_back(j);
}
for(int i = 1; i <= m; i++) {
for(int j = 1; j <= n; j++) {
char ch; cin >> ch;
a[i][j] = (ch == '.' ? 1 : 0);
}
}
q[1].push({rs, cs}); f[rs][cs] = 1;
while (!q[1].empty() || !q[0].empty()) {
while (!q[1].empty()) {
int x, y; tie(x, y) = q[1].front(); q[1].pop();
q[0].push({x, y});
if(x == re && y == ce) return cout << f[x][y] - 1 << "\n", 0;
for(int i = 0; i < 4; i++) {
int u = x + dx[i], v = y + dy[i];
if(0 < u && u <= m && 0 < v && v <= n && !f[u][v] && a[u][v]) {
f[u][v] = f[x][y];
q[1].push({u, v});
}
}
}
while (!q[0].empty()) {
int x, y; tie(x, y) = q[0].front(); q[0].pop();
if(x == rs && y == cs) {
int s1 = max(1, x - s), s2 = max(1, y - s);
int s3 = min(m, x + s), s4 = min(n, y + s);
for(int i = s1; i <= s3; i++) {
for(int j = s2; j <= s4; j++) if(!f[i][j]) {
if(i == x - s && (j == y - s || j == y + s)) continue ;
if(i == x + s && (j == y - s || j == y + s)) continue ;
f[i][j] = f[x][y] + 1;
q[1].push({i, j});
}
} ok[x][y] = 1;
continue ;
}
int val = f[x][y] + 1;
for(int i = 0; i < 4; i++) {
int u = x + dx[i], v = y + dy[i];
up(x - s, y + s - 1, val);
up(x + s, y + s - 1, val);
if(y + s <= n) upd(0, y + s, max(1, x - s + 1), min(m, x + s - 1), val);
up(x + s - 1, y - s, val);
up(x + s - 1, y + s, val);
if(x + s <= m) upd(1, x + s, max(1, y - s + 1), min(n, y + s - 1), val);
up(x - s, y - s + 1, val);
up(x + s, y - s + 1, val);
if(y > s) upd(0, y - s, max(1, x - s + 1), min(m, x + s - 1), val);
up(x - s + 1, y - s, val);
up(x - s + 1, y + s, val);
if(x > s) upd(1, x - s, max(1, y - s + 1), min(n, y + s - 1), val);
}
}
}
}
Compilation message
Main.cpp:41:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
41 | main () {
| ^~~~
Main.cpp: In function 'int main()':
Main.cpp:92:21: warning: unused variable 'u' [-Wunused-variable]
92 | int u = x + dx[i], v = y + dy[i];
| ^
Main.cpp:92:36: warning: unused variable 'v' [-Wunused-variable]
92 | int u = x + dx[i], v = y + dy[i];
| ^
Main.cpp:44:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
44 | freopen("task.inp", "r", stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp:45:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
45 | freopen("wa.out", "w", stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
342 ms |
704764 KB |
Output is correct |
2 |
Correct |
316 ms |
704892 KB |
Output is correct |
3 |
Correct |
333 ms |
704728 KB |
Output is correct |
4 |
Correct |
316 ms |
704780 KB |
Output is correct |
5 |
Correct |
344 ms |
704748 KB |
Output is correct |
6 |
Correct |
315 ms |
704840 KB |
Output is correct |
7 |
Correct |
316 ms |
704840 KB |
Output is correct |
8 |
Correct |
326 ms |
704772 KB |
Output is correct |
9 |
Correct |
313 ms |
704924 KB |
Output is correct |
10 |
Correct |
341 ms |
704804 KB |
Output is correct |
11 |
Correct |
309 ms |
704820 KB |
Output is correct |
12 |
Correct |
376 ms |
704712 KB |
Output is correct |
13 |
Correct |
347 ms |
704916 KB |
Output is correct |
14 |
Correct |
331 ms |
704760 KB |
Output is correct |
15 |
Correct |
318 ms |
704776 KB |
Output is correct |
16 |
Correct |
324 ms |
704732 KB |
Output is correct |
17 |
Correct |
320 ms |
704784 KB |
Output is correct |
18 |
Correct |
315 ms |
704840 KB |
Output is correct |
19 |
Correct |
337 ms |
706028 KB |
Output is correct |
20 |
Correct |
344 ms |
707172 KB |
Output is correct |
21 |
Correct |
337 ms |
706340 KB |
Output is correct |
22 |
Correct |
341 ms |
706036 KB |
Output is correct |
23 |
Correct |
335 ms |
705952 KB |
Output is correct |
24 |
Correct |
333 ms |
707632 KB |
Output is correct |
25 |
Correct |
352 ms |
707628 KB |
Output is correct |
26 |
Correct |
317 ms |
705960 KB |
Output is correct |
27 |
Correct |
319 ms |
705968 KB |
Output is correct |
28 |
Correct |
334 ms |
706012 KB |
Output is correct |
29 |
Correct |
367 ms |
708064 KB |
Output is correct |
30 |
Correct |
355 ms |
706652 KB |
Output is correct |
31 |
Correct |
327 ms |
709288 KB |
Output is correct |
32 |
Correct |
420 ms |
708068 KB |
Output is correct |
33 |
Correct |
368 ms |
708060 KB |
Output is correct |
34 |
Correct |
375 ms |
711888 KB |
Output is correct |
35 |
Correct |
362 ms |
711768 KB |
Output is correct |
36 |
Correct |
339 ms |
708268 KB |
Output is correct |
37 |
Correct |
390 ms |
708224 KB |
Output is correct |
38 |
Correct |
323 ms |
708172 KB |
Output is correct |
39 |
Correct |
922 ms |
742268 KB |
Output is correct |
40 |
Correct |
331 ms |
709132 KB |
Output is correct |
41 |
Correct |
355 ms |
713500 KB |
Output is correct |
42 |
Correct |
395 ms |
709964 KB |
Output is correct |
43 |
Correct |
372 ms |
712356 KB |
Output is correct |
44 |
Correct |
430 ms |
722280 KB |
Output is correct |
45 |
Correct |
484 ms |
724928 KB |
Output is correct |
46 |
Correct |
379 ms |
744956 KB |
Output is correct |
47 |
Correct |
1008 ms |
742436 KB |
Output is correct |
48 |
Correct |
777 ms |
742140 KB |
Output is correct |
49 |
Correct |
683 ms |
775200 KB |
Output is correct |
50 |
Correct |
651 ms |
775276 KB |
Output is correct |
51 |
Correct |
750 ms |
742744 KB |
Output is correct |
52 |
Correct |
651 ms |
742300 KB |
Output is correct |
53 |
Correct |
876 ms |
742260 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
316 ms |
704928 KB |
Output is correct |
2 |
Correct |
358 ms |
704824 KB |
Output is correct |
3 |
Correct |
343 ms |
704712 KB |
Output is correct |
4 |
Correct |
330 ms |
704808 KB |
Output is correct |
5 |
Correct |
331 ms |
704844 KB |
Output is correct |
6 |
Correct |
323 ms |
704772 KB |
Output is correct |
7 |
Correct |
312 ms |
704792 KB |
Output is correct |
8 |
Correct |
319 ms |
704832 KB |
Output is correct |
9 |
Correct |
321 ms |
704760 KB |
Output is correct |
10 |
Correct |
319 ms |
704804 KB |
Output is correct |
11 |
Correct |
328 ms |
704896 KB |
Output is correct |
12 |
Correct |
340 ms |
704848 KB |
Output is correct |
13 |
Correct |
329 ms |
705000 KB |
Output is correct |
14 |
Correct |
319 ms |
704836 KB |
Output is correct |
15 |
Correct |
332 ms |
704900 KB |
Output is correct |
16 |
Correct |
315 ms |
704752 KB |
Output is correct |
17 |
Correct |
343 ms |
704808 KB |
Output is correct |
18 |
Correct |
316 ms |
704696 KB |
Output is correct |
19 |
Correct |
335 ms |
704720 KB |
Output is correct |
20 |
Correct |
317 ms |
704888 KB |
Output is correct |
21 |
Correct |
322 ms |
704740 KB |
Output is correct |
22 |
Correct |
314 ms |
704772 KB |
Output is correct |
23 |
Correct |
328 ms |
704708 KB |
Output is correct |
24 |
Correct |
333 ms |
704796 KB |
Output is correct |
25 |
Correct |
334 ms |
704792 KB |
Output is correct |
26 |
Correct |
318 ms |
704788 KB |
Output is correct |
27 |
Correct |
328 ms |
704900 KB |
Output is correct |
28 |
Correct |
313 ms |
704704 KB |
Output is correct |
29 |
Correct |
323 ms |
704716 KB |
Output is correct |
30 |
Correct |
318 ms |
704836 KB |
Output is correct |
31 |
Correct |
357 ms |
704832 KB |
Output is correct |
32 |
Correct |
357 ms |
704760 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
322 ms |
704744 KB |
Output is correct |
2 |
Correct |
329 ms |
704848 KB |
Output is correct |
3 |
Correct |
314 ms |
704804 KB |
Output is correct |
4 |
Correct |
321 ms |
704848 KB |
Output is correct |
5 |
Correct |
360 ms |
704772 KB |
Output is correct |
6 |
Correct |
322 ms |
704708 KB |
Output is correct |
7 |
Correct |
318 ms |
704852 KB |
Output is correct |
8 |
Correct |
343 ms |
704840 KB |
Output is correct |
9 |
Correct |
333 ms |
704844 KB |
Output is correct |
10 |
Correct |
311 ms |
704848 KB |
Output is correct |
11 |
Correct |
319 ms |
704816 KB |
Output is correct |
12 |
Correct |
339 ms |
704772 KB |
Output is correct |
13 |
Correct |
343 ms |
704808 KB |
Output is correct |
14 |
Correct |
313 ms |
704828 KB |
Output is correct |
15 |
Correct |
318 ms |
704700 KB |
Output is correct |
16 |
Correct |
327 ms |
704748 KB |
Output is correct |
17 |
Correct |
333 ms |
704792 KB |
Output is correct |
18 |
Correct |
321 ms |
704756 KB |
Output is correct |
19 |
Correct |
353 ms |
704808 KB |
Output is correct |
20 |
Correct |
332 ms |
704888 KB |
Output is correct |
21 |
Correct |
326 ms |
704920 KB |
Output is correct |
22 |
Correct |
321 ms |
704768 KB |
Output is correct |
23 |
Correct |
333 ms |
704736 KB |
Output is correct |
24 |
Correct |
324 ms |
704824 KB |
Output is correct |
25 |
Correct |
333 ms |
705868 KB |
Output is correct |
26 |
Correct |
323 ms |
706380 KB |
Output is correct |
27 |
Correct |
340 ms |
706444 KB |
Output is correct |
28 |
Correct |
319 ms |
706268 KB |
Output is correct |
29 |
Correct |
321 ms |
706428 KB |
Output is correct |
30 |
Correct |
328 ms |
706420 KB |
Output is correct |
31 |
Correct |
355 ms |
706028 KB |
Output is correct |
32 |
Correct |
323 ms |
706016 KB |
Output is correct |
33 |
Correct |
327 ms |
705952 KB |
Output is correct |
34 |
Correct |
342 ms |
708112 KB |
Output is correct |
35 |
Correct |
374 ms |
709224 KB |
Output is correct |
36 |
Correct |
324 ms |
709108 KB |
Output is correct |
37 |
Correct |
327 ms |
709476 KB |
Output is correct |
38 |
Correct |
325 ms |
709428 KB |
Output is correct |
39 |
Correct |
341 ms |
716876 KB |
Output is correct |
40 |
Correct |
404 ms |
738200 KB |
Output is correct |
41 |
Correct |
400 ms |
745004 KB |
Output is correct |
42 |
Correct |
410 ms |
752380 KB |
Output is correct |
43 |
Correct |
423 ms |
754572 KB |
Output is correct |
44 |
Correct |
432 ms |
754664 KB |
Output is correct |
45 |
Correct |
506 ms |
745548 KB |
Output is correct |
46 |
Correct |
481 ms |
741456 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
316 ms |
704928 KB |
Output is correct |
2 |
Correct |
358 ms |
704824 KB |
Output is correct |
3 |
Correct |
343 ms |
704712 KB |
Output is correct |
4 |
Correct |
330 ms |
704808 KB |
Output is correct |
5 |
Correct |
331 ms |
704844 KB |
Output is correct |
6 |
Correct |
323 ms |
704772 KB |
Output is correct |
7 |
Correct |
312 ms |
704792 KB |
Output is correct |
8 |
Correct |
319 ms |
704832 KB |
Output is correct |
9 |
Correct |
321 ms |
704760 KB |
Output is correct |
10 |
Correct |
319 ms |
704804 KB |
Output is correct |
11 |
Correct |
328 ms |
704896 KB |
Output is correct |
12 |
Correct |
340 ms |
704848 KB |
Output is correct |
13 |
Correct |
329 ms |
705000 KB |
Output is correct |
14 |
Correct |
319 ms |
704836 KB |
Output is correct |
15 |
Correct |
332 ms |
704900 KB |
Output is correct |
16 |
Correct |
315 ms |
704752 KB |
Output is correct |
17 |
Correct |
343 ms |
704808 KB |
Output is correct |
18 |
Correct |
316 ms |
704696 KB |
Output is correct |
19 |
Correct |
335 ms |
704720 KB |
Output is correct |
20 |
Correct |
317 ms |
704888 KB |
Output is correct |
21 |
Correct |
322 ms |
704740 KB |
Output is correct |
22 |
Correct |
314 ms |
704772 KB |
Output is correct |
23 |
Correct |
328 ms |
704708 KB |
Output is correct |
24 |
Correct |
333 ms |
704796 KB |
Output is correct |
25 |
Correct |
334 ms |
704792 KB |
Output is correct |
26 |
Correct |
318 ms |
704788 KB |
Output is correct |
27 |
Correct |
328 ms |
704900 KB |
Output is correct |
28 |
Correct |
313 ms |
704704 KB |
Output is correct |
29 |
Correct |
323 ms |
704716 KB |
Output is correct |
30 |
Correct |
318 ms |
704836 KB |
Output is correct |
31 |
Correct |
357 ms |
704832 KB |
Output is correct |
32 |
Correct |
357 ms |
704760 KB |
Output is correct |
33 |
Correct |
413 ms |
706144 KB |
Output is correct |
34 |
Correct |
336 ms |
704860 KB |
Output is correct |
35 |
Correct |
386 ms |
704968 KB |
Output is correct |
36 |
Correct |
370 ms |
705864 KB |
Output is correct |
37 |
Correct |
346 ms |
706924 KB |
Output is correct |
38 |
Correct |
366 ms |
706316 KB |
Output is correct |
39 |
Correct |
381 ms |
706480 KB |
Output is correct |
40 |
Correct |
394 ms |
706000 KB |
Output is correct |
41 |
Correct |
390 ms |
706068 KB |
Output is correct |
42 |
Correct |
366 ms |
706336 KB |
Output is correct |
43 |
Correct |
381 ms |
706496 KB |
Output is correct |
44 |
Correct |
354 ms |
706508 KB |
Output is correct |
45 |
Correct |
367 ms |
707680 KB |
Output is correct |
46 |
Correct |
361 ms |
707664 KB |
Output is correct |
47 |
Correct |
413 ms |
706656 KB |
Output is correct |
48 |
Correct |
353 ms |
706384 KB |
Output is correct |
49 |
Correct |
376 ms |
706136 KB |
Output is correct |
50 |
Correct |
354 ms |
706384 KB |
Output is correct |
51 |
Correct |
347 ms |
706072 KB |
Output is correct |
52 |
Correct |
327 ms |
705972 KB |
Output is correct |
53 |
Correct |
337 ms |
706084 KB |
Output is correct |
54 |
Correct |
338 ms |
706076 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
316 ms |
704928 KB |
Output is correct |
2 |
Correct |
358 ms |
704824 KB |
Output is correct |
3 |
Correct |
343 ms |
704712 KB |
Output is correct |
4 |
Correct |
330 ms |
704808 KB |
Output is correct |
5 |
Correct |
331 ms |
704844 KB |
Output is correct |
6 |
Correct |
323 ms |
704772 KB |
Output is correct |
7 |
Correct |
312 ms |
704792 KB |
Output is correct |
8 |
Correct |
319 ms |
704832 KB |
Output is correct |
9 |
Correct |
321 ms |
704760 KB |
Output is correct |
10 |
Correct |
319 ms |
704804 KB |
Output is correct |
11 |
Correct |
328 ms |
704896 KB |
Output is correct |
12 |
Correct |
340 ms |
704848 KB |
Output is correct |
13 |
Correct |
329 ms |
705000 KB |
Output is correct |
14 |
Correct |
319 ms |
704836 KB |
Output is correct |
15 |
Correct |
332 ms |
704900 KB |
Output is correct |
16 |
Correct |
315 ms |
704752 KB |
Output is correct |
17 |
Correct |
343 ms |
704808 KB |
Output is correct |
18 |
Correct |
316 ms |
704696 KB |
Output is correct |
19 |
Correct |
335 ms |
704720 KB |
Output is correct |
20 |
Correct |
317 ms |
704888 KB |
Output is correct |
21 |
Correct |
322 ms |
704740 KB |
Output is correct |
22 |
Correct |
314 ms |
704772 KB |
Output is correct |
23 |
Correct |
328 ms |
704708 KB |
Output is correct |
24 |
Correct |
333 ms |
704796 KB |
Output is correct |
25 |
Correct |
334 ms |
704792 KB |
Output is correct |
26 |
Correct |
318 ms |
704788 KB |
Output is correct |
27 |
Correct |
328 ms |
704900 KB |
Output is correct |
28 |
Correct |
313 ms |
704704 KB |
Output is correct |
29 |
Correct |
323 ms |
704716 KB |
Output is correct |
30 |
Correct |
318 ms |
704836 KB |
Output is correct |
31 |
Correct |
357 ms |
704832 KB |
Output is correct |
32 |
Correct |
357 ms |
704760 KB |
Output is correct |
33 |
Correct |
413 ms |
706144 KB |
Output is correct |
34 |
Correct |
336 ms |
704860 KB |
Output is correct |
35 |
Correct |
386 ms |
704968 KB |
Output is correct |
36 |
Correct |
370 ms |
705864 KB |
Output is correct |
37 |
Correct |
346 ms |
706924 KB |
Output is correct |
38 |
Correct |
366 ms |
706316 KB |
Output is correct |
39 |
Correct |
381 ms |
706480 KB |
Output is correct |
40 |
Correct |
394 ms |
706000 KB |
Output is correct |
41 |
Correct |
390 ms |
706068 KB |
Output is correct |
42 |
Correct |
366 ms |
706336 KB |
Output is correct |
43 |
Correct |
381 ms |
706496 KB |
Output is correct |
44 |
Correct |
354 ms |
706508 KB |
Output is correct |
45 |
Correct |
367 ms |
707680 KB |
Output is correct |
46 |
Correct |
361 ms |
707664 KB |
Output is correct |
47 |
Correct |
413 ms |
706656 KB |
Output is correct |
48 |
Correct |
353 ms |
706384 KB |
Output is correct |
49 |
Correct |
376 ms |
706136 KB |
Output is correct |
50 |
Correct |
354 ms |
706384 KB |
Output is correct |
51 |
Correct |
347 ms |
706072 KB |
Output is correct |
52 |
Correct |
327 ms |
705972 KB |
Output is correct |
53 |
Correct |
337 ms |
706084 KB |
Output is correct |
54 |
Correct |
338 ms |
706076 KB |
Output is correct |
55 |
Correct |
390 ms |
708304 KB |
Output is correct |
56 |
Correct |
349 ms |
706744 KB |
Output is correct |
57 |
Correct |
358 ms |
708320 KB |
Output is correct |
58 |
Correct |
367 ms |
707892 KB |
Output is correct |
59 |
Correct |
337 ms |
709416 KB |
Output is correct |
60 |
Correct |
379 ms |
708324 KB |
Output is correct |
61 |
Correct |
386 ms |
708372 KB |
Output is correct |
62 |
Correct |
353 ms |
709316 KB |
Output is correct |
63 |
Correct |
327 ms |
709476 KB |
Output is correct |
64 |
Correct |
349 ms |
709632 KB |
Output is correct |
65 |
Correct |
386 ms |
711996 KB |
Output is correct |
66 |
Correct |
399 ms |
712012 KB |
Output is correct |
67 |
Correct |
377 ms |
709676 KB |
Output is correct |
68 |
Correct |
349 ms |
708408 KB |
Output is correct |
69 |
Correct |
354 ms |
708620 KB |
Output is correct |
70 |
Correct |
366 ms |
708328 KB |
Output is correct |
71 |
Correct |
367 ms |
708540 KB |
Output is correct |
72 |
Correct |
345 ms |
708300 KB |
Output is correct |
73 |
Correct |
372 ms |
708296 KB |
Output is correct |
74 |
Correct |
326 ms |
708412 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
342 ms |
704764 KB |
Output is correct |
2 |
Correct |
316 ms |
704892 KB |
Output is correct |
3 |
Correct |
333 ms |
704728 KB |
Output is correct |
4 |
Correct |
316 ms |
704780 KB |
Output is correct |
5 |
Correct |
344 ms |
704748 KB |
Output is correct |
6 |
Correct |
315 ms |
704840 KB |
Output is correct |
7 |
Correct |
316 ms |
704840 KB |
Output is correct |
8 |
Correct |
326 ms |
704772 KB |
Output is correct |
9 |
Correct |
313 ms |
704924 KB |
Output is correct |
10 |
Correct |
341 ms |
704804 KB |
Output is correct |
11 |
Correct |
309 ms |
704820 KB |
Output is correct |
12 |
Correct |
376 ms |
704712 KB |
Output is correct |
13 |
Correct |
347 ms |
704916 KB |
Output is correct |
14 |
Correct |
331 ms |
704760 KB |
Output is correct |
15 |
Correct |
318 ms |
704776 KB |
Output is correct |
16 |
Correct |
324 ms |
704732 KB |
Output is correct |
17 |
Correct |
320 ms |
704784 KB |
Output is correct |
18 |
Correct |
315 ms |
704840 KB |
Output is correct |
19 |
Correct |
337 ms |
706028 KB |
Output is correct |
20 |
Correct |
344 ms |
707172 KB |
Output is correct |
21 |
Correct |
337 ms |
706340 KB |
Output is correct |
22 |
Correct |
341 ms |
706036 KB |
Output is correct |
23 |
Correct |
335 ms |
705952 KB |
Output is correct |
24 |
Correct |
333 ms |
707632 KB |
Output is correct |
25 |
Correct |
352 ms |
707628 KB |
Output is correct |
26 |
Correct |
317 ms |
705960 KB |
Output is correct |
27 |
Correct |
319 ms |
705968 KB |
Output is correct |
28 |
Correct |
334 ms |
706012 KB |
Output is correct |
29 |
Correct |
367 ms |
708064 KB |
Output is correct |
30 |
Correct |
355 ms |
706652 KB |
Output is correct |
31 |
Correct |
327 ms |
709288 KB |
Output is correct |
32 |
Correct |
420 ms |
708068 KB |
Output is correct |
33 |
Correct |
368 ms |
708060 KB |
Output is correct |
34 |
Correct |
375 ms |
711888 KB |
Output is correct |
35 |
Correct |
362 ms |
711768 KB |
Output is correct |
36 |
Correct |
339 ms |
708268 KB |
Output is correct |
37 |
Correct |
390 ms |
708224 KB |
Output is correct |
38 |
Correct |
323 ms |
708172 KB |
Output is correct |
39 |
Correct |
922 ms |
742268 KB |
Output is correct |
40 |
Correct |
331 ms |
709132 KB |
Output is correct |
41 |
Correct |
355 ms |
713500 KB |
Output is correct |
42 |
Correct |
395 ms |
709964 KB |
Output is correct |
43 |
Correct |
372 ms |
712356 KB |
Output is correct |
44 |
Correct |
430 ms |
722280 KB |
Output is correct |
45 |
Correct |
484 ms |
724928 KB |
Output is correct |
46 |
Correct |
379 ms |
744956 KB |
Output is correct |
47 |
Correct |
1008 ms |
742436 KB |
Output is correct |
48 |
Correct |
777 ms |
742140 KB |
Output is correct |
49 |
Correct |
683 ms |
775200 KB |
Output is correct |
50 |
Correct |
651 ms |
775276 KB |
Output is correct |
51 |
Correct |
750 ms |
742744 KB |
Output is correct |
52 |
Correct |
651 ms |
742300 KB |
Output is correct |
53 |
Correct |
876 ms |
742260 KB |
Output is correct |
54 |
Correct |
316 ms |
704928 KB |
Output is correct |
55 |
Correct |
358 ms |
704824 KB |
Output is correct |
56 |
Correct |
343 ms |
704712 KB |
Output is correct |
57 |
Correct |
330 ms |
704808 KB |
Output is correct |
58 |
Correct |
331 ms |
704844 KB |
Output is correct |
59 |
Correct |
323 ms |
704772 KB |
Output is correct |
60 |
Correct |
312 ms |
704792 KB |
Output is correct |
61 |
Correct |
319 ms |
704832 KB |
Output is correct |
62 |
Correct |
321 ms |
704760 KB |
Output is correct |
63 |
Correct |
319 ms |
704804 KB |
Output is correct |
64 |
Correct |
328 ms |
704896 KB |
Output is correct |
65 |
Correct |
340 ms |
704848 KB |
Output is correct |
66 |
Correct |
329 ms |
705000 KB |
Output is correct |
67 |
Correct |
319 ms |
704836 KB |
Output is correct |
68 |
Correct |
332 ms |
704900 KB |
Output is correct |
69 |
Correct |
315 ms |
704752 KB |
Output is correct |
70 |
Correct |
343 ms |
704808 KB |
Output is correct |
71 |
Correct |
316 ms |
704696 KB |
Output is correct |
72 |
Correct |
335 ms |
704720 KB |
Output is correct |
73 |
Correct |
317 ms |
704888 KB |
Output is correct |
74 |
Correct |
322 ms |
704740 KB |
Output is correct |
75 |
Correct |
314 ms |
704772 KB |
Output is correct |
76 |
Correct |
328 ms |
704708 KB |
Output is correct |
77 |
Correct |
333 ms |
704796 KB |
Output is correct |
78 |
Correct |
334 ms |
704792 KB |
Output is correct |
79 |
Correct |
318 ms |
704788 KB |
Output is correct |
80 |
Correct |
328 ms |
704900 KB |
Output is correct |
81 |
Correct |
313 ms |
704704 KB |
Output is correct |
82 |
Correct |
323 ms |
704716 KB |
Output is correct |
83 |
Correct |
318 ms |
704836 KB |
Output is correct |
84 |
Correct |
357 ms |
704832 KB |
Output is correct |
85 |
Correct |
357 ms |
704760 KB |
Output is correct |
86 |
Correct |
322 ms |
704744 KB |
Output is correct |
87 |
Correct |
329 ms |
704848 KB |
Output is correct |
88 |
Correct |
314 ms |
704804 KB |
Output is correct |
89 |
Correct |
321 ms |
704848 KB |
Output is correct |
90 |
Correct |
360 ms |
704772 KB |
Output is correct |
91 |
Correct |
322 ms |
704708 KB |
Output is correct |
92 |
Correct |
318 ms |
704852 KB |
Output is correct |
93 |
Correct |
343 ms |
704840 KB |
Output is correct |
94 |
Correct |
333 ms |
704844 KB |
Output is correct |
95 |
Correct |
311 ms |
704848 KB |
Output is correct |
96 |
Correct |
319 ms |
704816 KB |
Output is correct |
97 |
Correct |
339 ms |
704772 KB |
Output is correct |
98 |
Correct |
343 ms |
704808 KB |
Output is correct |
99 |
Correct |
313 ms |
704828 KB |
Output is correct |
100 |
Correct |
318 ms |
704700 KB |
Output is correct |
101 |
Correct |
327 ms |
704748 KB |
Output is correct |
102 |
Correct |
333 ms |
704792 KB |
Output is correct |
103 |
Correct |
321 ms |
704756 KB |
Output is correct |
104 |
Correct |
353 ms |
704808 KB |
Output is correct |
105 |
Correct |
332 ms |
704888 KB |
Output is correct |
106 |
Correct |
326 ms |
704920 KB |
Output is correct |
107 |
Correct |
321 ms |
704768 KB |
Output is correct |
108 |
Correct |
333 ms |
704736 KB |
Output is correct |
109 |
Correct |
324 ms |
704824 KB |
Output is correct |
110 |
Correct |
333 ms |
705868 KB |
Output is correct |
111 |
Correct |
323 ms |
706380 KB |
Output is correct |
112 |
Correct |
340 ms |
706444 KB |
Output is correct |
113 |
Correct |
319 ms |
706268 KB |
Output is correct |
114 |
Correct |
321 ms |
706428 KB |
Output is correct |
115 |
Correct |
328 ms |
706420 KB |
Output is correct |
116 |
Correct |
355 ms |
706028 KB |
Output is correct |
117 |
Correct |
323 ms |
706016 KB |
Output is correct |
118 |
Correct |
327 ms |
705952 KB |
Output is correct |
119 |
Correct |
342 ms |
708112 KB |
Output is correct |
120 |
Correct |
374 ms |
709224 KB |
Output is correct |
121 |
Correct |
324 ms |
709108 KB |
Output is correct |
122 |
Correct |
327 ms |
709476 KB |
Output is correct |
123 |
Correct |
325 ms |
709428 KB |
Output is correct |
124 |
Correct |
341 ms |
716876 KB |
Output is correct |
125 |
Correct |
404 ms |
738200 KB |
Output is correct |
126 |
Correct |
400 ms |
745004 KB |
Output is correct |
127 |
Correct |
410 ms |
752380 KB |
Output is correct |
128 |
Correct |
423 ms |
754572 KB |
Output is correct |
129 |
Correct |
432 ms |
754664 KB |
Output is correct |
130 |
Correct |
506 ms |
745548 KB |
Output is correct |
131 |
Correct |
481 ms |
741456 KB |
Output is correct |
132 |
Correct |
413 ms |
706144 KB |
Output is correct |
133 |
Correct |
336 ms |
704860 KB |
Output is correct |
134 |
Correct |
386 ms |
704968 KB |
Output is correct |
135 |
Correct |
370 ms |
705864 KB |
Output is correct |
136 |
Correct |
346 ms |
706924 KB |
Output is correct |
137 |
Correct |
366 ms |
706316 KB |
Output is correct |
138 |
Correct |
381 ms |
706480 KB |
Output is correct |
139 |
Correct |
394 ms |
706000 KB |
Output is correct |
140 |
Correct |
390 ms |
706068 KB |
Output is correct |
141 |
Correct |
366 ms |
706336 KB |
Output is correct |
142 |
Correct |
381 ms |
706496 KB |
Output is correct |
143 |
Correct |
354 ms |
706508 KB |
Output is correct |
144 |
Correct |
367 ms |
707680 KB |
Output is correct |
145 |
Correct |
361 ms |
707664 KB |
Output is correct |
146 |
Correct |
413 ms |
706656 KB |
Output is correct |
147 |
Correct |
353 ms |
706384 KB |
Output is correct |
148 |
Correct |
376 ms |
706136 KB |
Output is correct |
149 |
Correct |
354 ms |
706384 KB |
Output is correct |
150 |
Correct |
347 ms |
706072 KB |
Output is correct |
151 |
Correct |
327 ms |
705972 KB |
Output is correct |
152 |
Correct |
337 ms |
706084 KB |
Output is correct |
153 |
Correct |
338 ms |
706076 KB |
Output is correct |
154 |
Correct |
390 ms |
708304 KB |
Output is correct |
155 |
Correct |
349 ms |
706744 KB |
Output is correct |
156 |
Correct |
358 ms |
708320 KB |
Output is correct |
157 |
Correct |
367 ms |
707892 KB |
Output is correct |
158 |
Correct |
337 ms |
709416 KB |
Output is correct |
159 |
Correct |
379 ms |
708324 KB |
Output is correct |
160 |
Correct |
386 ms |
708372 KB |
Output is correct |
161 |
Correct |
353 ms |
709316 KB |
Output is correct |
162 |
Correct |
327 ms |
709476 KB |
Output is correct |
163 |
Correct |
349 ms |
709632 KB |
Output is correct |
164 |
Correct |
386 ms |
711996 KB |
Output is correct |
165 |
Correct |
399 ms |
712012 KB |
Output is correct |
166 |
Correct |
377 ms |
709676 KB |
Output is correct |
167 |
Correct |
349 ms |
708408 KB |
Output is correct |
168 |
Correct |
354 ms |
708620 KB |
Output is correct |
169 |
Correct |
366 ms |
708328 KB |
Output is correct |
170 |
Correct |
367 ms |
708540 KB |
Output is correct |
171 |
Correct |
345 ms |
708300 KB |
Output is correct |
172 |
Correct |
372 ms |
708296 KB |
Output is correct |
173 |
Correct |
326 ms |
708412 KB |
Output is correct |
174 |
Correct |
347 ms |
709308 KB |
Output is correct |
175 |
Correct |
490 ms |
712284 KB |
Output is correct |
176 |
Correct |
424 ms |
729464 KB |
Output is correct |
177 |
Correct |
568 ms |
728116 KB |
Output is correct |
178 |
Correct |
391 ms |
736248 KB |
Output is correct |
179 |
Correct |
518 ms |
739056 KB |
Output is correct |
180 |
Correct |
661 ms |
739744 KB |
Output is correct |
181 |
Correct |
635 ms |
737504 KB |
Output is correct |
182 |
Correct |
640 ms |
739352 KB |
Output is correct |
183 |
Correct |
660 ms |
739156 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
342 ms |
704764 KB |
Output is correct |
2 |
Correct |
316 ms |
704892 KB |
Output is correct |
3 |
Correct |
333 ms |
704728 KB |
Output is correct |
4 |
Correct |
316 ms |
704780 KB |
Output is correct |
5 |
Correct |
344 ms |
704748 KB |
Output is correct |
6 |
Correct |
315 ms |
704840 KB |
Output is correct |
7 |
Correct |
316 ms |
704840 KB |
Output is correct |
8 |
Correct |
326 ms |
704772 KB |
Output is correct |
9 |
Correct |
313 ms |
704924 KB |
Output is correct |
10 |
Correct |
341 ms |
704804 KB |
Output is correct |
11 |
Correct |
309 ms |
704820 KB |
Output is correct |
12 |
Correct |
376 ms |
704712 KB |
Output is correct |
13 |
Correct |
347 ms |
704916 KB |
Output is correct |
14 |
Correct |
331 ms |
704760 KB |
Output is correct |
15 |
Correct |
318 ms |
704776 KB |
Output is correct |
16 |
Correct |
324 ms |
704732 KB |
Output is correct |
17 |
Correct |
320 ms |
704784 KB |
Output is correct |
18 |
Correct |
315 ms |
704840 KB |
Output is correct |
19 |
Correct |
337 ms |
706028 KB |
Output is correct |
20 |
Correct |
344 ms |
707172 KB |
Output is correct |
21 |
Correct |
337 ms |
706340 KB |
Output is correct |
22 |
Correct |
341 ms |
706036 KB |
Output is correct |
23 |
Correct |
335 ms |
705952 KB |
Output is correct |
24 |
Correct |
333 ms |
707632 KB |
Output is correct |
25 |
Correct |
352 ms |
707628 KB |
Output is correct |
26 |
Correct |
317 ms |
705960 KB |
Output is correct |
27 |
Correct |
319 ms |
705968 KB |
Output is correct |
28 |
Correct |
334 ms |
706012 KB |
Output is correct |
29 |
Correct |
367 ms |
708064 KB |
Output is correct |
30 |
Correct |
355 ms |
706652 KB |
Output is correct |
31 |
Correct |
327 ms |
709288 KB |
Output is correct |
32 |
Correct |
420 ms |
708068 KB |
Output is correct |
33 |
Correct |
368 ms |
708060 KB |
Output is correct |
34 |
Correct |
375 ms |
711888 KB |
Output is correct |
35 |
Correct |
362 ms |
711768 KB |
Output is correct |
36 |
Correct |
339 ms |
708268 KB |
Output is correct |
37 |
Correct |
390 ms |
708224 KB |
Output is correct |
38 |
Correct |
323 ms |
708172 KB |
Output is correct |
39 |
Correct |
922 ms |
742268 KB |
Output is correct |
40 |
Correct |
331 ms |
709132 KB |
Output is correct |
41 |
Correct |
355 ms |
713500 KB |
Output is correct |
42 |
Correct |
395 ms |
709964 KB |
Output is correct |
43 |
Correct |
372 ms |
712356 KB |
Output is correct |
44 |
Correct |
430 ms |
722280 KB |
Output is correct |
45 |
Correct |
484 ms |
724928 KB |
Output is correct |
46 |
Correct |
379 ms |
744956 KB |
Output is correct |
47 |
Correct |
1008 ms |
742436 KB |
Output is correct |
48 |
Correct |
777 ms |
742140 KB |
Output is correct |
49 |
Correct |
683 ms |
775200 KB |
Output is correct |
50 |
Correct |
651 ms |
775276 KB |
Output is correct |
51 |
Correct |
750 ms |
742744 KB |
Output is correct |
52 |
Correct |
651 ms |
742300 KB |
Output is correct |
53 |
Correct |
876 ms |
742260 KB |
Output is correct |
54 |
Correct |
316 ms |
704928 KB |
Output is correct |
55 |
Correct |
358 ms |
704824 KB |
Output is correct |
56 |
Correct |
343 ms |
704712 KB |
Output is correct |
57 |
Correct |
330 ms |
704808 KB |
Output is correct |
58 |
Correct |
331 ms |
704844 KB |
Output is correct |
59 |
Correct |
323 ms |
704772 KB |
Output is correct |
60 |
Correct |
312 ms |
704792 KB |
Output is correct |
61 |
Correct |
319 ms |
704832 KB |
Output is correct |
62 |
Correct |
321 ms |
704760 KB |
Output is correct |
63 |
Correct |
319 ms |
704804 KB |
Output is correct |
64 |
Correct |
328 ms |
704896 KB |
Output is correct |
65 |
Correct |
340 ms |
704848 KB |
Output is correct |
66 |
Correct |
329 ms |
705000 KB |
Output is correct |
67 |
Correct |
319 ms |
704836 KB |
Output is correct |
68 |
Correct |
332 ms |
704900 KB |
Output is correct |
69 |
Correct |
315 ms |
704752 KB |
Output is correct |
70 |
Correct |
343 ms |
704808 KB |
Output is correct |
71 |
Correct |
316 ms |
704696 KB |
Output is correct |
72 |
Correct |
335 ms |
704720 KB |
Output is correct |
73 |
Correct |
317 ms |
704888 KB |
Output is correct |
74 |
Correct |
322 ms |
704740 KB |
Output is correct |
75 |
Correct |
314 ms |
704772 KB |
Output is correct |
76 |
Correct |
328 ms |
704708 KB |
Output is correct |
77 |
Correct |
333 ms |
704796 KB |
Output is correct |
78 |
Correct |
334 ms |
704792 KB |
Output is correct |
79 |
Correct |
318 ms |
704788 KB |
Output is correct |
80 |
Correct |
328 ms |
704900 KB |
Output is correct |
81 |
Correct |
313 ms |
704704 KB |
Output is correct |
82 |
Correct |
323 ms |
704716 KB |
Output is correct |
83 |
Correct |
318 ms |
704836 KB |
Output is correct |
84 |
Correct |
357 ms |
704832 KB |
Output is correct |
85 |
Correct |
357 ms |
704760 KB |
Output is correct |
86 |
Correct |
322 ms |
704744 KB |
Output is correct |
87 |
Correct |
329 ms |
704848 KB |
Output is correct |
88 |
Correct |
314 ms |
704804 KB |
Output is correct |
89 |
Correct |
321 ms |
704848 KB |
Output is correct |
90 |
Correct |
360 ms |
704772 KB |
Output is correct |
91 |
Correct |
322 ms |
704708 KB |
Output is correct |
92 |
Correct |
318 ms |
704852 KB |
Output is correct |
93 |
Correct |
343 ms |
704840 KB |
Output is correct |
94 |
Correct |
333 ms |
704844 KB |
Output is correct |
95 |
Correct |
311 ms |
704848 KB |
Output is correct |
96 |
Correct |
319 ms |
704816 KB |
Output is correct |
97 |
Correct |
339 ms |
704772 KB |
Output is correct |
98 |
Correct |
343 ms |
704808 KB |
Output is correct |
99 |
Correct |
313 ms |
704828 KB |
Output is correct |
100 |
Correct |
318 ms |
704700 KB |
Output is correct |
101 |
Correct |
327 ms |
704748 KB |
Output is correct |
102 |
Correct |
333 ms |
704792 KB |
Output is correct |
103 |
Correct |
321 ms |
704756 KB |
Output is correct |
104 |
Correct |
353 ms |
704808 KB |
Output is correct |
105 |
Correct |
332 ms |
704888 KB |
Output is correct |
106 |
Correct |
326 ms |
704920 KB |
Output is correct |
107 |
Correct |
321 ms |
704768 KB |
Output is correct |
108 |
Correct |
333 ms |
704736 KB |
Output is correct |
109 |
Correct |
324 ms |
704824 KB |
Output is correct |
110 |
Correct |
333 ms |
705868 KB |
Output is correct |
111 |
Correct |
323 ms |
706380 KB |
Output is correct |
112 |
Correct |
340 ms |
706444 KB |
Output is correct |
113 |
Correct |
319 ms |
706268 KB |
Output is correct |
114 |
Correct |
321 ms |
706428 KB |
Output is correct |
115 |
Correct |
328 ms |
706420 KB |
Output is correct |
116 |
Correct |
355 ms |
706028 KB |
Output is correct |
117 |
Correct |
323 ms |
706016 KB |
Output is correct |
118 |
Correct |
327 ms |
705952 KB |
Output is correct |
119 |
Correct |
342 ms |
708112 KB |
Output is correct |
120 |
Correct |
374 ms |
709224 KB |
Output is correct |
121 |
Correct |
324 ms |
709108 KB |
Output is correct |
122 |
Correct |
327 ms |
709476 KB |
Output is correct |
123 |
Correct |
325 ms |
709428 KB |
Output is correct |
124 |
Correct |
341 ms |
716876 KB |
Output is correct |
125 |
Correct |
404 ms |
738200 KB |
Output is correct |
126 |
Correct |
400 ms |
745004 KB |
Output is correct |
127 |
Correct |
410 ms |
752380 KB |
Output is correct |
128 |
Correct |
423 ms |
754572 KB |
Output is correct |
129 |
Correct |
432 ms |
754664 KB |
Output is correct |
130 |
Correct |
506 ms |
745548 KB |
Output is correct |
131 |
Correct |
481 ms |
741456 KB |
Output is correct |
132 |
Correct |
413 ms |
706144 KB |
Output is correct |
133 |
Correct |
336 ms |
704860 KB |
Output is correct |
134 |
Correct |
386 ms |
704968 KB |
Output is correct |
135 |
Correct |
370 ms |
705864 KB |
Output is correct |
136 |
Correct |
346 ms |
706924 KB |
Output is correct |
137 |
Correct |
366 ms |
706316 KB |
Output is correct |
138 |
Correct |
381 ms |
706480 KB |
Output is correct |
139 |
Correct |
394 ms |
706000 KB |
Output is correct |
140 |
Correct |
390 ms |
706068 KB |
Output is correct |
141 |
Correct |
366 ms |
706336 KB |
Output is correct |
142 |
Correct |
381 ms |
706496 KB |
Output is correct |
143 |
Correct |
354 ms |
706508 KB |
Output is correct |
144 |
Correct |
367 ms |
707680 KB |
Output is correct |
145 |
Correct |
361 ms |
707664 KB |
Output is correct |
146 |
Correct |
413 ms |
706656 KB |
Output is correct |
147 |
Correct |
353 ms |
706384 KB |
Output is correct |
148 |
Correct |
376 ms |
706136 KB |
Output is correct |
149 |
Correct |
354 ms |
706384 KB |
Output is correct |
150 |
Correct |
347 ms |
706072 KB |
Output is correct |
151 |
Correct |
327 ms |
705972 KB |
Output is correct |
152 |
Correct |
337 ms |
706084 KB |
Output is correct |
153 |
Correct |
338 ms |
706076 KB |
Output is correct |
154 |
Correct |
390 ms |
708304 KB |
Output is correct |
155 |
Correct |
349 ms |
706744 KB |
Output is correct |
156 |
Correct |
358 ms |
708320 KB |
Output is correct |
157 |
Correct |
367 ms |
707892 KB |
Output is correct |
158 |
Correct |
337 ms |
709416 KB |
Output is correct |
159 |
Correct |
379 ms |
708324 KB |
Output is correct |
160 |
Correct |
386 ms |
708372 KB |
Output is correct |
161 |
Correct |
353 ms |
709316 KB |
Output is correct |
162 |
Correct |
327 ms |
709476 KB |
Output is correct |
163 |
Correct |
349 ms |
709632 KB |
Output is correct |
164 |
Correct |
386 ms |
711996 KB |
Output is correct |
165 |
Correct |
399 ms |
712012 KB |
Output is correct |
166 |
Correct |
377 ms |
709676 KB |
Output is correct |
167 |
Correct |
349 ms |
708408 KB |
Output is correct |
168 |
Correct |
354 ms |
708620 KB |
Output is correct |
169 |
Correct |
366 ms |
708328 KB |
Output is correct |
170 |
Correct |
367 ms |
708540 KB |
Output is correct |
171 |
Correct |
345 ms |
708300 KB |
Output is correct |
172 |
Correct |
372 ms |
708296 KB |
Output is correct |
173 |
Correct |
326 ms |
708412 KB |
Output is correct |
174 |
Correct |
347 ms |
709308 KB |
Output is correct |
175 |
Correct |
490 ms |
712284 KB |
Output is correct |
176 |
Correct |
424 ms |
729464 KB |
Output is correct |
177 |
Correct |
568 ms |
728116 KB |
Output is correct |
178 |
Correct |
391 ms |
736248 KB |
Output is correct |
179 |
Correct |
518 ms |
739056 KB |
Output is correct |
180 |
Correct |
661 ms |
739744 KB |
Output is correct |
181 |
Correct |
635 ms |
737504 KB |
Output is correct |
182 |
Correct |
640 ms |
739352 KB |
Output is correct |
183 |
Correct |
660 ms |
739156 KB |
Output is correct |
184 |
Correct |
1567 ms |
770860 KB |
Output is correct |
185 |
Correct |
582 ms |
745368 KB |
Output is correct |
186 |
Correct |
431 ms |
750984 KB |
Output is correct |
187 |
Correct |
592 ms |
754896 KB |
Output is correct |
188 |
Correct |
593 ms |
794448 KB |
Output is correct |
189 |
Correct |
1315 ms |
770992 KB |
Output is correct |
190 |
Correct |
772 ms |
770636 KB |
Output is correct |
191 |
Correct |
542 ms |
794600 KB |
Output is correct |
192 |
Correct |
467 ms |
795164 KB |
Output is correct |
193 |
Correct |
472 ms |
795912 KB |
Output is correct |
194 |
Correct |
1269 ms |
848056 KB |
Output is correct |
195 |
Correct |
1014 ms |
847616 KB |
Output is correct |
196 |
Correct |
967 ms |
769200 KB |
Output is correct |
197 |
Correct |
673 ms |
772744 KB |
Output is correct |
198 |
Correct |
677 ms |
777012 KB |
Output is correct |
199 |
Correct |
950 ms |
770744 KB |
Output is correct |
200 |
Correct |
805 ms |
769940 KB |
Output is correct |
201 |
Correct |
1219 ms |
770984 KB |
Output is correct |
202 |
Correct |
1549 ms |
770956 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
342 ms |
704764 KB |
Output is correct |
2 |
Correct |
316 ms |
704892 KB |
Output is correct |
3 |
Correct |
333 ms |
704728 KB |
Output is correct |
4 |
Correct |
316 ms |
704780 KB |
Output is correct |
5 |
Correct |
344 ms |
704748 KB |
Output is correct |
6 |
Correct |
315 ms |
704840 KB |
Output is correct |
7 |
Correct |
316 ms |
704840 KB |
Output is correct |
8 |
Correct |
326 ms |
704772 KB |
Output is correct |
9 |
Correct |
313 ms |
704924 KB |
Output is correct |
10 |
Correct |
341 ms |
704804 KB |
Output is correct |
11 |
Correct |
309 ms |
704820 KB |
Output is correct |
12 |
Correct |
376 ms |
704712 KB |
Output is correct |
13 |
Correct |
347 ms |
704916 KB |
Output is correct |
14 |
Correct |
331 ms |
704760 KB |
Output is correct |
15 |
Correct |
318 ms |
704776 KB |
Output is correct |
16 |
Correct |
324 ms |
704732 KB |
Output is correct |
17 |
Correct |
320 ms |
704784 KB |
Output is correct |
18 |
Correct |
315 ms |
704840 KB |
Output is correct |
19 |
Correct |
337 ms |
706028 KB |
Output is correct |
20 |
Correct |
344 ms |
707172 KB |
Output is correct |
21 |
Correct |
337 ms |
706340 KB |
Output is correct |
22 |
Correct |
341 ms |
706036 KB |
Output is correct |
23 |
Correct |
335 ms |
705952 KB |
Output is correct |
24 |
Correct |
333 ms |
707632 KB |
Output is correct |
25 |
Correct |
352 ms |
707628 KB |
Output is correct |
26 |
Correct |
317 ms |
705960 KB |
Output is correct |
27 |
Correct |
319 ms |
705968 KB |
Output is correct |
28 |
Correct |
334 ms |
706012 KB |
Output is correct |
29 |
Correct |
367 ms |
708064 KB |
Output is correct |
30 |
Correct |
355 ms |
706652 KB |
Output is correct |
31 |
Correct |
327 ms |
709288 KB |
Output is correct |
32 |
Correct |
420 ms |
708068 KB |
Output is correct |
33 |
Correct |
368 ms |
708060 KB |
Output is correct |
34 |
Correct |
375 ms |
711888 KB |
Output is correct |
35 |
Correct |
362 ms |
711768 KB |
Output is correct |
36 |
Correct |
339 ms |
708268 KB |
Output is correct |
37 |
Correct |
390 ms |
708224 KB |
Output is correct |
38 |
Correct |
323 ms |
708172 KB |
Output is correct |
39 |
Correct |
922 ms |
742268 KB |
Output is correct |
40 |
Correct |
331 ms |
709132 KB |
Output is correct |
41 |
Correct |
355 ms |
713500 KB |
Output is correct |
42 |
Correct |
395 ms |
709964 KB |
Output is correct |
43 |
Correct |
372 ms |
712356 KB |
Output is correct |
44 |
Correct |
430 ms |
722280 KB |
Output is correct |
45 |
Correct |
484 ms |
724928 KB |
Output is correct |
46 |
Correct |
379 ms |
744956 KB |
Output is correct |
47 |
Correct |
1008 ms |
742436 KB |
Output is correct |
48 |
Correct |
777 ms |
742140 KB |
Output is correct |
49 |
Correct |
683 ms |
775200 KB |
Output is correct |
50 |
Correct |
651 ms |
775276 KB |
Output is correct |
51 |
Correct |
750 ms |
742744 KB |
Output is correct |
52 |
Correct |
651 ms |
742300 KB |
Output is correct |
53 |
Correct |
876 ms |
742260 KB |
Output is correct |
54 |
Correct |
316 ms |
704928 KB |
Output is correct |
55 |
Correct |
358 ms |
704824 KB |
Output is correct |
56 |
Correct |
343 ms |
704712 KB |
Output is correct |
57 |
Correct |
330 ms |
704808 KB |
Output is correct |
58 |
Correct |
331 ms |
704844 KB |
Output is correct |
59 |
Correct |
323 ms |
704772 KB |
Output is correct |
60 |
Correct |
312 ms |
704792 KB |
Output is correct |
61 |
Correct |
319 ms |
704832 KB |
Output is correct |
62 |
Correct |
321 ms |
704760 KB |
Output is correct |
63 |
Correct |
319 ms |
704804 KB |
Output is correct |
64 |
Correct |
328 ms |
704896 KB |
Output is correct |
65 |
Correct |
340 ms |
704848 KB |
Output is correct |
66 |
Correct |
329 ms |
705000 KB |
Output is correct |
67 |
Correct |
319 ms |
704836 KB |
Output is correct |
68 |
Correct |
332 ms |
704900 KB |
Output is correct |
69 |
Correct |
315 ms |
704752 KB |
Output is correct |
70 |
Correct |
343 ms |
704808 KB |
Output is correct |
71 |
Correct |
316 ms |
704696 KB |
Output is correct |
72 |
Correct |
335 ms |
704720 KB |
Output is correct |
73 |
Correct |
317 ms |
704888 KB |
Output is correct |
74 |
Correct |
322 ms |
704740 KB |
Output is correct |
75 |
Correct |
314 ms |
704772 KB |
Output is correct |
76 |
Correct |
328 ms |
704708 KB |
Output is correct |
77 |
Correct |
333 ms |
704796 KB |
Output is correct |
78 |
Correct |
334 ms |
704792 KB |
Output is correct |
79 |
Correct |
318 ms |
704788 KB |
Output is correct |
80 |
Correct |
328 ms |
704900 KB |
Output is correct |
81 |
Correct |
313 ms |
704704 KB |
Output is correct |
82 |
Correct |
323 ms |
704716 KB |
Output is correct |
83 |
Correct |
318 ms |
704836 KB |
Output is correct |
84 |
Correct |
357 ms |
704832 KB |
Output is correct |
85 |
Correct |
357 ms |
704760 KB |
Output is correct |
86 |
Correct |
322 ms |
704744 KB |
Output is correct |
87 |
Correct |
329 ms |
704848 KB |
Output is correct |
88 |
Correct |
314 ms |
704804 KB |
Output is correct |
89 |
Correct |
321 ms |
704848 KB |
Output is correct |
90 |
Correct |
360 ms |
704772 KB |
Output is correct |
91 |
Correct |
322 ms |
704708 KB |
Output is correct |
92 |
Correct |
318 ms |
704852 KB |
Output is correct |
93 |
Correct |
343 ms |
704840 KB |
Output is correct |
94 |
Correct |
333 ms |
704844 KB |
Output is correct |
95 |
Correct |
311 ms |
704848 KB |
Output is correct |
96 |
Correct |
319 ms |
704816 KB |
Output is correct |
97 |
Correct |
339 ms |
704772 KB |
Output is correct |
98 |
Correct |
343 ms |
704808 KB |
Output is correct |
99 |
Correct |
313 ms |
704828 KB |
Output is correct |
100 |
Correct |
318 ms |
704700 KB |
Output is correct |
101 |
Correct |
327 ms |
704748 KB |
Output is correct |
102 |
Correct |
333 ms |
704792 KB |
Output is correct |
103 |
Correct |
321 ms |
704756 KB |
Output is correct |
104 |
Correct |
353 ms |
704808 KB |
Output is correct |
105 |
Correct |
332 ms |
704888 KB |
Output is correct |
106 |
Correct |
326 ms |
704920 KB |
Output is correct |
107 |
Correct |
321 ms |
704768 KB |
Output is correct |
108 |
Correct |
333 ms |
704736 KB |
Output is correct |
109 |
Correct |
324 ms |
704824 KB |
Output is correct |
110 |
Correct |
333 ms |
705868 KB |
Output is correct |
111 |
Correct |
323 ms |
706380 KB |
Output is correct |
112 |
Correct |
340 ms |
706444 KB |
Output is correct |
113 |
Correct |
319 ms |
706268 KB |
Output is correct |
114 |
Correct |
321 ms |
706428 KB |
Output is correct |
115 |
Correct |
328 ms |
706420 KB |
Output is correct |
116 |
Correct |
355 ms |
706028 KB |
Output is correct |
117 |
Correct |
323 ms |
706016 KB |
Output is correct |
118 |
Correct |
327 ms |
705952 KB |
Output is correct |
119 |
Correct |
342 ms |
708112 KB |
Output is correct |
120 |
Correct |
374 ms |
709224 KB |
Output is correct |
121 |
Correct |
324 ms |
709108 KB |
Output is correct |
122 |
Correct |
327 ms |
709476 KB |
Output is correct |
123 |
Correct |
325 ms |
709428 KB |
Output is correct |
124 |
Correct |
341 ms |
716876 KB |
Output is correct |
125 |
Correct |
404 ms |
738200 KB |
Output is correct |
126 |
Correct |
400 ms |
745004 KB |
Output is correct |
127 |
Correct |
410 ms |
752380 KB |
Output is correct |
128 |
Correct |
423 ms |
754572 KB |
Output is correct |
129 |
Correct |
432 ms |
754664 KB |
Output is correct |
130 |
Correct |
506 ms |
745548 KB |
Output is correct |
131 |
Correct |
481 ms |
741456 KB |
Output is correct |
132 |
Correct |
413 ms |
706144 KB |
Output is correct |
133 |
Correct |
336 ms |
704860 KB |
Output is correct |
134 |
Correct |
386 ms |
704968 KB |
Output is correct |
135 |
Correct |
370 ms |
705864 KB |
Output is correct |
136 |
Correct |
346 ms |
706924 KB |
Output is correct |
137 |
Correct |
366 ms |
706316 KB |
Output is correct |
138 |
Correct |
381 ms |
706480 KB |
Output is correct |
139 |
Correct |
394 ms |
706000 KB |
Output is correct |
140 |
Correct |
390 ms |
706068 KB |
Output is correct |
141 |
Correct |
366 ms |
706336 KB |
Output is correct |
142 |
Correct |
381 ms |
706496 KB |
Output is correct |
143 |
Correct |
354 ms |
706508 KB |
Output is correct |
144 |
Correct |
367 ms |
707680 KB |
Output is correct |
145 |
Correct |
361 ms |
707664 KB |
Output is correct |
146 |
Correct |
413 ms |
706656 KB |
Output is correct |
147 |
Correct |
353 ms |
706384 KB |
Output is correct |
148 |
Correct |
376 ms |
706136 KB |
Output is correct |
149 |
Correct |
354 ms |
706384 KB |
Output is correct |
150 |
Correct |
347 ms |
706072 KB |
Output is correct |
151 |
Correct |
327 ms |
705972 KB |
Output is correct |
152 |
Correct |
337 ms |
706084 KB |
Output is correct |
153 |
Correct |
338 ms |
706076 KB |
Output is correct |
154 |
Correct |
390 ms |
708304 KB |
Output is correct |
155 |
Correct |
349 ms |
706744 KB |
Output is correct |
156 |
Correct |
358 ms |
708320 KB |
Output is correct |
157 |
Correct |
367 ms |
707892 KB |
Output is correct |
158 |
Correct |
337 ms |
709416 KB |
Output is correct |
159 |
Correct |
379 ms |
708324 KB |
Output is correct |
160 |
Correct |
386 ms |
708372 KB |
Output is correct |
161 |
Correct |
353 ms |
709316 KB |
Output is correct |
162 |
Correct |
327 ms |
709476 KB |
Output is correct |
163 |
Correct |
349 ms |
709632 KB |
Output is correct |
164 |
Correct |
386 ms |
711996 KB |
Output is correct |
165 |
Correct |
399 ms |
712012 KB |
Output is correct |
166 |
Correct |
377 ms |
709676 KB |
Output is correct |
167 |
Correct |
349 ms |
708408 KB |
Output is correct |
168 |
Correct |
354 ms |
708620 KB |
Output is correct |
169 |
Correct |
366 ms |
708328 KB |
Output is correct |
170 |
Correct |
367 ms |
708540 KB |
Output is correct |
171 |
Correct |
345 ms |
708300 KB |
Output is correct |
172 |
Correct |
372 ms |
708296 KB |
Output is correct |
173 |
Correct |
326 ms |
708412 KB |
Output is correct |
174 |
Correct |
347 ms |
709308 KB |
Output is correct |
175 |
Correct |
490 ms |
712284 KB |
Output is correct |
176 |
Correct |
424 ms |
729464 KB |
Output is correct |
177 |
Correct |
568 ms |
728116 KB |
Output is correct |
178 |
Correct |
391 ms |
736248 KB |
Output is correct |
179 |
Correct |
518 ms |
739056 KB |
Output is correct |
180 |
Correct |
661 ms |
739744 KB |
Output is correct |
181 |
Correct |
635 ms |
737504 KB |
Output is correct |
182 |
Correct |
640 ms |
739352 KB |
Output is correct |
183 |
Correct |
660 ms |
739156 KB |
Output is correct |
184 |
Correct |
1567 ms |
770860 KB |
Output is correct |
185 |
Correct |
582 ms |
745368 KB |
Output is correct |
186 |
Correct |
431 ms |
750984 KB |
Output is correct |
187 |
Correct |
592 ms |
754896 KB |
Output is correct |
188 |
Correct |
593 ms |
794448 KB |
Output is correct |
189 |
Correct |
1315 ms |
770992 KB |
Output is correct |
190 |
Correct |
772 ms |
770636 KB |
Output is correct |
191 |
Correct |
542 ms |
794600 KB |
Output is correct |
192 |
Correct |
467 ms |
795164 KB |
Output is correct |
193 |
Correct |
472 ms |
795912 KB |
Output is correct |
194 |
Correct |
1269 ms |
848056 KB |
Output is correct |
195 |
Correct |
1014 ms |
847616 KB |
Output is correct |
196 |
Correct |
967 ms |
769200 KB |
Output is correct |
197 |
Correct |
673 ms |
772744 KB |
Output is correct |
198 |
Correct |
677 ms |
777012 KB |
Output is correct |
199 |
Correct |
950 ms |
770744 KB |
Output is correct |
200 |
Correct |
805 ms |
769940 KB |
Output is correct |
201 |
Correct |
1219 ms |
770984 KB |
Output is correct |
202 |
Correct |
1549 ms |
770956 KB |
Output is correct |
203 |
Execution timed out |
2076 ms |
845700 KB |
Time limit exceeded |
204 |
Halted |
0 ms |
0 KB |
- |