//-------------dilanyan------------\\
#define _CRT_SECURE_NO_WARNINGS
#include<bits/stdc++.h>
#include<stdio.h>
using namespace std;
//------------------Kargpefines--------------------\\
#define ll long long
#define pb push_back
#define all(u) (u).begin(), (u).end()
#define pqueue priority_queue
#define upper upper_bound
#define lower lower_bound
#define umap unordered_map
#define uset unordered_set
void KarginSet(string name = "") {
ios_base::sync_with_stdio(false); cin.tie(NULL);
if (name.size()) {
freopen((name + ".in").c_str(), "r", stdin);
freopen((name + ".out").c_str(), "w", stdout);
}
}
//-------------------KarginConstants------------------\\
const ll mod = 1e9 + 7;
const ll inf = 2e9;
//-------------------KarginCode-----------------------\\
const int N = 1505, M = 1000005;
int w, h, k, l;
int w_h, h_h, w_v, h_v;
char a[N][N];
int pref_w[N][N], pref_h[N][N];
bool vis[N][N];
int dh[4] = { 1,-1,0,0 };
int dw[4] = { 0,0,1,-1 };
bool valid(int h_s, int w_s, int h_e, int w_e, int d) {
if (h_e < 0 || h_e >= h || w_e < 0 || w_e >= w) return false;
if (a[h_e][w_e] == 'X' || vis[h_e][w_e]) return false;
if (d) { // horiz
for (int i = max(0, w_s - k + 1);i <= w_s;i++) {
if (i + k > w) return false;
if (i == 0) {
if (pref_h[h_s][i + k - 1] == 0 && pref_h[h_e][i + k - 1] == 0) return true;
}
else {
if (pref_h[h_s][i + k - 1] - pref_h[h_s][i - 1] == 0 && pref_h[h_e][i + k - 1] - pref_h[h_e][i - 1] == 0) return true;
}
}
return false;
}
else { // vertic
for (int i = max(0, h_s - l + 1);i <= h_s;i++) {
if (i + l > h) return false;
if (i == 0) {
if (pref_w[w_s][i + l - 1] == 0 && pref_w[w_e][i + l - 1] == 0) return true;
}
else {
if (pref_w[w_s][i + l - 1] - pref_w[w_s][i - 1] == 0 && pref_w[w_e][i + l - 1] - pref_w[w_e][i - 1] == 0) return true;
}
}
return false;
}
}
void KarginSolve() {
cin >> w >> h >> k >> l;
cin >> w_h >> h_h >> w_v >> h_v;
int h_e, w_e;
for (int i = 0;i < h;i++) {
for (int j = 0;j < w;j++) {
cin >> a[i][j];
if (a[i][j] == '*') {
h_e = i, w_e = j;
}
vis[i][j] = false;
}
}
for (int i = 0;i < h;i++) {
for (int j = 0;j < w;j++) {
pref_h[i][j] = (a[i][j] == 'X');
if (j > 0) pref_h[i][j] += pref_h[i][j - 1];
}
}
for (int i = 0;i < w;i++) {
for (int j = 0;j < h;j++) {
pref_w[i][j] = (a[j][i] == 'X');
if (j > 0) pref_w[i][j] += pref_w[i][j - 1];
}
}
int w_s = w_v, h_s = h_h;
queue<pair<int, int>> q;
q.push({ w_s,h_s });
vis[h_s][w_s] = true;
while (!q.empty()) {
int w_u = q.front().first, h_u = q.front().second;
q.pop();
for (int i = 0;i < 4;i++) {
int h_x = h_u + dh[i], w_x = w_u + dw[i];
if (valid(h_u, w_u, h_x, w_x, (dh[i] != 0))) {
vis[h_x][w_x] = true;
q.push({ w_x,h_x });
}
}
}
if (vis[h_e][w_e]) cout << "YES\n";
else cout << "NO\n";
}
int main() {
KarginSet();
int test = 1;
//cin >> test;
while (test--) {
KarginSolve();
}
return 0;
}
Compilation message
Main.cpp:1:1: warning: multi-line comment [-Wcomment]
1 | //-------------dilanyan------------\\
| ^
Main.cpp:8:1: warning: multi-line comment [-Wcomment]
8 | //------------------Kargpefines--------------------\\
| ^
Main.cpp:27:1: warning: multi-line comment [-Wcomment]
27 | //-------------------KarginConstants------------------\\
| ^
Main.cpp:32:1: warning: multi-line comment [-Wcomment]
32 | //-------------------KarginCode-----------------------\\
| ^
Main.cpp: In function 'void KarginSet(std::string)':
Main.cpp:22:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
22 | freopen((name + ".in").c_str(), "r", stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp:23:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
23 | freopen((name + ".out").c_str(), "w", stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp: In function 'void KarginSolve()':
Main.cpp:115:21: warning: 'w_e' may be used uninitialized in this function [-Wmaybe-uninitialized]
115 | if (vis[h_e][w_e]) cout << "YES\n";
| ~~~~~~~~~~~~^
Main.cpp:115:21: warning: 'h_e' may be used uninitialized in this function [-Wmaybe-uninitialized]
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
8540 KB |
Output is correct |
2 |
Correct |
1 ms |
8540 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
8540 KB |
Output is correct |
2 |
Correct |
1 ms |
8540 KB |
Output is correct |
3 |
Correct |
1 ms |
8536 KB |
Output is correct |
4 |
Correct |
1 ms |
8540 KB |
Output is correct |
5 |
Correct |
1 ms |
8540 KB |
Output is correct |
6 |
Correct |
1 ms |
8540 KB |
Output is correct |
7 |
Correct |
1 ms |
8540 KB |
Output is correct |
8 |
Correct |
1 ms |
8540 KB |
Output is correct |
9 |
Correct |
1 ms |
8540 KB |
Output is correct |
10 |
Correct |
1 ms |
8540 KB |
Output is correct |
11 |
Correct |
1 ms |
8540 KB |
Output is correct |
12 |
Correct |
1 ms |
8540 KB |
Output is correct |
13 |
Correct |
1 ms |
8540 KB |
Output is correct |
14 |
Correct |
1 ms |
8536 KB |
Output is correct |
15 |
Correct |
1 ms |
8540 KB |
Output is correct |
16 |
Correct |
1 ms |
8540 KB |
Output is correct |
17 |
Correct |
1 ms |
8540 KB |
Output is correct |
18 |
Correct |
1 ms |
8600 KB |
Output is correct |
19 |
Correct |
1 ms |
8540 KB |
Output is correct |
20 |
Correct |
1 ms |
8540 KB |
Output is correct |
21 |
Correct |
1 ms |
8792 KB |
Output is correct |
22 |
Correct |
1 ms |
8652 KB |
Output is correct |
23 |
Correct |
1 ms |
8540 KB |
Output is correct |
24 |
Correct |
1 ms |
8540 KB |
Output is correct |
25 |
Correct |
1 ms |
8744 KB |
Output is correct |
26 |
Correct |
1 ms |
8540 KB |
Output is correct |
27 |
Correct |
1 ms |
8540 KB |
Output is correct |
28 |
Correct |
1 ms |
8656 KB |
Output is correct |
29 |
Correct |
1 ms |
8540 KB |
Output is correct |
30 |
Correct |
1 ms |
8536 KB |
Output is correct |
31 |
Correct |
1 ms |
8536 KB |
Output is correct |
32 |
Correct |
1 ms |
8612 KB |
Output is correct |
33 |
Correct |
1 ms |
8540 KB |
Output is correct |
34 |
Correct |
1 ms |
8540 KB |
Output is correct |
35 |
Correct |
1 ms |
8540 KB |
Output is correct |
36 |
Correct |
1 ms |
8540 KB |
Output is correct |
37 |
Correct |
1 ms |
8660 KB |
Output is correct |
38 |
Correct |
1 ms |
8540 KB |
Output is correct |
39 |
Correct |
1 ms |
8540 KB |
Output is correct |
40 |
Correct |
1 ms |
8652 KB |
Output is correct |
41 |
Correct |
1 ms |
8540 KB |
Output is correct |
42 |
Correct |
1 ms |
8540 KB |
Output is correct |
43 |
Correct |
1 ms |
8540 KB |
Output is correct |
44 |
Correct |
1 ms |
8660 KB |
Output is correct |
45 |
Correct |
1 ms |
8540 KB |
Output is correct |
46 |
Correct |
1 ms |
8536 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
8540 KB |
Output is correct |
2 |
Correct |
1 ms |
8540 KB |
Output is correct |
3 |
Correct |
1 ms |
8536 KB |
Output is correct |
4 |
Correct |
1 ms |
8540 KB |
Output is correct |
5 |
Correct |
1 ms |
8540 KB |
Output is correct |
6 |
Correct |
1 ms |
8540 KB |
Output is correct |
7 |
Correct |
1 ms |
8540 KB |
Output is correct |
8 |
Correct |
1 ms |
8540 KB |
Output is correct |
9 |
Correct |
1 ms |
8540 KB |
Output is correct |
10 |
Correct |
1 ms |
8540 KB |
Output is correct |
11 |
Correct |
1 ms |
8540 KB |
Output is correct |
12 |
Correct |
1 ms |
8540 KB |
Output is correct |
13 |
Correct |
1 ms |
8540 KB |
Output is correct |
14 |
Correct |
1 ms |
8536 KB |
Output is correct |
15 |
Correct |
1 ms |
8540 KB |
Output is correct |
16 |
Correct |
1 ms |
8540 KB |
Output is correct |
17 |
Correct |
1 ms |
8540 KB |
Output is correct |
18 |
Correct |
1 ms |
8600 KB |
Output is correct |
19 |
Correct |
1 ms |
8540 KB |
Output is correct |
20 |
Correct |
1 ms |
8540 KB |
Output is correct |
21 |
Correct |
1 ms |
8792 KB |
Output is correct |
22 |
Correct |
1 ms |
8652 KB |
Output is correct |
23 |
Correct |
1 ms |
8540 KB |
Output is correct |
24 |
Correct |
1 ms |
8540 KB |
Output is correct |
25 |
Correct |
1 ms |
8744 KB |
Output is correct |
26 |
Correct |
1 ms |
8540 KB |
Output is correct |
27 |
Correct |
1 ms |
8540 KB |
Output is correct |
28 |
Correct |
1 ms |
8656 KB |
Output is correct |
29 |
Correct |
1 ms |
8540 KB |
Output is correct |
30 |
Correct |
1 ms |
8536 KB |
Output is correct |
31 |
Correct |
1 ms |
8536 KB |
Output is correct |
32 |
Correct |
1 ms |
8612 KB |
Output is correct |
33 |
Correct |
1 ms |
8540 KB |
Output is correct |
34 |
Correct |
1 ms |
8540 KB |
Output is correct |
35 |
Correct |
1 ms |
8540 KB |
Output is correct |
36 |
Correct |
1 ms |
8540 KB |
Output is correct |
37 |
Correct |
1 ms |
8660 KB |
Output is correct |
38 |
Correct |
1 ms |
8540 KB |
Output is correct |
39 |
Correct |
1 ms |
8540 KB |
Output is correct |
40 |
Correct |
1 ms |
8652 KB |
Output is correct |
41 |
Correct |
1 ms |
8540 KB |
Output is correct |
42 |
Correct |
1 ms |
8540 KB |
Output is correct |
43 |
Correct |
1 ms |
8540 KB |
Output is correct |
44 |
Correct |
1 ms |
8660 KB |
Output is correct |
45 |
Correct |
1 ms |
8540 KB |
Output is correct |
46 |
Correct |
1 ms |
8536 KB |
Output is correct |
47 |
Correct |
1 ms |
8540 KB |
Output is correct |
48 |
Correct |
1 ms |
8796 KB |
Output is correct |
49 |
Correct |
1 ms |
8796 KB |
Output is correct |
50 |
Correct |
1 ms |
8796 KB |
Output is correct |
51 |
Correct |
1 ms |
8796 KB |
Output is correct |
52 |
Correct |
1 ms |
8796 KB |
Output is correct |
53 |
Correct |
1 ms |
8540 KB |
Output is correct |
54 |
Correct |
1 ms |
8796 KB |
Output is correct |
55 |
Correct |
1 ms |
8796 KB |
Output is correct |
56 |
Correct |
1 ms |
8796 KB |
Output is correct |
57 |
Correct |
1 ms |
8796 KB |
Output is correct |
58 |
Correct |
1 ms |
8796 KB |
Output is correct |
59 |
Correct |
1 ms |
8796 KB |
Output is correct |
60 |
Correct |
1 ms |
8796 KB |
Output is correct |
61 |
Correct |
1 ms |
8540 KB |
Output is correct |
62 |
Correct |
1 ms |
8796 KB |
Output is correct |
63 |
Correct |
1 ms |
8796 KB |
Output is correct |
64 |
Correct |
1 ms |
8796 KB |
Output is correct |
65 |
Correct |
1 ms |
8796 KB |
Output is correct |
66 |
Correct |
1 ms |
8796 KB |
Output is correct |
67 |
Correct |
1 ms |
8796 KB |
Output is correct |
68 |
Correct |
1 ms |
8796 KB |
Output is correct |
69 |
Correct |
1 ms |
8796 KB |
Output is correct |
70 |
Correct |
1 ms |
8796 KB |
Output is correct |
71 |
Correct |
1 ms |
8796 KB |
Output is correct |
72 |
Correct |
1 ms |
8796 KB |
Output is correct |
73 |
Correct |
1 ms |
8792 KB |
Output is correct |
74 |
Correct |
1 ms |
8796 KB |
Output is correct |
75 |
Correct |
2 ms |
8540 KB |
Output is correct |
76 |
Correct |
1 ms |
8796 KB |
Output is correct |
77 |
Correct |
1 ms |
8796 KB |
Output is correct |
78 |
Correct |
1 ms |
8796 KB |
Output is correct |
79 |
Correct |
1 ms |
8796 KB |
Output is correct |
80 |
Correct |
1 ms |
8796 KB |
Output is correct |
81 |
Correct |
1 ms |
8540 KB |
Output is correct |
82 |
Correct |
1 ms |
8540 KB |
Output is correct |
83 |
Correct |
1 ms |
8540 KB |
Output is correct |
84 |
Correct |
2 ms |
8536 KB |
Output is correct |
85 |
Correct |
1 ms |
8792 KB |
Output is correct |
86 |
Correct |
1 ms |
8796 KB |
Output is correct |
87 |
Correct |
1 ms |
8796 KB |
Output is correct |
88 |
Correct |
1 ms |
8796 KB |
Output is correct |
89 |
Correct |
1 ms |
8796 KB |
Output is correct |
90 |
Correct |
1 ms |
8788 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
8540 KB |
Output is correct |
2 |
Correct |
1 ms |
8540 KB |
Output is correct |
3 |
Correct |
1 ms |
8540 KB |
Output is correct |
4 |
Correct |
4 ms |
10844 KB |
Output is correct |
5 |
Correct |
5 ms |
10844 KB |
Output is correct |
6 |
Correct |
1 ms |
8540 KB |
Output is correct |
7 |
Correct |
6 ms |
10844 KB |
Output is correct |
8 |
Correct |
4 ms |
10844 KB |
Output is correct |
9 |
Correct |
2 ms |
10844 KB |
Output is correct |
10 |
Correct |
3 ms |
10844 KB |
Output is correct |
11 |
Correct |
2 ms |
10972 KB |
Output is correct |
12 |
Correct |
1 ms |
8796 KB |
Output is correct |
13 |
Correct |
2 ms |
10984 KB |
Output is correct |
14 |
Correct |
2 ms |
10844 KB |
Output is correct |
15 |
Correct |
3 ms |
10972 KB |
Output is correct |
16 |
Correct |
3 ms |
10844 KB |
Output is correct |
17 |
Correct |
3 ms |
10844 KB |
Output is correct |
18 |
Correct |
3 ms |
10968 KB |
Output is correct |
19 |
Correct |
3 ms |
10844 KB |
Output is correct |
20 |
Correct |
6 ms |
11096 KB |
Output is correct |
21 |
Correct |
6 ms |
10844 KB |
Output is correct |
22 |
Correct |
4 ms |
10844 KB |
Output is correct |
23 |
Correct |
3 ms |
10844 KB |
Output is correct |
24 |
Correct |
3 ms |
10844 KB |
Output is correct |
25 |
Correct |
4 ms |
10840 KB |
Output is correct |
26 |
Correct |
6 ms |
10844 KB |
Output is correct |
27 |
Correct |
7 ms |
10988 KB |
Output is correct |
28 |
Correct |
6 ms |
10972 KB |
Output is correct |
29 |
Correct |
6 ms |
10840 KB |
Output is correct |
30 |
Correct |
4 ms |
10844 KB |
Output is correct |
31 |
Correct |
3 ms |
10980 KB |
Output is correct |
32 |
Correct |
4 ms |
10968 KB |
Output is correct |
33 |
Correct |
3 ms |
10844 KB |
Output is correct |
34 |
Correct |
3 ms |
10972 KB |
Output is correct |
35 |
Correct |
3 ms |
10844 KB |
Output is correct |
36 |
Correct |
3 ms |
10844 KB |
Output is correct |
37 |
Correct |
3 ms |
10844 KB |
Output is correct |
38 |
Correct |
2 ms |
10844 KB |
Output is correct |
39 |
Correct |
2 ms |
10840 KB |
Output is correct |
40 |
Correct |
2 ms |
10844 KB |
Output is correct |
41 |
Correct |
2 ms |
10844 KB |
Output is correct |
42 |
Correct |
4 ms |
10968 KB |
Output is correct |
43 |
Correct |
4 ms |
11096 KB |
Output is correct |
44 |
Correct |
4 ms |
10884 KB |
Output is correct |
45 |
Correct |
4 ms |
10980 KB |
Output is correct |
46 |
Correct |
2 ms |
10968 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
8540 KB |
Output is correct |
2 |
Correct |
1 ms |
8540 KB |
Output is correct |
3 |
Correct |
1 ms |
8536 KB |
Output is correct |
4 |
Correct |
1 ms |
8540 KB |
Output is correct |
5 |
Correct |
1 ms |
8540 KB |
Output is correct |
6 |
Correct |
1 ms |
8540 KB |
Output is correct |
7 |
Correct |
1 ms |
8540 KB |
Output is correct |
8 |
Correct |
1 ms |
8540 KB |
Output is correct |
9 |
Correct |
1 ms |
8540 KB |
Output is correct |
10 |
Correct |
1 ms |
8540 KB |
Output is correct |
11 |
Correct |
1 ms |
8540 KB |
Output is correct |
12 |
Correct |
1 ms |
8540 KB |
Output is correct |
13 |
Correct |
1 ms |
8540 KB |
Output is correct |
14 |
Correct |
1 ms |
8536 KB |
Output is correct |
15 |
Correct |
1 ms |
8540 KB |
Output is correct |
16 |
Correct |
1 ms |
8540 KB |
Output is correct |
17 |
Correct |
1 ms |
8540 KB |
Output is correct |
18 |
Correct |
1 ms |
8600 KB |
Output is correct |
19 |
Correct |
1 ms |
8540 KB |
Output is correct |
20 |
Correct |
1 ms |
8540 KB |
Output is correct |
21 |
Correct |
1 ms |
8792 KB |
Output is correct |
22 |
Correct |
1 ms |
8652 KB |
Output is correct |
23 |
Correct |
1 ms |
8540 KB |
Output is correct |
24 |
Correct |
1 ms |
8540 KB |
Output is correct |
25 |
Correct |
1 ms |
8744 KB |
Output is correct |
26 |
Correct |
1 ms |
8540 KB |
Output is correct |
27 |
Correct |
1 ms |
8540 KB |
Output is correct |
28 |
Correct |
1 ms |
8656 KB |
Output is correct |
29 |
Correct |
1 ms |
8540 KB |
Output is correct |
30 |
Correct |
1 ms |
8536 KB |
Output is correct |
31 |
Correct |
1 ms |
8536 KB |
Output is correct |
32 |
Correct |
1 ms |
8612 KB |
Output is correct |
33 |
Correct |
1 ms |
8540 KB |
Output is correct |
34 |
Correct |
1 ms |
8540 KB |
Output is correct |
35 |
Correct |
1 ms |
8540 KB |
Output is correct |
36 |
Correct |
1 ms |
8540 KB |
Output is correct |
37 |
Correct |
1 ms |
8660 KB |
Output is correct |
38 |
Correct |
1 ms |
8540 KB |
Output is correct |
39 |
Correct |
1 ms |
8540 KB |
Output is correct |
40 |
Correct |
1 ms |
8652 KB |
Output is correct |
41 |
Correct |
1 ms |
8540 KB |
Output is correct |
42 |
Correct |
1 ms |
8540 KB |
Output is correct |
43 |
Correct |
1 ms |
8540 KB |
Output is correct |
44 |
Correct |
1 ms |
8660 KB |
Output is correct |
45 |
Correct |
1 ms |
8540 KB |
Output is correct |
46 |
Correct |
1 ms |
8536 KB |
Output is correct |
47 |
Correct |
1 ms |
8540 KB |
Output is correct |
48 |
Correct |
1 ms |
8796 KB |
Output is correct |
49 |
Correct |
1 ms |
8796 KB |
Output is correct |
50 |
Correct |
1 ms |
8796 KB |
Output is correct |
51 |
Correct |
1 ms |
8796 KB |
Output is correct |
52 |
Correct |
1 ms |
8796 KB |
Output is correct |
53 |
Correct |
1 ms |
8540 KB |
Output is correct |
54 |
Correct |
1 ms |
8796 KB |
Output is correct |
55 |
Correct |
1 ms |
8796 KB |
Output is correct |
56 |
Correct |
1 ms |
8796 KB |
Output is correct |
57 |
Correct |
1 ms |
8796 KB |
Output is correct |
58 |
Correct |
1 ms |
8796 KB |
Output is correct |
59 |
Correct |
1 ms |
8796 KB |
Output is correct |
60 |
Correct |
1 ms |
8796 KB |
Output is correct |
61 |
Correct |
1 ms |
8540 KB |
Output is correct |
62 |
Correct |
1 ms |
8796 KB |
Output is correct |
63 |
Correct |
1 ms |
8796 KB |
Output is correct |
64 |
Correct |
1 ms |
8796 KB |
Output is correct |
65 |
Correct |
1 ms |
8796 KB |
Output is correct |
66 |
Correct |
1 ms |
8796 KB |
Output is correct |
67 |
Correct |
1 ms |
8796 KB |
Output is correct |
68 |
Correct |
1 ms |
8796 KB |
Output is correct |
69 |
Correct |
1 ms |
8796 KB |
Output is correct |
70 |
Correct |
1 ms |
8796 KB |
Output is correct |
71 |
Correct |
1 ms |
8796 KB |
Output is correct |
72 |
Correct |
1 ms |
8796 KB |
Output is correct |
73 |
Correct |
1 ms |
8792 KB |
Output is correct |
74 |
Correct |
1 ms |
8796 KB |
Output is correct |
75 |
Correct |
2 ms |
8540 KB |
Output is correct |
76 |
Correct |
1 ms |
8796 KB |
Output is correct |
77 |
Correct |
1 ms |
8796 KB |
Output is correct |
78 |
Correct |
1 ms |
8796 KB |
Output is correct |
79 |
Correct |
1 ms |
8796 KB |
Output is correct |
80 |
Correct |
1 ms |
8796 KB |
Output is correct |
81 |
Correct |
1 ms |
8540 KB |
Output is correct |
82 |
Correct |
1 ms |
8540 KB |
Output is correct |
83 |
Correct |
1 ms |
8540 KB |
Output is correct |
84 |
Correct |
2 ms |
8536 KB |
Output is correct |
85 |
Correct |
1 ms |
8792 KB |
Output is correct |
86 |
Correct |
1 ms |
8796 KB |
Output is correct |
87 |
Correct |
1 ms |
8796 KB |
Output is correct |
88 |
Correct |
1 ms |
8796 KB |
Output is correct |
89 |
Correct |
1 ms |
8796 KB |
Output is correct |
90 |
Correct |
1 ms |
8788 KB |
Output is correct |
91 |
Correct |
1 ms |
8540 KB |
Output is correct |
92 |
Correct |
4 ms |
10844 KB |
Output is correct |
93 |
Correct |
5 ms |
10844 KB |
Output is correct |
94 |
Correct |
1 ms |
8540 KB |
Output is correct |
95 |
Correct |
6 ms |
10844 KB |
Output is correct |
96 |
Correct |
4 ms |
10844 KB |
Output is correct |
97 |
Correct |
2 ms |
10844 KB |
Output is correct |
98 |
Correct |
3 ms |
10844 KB |
Output is correct |
99 |
Correct |
2 ms |
10972 KB |
Output is correct |
100 |
Correct |
1 ms |
8796 KB |
Output is correct |
101 |
Correct |
2 ms |
10984 KB |
Output is correct |
102 |
Correct |
2 ms |
10844 KB |
Output is correct |
103 |
Correct |
3 ms |
10972 KB |
Output is correct |
104 |
Correct |
3 ms |
10844 KB |
Output is correct |
105 |
Correct |
3 ms |
10844 KB |
Output is correct |
106 |
Correct |
3 ms |
10968 KB |
Output is correct |
107 |
Correct |
3 ms |
10844 KB |
Output is correct |
108 |
Correct |
6 ms |
11096 KB |
Output is correct |
109 |
Correct |
6 ms |
10844 KB |
Output is correct |
110 |
Correct |
4 ms |
10844 KB |
Output is correct |
111 |
Correct |
3 ms |
10844 KB |
Output is correct |
112 |
Correct |
3 ms |
10844 KB |
Output is correct |
113 |
Correct |
4 ms |
10840 KB |
Output is correct |
114 |
Correct |
6 ms |
10844 KB |
Output is correct |
115 |
Correct |
7 ms |
10988 KB |
Output is correct |
116 |
Correct |
6 ms |
10972 KB |
Output is correct |
117 |
Correct |
6 ms |
10840 KB |
Output is correct |
118 |
Correct |
4 ms |
10844 KB |
Output is correct |
119 |
Correct |
3 ms |
10980 KB |
Output is correct |
120 |
Correct |
4 ms |
10968 KB |
Output is correct |
121 |
Correct |
3 ms |
10844 KB |
Output is correct |
122 |
Correct |
3 ms |
10972 KB |
Output is correct |
123 |
Correct |
3 ms |
10844 KB |
Output is correct |
124 |
Correct |
3 ms |
10844 KB |
Output is correct |
125 |
Correct |
3 ms |
10844 KB |
Output is correct |
126 |
Correct |
2 ms |
10844 KB |
Output is correct |
127 |
Correct |
2 ms |
10840 KB |
Output is correct |
128 |
Correct |
2 ms |
10844 KB |
Output is correct |
129 |
Correct |
2 ms |
10844 KB |
Output is correct |
130 |
Correct |
4 ms |
10968 KB |
Output is correct |
131 |
Correct |
4 ms |
11096 KB |
Output is correct |
132 |
Correct |
4 ms |
10884 KB |
Output is correct |
133 |
Correct |
4 ms |
10980 KB |
Output is correct |
134 |
Correct |
2 ms |
10968 KB |
Output is correct |
135 |
Correct |
2 ms |
8792 KB |
Output is correct |
136 |
Correct |
3 ms |
12852 KB |
Output is correct |
137 |
Correct |
3 ms |
12892 KB |
Output is correct |
138 |
Correct |
2 ms |
8796 KB |
Output is correct |
139 |
Correct |
3 ms |
13084 KB |
Output is correct |
140 |
Correct |
3 ms |
12888 KB |
Output is correct |
141 |
Correct |
2 ms |
8796 KB |
Output is correct |
142 |
Correct |
3 ms |
12892 KB |
Output is correct |
143 |
Correct |
3 ms |
12892 KB |
Output is correct |
144 |
Correct |
1 ms |
8712 KB |
Output is correct |
145 |
Correct |
3 ms |
12888 KB |
Output is correct |
146 |
Correct |
3 ms |
12892 KB |
Output is correct |
147 |
Correct |
7 ms |
12892 KB |
Output is correct |
148 |
Correct |
4 ms |
10844 KB |
Output is correct |
149 |
Correct |
4 ms |
10844 KB |
Output is correct |
150 |
Correct |
5 ms |
12892 KB |
Output is correct |
151 |
Correct |
5 ms |
12888 KB |
Output is correct |
152 |
Correct |
5 ms |
12892 KB |
Output is correct |
153 |
Correct |
5 ms |
13080 KB |
Output is correct |
154 |
Correct |
5 ms |
12892 KB |
Output is correct |
155 |
Correct |
5 ms |
12892 KB |
Output is correct |
156 |
Correct |
5 ms |
12892 KB |
Output is correct |
157 |
Correct |
5 ms |
12892 KB |
Output is correct |
158 |
Correct |
6 ms |
13080 KB |
Output is correct |
159 |
Correct |
9 ms |
12888 KB |
Output is correct |
160 |
Correct |
10 ms |
12892 KB |
Output is correct |
161 |
Correct |
6 ms |
12892 KB |
Output is correct |
162 |
Correct |
5 ms |
10936 KB |
Output is correct |
163 |
Correct |
7 ms |
10940 KB |
Output is correct |
164 |
Correct |
5 ms |
12892 KB |
Output is correct |
165 |
Correct |
7 ms |
11008 KB |
Output is correct |
166 |
Correct |
7 ms |
10880 KB |
Output is correct |
167 |
Correct |
4 ms |
10844 KB |
Output is correct |
168 |
Correct |
2 ms |
10844 KB |
Output is correct |
169 |
Correct |
3 ms |
10844 KB |
Output is correct |
170 |
Correct |
4 ms |
12888 KB |
Output is correct |
171 |
Correct |
4 ms |
10844 KB |
Output is correct |
172 |
Correct |
4 ms |
10844 KB |
Output is correct |
173 |
Correct |
3 ms |
10844 KB |
Output is correct |
174 |
Correct |
8 ms |
13076 KB |
Output is correct |
175 |
Correct |
5 ms |
13064 KB |
Output is correct |
176 |
Correct |
5 ms |
12892 KB |
Output is correct |
177 |
Correct |
8 ms |
13084 KB |
Output is correct |
178 |
Correct |
3 ms |
12892 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
8540 KB |
Output is correct |
2 |
Correct |
1 ms |
8540 KB |
Output is correct |
3 |
Correct |
1 ms |
8536 KB |
Output is correct |
4 |
Correct |
1 ms |
8540 KB |
Output is correct |
5 |
Correct |
1 ms |
8540 KB |
Output is correct |
6 |
Correct |
1 ms |
8540 KB |
Output is correct |
7 |
Correct |
1 ms |
8540 KB |
Output is correct |
8 |
Correct |
1 ms |
8540 KB |
Output is correct |
9 |
Correct |
1 ms |
8540 KB |
Output is correct |
10 |
Correct |
1 ms |
8540 KB |
Output is correct |
11 |
Correct |
1 ms |
8540 KB |
Output is correct |
12 |
Correct |
1 ms |
8540 KB |
Output is correct |
13 |
Correct |
1 ms |
8540 KB |
Output is correct |
14 |
Correct |
1 ms |
8536 KB |
Output is correct |
15 |
Correct |
1 ms |
8540 KB |
Output is correct |
16 |
Correct |
1 ms |
8540 KB |
Output is correct |
17 |
Correct |
1 ms |
8540 KB |
Output is correct |
18 |
Correct |
1 ms |
8600 KB |
Output is correct |
19 |
Correct |
1 ms |
8540 KB |
Output is correct |
20 |
Correct |
1 ms |
8540 KB |
Output is correct |
21 |
Correct |
1 ms |
8792 KB |
Output is correct |
22 |
Correct |
1 ms |
8652 KB |
Output is correct |
23 |
Correct |
1 ms |
8540 KB |
Output is correct |
24 |
Correct |
1 ms |
8540 KB |
Output is correct |
25 |
Correct |
1 ms |
8744 KB |
Output is correct |
26 |
Correct |
1 ms |
8540 KB |
Output is correct |
27 |
Correct |
1 ms |
8540 KB |
Output is correct |
28 |
Correct |
1 ms |
8656 KB |
Output is correct |
29 |
Correct |
1 ms |
8540 KB |
Output is correct |
30 |
Correct |
1 ms |
8536 KB |
Output is correct |
31 |
Correct |
1 ms |
8536 KB |
Output is correct |
32 |
Correct |
1 ms |
8612 KB |
Output is correct |
33 |
Correct |
1 ms |
8540 KB |
Output is correct |
34 |
Correct |
1 ms |
8540 KB |
Output is correct |
35 |
Correct |
1 ms |
8540 KB |
Output is correct |
36 |
Correct |
1 ms |
8540 KB |
Output is correct |
37 |
Correct |
1 ms |
8660 KB |
Output is correct |
38 |
Correct |
1 ms |
8540 KB |
Output is correct |
39 |
Correct |
1 ms |
8540 KB |
Output is correct |
40 |
Correct |
1 ms |
8652 KB |
Output is correct |
41 |
Correct |
1 ms |
8540 KB |
Output is correct |
42 |
Correct |
1 ms |
8540 KB |
Output is correct |
43 |
Correct |
1 ms |
8540 KB |
Output is correct |
44 |
Correct |
1 ms |
8660 KB |
Output is correct |
45 |
Correct |
1 ms |
8540 KB |
Output is correct |
46 |
Correct |
1 ms |
8536 KB |
Output is correct |
47 |
Correct |
1 ms |
8540 KB |
Output is correct |
48 |
Correct |
1 ms |
8796 KB |
Output is correct |
49 |
Correct |
1 ms |
8796 KB |
Output is correct |
50 |
Correct |
1 ms |
8796 KB |
Output is correct |
51 |
Correct |
1 ms |
8796 KB |
Output is correct |
52 |
Correct |
1 ms |
8796 KB |
Output is correct |
53 |
Correct |
1 ms |
8540 KB |
Output is correct |
54 |
Correct |
1 ms |
8796 KB |
Output is correct |
55 |
Correct |
1 ms |
8796 KB |
Output is correct |
56 |
Correct |
1 ms |
8796 KB |
Output is correct |
57 |
Correct |
1 ms |
8796 KB |
Output is correct |
58 |
Correct |
1 ms |
8796 KB |
Output is correct |
59 |
Correct |
1 ms |
8796 KB |
Output is correct |
60 |
Correct |
1 ms |
8796 KB |
Output is correct |
61 |
Correct |
1 ms |
8540 KB |
Output is correct |
62 |
Correct |
1 ms |
8796 KB |
Output is correct |
63 |
Correct |
1 ms |
8796 KB |
Output is correct |
64 |
Correct |
1 ms |
8796 KB |
Output is correct |
65 |
Correct |
1 ms |
8796 KB |
Output is correct |
66 |
Correct |
1 ms |
8796 KB |
Output is correct |
67 |
Correct |
1 ms |
8796 KB |
Output is correct |
68 |
Correct |
1 ms |
8796 KB |
Output is correct |
69 |
Correct |
1 ms |
8796 KB |
Output is correct |
70 |
Correct |
1 ms |
8796 KB |
Output is correct |
71 |
Correct |
1 ms |
8796 KB |
Output is correct |
72 |
Correct |
1 ms |
8796 KB |
Output is correct |
73 |
Correct |
1 ms |
8792 KB |
Output is correct |
74 |
Correct |
1 ms |
8796 KB |
Output is correct |
75 |
Correct |
2 ms |
8540 KB |
Output is correct |
76 |
Correct |
1 ms |
8796 KB |
Output is correct |
77 |
Correct |
1 ms |
8796 KB |
Output is correct |
78 |
Correct |
1 ms |
8796 KB |
Output is correct |
79 |
Correct |
1 ms |
8796 KB |
Output is correct |
80 |
Correct |
1 ms |
8796 KB |
Output is correct |
81 |
Correct |
1 ms |
8540 KB |
Output is correct |
82 |
Correct |
1 ms |
8540 KB |
Output is correct |
83 |
Correct |
1 ms |
8540 KB |
Output is correct |
84 |
Correct |
2 ms |
8536 KB |
Output is correct |
85 |
Correct |
1 ms |
8792 KB |
Output is correct |
86 |
Correct |
1 ms |
8796 KB |
Output is correct |
87 |
Correct |
1 ms |
8796 KB |
Output is correct |
88 |
Correct |
1 ms |
8796 KB |
Output is correct |
89 |
Correct |
1 ms |
8796 KB |
Output is correct |
90 |
Correct |
1 ms |
8788 KB |
Output is correct |
91 |
Correct |
1 ms |
8540 KB |
Output is correct |
92 |
Correct |
4 ms |
10844 KB |
Output is correct |
93 |
Correct |
5 ms |
10844 KB |
Output is correct |
94 |
Correct |
1 ms |
8540 KB |
Output is correct |
95 |
Correct |
6 ms |
10844 KB |
Output is correct |
96 |
Correct |
4 ms |
10844 KB |
Output is correct |
97 |
Correct |
2 ms |
10844 KB |
Output is correct |
98 |
Correct |
3 ms |
10844 KB |
Output is correct |
99 |
Correct |
2 ms |
10972 KB |
Output is correct |
100 |
Correct |
1 ms |
8796 KB |
Output is correct |
101 |
Correct |
2 ms |
10984 KB |
Output is correct |
102 |
Correct |
2 ms |
10844 KB |
Output is correct |
103 |
Correct |
3 ms |
10972 KB |
Output is correct |
104 |
Correct |
3 ms |
10844 KB |
Output is correct |
105 |
Correct |
3 ms |
10844 KB |
Output is correct |
106 |
Correct |
3 ms |
10968 KB |
Output is correct |
107 |
Correct |
3 ms |
10844 KB |
Output is correct |
108 |
Correct |
6 ms |
11096 KB |
Output is correct |
109 |
Correct |
6 ms |
10844 KB |
Output is correct |
110 |
Correct |
4 ms |
10844 KB |
Output is correct |
111 |
Correct |
3 ms |
10844 KB |
Output is correct |
112 |
Correct |
3 ms |
10844 KB |
Output is correct |
113 |
Correct |
4 ms |
10840 KB |
Output is correct |
114 |
Correct |
6 ms |
10844 KB |
Output is correct |
115 |
Correct |
7 ms |
10988 KB |
Output is correct |
116 |
Correct |
6 ms |
10972 KB |
Output is correct |
117 |
Correct |
6 ms |
10840 KB |
Output is correct |
118 |
Correct |
4 ms |
10844 KB |
Output is correct |
119 |
Correct |
3 ms |
10980 KB |
Output is correct |
120 |
Correct |
4 ms |
10968 KB |
Output is correct |
121 |
Correct |
3 ms |
10844 KB |
Output is correct |
122 |
Correct |
3 ms |
10972 KB |
Output is correct |
123 |
Correct |
3 ms |
10844 KB |
Output is correct |
124 |
Correct |
3 ms |
10844 KB |
Output is correct |
125 |
Correct |
3 ms |
10844 KB |
Output is correct |
126 |
Correct |
2 ms |
10844 KB |
Output is correct |
127 |
Correct |
2 ms |
10840 KB |
Output is correct |
128 |
Correct |
2 ms |
10844 KB |
Output is correct |
129 |
Correct |
2 ms |
10844 KB |
Output is correct |
130 |
Correct |
4 ms |
10968 KB |
Output is correct |
131 |
Correct |
4 ms |
11096 KB |
Output is correct |
132 |
Correct |
4 ms |
10884 KB |
Output is correct |
133 |
Correct |
4 ms |
10980 KB |
Output is correct |
134 |
Correct |
2 ms |
10968 KB |
Output is correct |
135 |
Correct |
2 ms |
8792 KB |
Output is correct |
136 |
Correct |
3 ms |
12852 KB |
Output is correct |
137 |
Correct |
3 ms |
12892 KB |
Output is correct |
138 |
Correct |
2 ms |
8796 KB |
Output is correct |
139 |
Correct |
3 ms |
13084 KB |
Output is correct |
140 |
Correct |
3 ms |
12888 KB |
Output is correct |
141 |
Correct |
2 ms |
8796 KB |
Output is correct |
142 |
Correct |
3 ms |
12892 KB |
Output is correct |
143 |
Correct |
3 ms |
12892 KB |
Output is correct |
144 |
Correct |
1 ms |
8712 KB |
Output is correct |
145 |
Correct |
3 ms |
12888 KB |
Output is correct |
146 |
Correct |
3 ms |
12892 KB |
Output is correct |
147 |
Correct |
7 ms |
12892 KB |
Output is correct |
148 |
Correct |
4 ms |
10844 KB |
Output is correct |
149 |
Correct |
4 ms |
10844 KB |
Output is correct |
150 |
Correct |
5 ms |
12892 KB |
Output is correct |
151 |
Correct |
5 ms |
12888 KB |
Output is correct |
152 |
Correct |
5 ms |
12892 KB |
Output is correct |
153 |
Correct |
5 ms |
13080 KB |
Output is correct |
154 |
Correct |
5 ms |
12892 KB |
Output is correct |
155 |
Correct |
5 ms |
12892 KB |
Output is correct |
156 |
Correct |
5 ms |
12892 KB |
Output is correct |
157 |
Correct |
5 ms |
12892 KB |
Output is correct |
158 |
Correct |
6 ms |
13080 KB |
Output is correct |
159 |
Correct |
9 ms |
12888 KB |
Output is correct |
160 |
Correct |
10 ms |
12892 KB |
Output is correct |
161 |
Correct |
6 ms |
12892 KB |
Output is correct |
162 |
Correct |
5 ms |
10936 KB |
Output is correct |
163 |
Correct |
7 ms |
10940 KB |
Output is correct |
164 |
Correct |
5 ms |
12892 KB |
Output is correct |
165 |
Correct |
7 ms |
11008 KB |
Output is correct |
166 |
Correct |
7 ms |
10880 KB |
Output is correct |
167 |
Correct |
4 ms |
10844 KB |
Output is correct |
168 |
Correct |
2 ms |
10844 KB |
Output is correct |
169 |
Correct |
3 ms |
10844 KB |
Output is correct |
170 |
Correct |
4 ms |
12888 KB |
Output is correct |
171 |
Correct |
4 ms |
10844 KB |
Output is correct |
172 |
Correct |
4 ms |
10844 KB |
Output is correct |
173 |
Correct |
3 ms |
10844 KB |
Output is correct |
174 |
Correct |
8 ms |
13076 KB |
Output is correct |
175 |
Correct |
5 ms |
13064 KB |
Output is correct |
176 |
Correct |
5 ms |
12892 KB |
Output is correct |
177 |
Correct |
8 ms |
13084 KB |
Output is correct |
178 |
Correct |
3 ms |
12892 KB |
Output is correct |
179 |
Correct |
13 ms |
18012 KB |
Output is correct |
180 |
Correct |
37 ms |
23816 KB |
Output is correct |
181 |
Correct |
28 ms |
23636 KB |
Output is correct |
182 |
Correct |
8 ms |
18240 KB |
Output is correct |
183 |
Correct |
34 ms |
23636 KB |
Output is correct |
184 |
Correct |
30 ms |
23648 KB |
Output is correct |
185 |
Correct |
23 ms |
23344 KB |
Output is correct |
186 |
Correct |
27 ms |
23868 KB |
Output is correct |
187 |
Correct |
29 ms |
23864 KB |
Output is correct |
188 |
Correct |
22 ms |
22892 KB |
Output is correct |
189 |
Correct |
28 ms |
23772 KB |
Output is correct |
190 |
Correct |
27 ms |
23636 KB |
Output is correct |
191 |
Correct |
75 ms |
23580 KB |
Output is correct |
192 |
Correct |
66 ms |
23700 KB |
Output is correct |
193 |
Correct |
93 ms |
23636 KB |
Output is correct |
194 |
Correct |
76 ms |
23876 KB |
Output is correct |
195 |
Correct |
73 ms |
23640 KB |
Output is correct |
196 |
Correct |
65 ms |
23900 KB |
Output is correct |
197 |
Correct |
71 ms |
23864 KB |
Output is correct |
198 |
Correct |
83 ms |
23892 KB |
Output is correct |
199 |
Correct |
67 ms |
22608 KB |
Output is correct |
200 |
Correct |
68 ms |
22604 KB |
Output is correct |
201 |
Correct |
68 ms |
22616 KB |
Output is correct |
202 |
Correct |
119 ms |
22356 KB |
Output is correct |
203 |
Correct |
118 ms |
22356 KB |
Output is correct |
204 |
Correct |
119 ms |
22596 KB |
Output is correct |
205 |
Correct |
154 ms |
22596 KB |
Output is correct |
206 |
Correct |
59 ms |
22520 KB |
Output is correct |
207 |
Correct |
63 ms |
22428 KB |
Output is correct |
208 |
Correct |
80 ms |
22356 KB |
Output is correct |
209 |
Correct |
57 ms |
22536 KB |
Output is correct |
210 |
Correct |
58 ms |
22260 KB |
Output is correct |
211 |
Correct |
62 ms |
22364 KB |
Output is correct |
212 |
Correct |
25 ms |
22368 KB |
Output is correct |
213 |
Correct |
39 ms |
22352 KB |
Output is correct |
214 |
Correct |
37 ms |
22224 KB |
Output is correct |
215 |
Correct |
39 ms |
22364 KB |
Output is correct |
216 |
Correct |
33 ms |
22356 KB |
Output is correct |
217 |
Correct |
35 ms |
22356 KB |
Output is correct |
218 |
Correct |
77 ms |
22364 KB |
Output is correct |
219 |
Correct |
69 ms |
22616 KB |
Output is correct |
220 |
Correct |
66 ms |
22600 KB |
Output is correct |
221 |
Correct |
99 ms |
22604 KB |
Output is correct |
222 |
Correct |
26 ms |
22364 KB |
Output is correct |