// -------------------- Includes -------------------- //
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <stdio.h>
#include <cstdlib>
#include <stdlib.h>
#include <array>
#include <string>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <math.h>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <bitset>
#include <list>
#include <iterator>
#include <numeric>
#include <complex>
#include <tuple>
#include <utility>
#include <cassert>
#include <assert.h>
#include <climits>
#include <limits.h>
#include <ctime>
#include <time.h>
#include <random>
#include <chrono>
#include <fstream>
using namespace std;
// -------------------- Typedefs -------------------- //
typedef long long ll;
typedef unsigned long long ull;
typedef double db;
typedef long double ld;
// -------------------- Defines -------------------- //
#define pr pair
#define mpr make_pair
#define ff first
#define ss second
#define mset multiset
#define mmap multimap
#define uset unordered_set
#define umap unordered_map
#define umset unordered_multiset
#define ummap unordered_multimap
#define pqueue priority_queue
#define sz(x) (int((x).size()))
#define len(x) (int((x).length()))
#define all(x) (x).begin(), (x).end()
#define clr(x) (x).clear()
#define ft front
#define bk back
#define pf push_front
#define pb push_back
#define popf pop_front
#define popb pop_back
#define lb lower_bound
#define ub upper_bound
#define bs binary_search
// -------------------- Constants -------------------- //
const int MAX = int(1e9 + 5);
const ll MAXL = ll(1e18 + 5);
const ll MOD = ll(1e9 + 7);
const ll MOD2 = ll(998244353);
// -------------------- Functions -------------------- //
void fastio()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
return;
}
void precision(int x)
{
cout << fixed << setprecision(x);
return;
}
ll gcd0(ll a, ll b)
{
while (b) {
a %= b;
swap(a, b);
}
return a;
}
ll lcm0(ll a, ll b)
{
return a / gcd0(a, b) * b;
}
bool is_prime(ll a)
{
if (a == 1) return false;
for (ll i = 2; i * i <= a; i++) if (a % i == 0) return false;
return true;
}
bool is_square(ll a)
{
ll b = ll(sqrtl(ld(a)));
return (b * b == a);
}
bool is_cube(ll a)
{
ll b = ll(cbrtl(ld(a)));
return (b * b * b == a);
}
int digit_sum(ll a)
{
int sum = 0;
while (a) {
sum += int(a % 10);
a /= 10;
}
return sum;
}
ll binpow(ll a, int b)
{
ll ans = 1;
while (b) {
if (b & 1) ans *= a;
b >>= 1;
a *= a;
}
return ans;
}
ll binpow_mod(ll a, ll b, ll mod)
{
ll ans = 1;
while (b) {
if (b & 1) ans = (ans * a) % mod;
b >>= 1;
a = (a * a) % mod;
}
return ans;
}
ll factorial(int a)
{
ll ans = 1;
for (int i = 2; i <= a; i++) ans *= ll(i);
return ans;
}
ll factorial_mod(int a, ll mod)
{
ll ans = 1;
for (int i = 2; i <= a; i++) ans = (ans * ll(i)) % mod;
return ans;
}
// -------------------- Solution -------------------- //
const int N = 1505, M = 1505;
char a[N][M];
int px[N], py[M];
vector<pr<int, int>> g[N][M];
int n, m, k, l;
int xh, yh, xv, yv, tx, ty;
vector<int> vx[N], vy[M];
bool used[N][M];
void dfs(int x, int y)
{
if (a[x][y] == 'X') return;
used[x][y] = true;
for (int i = 0; i < sz(g[x][y]); i++) {
if (!used[g[x][y][i].ff][g[x][y][i].ss]) dfs(g[x][y][i].ff, g[x][y][i].ss);
}
return;
}
void solve()
{
int i, j;
cin >> m >> n >> k >> l;
cin >> yh >> xh >> yv >> xv;
for (i = 1; i <= n; i++) {
for (j = 1; j <= m; j++) {
cin >> a[i][j];
if (a[i][j] == '*') {
tx = i;
ty = j;
}
else if (a[i][j] == 'X') {
vx[i].pb(j);
vy[j].pb(i);
}
}
}
for (j = 1; j <= m; j++) sort(all(vy[j]));
int h;
int lx, rx, ly, ry;
int ul, ur;
for (i = 1; i <= n; i++) {
for (j = 1; j <= m; j++) {
if (a[i][j] == 'X') continue;
h = ub(all(vy[j]), i) - vy[j].begin();
if (h == sz(vy[j])) rx = n;
else rx = vy[j][h] - 1;
rx = min(rx, i + l - 1);
h--;
if (h < 0) lx = 1;
else lx = vy[j][h] + 1;
lx = max(lx, i - l + 1);
h = ub(all(vx[i]), j) - vx[i].begin();
if (h == sz(vx[i])) ry = m;
else ry = vx[i][h] - 1;
ry = min(ry, j + k - 1);
h--;
if (h < 0) ly = 1;
else ly = vx[i][h] + 1;
ly = max(ly, j - k + 1);
if (l > rx - lx + 1 || k > ry - ly + 1) continue;
if (i < n && rx >= i + 1 && a[i + 1][j] != 'X') {
h = ub(all(vx[i + 1]), j) - vx[i + 1].begin();
if (h == sz(vx[i + 1])) ur = m;
else ur = vx[i + 1][h] - 1;
ur = min(ur, ry);
h--;
if (h < 0) ul = 1;
else ul = vx[i + 1][h] + 1;
ul = max(ul, ly);
if (ur - ul + 1 >= k) {
g[i][j].pb(mpr(i + 1, j));
g[i + 1][j].pb(mpr(i, j));
}
}
if (j < m && ry >= j + 1 && a[i][j + 1] != 'X') {
h = ub(all(vy[j + 1]), i) - vy[j + 1].begin();
if (h == sz(vy[j + 1])) ur = n;
else ur = vy[j + 1][h] - 1;
ur = min(ur, rx);
h--;
if (h < 0) ul = 1;
else ul = vy[j + 1][h] + 1;
ul = max(ul, lx);
if (ur - ul + 1 >= l) {
g[i][j].pb(mpr(i, j + 1));
g[i][j + 1].pb(mpr(i, j));
}
}
}
}
dfs(xh + 1, yv + 1);
if (used[tx][ty]) cout << "YES\n";
else cout << "NO\n";
return;
}
void precalc()
{
return;
}
int main()
{
fastio();
precalc();
int tests = 1, tc;
//cin >> tests;
for (tc = 1; tc <= tests; tc++) {
solve();
}
return 0;
}
/*
# # # # # # # # # # # # # # # # #
# # # # # # # # # #
# # # # # # # # # # # # #
# # # # # # # # # # # #
# # # # # # # # # # # # # #
*/
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
55644 KB |
Output is correct |
2 |
Correct |
8 ms |
55644 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
55644 KB |
Output is correct |
2 |
Correct |
8 ms |
55644 KB |
Output is correct |
3 |
Correct |
8 ms |
55800 KB |
Output is correct |
4 |
Correct |
9 ms |
56156 KB |
Output is correct |
5 |
Correct |
12 ms |
56056 KB |
Output is correct |
6 |
Correct |
10 ms |
55900 KB |
Output is correct |
7 |
Correct |
8 ms |
55956 KB |
Output is correct |
8 |
Correct |
8 ms |
55912 KB |
Output is correct |
9 |
Correct |
8 ms |
55644 KB |
Output is correct |
10 |
Correct |
8 ms |
55644 KB |
Output is correct |
11 |
Correct |
8 ms |
55644 KB |
Output is correct |
12 |
Correct |
7 ms |
55644 KB |
Output is correct |
13 |
Correct |
8 ms |
55776 KB |
Output is correct |
14 |
Correct |
8 ms |
55644 KB |
Output is correct |
15 |
Correct |
9 ms |
55900 KB |
Output is correct |
16 |
Correct |
10 ms |
55900 KB |
Output is correct |
17 |
Correct |
10 ms |
56144 KB |
Output is correct |
18 |
Correct |
8 ms |
56008 KB |
Output is correct |
19 |
Correct |
8 ms |
56064 KB |
Output is correct |
20 |
Correct |
9 ms |
56024 KB |
Output is correct |
21 |
Correct |
8 ms |
56036 KB |
Output is correct |
22 |
Correct |
9 ms |
56152 KB |
Output is correct |
23 |
Correct |
10 ms |
56156 KB |
Output is correct |
24 |
Correct |
9 ms |
56148 KB |
Output is correct |
25 |
Correct |
8 ms |
56036 KB |
Output is correct |
26 |
Correct |
9 ms |
55900 KB |
Output is correct |
27 |
Correct |
9 ms |
56072 KB |
Output is correct |
28 |
Correct |
9 ms |
56012 KB |
Output is correct |
29 |
Correct |
9 ms |
55900 KB |
Output is correct |
30 |
Correct |
10 ms |
55900 KB |
Output is correct |
31 |
Correct |
10 ms |
55900 KB |
Output is correct |
32 |
Correct |
9 ms |
56140 KB |
Output is correct |
33 |
Correct |
9 ms |
55992 KB |
Output is correct |
34 |
Correct |
9 ms |
56088 KB |
Output is correct |
35 |
Correct |
9 ms |
55900 KB |
Output is correct |
36 |
Correct |
10 ms |
55780 KB |
Output is correct |
37 |
Correct |
10 ms |
55896 KB |
Output is correct |
38 |
Correct |
9 ms |
55804 KB |
Output is correct |
39 |
Correct |
10 ms |
55900 KB |
Output is correct |
40 |
Correct |
9 ms |
55836 KB |
Output is correct |
41 |
Correct |
9 ms |
56044 KB |
Output is correct |
42 |
Correct |
10 ms |
56156 KB |
Output is correct |
43 |
Correct |
8 ms |
56024 KB |
Output is correct |
44 |
Correct |
10 ms |
56156 KB |
Output is correct |
45 |
Correct |
8 ms |
56156 KB |
Output is correct |
46 |
Correct |
8 ms |
55644 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
55644 KB |
Output is correct |
2 |
Correct |
8 ms |
55644 KB |
Output is correct |
3 |
Correct |
8 ms |
55800 KB |
Output is correct |
4 |
Correct |
9 ms |
56156 KB |
Output is correct |
5 |
Correct |
12 ms |
56056 KB |
Output is correct |
6 |
Correct |
10 ms |
55900 KB |
Output is correct |
7 |
Correct |
8 ms |
55956 KB |
Output is correct |
8 |
Correct |
8 ms |
55912 KB |
Output is correct |
9 |
Correct |
8 ms |
55644 KB |
Output is correct |
10 |
Correct |
8 ms |
55644 KB |
Output is correct |
11 |
Correct |
8 ms |
55644 KB |
Output is correct |
12 |
Correct |
7 ms |
55644 KB |
Output is correct |
13 |
Correct |
8 ms |
55776 KB |
Output is correct |
14 |
Correct |
8 ms |
55644 KB |
Output is correct |
15 |
Correct |
9 ms |
55900 KB |
Output is correct |
16 |
Correct |
10 ms |
55900 KB |
Output is correct |
17 |
Correct |
10 ms |
56144 KB |
Output is correct |
18 |
Correct |
8 ms |
56008 KB |
Output is correct |
19 |
Correct |
8 ms |
56064 KB |
Output is correct |
20 |
Correct |
9 ms |
56024 KB |
Output is correct |
21 |
Correct |
8 ms |
56036 KB |
Output is correct |
22 |
Correct |
9 ms |
56152 KB |
Output is correct |
23 |
Correct |
10 ms |
56156 KB |
Output is correct |
24 |
Correct |
9 ms |
56148 KB |
Output is correct |
25 |
Correct |
8 ms |
56036 KB |
Output is correct |
26 |
Correct |
9 ms |
55900 KB |
Output is correct |
27 |
Correct |
9 ms |
56072 KB |
Output is correct |
28 |
Correct |
9 ms |
56012 KB |
Output is correct |
29 |
Correct |
9 ms |
55900 KB |
Output is correct |
30 |
Correct |
10 ms |
55900 KB |
Output is correct |
31 |
Correct |
10 ms |
55900 KB |
Output is correct |
32 |
Correct |
9 ms |
56140 KB |
Output is correct |
33 |
Correct |
9 ms |
55992 KB |
Output is correct |
34 |
Correct |
9 ms |
56088 KB |
Output is correct |
35 |
Correct |
9 ms |
55900 KB |
Output is correct |
36 |
Correct |
10 ms |
55780 KB |
Output is correct |
37 |
Correct |
10 ms |
55896 KB |
Output is correct |
38 |
Correct |
9 ms |
55804 KB |
Output is correct |
39 |
Correct |
10 ms |
55900 KB |
Output is correct |
40 |
Correct |
9 ms |
55836 KB |
Output is correct |
41 |
Correct |
9 ms |
56044 KB |
Output is correct |
42 |
Correct |
10 ms |
56156 KB |
Output is correct |
43 |
Correct |
8 ms |
56024 KB |
Output is correct |
44 |
Correct |
10 ms |
56156 KB |
Output is correct |
45 |
Correct |
8 ms |
56156 KB |
Output is correct |
46 |
Correct |
8 ms |
55644 KB |
Output is correct |
47 |
Correct |
9 ms |
55900 KB |
Output is correct |
48 |
Correct |
8 ms |
58204 KB |
Output is correct |
49 |
Correct |
8 ms |
58204 KB |
Output is correct |
50 |
Correct |
8 ms |
57848 KB |
Output is correct |
51 |
Correct |
9 ms |
58204 KB |
Output is correct |
52 |
Correct |
8 ms |
57972 KB |
Output is correct |
53 |
Correct |
8 ms |
55640 KB |
Output is correct |
54 |
Correct |
8 ms |
57692 KB |
Output is correct |
55 |
Correct |
8 ms |
57692 KB |
Output is correct |
56 |
Correct |
8 ms |
57692 KB |
Output is correct |
57 |
Correct |
9 ms |
57948 KB |
Output is correct |
58 |
Correct |
8 ms |
57980 KB |
Output is correct |
59 |
Correct |
10 ms |
58716 KB |
Output is correct |
60 |
Correct |
9 ms |
58612 KB |
Output is correct |
61 |
Correct |
12 ms |
58648 KB |
Output is correct |
62 |
Correct |
11 ms |
58716 KB |
Output is correct |
63 |
Correct |
11 ms |
58716 KB |
Output is correct |
64 |
Correct |
10 ms |
58716 KB |
Output is correct |
65 |
Correct |
11 ms |
58600 KB |
Output is correct |
66 |
Correct |
9 ms |
58572 KB |
Output is correct |
67 |
Correct |
10 ms |
58716 KB |
Output is correct |
68 |
Correct |
9 ms |
58596 KB |
Output is correct |
69 |
Correct |
10 ms |
58576 KB |
Output is correct |
70 |
Correct |
12 ms |
58460 KB |
Output is correct |
71 |
Correct |
11 ms |
58604 KB |
Output is correct |
72 |
Correct |
8 ms |
58672 KB |
Output is correct |
73 |
Correct |
9 ms |
58628 KB |
Output is correct |
74 |
Correct |
11 ms |
58728 KB |
Output is correct |
75 |
Correct |
11 ms |
58592 KB |
Output is correct |
76 |
Correct |
11 ms |
58612 KB |
Output is correct |
77 |
Correct |
9 ms |
58604 KB |
Output is correct |
78 |
Correct |
9 ms |
58608 KB |
Output is correct |
79 |
Correct |
11 ms |
58648 KB |
Output is correct |
80 |
Correct |
9 ms |
57788 KB |
Output is correct |
81 |
Correct |
9 ms |
58204 KB |
Output is correct |
82 |
Correct |
10 ms |
58460 KB |
Output is correct |
83 |
Correct |
10 ms |
58384 KB |
Output is correct |
84 |
Correct |
8 ms |
58348 KB |
Output is correct |
85 |
Correct |
11 ms |
58200 KB |
Output is correct |
86 |
Correct |
9 ms |
58716 KB |
Output is correct |
87 |
Correct |
9 ms |
58712 KB |
Output is correct |
88 |
Correct |
9 ms |
58716 KB |
Output is correct |
89 |
Correct |
11 ms |
58716 KB |
Output is correct |
90 |
Correct |
9 ms |
57948 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
55644 KB |
Output is correct |
2 |
Correct |
8 ms |
55644 KB |
Output is correct |
3 |
Correct |
8 ms |
56216 KB |
Output is correct |
4 |
Correct |
24 ms |
66276 KB |
Output is correct |
5 |
Correct |
30 ms |
66396 KB |
Output is correct |
6 |
Correct |
10 ms |
58968 KB |
Output is correct |
7 |
Correct |
22 ms |
65028 KB |
Output is correct |
8 |
Correct |
23 ms |
65212 KB |
Output is correct |
9 |
Correct |
11 ms |
58616 KB |
Output is correct |
10 |
Correct |
19 ms |
60404 KB |
Output is correct |
11 |
Correct |
17 ms |
59484 KB |
Output is correct |
12 |
Correct |
12 ms |
57948 KB |
Output is correct |
13 |
Correct |
15 ms |
58136 KB |
Output is correct |
14 |
Correct |
16 ms |
58336 KB |
Output is correct |
15 |
Correct |
27 ms |
65884 KB |
Output is correct |
16 |
Correct |
29 ms |
65628 KB |
Output is correct |
17 |
Correct |
21 ms |
65404 KB |
Output is correct |
18 |
Correct |
22 ms |
66392 KB |
Output is correct |
19 |
Correct |
22 ms |
66556 KB |
Output is correct |
20 |
Correct |
29 ms |
66372 KB |
Output is correct |
21 |
Correct |
22 ms |
66496 KB |
Output is correct |
22 |
Correct |
21 ms |
66372 KB |
Output is correct |
23 |
Correct |
26 ms |
66340 KB |
Output is correct |
24 |
Correct |
34 ms |
66320 KB |
Output is correct |
25 |
Correct |
26 ms |
66396 KB |
Output is correct |
26 |
Correct |
24 ms |
64792 KB |
Output is correct |
27 |
Correct |
20 ms |
64860 KB |
Output is correct |
28 |
Correct |
20 ms |
64776 KB |
Output is correct |
29 |
Correct |
29 ms |
64728 KB |
Output is correct |
30 |
Correct |
21 ms |
66136 KB |
Output is correct |
31 |
Correct |
22 ms |
65756 KB |
Output is correct |
32 |
Correct |
19 ms |
66132 KB |
Output is correct |
33 |
Correct |
19 ms |
65628 KB |
Output is correct |
34 |
Correct |
22 ms |
65684 KB |
Output is correct |
35 |
Correct |
23 ms |
65808 KB |
Output is correct |
36 |
Correct |
10 ms |
58204 KB |
Output is correct |
37 |
Correct |
19 ms |
63388 KB |
Output is correct |
38 |
Correct |
17 ms |
63068 KB |
Output is correct |
39 |
Correct |
16 ms |
63068 KB |
Output is correct |
40 |
Correct |
18 ms |
63324 KB |
Output is correct |
41 |
Correct |
19 ms |
62940 KB |
Output is correct |
42 |
Correct |
27 ms |
66348 KB |
Output is correct |
43 |
Correct |
22 ms |
66532 KB |
Output is correct |
44 |
Correct |
30 ms |
66524 KB |
Output is correct |
45 |
Correct |
24 ms |
66392 KB |
Output is correct |
46 |
Correct |
11 ms |
58972 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
55644 KB |
Output is correct |
2 |
Correct |
8 ms |
55644 KB |
Output is correct |
3 |
Correct |
8 ms |
55800 KB |
Output is correct |
4 |
Correct |
9 ms |
56156 KB |
Output is correct |
5 |
Correct |
12 ms |
56056 KB |
Output is correct |
6 |
Correct |
10 ms |
55900 KB |
Output is correct |
7 |
Correct |
8 ms |
55956 KB |
Output is correct |
8 |
Correct |
8 ms |
55912 KB |
Output is correct |
9 |
Correct |
8 ms |
55644 KB |
Output is correct |
10 |
Correct |
8 ms |
55644 KB |
Output is correct |
11 |
Correct |
8 ms |
55644 KB |
Output is correct |
12 |
Correct |
7 ms |
55644 KB |
Output is correct |
13 |
Correct |
8 ms |
55776 KB |
Output is correct |
14 |
Correct |
8 ms |
55644 KB |
Output is correct |
15 |
Correct |
9 ms |
55900 KB |
Output is correct |
16 |
Correct |
10 ms |
55900 KB |
Output is correct |
17 |
Correct |
10 ms |
56144 KB |
Output is correct |
18 |
Correct |
8 ms |
56008 KB |
Output is correct |
19 |
Correct |
8 ms |
56064 KB |
Output is correct |
20 |
Correct |
9 ms |
56024 KB |
Output is correct |
21 |
Correct |
8 ms |
56036 KB |
Output is correct |
22 |
Correct |
9 ms |
56152 KB |
Output is correct |
23 |
Correct |
10 ms |
56156 KB |
Output is correct |
24 |
Correct |
9 ms |
56148 KB |
Output is correct |
25 |
Correct |
8 ms |
56036 KB |
Output is correct |
26 |
Correct |
9 ms |
55900 KB |
Output is correct |
27 |
Correct |
9 ms |
56072 KB |
Output is correct |
28 |
Correct |
9 ms |
56012 KB |
Output is correct |
29 |
Correct |
9 ms |
55900 KB |
Output is correct |
30 |
Correct |
10 ms |
55900 KB |
Output is correct |
31 |
Correct |
10 ms |
55900 KB |
Output is correct |
32 |
Correct |
9 ms |
56140 KB |
Output is correct |
33 |
Correct |
9 ms |
55992 KB |
Output is correct |
34 |
Correct |
9 ms |
56088 KB |
Output is correct |
35 |
Correct |
9 ms |
55900 KB |
Output is correct |
36 |
Correct |
10 ms |
55780 KB |
Output is correct |
37 |
Correct |
10 ms |
55896 KB |
Output is correct |
38 |
Correct |
9 ms |
55804 KB |
Output is correct |
39 |
Correct |
10 ms |
55900 KB |
Output is correct |
40 |
Correct |
9 ms |
55836 KB |
Output is correct |
41 |
Correct |
9 ms |
56044 KB |
Output is correct |
42 |
Correct |
10 ms |
56156 KB |
Output is correct |
43 |
Correct |
8 ms |
56024 KB |
Output is correct |
44 |
Correct |
10 ms |
56156 KB |
Output is correct |
45 |
Correct |
8 ms |
56156 KB |
Output is correct |
46 |
Correct |
8 ms |
55644 KB |
Output is correct |
47 |
Correct |
9 ms |
55900 KB |
Output is correct |
48 |
Correct |
8 ms |
58204 KB |
Output is correct |
49 |
Correct |
8 ms |
58204 KB |
Output is correct |
50 |
Correct |
8 ms |
57848 KB |
Output is correct |
51 |
Correct |
9 ms |
58204 KB |
Output is correct |
52 |
Correct |
8 ms |
57972 KB |
Output is correct |
53 |
Correct |
8 ms |
55640 KB |
Output is correct |
54 |
Correct |
8 ms |
57692 KB |
Output is correct |
55 |
Correct |
8 ms |
57692 KB |
Output is correct |
56 |
Correct |
8 ms |
57692 KB |
Output is correct |
57 |
Correct |
9 ms |
57948 KB |
Output is correct |
58 |
Correct |
8 ms |
57980 KB |
Output is correct |
59 |
Correct |
10 ms |
58716 KB |
Output is correct |
60 |
Correct |
9 ms |
58612 KB |
Output is correct |
61 |
Correct |
12 ms |
58648 KB |
Output is correct |
62 |
Correct |
11 ms |
58716 KB |
Output is correct |
63 |
Correct |
11 ms |
58716 KB |
Output is correct |
64 |
Correct |
10 ms |
58716 KB |
Output is correct |
65 |
Correct |
11 ms |
58600 KB |
Output is correct |
66 |
Correct |
9 ms |
58572 KB |
Output is correct |
67 |
Correct |
10 ms |
58716 KB |
Output is correct |
68 |
Correct |
9 ms |
58596 KB |
Output is correct |
69 |
Correct |
10 ms |
58576 KB |
Output is correct |
70 |
Correct |
12 ms |
58460 KB |
Output is correct |
71 |
Correct |
11 ms |
58604 KB |
Output is correct |
72 |
Correct |
8 ms |
58672 KB |
Output is correct |
73 |
Correct |
9 ms |
58628 KB |
Output is correct |
74 |
Correct |
11 ms |
58728 KB |
Output is correct |
75 |
Correct |
11 ms |
58592 KB |
Output is correct |
76 |
Correct |
11 ms |
58612 KB |
Output is correct |
77 |
Correct |
9 ms |
58604 KB |
Output is correct |
78 |
Correct |
9 ms |
58608 KB |
Output is correct |
79 |
Correct |
11 ms |
58648 KB |
Output is correct |
80 |
Correct |
9 ms |
57788 KB |
Output is correct |
81 |
Correct |
9 ms |
58204 KB |
Output is correct |
82 |
Correct |
10 ms |
58460 KB |
Output is correct |
83 |
Correct |
10 ms |
58384 KB |
Output is correct |
84 |
Correct |
8 ms |
58348 KB |
Output is correct |
85 |
Correct |
11 ms |
58200 KB |
Output is correct |
86 |
Correct |
9 ms |
58716 KB |
Output is correct |
87 |
Correct |
9 ms |
58712 KB |
Output is correct |
88 |
Correct |
9 ms |
58716 KB |
Output is correct |
89 |
Correct |
11 ms |
58716 KB |
Output is correct |
90 |
Correct |
9 ms |
57948 KB |
Output is correct |
91 |
Correct |
8 ms |
56216 KB |
Output is correct |
92 |
Correct |
24 ms |
66276 KB |
Output is correct |
93 |
Correct |
30 ms |
66396 KB |
Output is correct |
94 |
Correct |
10 ms |
58968 KB |
Output is correct |
95 |
Correct |
22 ms |
65028 KB |
Output is correct |
96 |
Correct |
23 ms |
65212 KB |
Output is correct |
97 |
Correct |
11 ms |
58616 KB |
Output is correct |
98 |
Correct |
19 ms |
60404 KB |
Output is correct |
99 |
Correct |
17 ms |
59484 KB |
Output is correct |
100 |
Correct |
12 ms |
57948 KB |
Output is correct |
101 |
Correct |
15 ms |
58136 KB |
Output is correct |
102 |
Correct |
16 ms |
58336 KB |
Output is correct |
103 |
Correct |
27 ms |
65884 KB |
Output is correct |
104 |
Correct |
29 ms |
65628 KB |
Output is correct |
105 |
Correct |
21 ms |
65404 KB |
Output is correct |
106 |
Correct |
22 ms |
66392 KB |
Output is correct |
107 |
Correct |
22 ms |
66556 KB |
Output is correct |
108 |
Correct |
29 ms |
66372 KB |
Output is correct |
109 |
Correct |
22 ms |
66496 KB |
Output is correct |
110 |
Correct |
21 ms |
66372 KB |
Output is correct |
111 |
Correct |
26 ms |
66340 KB |
Output is correct |
112 |
Correct |
34 ms |
66320 KB |
Output is correct |
113 |
Correct |
26 ms |
66396 KB |
Output is correct |
114 |
Correct |
24 ms |
64792 KB |
Output is correct |
115 |
Correct |
20 ms |
64860 KB |
Output is correct |
116 |
Correct |
20 ms |
64776 KB |
Output is correct |
117 |
Correct |
29 ms |
64728 KB |
Output is correct |
118 |
Correct |
21 ms |
66136 KB |
Output is correct |
119 |
Correct |
22 ms |
65756 KB |
Output is correct |
120 |
Correct |
19 ms |
66132 KB |
Output is correct |
121 |
Correct |
19 ms |
65628 KB |
Output is correct |
122 |
Correct |
22 ms |
65684 KB |
Output is correct |
123 |
Correct |
23 ms |
65808 KB |
Output is correct |
124 |
Correct |
10 ms |
58204 KB |
Output is correct |
125 |
Correct |
19 ms |
63388 KB |
Output is correct |
126 |
Correct |
17 ms |
63068 KB |
Output is correct |
127 |
Correct |
16 ms |
63068 KB |
Output is correct |
128 |
Correct |
18 ms |
63324 KB |
Output is correct |
129 |
Correct |
19 ms |
62940 KB |
Output is correct |
130 |
Correct |
27 ms |
66348 KB |
Output is correct |
131 |
Correct |
22 ms |
66532 KB |
Output is correct |
132 |
Correct |
30 ms |
66524 KB |
Output is correct |
133 |
Correct |
24 ms |
66392 KB |
Output is correct |
134 |
Correct |
11 ms |
58972 KB |
Output is correct |
135 |
Correct |
13 ms |
59612 KB |
Output is correct |
136 |
Correct |
21 ms |
62924 KB |
Output is correct |
137 |
Correct |
21 ms |
60680 KB |
Output is correct |
138 |
Correct |
10 ms |
58456 KB |
Output is correct |
139 |
Correct |
21 ms |
58972 KB |
Output is correct |
140 |
Correct |
14 ms |
57948 KB |
Output is correct |
141 |
Correct |
9 ms |
57996 KB |
Output is correct |
142 |
Correct |
17 ms |
57948 KB |
Output is correct |
143 |
Correct |
13 ms |
57948 KB |
Output is correct |
144 |
Correct |
8 ms |
55900 KB |
Output is correct |
145 |
Correct |
15 ms |
58736 KB |
Output is correct |
146 |
Correct |
15 ms |
58712 KB |
Output is correct |
147 |
Correct |
42 ms |
68688 KB |
Output is correct |
148 |
Correct |
34 ms |
69204 KB |
Output is correct |
149 |
Correct |
25 ms |
68444 KB |
Output is correct |
150 |
Correct |
31 ms |
70236 KB |
Output is correct |
151 |
Correct |
33 ms |
70136 KB |
Output is correct |
152 |
Correct |
29 ms |
70228 KB |
Output is correct |
153 |
Correct |
29 ms |
70236 KB |
Output is correct |
154 |
Correct |
30 ms |
70248 KB |
Output is correct |
155 |
Correct |
27 ms |
70144 KB |
Output is correct |
156 |
Correct |
47 ms |
70012 KB |
Output is correct |
157 |
Correct |
25 ms |
70232 KB |
Output is correct |
158 |
Correct |
26 ms |
68024 KB |
Output is correct |
159 |
Correct |
37 ms |
67924 KB |
Output is correct |
160 |
Correct |
26 ms |
67960 KB |
Output is correct |
161 |
Correct |
29 ms |
67920 KB |
Output is correct |
162 |
Correct |
26 ms |
69116 KB |
Output is correct |
163 |
Correct |
26 ms |
68944 KB |
Output is correct |
164 |
Correct |
30 ms |
69752 KB |
Output is correct |
165 |
Correct |
28 ms |
68700 KB |
Output is correct |
166 |
Correct |
41 ms |
69652 KB |
Output is correct |
167 |
Correct |
24 ms |
69044 KB |
Output is correct |
168 |
Correct |
10 ms |
58204 KB |
Output is correct |
169 |
Correct |
32 ms |
65544 KB |
Output is correct |
170 |
Correct |
29 ms |
65596 KB |
Output is correct |
171 |
Correct |
33 ms |
65356 KB |
Output is correct |
172 |
Correct |
19 ms |
64860 KB |
Output is correct |
173 |
Correct |
20 ms |
65328 KB |
Output is correct |
174 |
Correct |
28 ms |
70168 KB |
Output is correct |
175 |
Correct |
26 ms |
70232 KB |
Output is correct |
176 |
Correct |
25 ms |
70028 KB |
Output is correct |
177 |
Correct |
28 ms |
70236 KB |
Output is correct |
178 |
Correct |
10 ms |
59228 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
55644 KB |
Output is correct |
2 |
Correct |
8 ms |
55644 KB |
Output is correct |
3 |
Correct |
8 ms |
55800 KB |
Output is correct |
4 |
Correct |
9 ms |
56156 KB |
Output is correct |
5 |
Correct |
12 ms |
56056 KB |
Output is correct |
6 |
Correct |
10 ms |
55900 KB |
Output is correct |
7 |
Correct |
8 ms |
55956 KB |
Output is correct |
8 |
Correct |
8 ms |
55912 KB |
Output is correct |
9 |
Correct |
8 ms |
55644 KB |
Output is correct |
10 |
Correct |
8 ms |
55644 KB |
Output is correct |
11 |
Correct |
8 ms |
55644 KB |
Output is correct |
12 |
Correct |
7 ms |
55644 KB |
Output is correct |
13 |
Correct |
8 ms |
55776 KB |
Output is correct |
14 |
Correct |
8 ms |
55644 KB |
Output is correct |
15 |
Correct |
9 ms |
55900 KB |
Output is correct |
16 |
Correct |
10 ms |
55900 KB |
Output is correct |
17 |
Correct |
10 ms |
56144 KB |
Output is correct |
18 |
Correct |
8 ms |
56008 KB |
Output is correct |
19 |
Correct |
8 ms |
56064 KB |
Output is correct |
20 |
Correct |
9 ms |
56024 KB |
Output is correct |
21 |
Correct |
8 ms |
56036 KB |
Output is correct |
22 |
Correct |
9 ms |
56152 KB |
Output is correct |
23 |
Correct |
10 ms |
56156 KB |
Output is correct |
24 |
Correct |
9 ms |
56148 KB |
Output is correct |
25 |
Correct |
8 ms |
56036 KB |
Output is correct |
26 |
Correct |
9 ms |
55900 KB |
Output is correct |
27 |
Correct |
9 ms |
56072 KB |
Output is correct |
28 |
Correct |
9 ms |
56012 KB |
Output is correct |
29 |
Correct |
9 ms |
55900 KB |
Output is correct |
30 |
Correct |
10 ms |
55900 KB |
Output is correct |
31 |
Correct |
10 ms |
55900 KB |
Output is correct |
32 |
Correct |
9 ms |
56140 KB |
Output is correct |
33 |
Correct |
9 ms |
55992 KB |
Output is correct |
34 |
Correct |
9 ms |
56088 KB |
Output is correct |
35 |
Correct |
9 ms |
55900 KB |
Output is correct |
36 |
Correct |
10 ms |
55780 KB |
Output is correct |
37 |
Correct |
10 ms |
55896 KB |
Output is correct |
38 |
Correct |
9 ms |
55804 KB |
Output is correct |
39 |
Correct |
10 ms |
55900 KB |
Output is correct |
40 |
Correct |
9 ms |
55836 KB |
Output is correct |
41 |
Correct |
9 ms |
56044 KB |
Output is correct |
42 |
Correct |
10 ms |
56156 KB |
Output is correct |
43 |
Correct |
8 ms |
56024 KB |
Output is correct |
44 |
Correct |
10 ms |
56156 KB |
Output is correct |
45 |
Correct |
8 ms |
56156 KB |
Output is correct |
46 |
Correct |
8 ms |
55644 KB |
Output is correct |
47 |
Correct |
9 ms |
55900 KB |
Output is correct |
48 |
Correct |
8 ms |
58204 KB |
Output is correct |
49 |
Correct |
8 ms |
58204 KB |
Output is correct |
50 |
Correct |
8 ms |
57848 KB |
Output is correct |
51 |
Correct |
9 ms |
58204 KB |
Output is correct |
52 |
Correct |
8 ms |
57972 KB |
Output is correct |
53 |
Correct |
8 ms |
55640 KB |
Output is correct |
54 |
Correct |
8 ms |
57692 KB |
Output is correct |
55 |
Correct |
8 ms |
57692 KB |
Output is correct |
56 |
Correct |
8 ms |
57692 KB |
Output is correct |
57 |
Correct |
9 ms |
57948 KB |
Output is correct |
58 |
Correct |
8 ms |
57980 KB |
Output is correct |
59 |
Correct |
10 ms |
58716 KB |
Output is correct |
60 |
Correct |
9 ms |
58612 KB |
Output is correct |
61 |
Correct |
12 ms |
58648 KB |
Output is correct |
62 |
Correct |
11 ms |
58716 KB |
Output is correct |
63 |
Correct |
11 ms |
58716 KB |
Output is correct |
64 |
Correct |
10 ms |
58716 KB |
Output is correct |
65 |
Correct |
11 ms |
58600 KB |
Output is correct |
66 |
Correct |
9 ms |
58572 KB |
Output is correct |
67 |
Correct |
10 ms |
58716 KB |
Output is correct |
68 |
Correct |
9 ms |
58596 KB |
Output is correct |
69 |
Correct |
10 ms |
58576 KB |
Output is correct |
70 |
Correct |
12 ms |
58460 KB |
Output is correct |
71 |
Correct |
11 ms |
58604 KB |
Output is correct |
72 |
Correct |
8 ms |
58672 KB |
Output is correct |
73 |
Correct |
9 ms |
58628 KB |
Output is correct |
74 |
Correct |
11 ms |
58728 KB |
Output is correct |
75 |
Correct |
11 ms |
58592 KB |
Output is correct |
76 |
Correct |
11 ms |
58612 KB |
Output is correct |
77 |
Correct |
9 ms |
58604 KB |
Output is correct |
78 |
Correct |
9 ms |
58608 KB |
Output is correct |
79 |
Correct |
11 ms |
58648 KB |
Output is correct |
80 |
Correct |
9 ms |
57788 KB |
Output is correct |
81 |
Correct |
9 ms |
58204 KB |
Output is correct |
82 |
Correct |
10 ms |
58460 KB |
Output is correct |
83 |
Correct |
10 ms |
58384 KB |
Output is correct |
84 |
Correct |
8 ms |
58348 KB |
Output is correct |
85 |
Correct |
11 ms |
58200 KB |
Output is correct |
86 |
Correct |
9 ms |
58716 KB |
Output is correct |
87 |
Correct |
9 ms |
58712 KB |
Output is correct |
88 |
Correct |
9 ms |
58716 KB |
Output is correct |
89 |
Correct |
11 ms |
58716 KB |
Output is correct |
90 |
Correct |
9 ms |
57948 KB |
Output is correct |
91 |
Correct |
8 ms |
56216 KB |
Output is correct |
92 |
Correct |
24 ms |
66276 KB |
Output is correct |
93 |
Correct |
30 ms |
66396 KB |
Output is correct |
94 |
Correct |
10 ms |
58968 KB |
Output is correct |
95 |
Correct |
22 ms |
65028 KB |
Output is correct |
96 |
Correct |
23 ms |
65212 KB |
Output is correct |
97 |
Correct |
11 ms |
58616 KB |
Output is correct |
98 |
Correct |
19 ms |
60404 KB |
Output is correct |
99 |
Correct |
17 ms |
59484 KB |
Output is correct |
100 |
Correct |
12 ms |
57948 KB |
Output is correct |
101 |
Correct |
15 ms |
58136 KB |
Output is correct |
102 |
Correct |
16 ms |
58336 KB |
Output is correct |
103 |
Correct |
27 ms |
65884 KB |
Output is correct |
104 |
Correct |
29 ms |
65628 KB |
Output is correct |
105 |
Correct |
21 ms |
65404 KB |
Output is correct |
106 |
Correct |
22 ms |
66392 KB |
Output is correct |
107 |
Correct |
22 ms |
66556 KB |
Output is correct |
108 |
Correct |
29 ms |
66372 KB |
Output is correct |
109 |
Correct |
22 ms |
66496 KB |
Output is correct |
110 |
Correct |
21 ms |
66372 KB |
Output is correct |
111 |
Correct |
26 ms |
66340 KB |
Output is correct |
112 |
Correct |
34 ms |
66320 KB |
Output is correct |
113 |
Correct |
26 ms |
66396 KB |
Output is correct |
114 |
Correct |
24 ms |
64792 KB |
Output is correct |
115 |
Correct |
20 ms |
64860 KB |
Output is correct |
116 |
Correct |
20 ms |
64776 KB |
Output is correct |
117 |
Correct |
29 ms |
64728 KB |
Output is correct |
118 |
Correct |
21 ms |
66136 KB |
Output is correct |
119 |
Correct |
22 ms |
65756 KB |
Output is correct |
120 |
Correct |
19 ms |
66132 KB |
Output is correct |
121 |
Correct |
19 ms |
65628 KB |
Output is correct |
122 |
Correct |
22 ms |
65684 KB |
Output is correct |
123 |
Correct |
23 ms |
65808 KB |
Output is correct |
124 |
Correct |
10 ms |
58204 KB |
Output is correct |
125 |
Correct |
19 ms |
63388 KB |
Output is correct |
126 |
Correct |
17 ms |
63068 KB |
Output is correct |
127 |
Correct |
16 ms |
63068 KB |
Output is correct |
128 |
Correct |
18 ms |
63324 KB |
Output is correct |
129 |
Correct |
19 ms |
62940 KB |
Output is correct |
130 |
Correct |
27 ms |
66348 KB |
Output is correct |
131 |
Correct |
22 ms |
66532 KB |
Output is correct |
132 |
Correct |
30 ms |
66524 KB |
Output is correct |
133 |
Correct |
24 ms |
66392 KB |
Output is correct |
134 |
Correct |
11 ms |
58972 KB |
Output is correct |
135 |
Correct |
13 ms |
59612 KB |
Output is correct |
136 |
Correct |
21 ms |
62924 KB |
Output is correct |
137 |
Correct |
21 ms |
60680 KB |
Output is correct |
138 |
Correct |
10 ms |
58456 KB |
Output is correct |
139 |
Correct |
21 ms |
58972 KB |
Output is correct |
140 |
Correct |
14 ms |
57948 KB |
Output is correct |
141 |
Correct |
9 ms |
57996 KB |
Output is correct |
142 |
Correct |
17 ms |
57948 KB |
Output is correct |
143 |
Correct |
13 ms |
57948 KB |
Output is correct |
144 |
Correct |
8 ms |
55900 KB |
Output is correct |
145 |
Correct |
15 ms |
58736 KB |
Output is correct |
146 |
Correct |
15 ms |
58712 KB |
Output is correct |
147 |
Correct |
42 ms |
68688 KB |
Output is correct |
148 |
Correct |
34 ms |
69204 KB |
Output is correct |
149 |
Correct |
25 ms |
68444 KB |
Output is correct |
150 |
Correct |
31 ms |
70236 KB |
Output is correct |
151 |
Correct |
33 ms |
70136 KB |
Output is correct |
152 |
Correct |
29 ms |
70228 KB |
Output is correct |
153 |
Correct |
29 ms |
70236 KB |
Output is correct |
154 |
Correct |
30 ms |
70248 KB |
Output is correct |
155 |
Correct |
27 ms |
70144 KB |
Output is correct |
156 |
Correct |
47 ms |
70012 KB |
Output is correct |
157 |
Correct |
25 ms |
70232 KB |
Output is correct |
158 |
Correct |
26 ms |
68024 KB |
Output is correct |
159 |
Correct |
37 ms |
67924 KB |
Output is correct |
160 |
Correct |
26 ms |
67960 KB |
Output is correct |
161 |
Correct |
29 ms |
67920 KB |
Output is correct |
162 |
Correct |
26 ms |
69116 KB |
Output is correct |
163 |
Correct |
26 ms |
68944 KB |
Output is correct |
164 |
Correct |
30 ms |
69752 KB |
Output is correct |
165 |
Correct |
28 ms |
68700 KB |
Output is correct |
166 |
Correct |
41 ms |
69652 KB |
Output is correct |
167 |
Correct |
24 ms |
69044 KB |
Output is correct |
168 |
Correct |
10 ms |
58204 KB |
Output is correct |
169 |
Correct |
32 ms |
65544 KB |
Output is correct |
170 |
Correct |
29 ms |
65596 KB |
Output is correct |
171 |
Correct |
33 ms |
65356 KB |
Output is correct |
172 |
Correct |
19 ms |
64860 KB |
Output is correct |
173 |
Correct |
20 ms |
65328 KB |
Output is correct |
174 |
Correct |
28 ms |
70168 KB |
Output is correct |
175 |
Correct |
26 ms |
70232 KB |
Output is correct |
176 |
Correct |
25 ms |
70028 KB |
Output is correct |
177 |
Correct |
28 ms |
70236 KB |
Output is correct |
178 |
Correct |
10 ms |
59228 KB |
Output is correct |
179 |
Correct |
65 ms |
79688 KB |
Output is correct |
180 |
Correct |
124 ms |
93264 KB |
Output is correct |
181 |
Correct |
91 ms |
60784 KB |
Output is correct |
182 |
Correct |
34 ms |
57948 KB |
Output is correct |
183 |
Correct |
71 ms |
58204 KB |
Output is correct |
184 |
Correct |
76 ms |
58204 KB |
Output is correct |
185 |
Correct |
97 ms |
59992 KB |
Output is correct |
186 |
Correct |
134 ms |
61272 KB |
Output is correct |
187 |
Correct |
132 ms |
61324 KB |
Output is correct |
188 |
Correct |
82 ms |
62556 KB |
Output is correct |
189 |
Correct |
157 ms |
70992 KB |
Output is correct |
190 |
Correct |
154 ms |
71000 KB |
Output is correct |
191 |
Correct |
311 ms |
235860 KB |
Output is correct |
192 |
Correct |
380 ms |
249168 KB |
Output is correct |
193 |
Correct |
335 ms |
243264 KB |
Output is correct |
194 |
Correct |
424 ms |
269648 KB |
Output is correct |
195 |
Correct |
377 ms |
269364 KB |
Output is correct |
196 |
Correct |
380 ms |
269392 KB |
Output is correct |
197 |
Correct |
379 ms |
269372 KB |
Output is correct |
198 |
Correct |
423 ms |
269364 KB |
Output is correct |
199 |
Correct |
397 ms |
270632 KB |
Output is correct |
200 |
Correct |
382 ms |
270700 KB |
Output is correct |
201 |
Correct |
400 ms |
270572 KB |
Output is correct |
202 |
Correct |
347 ms |
231252 KB |
Output is correct |
203 |
Correct |
350 ms |
231304 KB |
Output is correct |
204 |
Correct |
355 ms |
231296 KB |
Output is correct |
205 |
Correct |
371 ms |
231040 KB |
Output is correct |
206 |
Correct |
326 ms |
244116 KB |
Output is correct |
207 |
Correct |
333 ms |
245644 KB |
Output is correct |
208 |
Correct |
346 ms |
236172 KB |
Output is correct |
209 |
Correct |
350 ms |
248252 KB |
Output is correct |
210 |
Correct |
326 ms |
247892 KB |
Output is correct |
211 |
Correct |
345 ms |
259152 KB |
Output is correct |
212 |
Correct |
48 ms |
64820 KB |
Output is correct |
213 |
Correct |
245 ms |
186196 KB |
Output is correct |
214 |
Correct |
218 ms |
179536 KB |
Output is correct |
215 |
Correct |
232 ms |
188504 KB |
Output is correct |
216 |
Correct |
212 ms |
177280 KB |
Output is correct |
217 |
Correct |
216 ms |
179024 KB |
Output is correct |
218 |
Correct |
393 ms |
270672 KB |
Output is correct |
219 |
Correct |
371 ms |
270540 KB |
Output is correct |
220 |
Correct |
373 ms |
270700 KB |
Output is correct |
221 |
Correct |
416 ms |
270784 KB |
Output is correct |
222 |
Correct |
50 ms |
81236 KB |
Output is correct |