# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1072724 |
2024-08-24T03:28:05 Z |
jer033 |
Toy (CEOI24_toy) |
C++17 |
|
536 ms |
197832 KB |
#include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
int main()
{
std::ios_base::sync_with_stdio(false);
int W, H, K, L;
cin >> W >> H >> K >> L;
int xh, yh, xv, yv;
cin >> xh >> yh >> xv >> yv;
int xstart = xv;
int ystart = yh;
int xgoal, ygoal;
xgoal = -1; ygoal = -1;
//Note: when accessing, you access y, then x
vector<vector<bool>> has_obstacle(H, vector<bool> (W, 0));
for (int i=0; i<H; i++)
for (int j=0; j<W; j++)
{
char x;
cin >> x;
if (x=='*')
{
xgoal = j;
ygoal = i;
}
else if (x=='X')
{
has_obstacle[i][j] = 1;
}
}
vector<vector<pii>> hori_blocks(H, vector<pii> (W, {-1, -1}));
vector<vector<pii>> veri_blocks(H, vector<pii> (W, {-1, -1}));
for (int i=0; i<H; i++)
{
vector<int> blocks;
blocks.push_back(-1);
for (int j = 0; j<W; j++)
if (has_obstacle[i][j])
blocks.push_back(j);
blocks.push_back(W);
int k = blocks.size();
for (int conti = 0; conti <= (k-2); conti++)
{
int lef = blocks[conti];
int rig = blocks[conti+1];
for (int memb = lef+1; memb < rig; memb++)
hori_blocks[i][memb] = {lef, rig};
}
}
for (int j = 0; j<W; j++)
{
vector<int> blocks;
blocks.push_back(-1);
for (int i=0; i<H; i++)
if (has_obstacle[i][j])
blocks.push_back(i);
blocks.push_back(H);
int k = blocks.size();
for (int conti = 0; conti <= (k-2); conti++)
{
int up = blocks[conti];
int dow = blocks[conti+1];
for (int memb = up+1; memb < dow; memb++)
veri_blocks[memb][j] = {up, dow};
}
}
vector<vector<bool>> can_be_center(H, vector<bool> (W, 0));
for (int i = 0; i<H; i++)
for (int j = 0; j<W; j++)
{
if (((hori_blocks[i][j].second - hori_blocks[i][j].first) > K) and ((veri_blocks[i][j].second - veri_blocks[i][j].first) > L))
can_be_center[i][j] = 1;
}
vector<vector<vector<pii>>> edges(H, vector<vector<pii>> (W));
//making vertical edges
for (int i = 0; i<(H-1); i++)
for (int j=0; j<W; j++)
{
int i1 = i;
int i2 = i+1;
int j1 = j;
int j2 = j;
int intersection1 = max(hori_blocks[i1][j1].first, hori_blocks[i2][j2].first);
int intersection2 = min(hori_blocks[i1][j1].second, hori_blocks[i2][j2].second);
if (can_be_center[i1][j1] and can_be_center[i2][j2])
if ((intersection2 - intersection1) > K)
{
edges[i1][j1].push_back({i2, j2});
edges[i2][j2].push_back({i1, j1});
}
}
//making horizontal edges
for (int i = 0; i<H; i++)
for (int j=0; j<(W-1); j++)
{
int i1 = i;
int i2 = i;
int j1 = j;
int j2 = j+1;
int intersection1 = max(veri_blocks[i1][j1].first, veri_blocks[i2][j2].first);
int intersection2 = min(veri_blocks[i1][j1].second, veri_blocks[i2][j2].second);
if (can_be_center[i1][j1] and can_be_center[i2][j2])
if ((intersection2 - intersection1) > L)
{
edges[i1][j1].push_back({i2, j2});
edges[i2][j2].push_back({i1, j1});
}
}
vector<vector<bool>> visited(H, vector<bool> (W, 0));
queue<pii> visitlist;
visitlist.push({ystart, xstart});
visited[ystart][xstart] = 1;
while (!visitlist.empty())
{
pii next_square = visitlist.front();
visitlist.pop();
int icurr = next_square.first;
int jcurr = next_square.second;
for (pii neigh: edges[icurr][jcurr])
{
int inex = neigh.first;
int jnex = neigh.second;
if (visited[inex][jnex] == 0)
{
visited[inex][jnex] = 1;
visitlist.push({inex, jnex});
}
}
}
if (visited[ygoal][xgoal] == 1)
cout << "YES\n";
else
cout << "NO\n";
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
460 KB |
Output is correct |
5 |
Correct |
1 ms |
456 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
604 KB |
Output is correct |
8 |
Correct |
0 ms |
604 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
1 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
1 ms |
456 KB |
Output is correct |
16 |
Correct |
1 ms |
604 KB |
Output is correct |
17 |
Correct |
1 ms |
604 KB |
Output is correct |
18 |
Correct |
1 ms |
604 KB |
Output is correct |
19 |
Correct |
1 ms |
604 KB |
Output is correct |
20 |
Correct |
1 ms |
604 KB |
Output is correct |
21 |
Correct |
1 ms |
604 KB |
Output is correct |
22 |
Correct |
1 ms |
604 KB |
Output is correct |
23 |
Correct |
1 ms |
604 KB |
Output is correct |
24 |
Correct |
1 ms |
604 KB |
Output is correct |
25 |
Correct |
1 ms |
604 KB |
Output is correct |
26 |
Correct |
1 ms |
600 KB |
Output is correct |
27 |
Correct |
1 ms |
604 KB |
Output is correct |
28 |
Correct |
1 ms |
604 KB |
Output is correct |
29 |
Correct |
1 ms |
456 KB |
Output is correct |
30 |
Correct |
1 ms |
604 KB |
Output is correct |
31 |
Correct |
1 ms |
604 KB |
Output is correct |
32 |
Correct |
1 ms |
604 KB |
Output is correct |
33 |
Correct |
1 ms |
604 KB |
Output is correct |
34 |
Correct |
1 ms |
604 KB |
Output is correct |
35 |
Correct |
1 ms |
604 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
600 KB |
Output is correct |
38 |
Correct |
1 ms |
604 KB |
Output is correct |
39 |
Correct |
1 ms |
604 KB |
Output is correct |
40 |
Correct |
1 ms |
604 KB |
Output is correct |
41 |
Correct |
1 ms |
604 KB |
Output is correct |
42 |
Correct |
1 ms |
604 KB |
Output is correct |
43 |
Correct |
1 ms |
452 KB |
Output is correct |
44 |
Correct |
1 ms |
604 KB |
Output is correct |
45 |
Correct |
1 ms |
604 KB |
Output is correct |
46 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
460 KB |
Output is correct |
5 |
Correct |
1 ms |
456 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
604 KB |
Output is correct |
8 |
Correct |
0 ms |
604 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
1 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
1 ms |
456 KB |
Output is correct |
16 |
Correct |
1 ms |
604 KB |
Output is correct |
17 |
Correct |
1 ms |
604 KB |
Output is correct |
18 |
Correct |
1 ms |
604 KB |
Output is correct |
19 |
Correct |
1 ms |
604 KB |
Output is correct |
20 |
Correct |
1 ms |
604 KB |
Output is correct |
21 |
Correct |
1 ms |
604 KB |
Output is correct |
22 |
Correct |
1 ms |
604 KB |
Output is correct |
23 |
Correct |
1 ms |
604 KB |
Output is correct |
24 |
Correct |
1 ms |
604 KB |
Output is correct |
25 |
Correct |
1 ms |
604 KB |
Output is correct |
26 |
Correct |
1 ms |
600 KB |
Output is correct |
27 |
Correct |
1 ms |
604 KB |
Output is correct |
28 |
Correct |
1 ms |
604 KB |
Output is correct |
29 |
Correct |
1 ms |
456 KB |
Output is correct |
30 |
Correct |
1 ms |
604 KB |
Output is correct |
31 |
Correct |
1 ms |
604 KB |
Output is correct |
32 |
Correct |
1 ms |
604 KB |
Output is correct |
33 |
Correct |
1 ms |
604 KB |
Output is correct |
34 |
Correct |
1 ms |
604 KB |
Output is correct |
35 |
Correct |
1 ms |
604 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
600 KB |
Output is correct |
38 |
Correct |
1 ms |
604 KB |
Output is correct |
39 |
Correct |
1 ms |
604 KB |
Output is correct |
40 |
Correct |
1 ms |
604 KB |
Output is correct |
41 |
Correct |
1 ms |
604 KB |
Output is correct |
42 |
Correct |
1 ms |
604 KB |
Output is correct |
43 |
Correct |
1 ms |
452 KB |
Output is correct |
44 |
Correct |
1 ms |
604 KB |
Output is correct |
45 |
Correct |
1 ms |
604 KB |
Output is correct |
46 |
Correct |
0 ms |
348 KB |
Output is correct |
47 |
Correct |
1 ms |
604 KB |
Output is correct |
48 |
Correct |
1 ms |
1112 KB |
Output is correct |
49 |
Correct |
2 ms |
1000 KB |
Output is correct |
50 |
Correct |
1 ms |
604 KB |
Output is correct |
51 |
Correct |
1 ms |
860 KB |
Output is correct |
52 |
Correct |
1 ms |
604 KB |
Output is correct |
53 |
Correct |
0 ms |
632 KB |
Output is correct |
54 |
Correct |
1 ms |
604 KB |
Output is correct |
55 |
Correct |
1 ms |
604 KB |
Output is correct |
56 |
Correct |
0 ms |
348 KB |
Output is correct |
57 |
Correct |
1 ms |
604 KB |
Output is correct |
58 |
Correct |
1 ms |
604 KB |
Output is correct |
59 |
Correct |
2 ms |
1116 KB |
Output is correct |
60 |
Correct |
1 ms |
860 KB |
Output is correct |
61 |
Correct |
2 ms |
1116 KB |
Output is correct |
62 |
Correct |
2 ms |
1116 KB |
Output is correct |
63 |
Correct |
2 ms |
1116 KB |
Output is correct |
64 |
Correct |
2 ms |
1116 KB |
Output is correct |
65 |
Correct |
2 ms |
1116 KB |
Output is correct |
66 |
Correct |
2 ms |
1116 KB |
Output is correct |
67 |
Correct |
2 ms |
1116 KB |
Output is correct |
68 |
Correct |
1 ms |
1140 KB |
Output is correct |
69 |
Correct |
1 ms |
1116 KB |
Output is correct |
70 |
Correct |
2 ms |
1116 KB |
Output is correct |
71 |
Correct |
2 ms |
1116 KB |
Output is correct |
72 |
Correct |
2 ms |
1116 KB |
Output is correct |
73 |
Correct |
2 ms |
1116 KB |
Output is correct |
74 |
Correct |
2 ms |
1176 KB |
Output is correct |
75 |
Correct |
2 ms |
1116 KB |
Output is correct |
76 |
Correct |
2 ms |
1116 KB |
Output is correct |
77 |
Correct |
2 ms |
1116 KB |
Output is correct |
78 |
Correct |
2 ms |
1116 KB |
Output is correct |
79 |
Correct |
1 ms |
1116 KB |
Output is correct |
80 |
Correct |
1 ms |
600 KB |
Output is correct |
81 |
Correct |
1 ms |
860 KB |
Output is correct |
82 |
Correct |
2 ms |
1116 KB |
Output is correct |
83 |
Correct |
1 ms |
860 KB |
Output is correct |
84 |
Correct |
2 ms |
1116 KB |
Output is correct |
85 |
Correct |
1 ms |
1116 KB |
Output is correct |
86 |
Correct |
2 ms |
1116 KB |
Output is correct |
87 |
Correct |
2 ms |
1112 KB |
Output is correct |
88 |
Correct |
2 ms |
1116 KB |
Output is correct |
89 |
Correct |
2 ms |
1116 KB |
Output is correct |
90 |
Correct |
1 ms |
604 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
604 KB |
Output is correct |
4 |
Correct |
17 ms |
8284 KB |
Output is correct |
5 |
Correct |
17 ms |
8280 KB |
Output is correct |
6 |
Correct |
2 ms |
1368 KB |
Output is correct |
7 |
Correct |
16 ms |
8116 KB |
Output is correct |
8 |
Correct |
16 ms |
8284 KB |
Output is correct |
9 |
Correct |
4 ms |
2396 KB |
Output is correct |
10 |
Correct |
11 ms |
6748 KB |
Output is correct |
11 |
Correct |
8 ms |
5468 KB |
Output is correct |
12 |
Correct |
2 ms |
1628 KB |
Output is correct |
13 |
Correct |
6 ms |
4012 KB |
Output is correct |
14 |
Correct |
6 ms |
4188 KB |
Output is correct |
15 |
Correct |
13 ms |
7732 KB |
Output is correct |
16 |
Correct |
14 ms |
7516 KB |
Output is correct |
17 |
Correct |
15 ms |
7660 KB |
Output is correct |
18 |
Correct |
15 ms |
8284 KB |
Output is correct |
19 |
Correct |
15 ms |
8280 KB |
Output is correct |
20 |
Correct |
14 ms |
8280 KB |
Output is correct |
21 |
Correct |
15 ms |
8284 KB |
Output is correct |
22 |
Correct |
15 ms |
8284 KB |
Output is correct |
23 |
Correct |
16 ms |
8280 KB |
Output is correct |
24 |
Correct |
14 ms |
8284 KB |
Output is correct |
25 |
Correct |
14 ms |
8472 KB |
Output is correct |
26 |
Correct |
15 ms |
8280 KB |
Output is correct |
27 |
Correct |
14 ms |
8252 KB |
Output is correct |
28 |
Correct |
15 ms |
8420 KB |
Output is correct |
29 |
Correct |
14 ms |
8284 KB |
Output is correct |
30 |
Correct |
13 ms |
8028 KB |
Output is correct |
31 |
Correct |
13 ms |
7772 KB |
Output is correct |
32 |
Correct |
14 ms |
8284 KB |
Output is correct |
33 |
Correct |
14 ms |
7516 KB |
Output is correct |
34 |
Correct |
13 ms |
7684 KB |
Output is correct |
35 |
Correct |
13 ms |
7632 KB |
Output is correct |
36 |
Correct |
4 ms |
3676 KB |
Output is correct |
37 |
Correct |
14 ms |
8032 KB |
Output is correct |
38 |
Correct |
12 ms |
7516 KB |
Output is correct |
39 |
Correct |
12 ms |
7804 KB |
Output is correct |
40 |
Correct |
12 ms |
8028 KB |
Output is correct |
41 |
Correct |
13 ms |
7512 KB |
Output is correct |
42 |
Correct |
17 ms |
8284 KB |
Output is correct |
43 |
Correct |
16 ms |
8480 KB |
Output is correct |
44 |
Correct |
21 ms |
8284 KB |
Output is correct |
45 |
Correct |
15 ms |
8280 KB |
Output is correct |
46 |
Correct |
4 ms |
3676 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
460 KB |
Output is correct |
5 |
Correct |
1 ms |
456 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
604 KB |
Output is correct |
8 |
Correct |
0 ms |
604 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
1 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
1 ms |
456 KB |
Output is correct |
16 |
Correct |
1 ms |
604 KB |
Output is correct |
17 |
Correct |
1 ms |
604 KB |
Output is correct |
18 |
Correct |
1 ms |
604 KB |
Output is correct |
19 |
Correct |
1 ms |
604 KB |
Output is correct |
20 |
Correct |
1 ms |
604 KB |
Output is correct |
21 |
Correct |
1 ms |
604 KB |
Output is correct |
22 |
Correct |
1 ms |
604 KB |
Output is correct |
23 |
Correct |
1 ms |
604 KB |
Output is correct |
24 |
Correct |
1 ms |
604 KB |
Output is correct |
25 |
Correct |
1 ms |
604 KB |
Output is correct |
26 |
Correct |
1 ms |
600 KB |
Output is correct |
27 |
Correct |
1 ms |
604 KB |
Output is correct |
28 |
Correct |
1 ms |
604 KB |
Output is correct |
29 |
Correct |
1 ms |
456 KB |
Output is correct |
30 |
Correct |
1 ms |
604 KB |
Output is correct |
31 |
Correct |
1 ms |
604 KB |
Output is correct |
32 |
Correct |
1 ms |
604 KB |
Output is correct |
33 |
Correct |
1 ms |
604 KB |
Output is correct |
34 |
Correct |
1 ms |
604 KB |
Output is correct |
35 |
Correct |
1 ms |
604 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
600 KB |
Output is correct |
38 |
Correct |
1 ms |
604 KB |
Output is correct |
39 |
Correct |
1 ms |
604 KB |
Output is correct |
40 |
Correct |
1 ms |
604 KB |
Output is correct |
41 |
Correct |
1 ms |
604 KB |
Output is correct |
42 |
Correct |
1 ms |
604 KB |
Output is correct |
43 |
Correct |
1 ms |
452 KB |
Output is correct |
44 |
Correct |
1 ms |
604 KB |
Output is correct |
45 |
Correct |
1 ms |
604 KB |
Output is correct |
46 |
Correct |
0 ms |
348 KB |
Output is correct |
47 |
Correct |
1 ms |
604 KB |
Output is correct |
48 |
Correct |
1 ms |
1112 KB |
Output is correct |
49 |
Correct |
2 ms |
1000 KB |
Output is correct |
50 |
Correct |
1 ms |
604 KB |
Output is correct |
51 |
Correct |
1 ms |
860 KB |
Output is correct |
52 |
Correct |
1 ms |
604 KB |
Output is correct |
53 |
Correct |
0 ms |
632 KB |
Output is correct |
54 |
Correct |
1 ms |
604 KB |
Output is correct |
55 |
Correct |
1 ms |
604 KB |
Output is correct |
56 |
Correct |
0 ms |
348 KB |
Output is correct |
57 |
Correct |
1 ms |
604 KB |
Output is correct |
58 |
Correct |
1 ms |
604 KB |
Output is correct |
59 |
Correct |
2 ms |
1116 KB |
Output is correct |
60 |
Correct |
1 ms |
860 KB |
Output is correct |
61 |
Correct |
2 ms |
1116 KB |
Output is correct |
62 |
Correct |
2 ms |
1116 KB |
Output is correct |
63 |
Correct |
2 ms |
1116 KB |
Output is correct |
64 |
Correct |
2 ms |
1116 KB |
Output is correct |
65 |
Correct |
2 ms |
1116 KB |
Output is correct |
66 |
Correct |
2 ms |
1116 KB |
Output is correct |
67 |
Correct |
2 ms |
1116 KB |
Output is correct |
68 |
Correct |
1 ms |
1140 KB |
Output is correct |
69 |
Correct |
1 ms |
1116 KB |
Output is correct |
70 |
Correct |
2 ms |
1116 KB |
Output is correct |
71 |
Correct |
2 ms |
1116 KB |
Output is correct |
72 |
Correct |
2 ms |
1116 KB |
Output is correct |
73 |
Correct |
2 ms |
1116 KB |
Output is correct |
74 |
Correct |
2 ms |
1176 KB |
Output is correct |
75 |
Correct |
2 ms |
1116 KB |
Output is correct |
76 |
Correct |
2 ms |
1116 KB |
Output is correct |
77 |
Correct |
2 ms |
1116 KB |
Output is correct |
78 |
Correct |
2 ms |
1116 KB |
Output is correct |
79 |
Correct |
1 ms |
1116 KB |
Output is correct |
80 |
Correct |
1 ms |
600 KB |
Output is correct |
81 |
Correct |
1 ms |
860 KB |
Output is correct |
82 |
Correct |
2 ms |
1116 KB |
Output is correct |
83 |
Correct |
1 ms |
860 KB |
Output is correct |
84 |
Correct |
2 ms |
1116 KB |
Output is correct |
85 |
Correct |
1 ms |
1116 KB |
Output is correct |
86 |
Correct |
2 ms |
1116 KB |
Output is correct |
87 |
Correct |
2 ms |
1112 KB |
Output is correct |
88 |
Correct |
2 ms |
1116 KB |
Output is correct |
89 |
Correct |
2 ms |
1116 KB |
Output is correct |
90 |
Correct |
1 ms |
604 KB |
Output is correct |
91 |
Correct |
1 ms |
604 KB |
Output is correct |
92 |
Correct |
17 ms |
8284 KB |
Output is correct |
93 |
Correct |
17 ms |
8280 KB |
Output is correct |
94 |
Correct |
2 ms |
1368 KB |
Output is correct |
95 |
Correct |
16 ms |
8116 KB |
Output is correct |
96 |
Correct |
16 ms |
8284 KB |
Output is correct |
97 |
Correct |
4 ms |
2396 KB |
Output is correct |
98 |
Correct |
11 ms |
6748 KB |
Output is correct |
99 |
Correct |
8 ms |
5468 KB |
Output is correct |
100 |
Correct |
2 ms |
1628 KB |
Output is correct |
101 |
Correct |
6 ms |
4012 KB |
Output is correct |
102 |
Correct |
6 ms |
4188 KB |
Output is correct |
103 |
Correct |
13 ms |
7732 KB |
Output is correct |
104 |
Correct |
14 ms |
7516 KB |
Output is correct |
105 |
Correct |
15 ms |
7660 KB |
Output is correct |
106 |
Correct |
15 ms |
8284 KB |
Output is correct |
107 |
Correct |
15 ms |
8280 KB |
Output is correct |
108 |
Correct |
14 ms |
8280 KB |
Output is correct |
109 |
Correct |
15 ms |
8284 KB |
Output is correct |
110 |
Correct |
15 ms |
8284 KB |
Output is correct |
111 |
Correct |
16 ms |
8280 KB |
Output is correct |
112 |
Correct |
14 ms |
8284 KB |
Output is correct |
113 |
Correct |
14 ms |
8472 KB |
Output is correct |
114 |
Correct |
15 ms |
8280 KB |
Output is correct |
115 |
Correct |
14 ms |
8252 KB |
Output is correct |
116 |
Correct |
15 ms |
8420 KB |
Output is correct |
117 |
Correct |
14 ms |
8284 KB |
Output is correct |
118 |
Correct |
13 ms |
8028 KB |
Output is correct |
119 |
Correct |
13 ms |
7772 KB |
Output is correct |
120 |
Correct |
14 ms |
8284 KB |
Output is correct |
121 |
Correct |
14 ms |
7516 KB |
Output is correct |
122 |
Correct |
13 ms |
7684 KB |
Output is correct |
123 |
Correct |
13 ms |
7632 KB |
Output is correct |
124 |
Correct |
4 ms |
3676 KB |
Output is correct |
125 |
Correct |
14 ms |
8032 KB |
Output is correct |
126 |
Correct |
12 ms |
7516 KB |
Output is correct |
127 |
Correct |
12 ms |
7804 KB |
Output is correct |
128 |
Correct |
12 ms |
8028 KB |
Output is correct |
129 |
Correct |
13 ms |
7512 KB |
Output is correct |
130 |
Correct |
17 ms |
8284 KB |
Output is correct |
131 |
Correct |
16 ms |
8480 KB |
Output is correct |
132 |
Correct |
21 ms |
8284 KB |
Output is correct |
133 |
Correct |
15 ms |
8280 KB |
Output is correct |
134 |
Correct |
4 ms |
3676 KB |
Output is correct |
135 |
Correct |
6 ms |
3588 KB |
Output is correct |
136 |
Correct |
17 ms |
10800 KB |
Output is correct |
137 |
Correct |
11 ms |
8540 KB |
Output is correct |
138 |
Correct |
3 ms |
2908 KB |
Output is correct |
139 |
Correct |
8 ms |
6748 KB |
Output is correct |
140 |
Correct |
5 ms |
5724 KB |
Output is correct |
141 |
Correct |
2 ms |
2396 KB |
Output is correct |
142 |
Correct |
6 ms |
5724 KB |
Output is correct |
143 |
Correct |
6 ms |
5572 KB |
Output is correct |
144 |
Correct |
1 ms |
604 KB |
Output is correct |
145 |
Correct |
8 ms |
5748 KB |
Output is correct |
146 |
Correct |
8 ms |
5724 KB |
Output is correct |
147 |
Correct |
22 ms |
10700 KB |
Output is correct |
148 |
Correct |
22 ms |
10912 KB |
Output is correct |
149 |
Correct |
18 ms |
10332 KB |
Output is correct |
150 |
Correct |
22 ms |
11868 KB |
Output is correct |
151 |
Correct |
20 ms |
11864 KB |
Output is correct |
152 |
Correct |
22 ms |
11848 KB |
Output is correct |
153 |
Correct |
20 ms |
12120 KB |
Output is correct |
154 |
Correct |
20 ms |
11868 KB |
Output is correct |
155 |
Correct |
21 ms |
11864 KB |
Output is correct |
156 |
Correct |
20 ms |
11868 KB |
Output is correct |
157 |
Correct |
20 ms |
11864 KB |
Output is correct |
158 |
Correct |
20 ms |
11864 KB |
Output is correct |
159 |
Correct |
23 ms |
11884 KB |
Output is correct |
160 |
Correct |
22 ms |
11868 KB |
Output is correct |
161 |
Correct |
21 ms |
11864 KB |
Output is correct |
162 |
Correct |
18 ms |
11012 KB |
Output is correct |
163 |
Correct |
19 ms |
10588 KB |
Output is correct |
164 |
Correct |
19 ms |
11356 KB |
Output is correct |
165 |
Correct |
17 ms |
10332 KB |
Output is correct |
166 |
Correct |
19 ms |
11100 KB |
Output is correct |
167 |
Correct |
21 ms |
10588 KB |
Output is correct |
168 |
Correct |
5 ms |
5212 KB |
Output is correct |
169 |
Correct |
17 ms |
10772 KB |
Output is correct |
170 |
Correct |
19 ms |
11028 KB |
Output is correct |
171 |
Correct |
26 ms |
10588 KB |
Output is correct |
172 |
Correct |
17 ms |
10076 KB |
Output is correct |
173 |
Correct |
19 ms |
10844 KB |
Output is correct |
174 |
Correct |
22 ms |
11864 KB |
Output is correct |
175 |
Correct |
23 ms |
11868 KB |
Output is correct |
176 |
Correct |
20 ms |
11860 KB |
Output is correct |
177 |
Correct |
24 ms |
11808 KB |
Output is correct |
178 |
Correct |
5 ms |
5208 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
460 KB |
Output is correct |
5 |
Correct |
1 ms |
456 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
604 KB |
Output is correct |
8 |
Correct |
0 ms |
604 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
1 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
1 ms |
456 KB |
Output is correct |
16 |
Correct |
1 ms |
604 KB |
Output is correct |
17 |
Correct |
1 ms |
604 KB |
Output is correct |
18 |
Correct |
1 ms |
604 KB |
Output is correct |
19 |
Correct |
1 ms |
604 KB |
Output is correct |
20 |
Correct |
1 ms |
604 KB |
Output is correct |
21 |
Correct |
1 ms |
604 KB |
Output is correct |
22 |
Correct |
1 ms |
604 KB |
Output is correct |
23 |
Correct |
1 ms |
604 KB |
Output is correct |
24 |
Correct |
1 ms |
604 KB |
Output is correct |
25 |
Correct |
1 ms |
604 KB |
Output is correct |
26 |
Correct |
1 ms |
600 KB |
Output is correct |
27 |
Correct |
1 ms |
604 KB |
Output is correct |
28 |
Correct |
1 ms |
604 KB |
Output is correct |
29 |
Correct |
1 ms |
456 KB |
Output is correct |
30 |
Correct |
1 ms |
604 KB |
Output is correct |
31 |
Correct |
1 ms |
604 KB |
Output is correct |
32 |
Correct |
1 ms |
604 KB |
Output is correct |
33 |
Correct |
1 ms |
604 KB |
Output is correct |
34 |
Correct |
1 ms |
604 KB |
Output is correct |
35 |
Correct |
1 ms |
604 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
600 KB |
Output is correct |
38 |
Correct |
1 ms |
604 KB |
Output is correct |
39 |
Correct |
1 ms |
604 KB |
Output is correct |
40 |
Correct |
1 ms |
604 KB |
Output is correct |
41 |
Correct |
1 ms |
604 KB |
Output is correct |
42 |
Correct |
1 ms |
604 KB |
Output is correct |
43 |
Correct |
1 ms |
452 KB |
Output is correct |
44 |
Correct |
1 ms |
604 KB |
Output is correct |
45 |
Correct |
1 ms |
604 KB |
Output is correct |
46 |
Correct |
0 ms |
348 KB |
Output is correct |
47 |
Correct |
1 ms |
604 KB |
Output is correct |
48 |
Correct |
1 ms |
1112 KB |
Output is correct |
49 |
Correct |
2 ms |
1000 KB |
Output is correct |
50 |
Correct |
1 ms |
604 KB |
Output is correct |
51 |
Correct |
1 ms |
860 KB |
Output is correct |
52 |
Correct |
1 ms |
604 KB |
Output is correct |
53 |
Correct |
0 ms |
632 KB |
Output is correct |
54 |
Correct |
1 ms |
604 KB |
Output is correct |
55 |
Correct |
1 ms |
604 KB |
Output is correct |
56 |
Correct |
0 ms |
348 KB |
Output is correct |
57 |
Correct |
1 ms |
604 KB |
Output is correct |
58 |
Correct |
1 ms |
604 KB |
Output is correct |
59 |
Correct |
2 ms |
1116 KB |
Output is correct |
60 |
Correct |
1 ms |
860 KB |
Output is correct |
61 |
Correct |
2 ms |
1116 KB |
Output is correct |
62 |
Correct |
2 ms |
1116 KB |
Output is correct |
63 |
Correct |
2 ms |
1116 KB |
Output is correct |
64 |
Correct |
2 ms |
1116 KB |
Output is correct |
65 |
Correct |
2 ms |
1116 KB |
Output is correct |
66 |
Correct |
2 ms |
1116 KB |
Output is correct |
67 |
Correct |
2 ms |
1116 KB |
Output is correct |
68 |
Correct |
1 ms |
1140 KB |
Output is correct |
69 |
Correct |
1 ms |
1116 KB |
Output is correct |
70 |
Correct |
2 ms |
1116 KB |
Output is correct |
71 |
Correct |
2 ms |
1116 KB |
Output is correct |
72 |
Correct |
2 ms |
1116 KB |
Output is correct |
73 |
Correct |
2 ms |
1116 KB |
Output is correct |
74 |
Correct |
2 ms |
1176 KB |
Output is correct |
75 |
Correct |
2 ms |
1116 KB |
Output is correct |
76 |
Correct |
2 ms |
1116 KB |
Output is correct |
77 |
Correct |
2 ms |
1116 KB |
Output is correct |
78 |
Correct |
2 ms |
1116 KB |
Output is correct |
79 |
Correct |
1 ms |
1116 KB |
Output is correct |
80 |
Correct |
1 ms |
600 KB |
Output is correct |
81 |
Correct |
1 ms |
860 KB |
Output is correct |
82 |
Correct |
2 ms |
1116 KB |
Output is correct |
83 |
Correct |
1 ms |
860 KB |
Output is correct |
84 |
Correct |
2 ms |
1116 KB |
Output is correct |
85 |
Correct |
1 ms |
1116 KB |
Output is correct |
86 |
Correct |
2 ms |
1116 KB |
Output is correct |
87 |
Correct |
2 ms |
1112 KB |
Output is correct |
88 |
Correct |
2 ms |
1116 KB |
Output is correct |
89 |
Correct |
2 ms |
1116 KB |
Output is correct |
90 |
Correct |
1 ms |
604 KB |
Output is correct |
91 |
Correct |
1 ms |
604 KB |
Output is correct |
92 |
Correct |
17 ms |
8284 KB |
Output is correct |
93 |
Correct |
17 ms |
8280 KB |
Output is correct |
94 |
Correct |
2 ms |
1368 KB |
Output is correct |
95 |
Correct |
16 ms |
8116 KB |
Output is correct |
96 |
Correct |
16 ms |
8284 KB |
Output is correct |
97 |
Correct |
4 ms |
2396 KB |
Output is correct |
98 |
Correct |
11 ms |
6748 KB |
Output is correct |
99 |
Correct |
8 ms |
5468 KB |
Output is correct |
100 |
Correct |
2 ms |
1628 KB |
Output is correct |
101 |
Correct |
6 ms |
4012 KB |
Output is correct |
102 |
Correct |
6 ms |
4188 KB |
Output is correct |
103 |
Correct |
13 ms |
7732 KB |
Output is correct |
104 |
Correct |
14 ms |
7516 KB |
Output is correct |
105 |
Correct |
15 ms |
7660 KB |
Output is correct |
106 |
Correct |
15 ms |
8284 KB |
Output is correct |
107 |
Correct |
15 ms |
8280 KB |
Output is correct |
108 |
Correct |
14 ms |
8280 KB |
Output is correct |
109 |
Correct |
15 ms |
8284 KB |
Output is correct |
110 |
Correct |
15 ms |
8284 KB |
Output is correct |
111 |
Correct |
16 ms |
8280 KB |
Output is correct |
112 |
Correct |
14 ms |
8284 KB |
Output is correct |
113 |
Correct |
14 ms |
8472 KB |
Output is correct |
114 |
Correct |
15 ms |
8280 KB |
Output is correct |
115 |
Correct |
14 ms |
8252 KB |
Output is correct |
116 |
Correct |
15 ms |
8420 KB |
Output is correct |
117 |
Correct |
14 ms |
8284 KB |
Output is correct |
118 |
Correct |
13 ms |
8028 KB |
Output is correct |
119 |
Correct |
13 ms |
7772 KB |
Output is correct |
120 |
Correct |
14 ms |
8284 KB |
Output is correct |
121 |
Correct |
14 ms |
7516 KB |
Output is correct |
122 |
Correct |
13 ms |
7684 KB |
Output is correct |
123 |
Correct |
13 ms |
7632 KB |
Output is correct |
124 |
Correct |
4 ms |
3676 KB |
Output is correct |
125 |
Correct |
14 ms |
8032 KB |
Output is correct |
126 |
Correct |
12 ms |
7516 KB |
Output is correct |
127 |
Correct |
12 ms |
7804 KB |
Output is correct |
128 |
Correct |
12 ms |
8028 KB |
Output is correct |
129 |
Correct |
13 ms |
7512 KB |
Output is correct |
130 |
Correct |
17 ms |
8284 KB |
Output is correct |
131 |
Correct |
16 ms |
8480 KB |
Output is correct |
132 |
Correct |
21 ms |
8284 KB |
Output is correct |
133 |
Correct |
15 ms |
8280 KB |
Output is correct |
134 |
Correct |
4 ms |
3676 KB |
Output is correct |
135 |
Correct |
6 ms |
3588 KB |
Output is correct |
136 |
Correct |
17 ms |
10800 KB |
Output is correct |
137 |
Correct |
11 ms |
8540 KB |
Output is correct |
138 |
Correct |
3 ms |
2908 KB |
Output is correct |
139 |
Correct |
8 ms |
6748 KB |
Output is correct |
140 |
Correct |
5 ms |
5724 KB |
Output is correct |
141 |
Correct |
2 ms |
2396 KB |
Output is correct |
142 |
Correct |
6 ms |
5724 KB |
Output is correct |
143 |
Correct |
6 ms |
5572 KB |
Output is correct |
144 |
Correct |
1 ms |
604 KB |
Output is correct |
145 |
Correct |
8 ms |
5748 KB |
Output is correct |
146 |
Correct |
8 ms |
5724 KB |
Output is correct |
147 |
Correct |
22 ms |
10700 KB |
Output is correct |
148 |
Correct |
22 ms |
10912 KB |
Output is correct |
149 |
Correct |
18 ms |
10332 KB |
Output is correct |
150 |
Correct |
22 ms |
11868 KB |
Output is correct |
151 |
Correct |
20 ms |
11864 KB |
Output is correct |
152 |
Correct |
22 ms |
11848 KB |
Output is correct |
153 |
Correct |
20 ms |
12120 KB |
Output is correct |
154 |
Correct |
20 ms |
11868 KB |
Output is correct |
155 |
Correct |
21 ms |
11864 KB |
Output is correct |
156 |
Correct |
20 ms |
11868 KB |
Output is correct |
157 |
Correct |
20 ms |
11864 KB |
Output is correct |
158 |
Correct |
20 ms |
11864 KB |
Output is correct |
159 |
Correct |
23 ms |
11884 KB |
Output is correct |
160 |
Correct |
22 ms |
11868 KB |
Output is correct |
161 |
Correct |
21 ms |
11864 KB |
Output is correct |
162 |
Correct |
18 ms |
11012 KB |
Output is correct |
163 |
Correct |
19 ms |
10588 KB |
Output is correct |
164 |
Correct |
19 ms |
11356 KB |
Output is correct |
165 |
Correct |
17 ms |
10332 KB |
Output is correct |
166 |
Correct |
19 ms |
11100 KB |
Output is correct |
167 |
Correct |
21 ms |
10588 KB |
Output is correct |
168 |
Correct |
5 ms |
5212 KB |
Output is correct |
169 |
Correct |
17 ms |
10772 KB |
Output is correct |
170 |
Correct |
19 ms |
11028 KB |
Output is correct |
171 |
Correct |
26 ms |
10588 KB |
Output is correct |
172 |
Correct |
17 ms |
10076 KB |
Output is correct |
173 |
Correct |
19 ms |
10844 KB |
Output is correct |
174 |
Correct |
22 ms |
11864 KB |
Output is correct |
175 |
Correct |
23 ms |
11868 KB |
Output is correct |
176 |
Correct |
20 ms |
11860 KB |
Output is correct |
177 |
Correct |
24 ms |
11808 KB |
Output is correct |
178 |
Correct |
5 ms |
5208 KB |
Output is correct |
179 |
Correct |
70 ms |
45648 KB |
Output is correct |
180 |
Correct |
161 ms |
127380 KB |
Output is correct |
181 |
Correct |
91 ms |
94804 KB |
Output is correct |
182 |
Correct |
22 ms |
24412 KB |
Output is correct |
183 |
Correct |
81 ms |
91916 KB |
Output is correct |
184 |
Correct |
81 ms |
91732 KB |
Output is correct |
185 |
Correct |
63 ms |
67412 KB |
Output is correct |
186 |
Correct |
89 ms |
91852 KB |
Output is correct |
187 |
Correct |
91 ms |
91732 KB |
Output is correct |
188 |
Correct |
65 ms |
47956 KB |
Output is correct |
189 |
Correct |
129 ms |
91984 KB |
Output is correct |
190 |
Correct |
127 ms |
91932 KB |
Output is correct |
191 |
Correct |
426 ms |
167760 KB |
Output is correct |
192 |
Correct |
454 ms |
179836 KB |
Output is correct |
193 |
Correct |
424 ms |
176648 KB |
Output is correct |
194 |
Correct |
430 ms |
197460 KB |
Output is correct |
195 |
Correct |
453 ms |
197832 KB |
Output is correct |
196 |
Correct |
440 ms |
197456 KB |
Output is correct |
197 |
Correct |
439 ms |
197808 KB |
Output is correct |
198 |
Correct |
462 ms |
197716 KB |
Output is correct |
199 |
Correct |
462 ms |
197456 KB |
Output is correct |
200 |
Correct |
465 ms |
197472 KB |
Output is correct |
201 |
Correct |
436 ms |
197456 KB |
Output is correct |
202 |
Correct |
475 ms |
197460 KB |
Output is correct |
203 |
Correct |
473 ms |
197352 KB |
Output is correct |
204 |
Correct |
458 ms |
197404 KB |
Output is correct |
205 |
Correct |
479 ms |
197588 KB |
Output is correct |
206 |
Correct |
383 ms |
172788 KB |
Output is correct |
207 |
Correct |
384 ms |
174048 KB |
Output is correct |
208 |
Correct |
382 ms |
165460 KB |
Output is correct |
209 |
Correct |
404 ms |
176724 KB |
Output is correct |
210 |
Correct |
416 ms |
176624 KB |
Output is correct |
211 |
Correct |
436 ms |
186868 KB |
Output is correct |
212 |
Correct |
66 ms |
79204 KB |
Output is correct |
213 |
Correct |
317 ms |
178004 KB |
Output is correct |
214 |
Correct |
313 ms |
168532 KB |
Output is correct |
215 |
Correct |
335 ms |
181328 KB |
Output is correct |
216 |
Correct |
307 ms |
165460 KB |
Output is correct |
217 |
Correct |
312 ms |
168044 KB |
Output is correct |
218 |
Correct |
507 ms |
197460 KB |
Output is correct |
219 |
Correct |
497 ms |
197664 KB |
Output is correct |
220 |
Correct |
536 ms |
197672 KB |
Output is correct |
221 |
Correct |
511 ms |
197436 KB |
Output is correct |
222 |
Correct |
64 ms |
76880 KB |
Output is correct |