# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
780356 |
2023-07-12T08:27:34 Z |
boris_mihov |
Maze (JOI23_ho_t3) |
C++17 |
|
2000 ms |
732236 KB |
#include <algorithm>
#include <iostream>
#include <numeric>
#include <cassert>
#include <vector>
#include <queue>
typedef long long llong;
const int MAXLOG = 23;
const int MAXN = 6000000 + 10;
const int INF = 1e9;
const int BUFF_SIZE = 1e6;
char buff[BUFF_SIZE];
int buffPos = BUFF_SIZE-1;
inline void readChar()
{
if (++buffPos == BUFF_SIZE) fread(buff, BUFF_SIZE, 1, stdin), buffPos = 0;
}
inline void readInt(int &num)
{
num = 0;
for (; '0' > buff[buffPos] || buff[buffPos] > '9' ; readChar());
for (; '0' <= buff[buffPos] && buff[buffPos] <= '9' ; readChar())
{
num = 10*num + buff[buffPos]-'0';
}
}
void readString(std::string &s)
{
s[0] = ' ';
int pos = 1;
for (; buff[buffPos] != '#' && buff[buffPos] != '.' ; readChar());
for (; buff[buffPos] == '#' || buff[buffPos] == '.' ; readChar())
{
s[pos++] = buff[buffPos];
}
}
struct BIT
{
std::vector <int> tree;
void build(int sz)
{
tree.resize(sz + 1, 0);
}
void update(int pos, int value)
{
for (int idx = pos ; idx < (int)tree.size() ; idx += idx & (-idx))
{
tree[idx] += value;
}
}
int query(int pos)
{
int res = 0;
for (int idx = pos ; idx > 0 ; idx -= idx & (-idx))
{
res += tree[idx];
}
return pos - res;
}
int findKth(int k)
{
int idx = 0;
for (int log = MAXLOG - 1 ; log >= 0 ; --log)
{
if (idx + (1 << log) < (int)tree.size() && (1 << log) - tree[idx + (1 << log)] < k)
{
idx += (1 << log);
k -= (1 << log) - tree[idx];
}
}
return idx + 1;
}
};
int r, c, n;
int sRow, sCol;
int eRow, eCol;
BIT byROW[MAXN];
BIT byCOL[MAXN];
std::pair <int,int> delta[] = {{-1, 0}, {0, -1}, {1, 0}, {0, 1}};
std::deque <std::pair <int,int>> dq;
std::vector <int> dist[MAXN];
std::string t[MAXN];
bool isOutside(int row, int col)
{
return row == 0 || row == r + 1 || col == 0 || col == c + 1;
}
void setCELL(int row, int col)
{
if (dist[row][col] == INF)
{
byROW[row].update(col, 1);
byCOL[col].update(row, 1);
}
}
void addROW(int row, int colL, int colR, int currDist)
{
int curr = byROW[row].query(colL - 1);
while (curr < byROW[row].query(c))
{
int search = byROW[row].findKth(curr + 1);
if (search > colR)
{
break;
}
setCELL(row, search);
if (dist[row][search] > currDist + 1) dist[row][search] = currDist + 1;
dq.push_back({row, search});
}
}
void addCOL(int col, int rowL, int rowR, int currDist)
{
int curr = byCOL[col].query(rowL - 1);
while (curr < byCOL[col].query(r))
{
int search = byCOL[col].findKth(curr + 1);
if (search > rowR)
{
break;
}
setCELL(search, col);
if (dist[search][col] > currDist + 1) dist[search][col] = currDist + 1;
dq.push_back({search, col});
}
}
void solve()
{
for (int i = 1 ; i <= r ; ++i)
{
std::fill(dist[i].begin(), dist[i].end(), INF);
}
for (int i = 1 ; i <= r ; ++i)
{
byROW[i].build(c);
}
for (int i = 1 ; i <= c ; ++i)
{
byCOL[i].build(r);
}
setCELL(sRow, sCol);
dq.push_back({sRow, sCol});
dist[sRow][sCol] = 0;
while (!dq.empty())
{
auto [row, col] = dq.front();
dq.pop_front();
if (row == eRow && col == eCol)
{
std::cout << dist[row][col] << '\n';
break;
}
for (const auto &[dx, dy] : delta)
{
if (isOutside(row + dx, col + dy) || dist[row + dx][col + dy] <= dist[row][col])
{
continue;
}
if (t[row + dx][col + dy] == '.')
{
setCELL(row + dx, col + dy);
dist[row + dx][col + dy] = dist[row][col];
dq.push_front({row + dx, col + dy});
}
}
if (abs(row - eRow) <= n && abs(col - eCol) <= n && dist[eRow][eCol] > dist[row][col])
{
setCELL(eRow, eCol);
dist[eRow][eCol] = dist[row][col] + 1;
dq.push_back({eRow, eCol});
}
addROW(std::max(1, row - n), std::max(1, col - n + 1), std::min(c, col + n - 1), dist[row][col]);
addROW(std::min(r, row + n), std::max(1, col - n + 1), std::min(c, col + n - 1), dist[row][col]);
addCOL(std::max(1, col - n), std::max(1, row - n + 1), std::min(r, row + n - 1), dist[row][col]);
addCOL(std::min(c, col + n), std::max(1, row - n + 1), std::min(r, row + n - 1), dist[row][col]);
}
}
void input()
{
readInt(r);
readInt(c);
readInt(n);
readInt(sRow);
readInt(sCol);
readInt(eRow);
readInt(eCol);
for (int i = 1 ; i <= r ; ++i)
{
t[i].resize(c + 1);
readString(t[i]);
dist[i].resize(c + 1, INF);
}
}
void fastIOI()
{
std::ios_base :: sync_with_stdio(0);
std::cout.tie(nullptr);
std::cin.tie(nullptr);
}
int main()
{
fastIOI();
input();
solve();
return 0;
}
Compilation message
Main.cpp: In function 'void readChar()':
Main.cpp:19:38: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
19 | if (++buffPos == BUFF_SIZE) fread(buff, BUFF_SIZE, 1, stdin), buffPos = 0;
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
269 ms |
610748 KB |
Output is correct |
2 |
Correct |
254 ms |
610868 KB |
Output is correct |
3 |
Correct |
261 ms |
610768 KB |
Output is correct |
4 |
Correct |
261 ms |
610844 KB |
Output is correct |
5 |
Correct |
270 ms |
610888 KB |
Output is correct |
6 |
Correct |
248 ms |
610820 KB |
Output is correct |
7 |
Correct |
253 ms |
610860 KB |
Output is correct |
8 |
Correct |
254 ms |
610948 KB |
Output is correct |
9 |
Correct |
248 ms |
610852 KB |
Output is correct |
10 |
Correct |
248 ms |
610848 KB |
Output is correct |
11 |
Correct |
256 ms |
610876 KB |
Output is correct |
12 |
Correct |
250 ms |
610836 KB |
Output is correct |
13 |
Correct |
255 ms |
610764 KB |
Output is correct |
14 |
Correct |
249 ms |
610808 KB |
Output is correct |
15 |
Correct |
269 ms |
610800 KB |
Output is correct |
16 |
Correct |
266 ms |
610876 KB |
Output is correct |
17 |
Correct |
258 ms |
610888 KB |
Output is correct |
18 |
Correct |
252 ms |
610804 KB |
Output is correct |
19 |
Correct |
271 ms |
611820 KB |
Output is correct |
20 |
Correct |
267 ms |
612780 KB |
Output is correct |
21 |
Correct |
259 ms |
611928 KB |
Output is correct |
22 |
Correct |
270 ms |
611708 KB |
Output is correct |
23 |
Correct |
270 ms |
611592 KB |
Output is correct |
24 |
Correct |
265 ms |
613284 KB |
Output is correct |
25 |
Correct |
257 ms |
613268 KB |
Output is correct |
26 |
Correct |
257 ms |
611728 KB |
Output is correct |
27 |
Correct |
254 ms |
611788 KB |
Output is correct |
28 |
Correct |
257 ms |
611632 KB |
Output is correct |
29 |
Correct |
296 ms |
613088 KB |
Output is correct |
30 |
Correct |
267 ms |
612608 KB |
Output is correct |
31 |
Correct |
281 ms |
613104 KB |
Output is correct |
32 |
Correct |
288 ms |
612964 KB |
Output is correct |
33 |
Correct |
311 ms |
612956 KB |
Output is correct |
34 |
Correct |
273 ms |
617036 KB |
Output is correct |
35 |
Correct |
311 ms |
617048 KB |
Output is correct |
36 |
Correct |
332 ms |
613016 KB |
Output is correct |
37 |
Correct |
297 ms |
613068 KB |
Output is correct |
38 |
Correct |
255 ms |
612848 KB |
Output is correct |
39 |
Correct |
777 ms |
631016 KB |
Output is correct |
40 |
Correct |
266 ms |
613368 KB |
Output is correct |
41 |
Correct |
281 ms |
618352 KB |
Output is correct |
42 |
Correct |
314 ms |
613836 KB |
Output is correct |
43 |
Correct |
294 ms |
616932 KB |
Output is correct |
44 |
Correct |
341 ms |
623968 KB |
Output is correct |
45 |
Correct |
334 ms |
623692 KB |
Output is correct |
46 |
Correct |
488 ms |
637248 KB |
Output is correct |
47 |
Correct |
596 ms |
631036 KB |
Output is correct |
48 |
Correct |
629 ms |
631004 KB |
Output is correct |
49 |
Correct |
681 ms |
672108 KB |
Output is correct |
50 |
Correct |
544 ms |
672036 KB |
Output is correct |
51 |
Correct |
548 ms |
631252 KB |
Output is correct |
52 |
Correct |
461 ms |
631076 KB |
Output is correct |
53 |
Correct |
652 ms |
631044 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
252 ms |
610872 KB |
Output is correct |
2 |
Correct |
258 ms |
610796 KB |
Output is correct |
3 |
Correct |
253 ms |
610872 KB |
Output is correct |
4 |
Correct |
265 ms |
610756 KB |
Output is correct |
5 |
Correct |
259 ms |
610908 KB |
Output is correct |
6 |
Correct |
257 ms |
610756 KB |
Output is correct |
7 |
Correct |
252 ms |
610764 KB |
Output is correct |
8 |
Correct |
257 ms |
610968 KB |
Output is correct |
9 |
Correct |
250 ms |
610844 KB |
Output is correct |
10 |
Correct |
254 ms |
610952 KB |
Output is correct |
11 |
Correct |
275 ms |
610888 KB |
Output is correct |
12 |
Correct |
257 ms |
610856 KB |
Output is correct |
13 |
Correct |
259 ms |
610840 KB |
Output is correct |
14 |
Correct |
251 ms |
610868 KB |
Output is correct |
15 |
Correct |
251 ms |
610900 KB |
Output is correct |
16 |
Correct |
249 ms |
611032 KB |
Output is correct |
17 |
Correct |
276 ms |
610888 KB |
Output is correct |
18 |
Correct |
419 ms |
610820 KB |
Output is correct |
19 |
Correct |
253 ms |
610888 KB |
Output is correct |
20 |
Correct |
250 ms |
610872 KB |
Output is correct |
21 |
Correct |
259 ms |
610892 KB |
Output is correct |
22 |
Correct |
259 ms |
610880 KB |
Output is correct |
23 |
Correct |
248 ms |
610784 KB |
Output is correct |
24 |
Correct |
258 ms |
610976 KB |
Output is correct |
25 |
Correct |
245 ms |
610868 KB |
Output is correct |
26 |
Correct |
259 ms |
610876 KB |
Output is correct |
27 |
Correct |
246 ms |
610848 KB |
Output is correct |
28 |
Correct |
248 ms |
610880 KB |
Output is correct |
29 |
Correct |
286 ms |
610764 KB |
Output is correct |
30 |
Correct |
246 ms |
610884 KB |
Output is correct |
31 |
Correct |
266 ms |
610768 KB |
Output is correct |
32 |
Correct |
252 ms |
610800 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
256 ms |
610936 KB |
Output is correct |
2 |
Correct |
244 ms |
610832 KB |
Output is correct |
3 |
Correct |
260 ms |
611080 KB |
Output is correct |
4 |
Correct |
247 ms |
610860 KB |
Output is correct |
5 |
Correct |
249 ms |
610872 KB |
Output is correct |
6 |
Correct |
252 ms |
610876 KB |
Output is correct |
7 |
Correct |
247 ms |
610892 KB |
Output is correct |
8 |
Correct |
247 ms |
610772 KB |
Output is correct |
9 |
Correct |
250 ms |
610772 KB |
Output is correct |
10 |
Correct |
252 ms |
610768 KB |
Output is correct |
11 |
Correct |
254 ms |
610884 KB |
Output is correct |
12 |
Correct |
249 ms |
610912 KB |
Output is correct |
13 |
Correct |
263 ms |
610932 KB |
Output is correct |
14 |
Correct |
248 ms |
610804 KB |
Output is correct |
15 |
Correct |
256 ms |
610756 KB |
Output is correct |
16 |
Correct |
259 ms |
610796 KB |
Output is correct |
17 |
Correct |
248 ms |
610868 KB |
Output is correct |
18 |
Correct |
253 ms |
610860 KB |
Output is correct |
19 |
Correct |
272 ms |
610868 KB |
Output is correct |
20 |
Correct |
270 ms |
610876 KB |
Output is correct |
21 |
Correct |
267 ms |
610884 KB |
Output is correct |
22 |
Correct |
268 ms |
610852 KB |
Output is correct |
23 |
Correct |
261 ms |
610892 KB |
Output is correct |
24 |
Correct |
250 ms |
610920 KB |
Output is correct |
25 |
Correct |
250 ms |
611416 KB |
Output is correct |
26 |
Correct |
257 ms |
611944 KB |
Output is correct |
27 |
Correct |
263 ms |
611960 KB |
Output is correct |
28 |
Correct |
256 ms |
611712 KB |
Output is correct |
29 |
Correct |
249 ms |
611660 KB |
Output is correct |
30 |
Correct |
258 ms |
611704 KB |
Output is correct |
31 |
Correct |
254 ms |
611896 KB |
Output is correct |
32 |
Correct |
251 ms |
611644 KB |
Output is correct |
33 |
Correct |
248 ms |
611616 KB |
Output is correct |
34 |
Correct |
268 ms |
613700 KB |
Output is correct |
35 |
Correct |
252 ms |
613080 KB |
Output is correct |
36 |
Correct |
262 ms |
613620 KB |
Output is correct |
37 |
Correct |
253 ms |
612912 KB |
Output is correct |
38 |
Correct |
253 ms |
612904 KB |
Output is correct |
39 |
Correct |
321 ms |
620920 KB |
Output is correct |
40 |
Correct |
393 ms |
639276 KB |
Output is correct |
41 |
Correct |
490 ms |
637272 KB |
Output is correct |
42 |
Correct |
347 ms |
641312 KB |
Output is correct |
43 |
Correct |
267 ms |
631040 KB |
Output is correct |
44 |
Correct |
263 ms |
630956 KB |
Output is correct |
45 |
Correct |
388 ms |
641724 KB |
Output is correct |
46 |
Correct |
409 ms |
643756 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
252 ms |
610872 KB |
Output is correct |
2 |
Correct |
258 ms |
610796 KB |
Output is correct |
3 |
Correct |
253 ms |
610872 KB |
Output is correct |
4 |
Correct |
265 ms |
610756 KB |
Output is correct |
5 |
Correct |
259 ms |
610908 KB |
Output is correct |
6 |
Correct |
257 ms |
610756 KB |
Output is correct |
7 |
Correct |
252 ms |
610764 KB |
Output is correct |
8 |
Correct |
257 ms |
610968 KB |
Output is correct |
9 |
Correct |
250 ms |
610844 KB |
Output is correct |
10 |
Correct |
254 ms |
610952 KB |
Output is correct |
11 |
Correct |
275 ms |
610888 KB |
Output is correct |
12 |
Correct |
257 ms |
610856 KB |
Output is correct |
13 |
Correct |
259 ms |
610840 KB |
Output is correct |
14 |
Correct |
251 ms |
610868 KB |
Output is correct |
15 |
Correct |
251 ms |
610900 KB |
Output is correct |
16 |
Correct |
249 ms |
611032 KB |
Output is correct |
17 |
Correct |
276 ms |
610888 KB |
Output is correct |
18 |
Correct |
419 ms |
610820 KB |
Output is correct |
19 |
Correct |
253 ms |
610888 KB |
Output is correct |
20 |
Correct |
250 ms |
610872 KB |
Output is correct |
21 |
Correct |
259 ms |
610892 KB |
Output is correct |
22 |
Correct |
259 ms |
610880 KB |
Output is correct |
23 |
Correct |
248 ms |
610784 KB |
Output is correct |
24 |
Correct |
258 ms |
610976 KB |
Output is correct |
25 |
Correct |
245 ms |
610868 KB |
Output is correct |
26 |
Correct |
259 ms |
610876 KB |
Output is correct |
27 |
Correct |
246 ms |
610848 KB |
Output is correct |
28 |
Correct |
248 ms |
610880 KB |
Output is correct |
29 |
Correct |
286 ms |
610764 KB |
Output is correct |
30 |
Correct |
246 ms |
610884 KB |
Output is correct |
31 |
Correct |
266 ms |
610768 KB |
Output is correct |
32 |
Correct |
252 ms |
610800 KB |
Output is correct |
33 |
Correct |
264 ms |
611704 KB |
Output is correct |
34 |
Correct |
261 ms |
610928 KB |
Output is correct |
35 |
Correct |
249 ms |
610892 KB |
Output is correct |
36 |
Correct |
249 ms |
611408 KB |
Output is correct |
37 |
Correct |
256 ms |
612680 KB |
Output is correct |
38 |
Correct |
261 ms |
611896 KB |
Output is correct |
39 |
Correct |
258 ms |
611916 KB |
Output is correct |
40 |
Correct |
264 ms |
611644 KB |
Output is correct |
41 |
Correct |
261 ms |
611708 KB |
Output is correct |
42 |
Correct |
249 ms |
611764 KB |
Output is correct |
43 |
Correct |
278 ms |
611692 KB |
Output is correct |
44 |
Correct |
246 ms |
611624 KB |
Output is correct |
45 |
Correct |
288 ms |
613304 KB |
Output is correct |
46 |
Correct |
255 ms |
613356 KB |
Output is correct |
47 |
Correct |
262 ms |
612376 KB |
Output is correct |
48 |
Correct |
268 ms |
611752 KB |
Output is correct |
49 |
Correct |
255 ms |
611688 KB |
Output is correct |
50 |
Correct |
268 ms |
611756 KB |
Output is correct |
51 |
Correct |
274 ms |
611696 KB |
Output is correct |
52 |
Correct |
253 ms |
611724 KB |
Output is correct |
53 |
Correct |
245 ms |
611708 KB |
Output is correct |
54 |
Correct |
258 ms |
611632 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
252 ms |
610872 KB |
Output is correct |
2 |
Correct |
258 ms |
610796 KB |
Output is correct |
3 |
Correct |
253 ms |
610872 KB |
Output is correct |
4 |
Correct |
265 ms |
610756 KB |
Output is correct |
5 |
Correct |
259 ms |
610908 KB |
Output is correct |
6 |
Correct |
257 ms |
610756 KB |
Output is correct |
7 |
Correct |
252 ms |
610764 KB |
Output is correct |
8 |
Correct |
257 ms |
610968 KB |
Output is correct |
9 |
Correct |
250 ms |
610844 KB |
Output is correct |
10 |
Correct |
254 ms |
610952 KB |
Output is correct |
11 |
Correct |
275 ms |
610888 KB |
Output is correct |
12 |
Correct |
257 ms |
610856 KB |
Output is correct |
13 |
Correct |
259 ms |
610840 KB |
Output is correct |
14 |
Correct |
251 ms |
610868 KB |
Output is correct |
15 |
Correct |
251 ms |
610900 KB |
Output is correct |
16 |
Correct |
249 ms |
611032 KB |
Output is correct |
17 |
Correct |
276 ms |
610888 KB |
Output is correct |
18 |
Correct |
419 ms |
610820 KB |
Output is correct |
19 |
Correct |
253 ms |
610888 KB |
Output is correct |
20 |
Correct |
250 ms |
610872 KB |
Output is correct |
21 |
Correct |
259 ms |
610892 KB |
Output is correct |
22 |
Correct |
259 ms |
610880 KB |
Output is correct |
23 |
Correct |
248 ms |
610784 KB |
Output is correct |
24 |
Correct |
258 ms |
610976 KB |
Output is correct |
25 |
Correct |
245 ms |
610868 KB |
Output is correct |
26 |
Correct |
259 ms |
610876 KB |
Output is correct |
27 |
Correct |
246 ms |
610848 KB |
Output is correct |
28 |
Correct |
248 ms |
610880 KB |
Output is correct |
29 |
Correct |
286 ms |
610764 KB |
Output is correct |
30 |
Correct |
246 ms |
610884 KB |
Output is correct |
31 |
Correct |
266 ms |
610768 KB |
Output is correct |
32 |
Correct |
252 ms |
610800 KB |
Output is correct |
33 |
Correct |
264 ms |
611704 KB |
Output is correct |
34 |
Correct |
261 ms |
610928 KB |
Output is correct |
35 |
Correct |
249 ms |
610892 KB |
Output is correct |
36 |
Correct |
249 ms |
611408 KB |
Output is correct |
37 |
Correct |
256 ms |
612680 KB |
Output is correct |
38 |
Correct |
261 ms |
611896 KB |
Output is correct |
39 |
Correct |
258 ms |
611916 KB |
Output is correct |
40 |
Correct |
264 ms |
611644 KB |
Output is correct |
41 |
Correct |
261 ms |
611708 KB |
Output is correct |
42 |
Correct |
249 ms |
611764 KB |
Output is correct |
43 |
Correct |
278 ms |
611692 KB |
Output is correct |
44 |
Correct |
246 ms |
611624 KB |
Output is correct |
45 |
Correct |
288 ms |
613304 KB |
Output is correct |
46 |
Correct |
255 ms |
613356 KB |
Output is correct |
47 |
Correct |
262 ms |
612376 KB |
Output is correct |
48 |
Correct |
268 ms |
611752 KB |
Output is correct |
49 |
Correct |
255 ms |
611688 KB |
Output is correct |
50 |
Correct |
268 ms |
611756 KB |
Output is correct |
51 |
Correct |
274 ms |
611696 KB |
Output is correct |
52 |
Correct |
253 ms |
611724 KB |
Output is correct |
53 |
Correct |
245 ms |
611708 KB |
Output is correct |
54 |
Correct |
258 ms |
611632 KB |
Output is correct |
55 |
Correct |
288 ms |
612964 KB |
Output is correct |
56 |
Correct |
270 ms |
612436 KB |
Output is correct |
57 |
Correct |
270 ms |
613724 KB |
Output is correct |
58 |
Correct |
276 ms |
612864 KB |
Output is correct |
59 |
Correct |
281 ms |
613224 KB |
Output is correct |
60 |
Correct |
294 ms |
613000 KB |
Output is correct |
61 |
Correct |
308 ms |
612844 KB |
Output is correct |
62 |
Correct |
279 ms |
613564 KB |
Output is correct |
63 |
Correct |
434 ms |
612968 KB |
Output is correct |
64 |
Correct |
263 ms |
613008 KB |
Output is correct |
65 |
Correct |
277 ms |
616980 KB |
Output is correct |
66 |
Correct |
300 ms |
617036 KB |
Output is correct |
67 |
Correct |
276 ms |
614620 KB |
Output is correct |
68 |
Correct |
270 ms |
613028 KB |
Output is correct |
69 |
Correct |
273 ms |
613052 KB |
Output is correct |
70 |
Correct |
278 ms |
613012 KB |
Output is correct |
71 |
Correct |
268 ms |
613204 KB |
Output is correct |
72 |
Correct |
272 ms |
613020 KB |
Output is correct |
73 |
Correct |
280 ms |
612992 KB |
Output is correct |
74 |
Correct |
261 ms |
613076 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
269 ms |
610748 KB |
Output is correct |
2 |
Correct |
254 ms |
610868 KB |
Output is correct |
3 |
Correct |
261 ms |
610768 KB |
Output is correct |
4 |
Correct |
261 ms |
610844 KB |
Output is correct |
5 |
Correct |
270 ms |
610888 KB |
Output is correct |
6 |
Correct |
248 ms |
610820 KB |
Output is correct |
7 |
Correct |
253 ms |
610860 KB |
Output is correct |
8 |
Correct |
254 ms |
610948 KB |
Output is correct |
9 |
Correct |
248 ms |
610852 KB |
Output is correct |
10 |
Correct |
248 ms |
610848 KB |
Output is correct |
11 |
Correct |
256 ms |
610876 KB |
Output is correct |
12 |
Correct |
250 ms |
610836 KB |
Output is correct |
13 |
Correct |
255 ms |
610764 KB |
Output is correct |
14 |
Correct |
249 ms |
610808 KB |
Output is correct |
15 |
Correct |
269 ms |
610800 KB |
Output is correct |
16 |
Correct |
266 ms |
610876 KB |
Output is correct |
17 |
Correct |
258 ms |
610888 KB |
Output is correct |
18 |
Correct |
252 ms |
610804 KB |
Output is correct |
19 |
Correct |
271 ms |
611820 KB |
Output is correct |
20 |
Correct |
267 ms |
612780 KB |
Output is correct |
21 |
Correct |
259 ms |
611928 KB |
Output is correct |
22 |
Correct |
270 ms |
611708 KB |
Output is correct |
23 |
Correct |
270 ms |
611592 KB |
Output is correct |
24 |
Correct |
265 ms |
613284 KB |
Output is correct |
25 |
Correct |
257 ms |
613268 KB |
Output is correct |
26 |
Correct |
257 ms |
611728 KB |
Output is correct |
27 |
Correct |
254 ms |
611788 KB |
Output is correct |
28 |
Correct |
257 ms |
611632 KB |
Output is correct |
29 |
Correct |
296 ms |
613088 KB |
Output is correct |
30 |
Correct |
267 ms |
612608 KB |
Output is correct |
31 |
Correct |
281 ms |
613104 KB |
Output is correct |
32 |
Correct |
288 ms |
612964 KB |
Output is correct |
33 |
Correct |
311 ms |
612956 KB |
Output is correct |
34 |
Correct |
273 ms |
617036 KB |
Output is correct |
35 |
Correct |
311 ms |
617048 KB |
Output is correct |
36 |
Correct |
332 ms |
613016 KB |
Output is correct |
37 |
Correct |
297 ms |
613068 KB |
Output is correct |
38 |
Correct |
255 ms |
612848 KB |
Output is correct |
39 |
Correct |
777 ms |
631016 KB |
Output is correct |
40 |
Correct |
266 ms |
613368 KB |
Output is correct |
41 |
Correct |
281 ms |
618352 KB |
Output is correct |
42 |
Correct |
314 ms |
613836 KB |
Output is correct |
43 |
Correct |
294 ms |
616932 KB |
Output is correct |
44 |
Correct |
341 ms |
623968 KB |
Output is correct |
45 |
Correct |
334 ms |
623692 KB |
Output is correct |
46 |
Correct |
488 ms |
637248 KB |
Output is correct |
47 |
Correct |
596 ms |
631036 KB |
Output is correct |
48 |
Correct |
629 ms |
631004 KB |
Output is correct |
49 |
Correct |
681 ms |
672108 KB |
Output is correct |
50 |
Correct |
544 ms |
672036 KB |
Output is correct |
51 |
Correct |
548 ms |
631252 KB |
Output is correct |
52 |
Correct |
461 ms |
631076 KB |
Output is correct |
53 |
Correct |
652 ms |
631044 KB |
Output is correct |
54 |
Correct |
252 ms |
610872 KB |
Output is correct |
55 |
Correct |
258 ms |
610796 KB |
Output is correct |
56 |
Correct |
253 ms |
610872 KB |
Output is correct |
57 |
Correct |
265 ms |
610756 KB |
Output is correct |
58 |
Correct |
259 ms |
610908 KB |
Output is correct |
59 |
Correct |
257 ms |
610756 KB |
Output is correct |
60 |
Correct |
252 ms |
610764 KB |
Output is correct |
61 |
Correct |
257 ms |
610968 KB |
Output is correct |
62 |
Correct |
250 ms |
610844 KB |
Output is correct |
63 |
Correct |
254 ms |
610952 KB |
Output is correct |
64 |
Correct |
275 ms |
610888 KB |
Output is correct |
65 |
Correct |
257 ms |
610856 KB |
Output is correct |
66 |
Correct |
259 ms |
610840 KB |
Output is correct |
67 |
Correct |
251 ms |
610868 KB |
Output is correct |
68 |
Correct |
251 ms |
610900 KB |
Output is correct |
69 |
Correct |
249 ms |
611032 KB |
Output is correct |
70 |
Correct |
276 ms |
610888 KB |
Output is correct |
71 |
Correct |
419 ms |
610820 KB |
Output is correct |
72 |
Correct |
253 ms |
610888 KB |
Output is correct |
73 |
Correct |
250 ms |
610872 KB |
Output is correct |
74 |
Correct |
259 ms |
610892 KB |
Output is correct |
75 |
Correct |
259 ms |
610880 KB |
Output is correct |
76 |
Correct |
248 ms |
610784 KB |
Output is correct |
77 |
Correct |
258 ms |
610976 KB |
Output is correct |
78 |
Correct |
245 ms |
610868 KB |
Output is correct |
79 |
Correct |
259 ms |
610876 KB |
Output is correct |
80 |
Correct |
246 ms |
610848 KB |
Output is correct |
81 |
Correct |
248 ms |
610880 KB |
Output is correct |
82 |
Correct |
286 ms |
610764 KB |
Output is correct |
83 |
Correct |
246 ms |
610884 KB |
Output is correct |
84 |
Correct |
266 ms |
610768 KB |
Output is correct |
85 |
Correct |
252 ms |
610800 KB |
Output is correct |
86 |
Correct |
256 ms |
610936 KB |
Output is correct |
87 |
Correct |
244 ms |
610832 KB |
Output is correct |
88 |
Correct |
260 ms |
611080 KB |
Output is correct |
89 |
Correct |
247 ms |
610860 KB |
Output is correct |
90 |
Correct |
249 ms |
610872 KB |
Output is correct |
91 |
Correct |
252 ms |
610876 KB |
Output is correct |
92 |
Correct |
247 ms |
610892 KB |
Output is correct |
93 |
Correct |
247 ms |
610772 KB |
Output is correct |
94 |
Correct |
250 ms |
610772 KB |
Output is correct |
95 |
Correct |
252 ms |
610768 KB |
Output is correct |
96 |
Correct |
254 ms |
610884 KB |
Output is correct |
97 |
Correct |
249 ms |
610912 KB |
Output is correct |
98 |
Correct |
263 ms |
610932 KB |
Output is correct |
99 |
Correct |
248 ms |
610804 KB |
Output is correct |
100 |
Correct |
256 ms |
610756 KB |
Output is correct |
101 |
Correct |
259 ms |
610796 KB |
Output is correct |
102 |
Correct |
248 ms |
610868 KB |
Output is correct |
103 |
Correct |
253 ms |
610860 KB |
Output is correct |
104 |
Correct |
272 ms |
610868 KB |
Output is correct |
105 |
Correct |
270 ms |
610876 KB |
Output is correct |
106 |
Correct |
267 ms |
610884 KB |
Output is correct |
107 |
Correct |
268 ms |
610852 KB |
Output is correct |
108 |
Correct |
261 ms |
610892 KB |
Output is correct |
109 |
Correct |
250 ms |
610920 KB |
Output is correct |
110 |
Correct |
250 ms |
611416 KB |
Output is correct |
111 |
Correct |
257 ms |
611944 KB |
Output is correct |
112 |
Correct |
263 ms |
611960 KB |
Output is correct |
113 |
Correct |
256 ms |
611712 KB |
Output is correct |
114 |
Correct |
249 ms |
611660 KB |
Output is correct |
115 |
Correct |
258 ms |
611704 KB |
Output is correct |
116 |
Correct |
254 ms |
611896 KB |
Output is correct |
117 |
Correct |
251 ms |
611644 KB |
Output is correct |
118 |
Correct |
248 ms |
611616 KB |
Output is correct |
119 |
Correct |
268 ms |
613700 KB |
Output is correct |
120 |
Correct |
252 ms |
613080 KB |
Output is correct |
121 |
Correct |
262 ms |
613620 KB |
Output is correct |
122 |
Correct |
253 ms |
612912 KB |
Output is correct |
123 |
Correct |
253 ms |
612904 KB |
Output is correct |
124 |
Correct |
321 ms |
620920 KB |
Output is correct |
125 |
Correct |
393 ms |
639276 KB |
Output is correct |
126 |
Correct |
490 ms |
637272 KB |
Output is correct |
127 |
Correct |
347 ms |
641312 KB |
Output is correct |
128 |
Correct |
267 ms |
631040 KB |
Output is correct |
129 |
Correct |
263 ms |
630956 KB |
Output is correct |
130 |
Correct |
388 ms |
641724 KB |
Output is correct |
131 |
Correct |
409 ms |
643756 KB |
Output is correct |
132 |
Correct |
264 ms |
611704 KB |
Output is correct |
133 |
Correct |
261 ms |
610928 KB |
Output is correct |
134 |
Correct |
249 ms |
610892 KB |
Output is correct |
135 |
Correct |
249 ms |
611408 KB |
Output is correct |
136 |
Correct |
256 ms |
612680 KB |
Output is correct |
137 |
Correct |
261 ms |
611896 KB |
Output is correct |
138 |
Correct |
258 ms |
611916 KB |
Output is correct |
139 |
Correct |
264 ms |
611644 KB |
Output is correct |
140 |
Correct |
261 ms |
611708 KB |
Output is correct |
141 |
Correct |
249 ms |
611764 KB |
Output is correct |
142 |
Correct |
278 ms |
611692 KB |
Output is correct |
143 |
Correct |
246 ms |
611624 KB |
Output is correct |
144 |
Correct |
288 ms |
613304 KB |
Output is correct |
145 |
Correct |
255 ms |
613356 KB |
Output is correct |
146 |
Correct |
262 ms |
612376 KB |
Output is correct |
147 |
Correct |
268 ms |
611752 KB |
Output is correct |
148 |
Correct |
255 ms |
611688 KB |
Output is correct |
149 |
Correct |
268 ms |
611756 KB |
Output is correct |
150 |
Correct |
274 ms |
611696 KB |
Output is correct |
151 |
Correct |
253 ms |
611724 KB |
Output is correct |
152 |
Correct |
245 ms |
611708 KB |
Output is correct |
153 |
Correct |
258 ms |
611632 KB |
Output is correct |
154 |
Correct |
288 ms |
612964 KB |
Output is correct |
155 |
Correct |
270 ms |
612436 KB |
Output is correct |
156 |
Correct |
270 ms |
613724 KB |
Output is correct |
157 |
Correct |
276 ms |
612864 KB |
Output is correct |
158 |
Correct |
281 ms |
613224 KB |
Output is correct |
159 |
Correct |
294 ms |
613000 KB |
Output is correct |
160 |
Correct |
308 ms |
612844 KB |
Output is correct |
161 |
Correct |
279 ms |
613564 KB |
Output is correct |
162 |
Correct |
434 ms |
612968 KB |
Output is correct |
163 |
Correct |
263 ms |
613008 KB |
Output is correct |
164 |
Correct |
277 ms |
616980 KB |
Output is correct |
165 |
Correct |
300 ms |
617036 KB |
Output is correct |
166 |
Correct |
276 ms |
614620 KB |
Output is correct |
167 |
Correct |
270 ms |
613028 KB |
Output is correct |
168 |
Correct |
273 ms |
613052 KB |
Output is correct |
169 |
Correct |
278 ms |
613012 KB |
Output is correct |
170 |
Correct |
268 ms |
613204 KB |
Output is correct |
171 |
Correct |
272 ms |
613020 KB |
Output is correct |
172 |
Correct |
280 ms |
612992 KB |
Output is correct |
173 |
Correct |
261 ms |
613076 KB |
Output is correct |
174 |
Correct |
265 ms |
613628 KB |
Output is correct |
175 |
Correct |
312 ms |
615504 KB |
Output is correct |
176 |
Correct |
326 ms |
626324 KB |
Output is correct |
177 |
Correct |
452 ms |
625732 KB |
Output is correct |
178 |
Correct |
285 ms |
629064 KB |
Output is correct |
179 |
Correct |
381 ms |
631540 KB |
Output is correct |
180 |
Correct |
481 ms |
631508 KB |
Output is correct |
181 |
Correct |
484 ms |
631792 KB |
Output is correct |
182 |
Correct |
492 ms |
632504 KB |
Output is correct |
183 |
Correct |
610 ms |
633320 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
269 ms |
610748 KB |
Output is correct |
2 |
Correct |
254 ms |
610868 KB |
Output is correct |
3 |
Correct |
261 ms |
610768 KB |
Output is correct |
4 |
Correct |
261 ms |
610844 KB |
Output is correct |
5 |
Correct |
270 ms |
610888 KB |
Output is correct |
6 |
Correct |
248 ms |
610820 KB |
Output is correct |
7 |
Correct |
253 ms |
610860 KB |
Output is correct |
8 |
Correct |
254 ms |
610948 KB |
Output is correct |
9 |
Correct |
248 ms |
610852 KB |
Output is correct |
10 |
Correct |
248 ms |
610848 KB |
Output is correct |
11 |
Correct |
256 ms |
610876 KB |
Output is correct |
12 |
Correct |
250 ms |
610836 KB |
Output is correct |
13 |
Correct |
255 ms |
610764 KB |
Output is correct |
14 |
Correct |
249 ms |
610808 KB |
Output is correct |
15 |
Correct |
269 ms |
610800 KB |
Output is correct |
16 |
Correct |
266 ms |
610876 KB |
Output is correct |
17 |
Correct |
258 ms |
610888 KB |
Output is correct |
18 |
Correct |
252 ms |
610804 KB |
Output is correct |
19 |
Correct |
271 ms |
611820 KB |
Output is correct |
20 |
Correct |
267 ms |
612780 KB |
Output is correct |
21 |
Correct |
259 ms |
611928 KB |
Output is correct |
22 |
Correct |
270 ms |
611708 KB |
Output is correct |
23 |
Correct |
270 ms |
611592 KB |
Output is correct |
24 |
Correct |
265 ms |
613284 KB |
Output is correct |
25 |
Correct |
257 ms |
613268 KB |
Output is correct |
26 |
Correct |
257 ms |
611728 KB |
Output is correct |
27 |
Correct |
254 ms |
611788 KB |
Output is correct |
28 |
Correct |
257 ms |
611632 KB |
Output is correct |
29 |
Correct |
296 ms |
613088 KB |
Output is correct |
30 |
Correct |
267 ms |
612608 KB |
Output is correct |
31 |
Correct |
281 ms |
613104 KB |
Output is correct |
32 |
Correct |
288 ms |
612964 KB |
Output is correct |
33 |
Correct |
311 ms |
612956 KB |
Output is correct |
34 |
Correct |
273 ms |
617036 KB |
Output is correct |
35 |
Correct |
311 ms |
617048 KB |
Output is correct |
36 |
Correct |
332 ms |
613016 KB |
Output is correct |
37 |
Correct |
297 ms |
613068 KB |
Output is correct |
38 |
Correct |
255 ms |
612848 KB |
Output is correct |
39 |
Correct |
777 ms |
631016 KB |
Output is correct |
40 |
Correct |
266 ms |
613368 KB |
Output is correct |
41 |
Correct |
281 ms |
618352 KB |
Output is correct |
42 |
Correct |
314 ms |
613836 KB |
Output is correct |
43 |
Correct |
294 ms |
616932 KB |
Output is correct |
44 |
Correct |
341 ms |
623968 KB |
Output is correct |
45 |
Correct |
334 ms |
623692 KB |
Output is correct |
46 |
Correct |
488 ms |
637248 KB |
Output is correct |
47 |
Correct |
596 ms |
631036 KB |
Output is correct |
48 |
Correct |
629 ms |
631004 KB |
Output is correct |
49 |
Correct |
681 ms |
672108 KB |
Output is correct |
50 |
Correct |
544 ms |
672036 KB |
Output is correct |
51 |
Correct |
548 ms |
631252 KB |
Output is correct |
52 |
Correct |
461 ms |
631076 KB |
Output is correct |
53 |
Correct |
652 ms |
631044 KB |
Output is correct |
54 |
Correct |
252 ms |
610872 KB |
Output is correct |
55 |
Correct |
258 ms |
610796 KB |
Output is correct |
56 |
Correct |
253 ms |
610872 KB |
Output is correct |
57 |
Correct |
265 ms |
610756 KB |
Output is correct |
58 |
Correct |
259 ms |
610908 KB |
Output is correct |
59 |
Correct |
257 ms |
610756 KB |
Output is correct |
60 |
Correct |
252 ms |
610764 KB |
Output is correct |
61 |
Correct |
257 ms |
610968 KB |
Output is correct |
62 |
Correct |
250 ms |
610844 KB |
Output is correct |
63 |
Correct |
254 ms |
610952 KB |
Output is correct |
64 |
Correct |
275 ms |
610888 KB |
Output is correct |
65 |
Correct |
257 ms |
610856 KB |
Output is correct |
66 |
Correct |
259 ms |
610840 KB |
Output is correct |
67 |
Correct |
251 ms |
610868 KB |
Output is correct |
68 |
Correct |
251 ms |
610900 KB |
Output is correct |
69 |
Correct |
249 ms |
611032 KB |
Output is correct |
70 |
Correct |
276 ms |
610888 KB |
Output is correct |
71 |
Correct |
419 ms |
610820 KB |
Output is correct |
72 |
Correct |
253 ms |
610888 KB |
Output is correct |
73 |
Correct |
250 ms |
610872 KB |
Output is correct |
74 |
Correct |
259 ms |
610892 KB |
Output is correct |
75 |
Correct |
259 ms |
610880 KB |
Output is correct |
76 |
Correct |
248 ms |
610784 KB |
Output is correct |
77 |
Correct |
258 ms |
610976 KB |
Output is correct |
78 |
Correct |
245 ms |
610868 KB |
Output is correct |
79 |
Correct |
259 ms |
610876 KB |
Output is correct |
80 |
Correct |
246 ms |
610848 KB |
Output is correct |
81 |
Correct |
248 ms |
610880 KB |
Output is correct |
82 |
Correct |
286 ms |
610764 KB |
Output is correct |
83 |
Correct |
246 ms |
610884 KB |
Output is correct |
84 |
Correct |
266 ms |
610768 KB |
Output is correct |
85 |
Correct |
252 ms |
610800 KB |
Output is correct |
86 |
Correct |
256 ms |
610936 KB |
Output is correct |
87 |
Correct |
244 ms |
610832 KB |
Output is correct |
88 |
Correct |
260 ms |
611080 KB |
Output is correct |
89 |
Correct |
247 ms |
610860 KB |
Output is correct |
90 |
Correct |
249 ms |
610872 KB |
Output is correct |
91 |
Correct |
252 ms |
610876 KB |
Output is correct |
92 |
Correct |
247 ms |
610892 KB |
Output is correct |
93 |
Correct |
247 ms |
610772 KB |
Output is correct |
94 |
Correct |
250 ms |
610772 KB |
Output is correct |
95 |
Correct |
252 ms |
610768 KB |
Output is correct |
96 |
Correct |
254 ms |
610884 KB |
Output is correct |
97 |
Correct |
249 ms |
610912 KB |
Output is correct |
98 |
Correct |
263 ms |
610932 KB |
Output is correct |
99 |
Correct |
248 ms |
610804 KB |
Output is correct |
100 |
Correct |
256 ms |
610756 KB |
Output is correct |
101 |
Correct |
259 ms |
610796 KB |
Output is correct |
102 |
Correct |
248 ms |
610868 KB |
Output is correct |
103 |
Correct |
253 ms |
610860 KB |
Output is correct |
104 |
Correct |
272 ms |
610868 KB |
Output is correct |
105 |
Correct |
270 ms |
610876 KB |
Output is correct |
106 |
Correct |
267 ms |
610884 KB |
Output is correct |
107 |
Correct |
268 ms |
610852 KB |
Output is correct |
108 |
Correct |
261 ms |
610892 KB |
Output is correct |
109 |
Correct |
250 ms |
610920 KB |
Output is correct |
110 |
Correct |
250 ms |
611416 KB |
Output is correct |
111 |
Correct |
257 ms |
611944 KB |
Output is correct |
112 |
Correct |
263 ms |
611960 KB |
Output is correct |
113 |
Correct |
256 ms |
611712 KB |
Output is correct |
114 |
Correct |
249 ms |
611660 KB |
Output is correct |
115 |
Correct |
258 ms |
611704 KB |
Output is correct |
116 |
Correct |
254 ms |
611896 KB |
Output is correct |
117 |
Correct |
251 ms |
611644 KB |
Output is correct |
118 |
Correct |
248 ms |
611616 KB |
Output is correct |
119 |
Correct |
268 ms |
613700 KB |
Output is correct |
120 |
Correct |
252 ms |
613080 KB |
Output is correct |
121 |
Correct |
262 ms |
613620 KB |
Output is correct |
122 |
Correct |
253 ms |
612912 KB |
Output is correct |
123 |
Correct |
253 ms |
612904 KB |
Output is correct |
124 |
Correct |
321 ms |
620920 KB |
Output is correct |
125 |
Correct |
393 ms |
639276 KB |
Output is correct |
126 |
Correct |
490 ms |
637272 KB |
Output is correct |
127 |
Correct |
347 ms |
641312 KB |
Output is correct |
128 |
Correct |
267 ms |
631040 KB |
Output is correct |
129 |
Correct |
263 ms |
630956 KB |
Output is correct |
130 |
Correct |
388 ms |
641724 KB |
Output is correct |
131 |
Correct |
409 ms |
643756 KB |
Output is correct |
132 |
Correct |
264 ms |
611704 KB |
Output is correct |
133 |
Correct |
261 ms |
610928 KB |
Output is correct |
134 |
Correct |
249 ms |
610892 KB |
Output is correct |
135 |
Correct |
249 ms |
611408 KB |
Output is correct |
136 |
Correct |
256 ms |
612680 KB |
Output is correct |
137 |
Correct |
261 ms |
611896 KB |
Output is correct |
138 |
Correct |
258 ms |
611916 KB |
Output is correct |
139 |
Correct |
264 ms |
611644 KB |
Output is correct |
140 |
Correct |
261 ms |
611708 KB |
Output is correct |
141 |
Correct |
249 ms |
611764 KB |
Output is correct |
142 |
Correct |
278 ms |
611692 KB |
Output is correct |
143 |
Correct |
246 ms |
611624 KB |
Output is correct |
144 |
Correct |
288 ms |
613304 KB |
Output is correct |
145 |
Correct |
255 ms |
613356 KB |
Output is correct |
146 |
Correct |
262 ms |
612376 KB |
Output is correct |
147 |
Correct |
268 ms |
611752 KB |
Output is correct |
148 |
Correct |
255 ms |
611688 KB |
Output is correct |
149 |
Correct |
268 ms |
611756 KB |
Output is correct |
150 |
Correct |
274 ms |
611696 KB |
Output is correct |
151 |
Correct |
253 ms |
611724 KB |
Output is correct |
152 |
Correct |
245 ms |
611708 KB |
Output is correct |
153 |
Correct |
258 ms |
611632 KB |
Output is correct |
154 |
Correct |
288 ms |
612964 KB |
Output is correct |
155 |
Correct |
270 ms |
612436 KB |
Output is correct |
156 |
Correct |
270 ms |
613724 KB |
Output is correct |
157 |
Correct |
276 ms |
612864 KB |
Output is correct |
158 |
Correct |
281 ms |
613224 KB |
Output is correct |
159 |
Correct |
294 ms |
613000 KB |
Output is correct |
160 |
Correct |
308 ms |
612844 KB |
Output is correct |
161 |
Correct |
279 ms |
613564 KB |
Output is correct |
162 |
Correct |
434 ms |
612968 KB |
Output is correct |
163 |
Correct |
263 ms |
613008 KB |
Output is correct |
164 |
Correct |
277 ms |
616980 KB |
Output is correct |
165 |
Correct |
300 ms |
617036 KB |
Output is correct |
166 |
Correct |
276 ms |
614620 KB |
Output is correct |
167 |
Correct |
270 ms |
613028 KB |
Output is correct |
168 |
Correct |
273 ms |
613052 KB |
Output is correct |
169 |
Correct |
278 ms |
613012 KB |
Output is correct |
170 |
Correct |
268 ms |
613204 KB |
Output is correct |
171 |
Correct |
272 ms |
613020 KB |
Output is correct |
172 |
Correct |
280 ms |
612992 KB |
Output is correct |
173 |
Correct |
261 ms |
613076 KB |
Output is correct |
174 |
Correct |
265 ms |
613628 KB |
Output is correct |
175 |
Correct |
312 ms |
615504 KB |
Output is correct |
176 |
Correct |
326 ms |
626324 KB |
Output is correct |
177 |
Correct |
452 ms |
625732 KB |
Output is correct |
178 |
Correct |
285 ms |
629064 KB |
Output is correct |
179 |
Correct |
381 ms |
631540 KB |
Output is correct |
180 |
Correct |
481 ms |
631508 KB |
Output is correct |
181 |
Correct |
484 ms |
631792 KB |
Output is correct |
182 |
Correct |
492 ms |
632504 KB |
Output is correct |
183 |
Correct |
610 ms |
633320 KB |
Output is correct |
184 |
Correct |
1368 ms |
650244 KB |
Output is correct |
185 |
Correct |
346 ms |
634156 KB |
Output is correct |
186 |
Correct |
554 ms |
650276 KB |
Output is correct |
187 |
Correct |
350 ms |
639872 KB |
Output is correct |
188 |
Correct |
671 ms |
661484 KB |
Output is correct |
189 |
Correct |
975 ms |
650288 KB |
Output is correct |
190 |
Correct |
638 ms |
650236 KB |
Output is correct |
191 |
Correct |
489 ms |
663476 KB |
Output is correct |
192 |
Correct |
287 ms |
650112 KB |
Output is correct |
193 |
Correct |
277 ms |
650088 KB |
Output is correct |
194 |
Correct |
1585 ms |
732236 KB |
Output is correct |
195 |
Correct |
1335 ms |
732216 KB |
Output is correct |
196 |
Correct |
688 ms |
651044 KB |
Output is correct |
197 |
Correct |
494 ms |
651532 KB |
Output is correct |
198 |
Correct |
498 ms |
651316 KB |
Output is correct |
199 |
Correct |
666 ms |
652344 KB |
Output is correct |
200 |
Correct |
583 ms |
650420 KB |
Output is correct |
201 |
Correct |
848 ms |
650316 KB |
Output is correct |
202 |
Correct |
1232 ms |
650168 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
269 ms |
610748 KB |
Output is correct |
2 |
Correct |
254 ms |
610868 KB |
Output is correct |
3 |
Correct |
261 ms |
610768 KB |
Output is correct |
4 |
Correct |
261 ms |
610844 KB |
Output is correct |
5 |
Correct |
270 ms |
610888 KB |
Output is correct |
6 |
Correct |
248 ms |
610820 KB |
Output is correct |
7 |
Correct |
253 ms |
610860 KB |
Output is correct |
8 |
Correct |
254 ms |
610948 KB |
Output is correct |
9 |
Correct |
248 ms |
610852 KB |
Output is correct |
10 |
Correct |
248 ms |
610848 KB |
Output is correct |
11 |
Correct |
256 ms |
610876 KB |
Output is correct |
12 |
Correct |
250 ms |
610836 KB |
Output is correct |
13 |
Correct |
255 ms |
610764 KB |
Output is correct |
14 |
Correct |
249 ms |
610808 KB |
Output is correct |
15 |
Correct |
269 ms |
610800 KB |
Output is correct |
16 |
Correct |
266 ms |
610876 KB |
Output is correct |
17 |
Correct |
258 ms |
610888 KB |
Output is correct |
18 |
Correct |
252 ms |
610804 KB |
Output is correct |
19 |
Correct |
271 ms |
611820 KB |
Output is correct |
20 |
Correct |
267 ms |
612780 KB |
Output is correct |
21 |
Correct |
259 ms |
611928 KB |
Output is correct |
22 |
Correct |
270 ms |
611708 KB |
Output is correct |
23 |
Correct |
270 ms |
611592 KB |
Output is correct |
24 |
Correct |
265 ms |
613284 KB |
Output is correct |
25 |
Correct |
257 ms |
613268 KB |
Output is correct |
26 |
Correct |
257 ms |
611728 KB |
Output is correct |
27 |
Correct |
254 ms |
611788 KB |
Output is correct |
28 |
Correct |
257 ms |
611632 KB |
Output is correct |
29 |
Correct |
296 ms |
613088 KB |
Output is correct |
30 |
Correct |
267 ms |
612608 KB |
Output is correct |
31 |
Correct |
281 ms |
613104 KB |
Output is correct |
32 |
Correct |
288 ms |
612964 KB |
Output is correct |
33 |
Correct |
311 ms |
612956 KB |
Output is correct |
34 |
Correct |
273 ms |
617036 KB |
Output is correct |
35 |
Correct |
311 ms |
617048 KB |
Output is correct |
36 |
Correct |
332 ms |
613016 KB |
Output is correct |
37 |
Correct |
297 ms |
613068 KB |
Output is correct |
38 |
Correct |
255 ms |
612848 KB |
Output is correct |
39 |
Correct |
777 ms |
631016 KB |
Output is correct |
40 |
Correct |
266 ms |
613368 KB |
Output is correct |
41 |
Correct |
281 ms |
618352 KB |
Output is correct |
42 |
Correct |
314 ms |
613836 KB |
Output is correct |
43 |
Correct |
294 ms |
616932 KB |
Output is correct |
44 |
Correct |
341 ms |
623968 KB |
Output is correct |
45 |
Correct |
334 ms |
623692 KB |
Output is correct |
46 |
Correct |
488 ms |
637248 KB |
Output is correct |
47 |
Correct |
596 ms |
631036 KB |
Output is correct |
48 |
Correct |
629 ms |
631004 KB |
Output is correct |
49 |
Correct |
681 ms |
672108 KB |
Output is correct |
50 |
Correct |
544 ms |
672036 KB |
Output is correct |
51 |
Correct |
548 ms |
631252 KB |
Output is correct |
52 |
Correct |
461 ms |
631076 KB |
Output is correct |
53 |
Correct |
652 ms |
631044 KB |
Output is correct |
54 |
Correct |
252 ms |
610872 KB |
Output is correct |
55 |
Correct |
258 ms |
610796 KB |
Output is correct |
56 |
Correct |
253 ms |
610872 KB |
Output is correct |
57 |
Correct |
265 ms |
610756 KB |
Output is correct |
58 |
Correct |
259 ms |
610908 KB |
Output is correct |
59 |
Correct |
257 ms |
610756 KB |
Output is correct |
60 |
Correct |
252 ms |
610764 KB |
Output is correct |
61 |
Correct |
257 ms |
610968 KB |
Output is correct |
62 |
Correct |
250 ms |
610844 KB |
Output is correct |
63 |
Correct |
254 ms |
610952 KB |
Output is correct |
64 |
Correct |
275 ms |
610888 KB |
Output is correct |
65 |
Correct |
257 ms |
610856 KB |
Output is correct |
66 |
Correct |
259 ms |
610840 KB |
Output is correct |
67 |
Correct |
251 ms |
610868 KB |
Output is correct |
68 |
Correct |
251 ms |
610900 KB |
Output is correct |
69 |
Correct |
249 ms |
611032 KB |
Output is correct |
70 |
Correct |
276 ms |
610888 KB |
Output is correct |
71 |
Correct |
419 ms |
610820 KB |
Output is correct |
72 |
Correct |
253 ms |
610888 KB |
Output is correct |
73 |
Correct |
250 ms |
610872 KB |
Output is correct |
74 |
Correct |
259 ms |
610892 KB |
Output is correct |
75 |
Correct |
259 ms |
610880 KB |
Output is correct |
76 |
Correct |
248 ms |
610784 KB |
Output is correct |
77 |
Correct |
258 ms |
610976 KB |
Output is correct |
78 |
Correct |
245 ms |
610868 KB |
Output is correct |
79 |
Correct |
259 ms |
610876 KB |
Output is correct |
80 |
Correct |
246 ms |
610848 KB |
Output is correct |
81 |
Correct |
248 ms |
610880 KB |
Output is correct |
82 |
Correct |
286 ms |
610764 KB |
Output is correct |
83 |
Correct |
246 ms |
610884 KB |
Output is correct |
84 |
Correct |
266 ms |
610768 KB |
Output is correct |
85 |
Correct |
252 ms |
610800 KB |
Output is correct |
86 |
Correct |
256 ms |
610936 KB |
Output is correct |
87 |
Correct |
244 ms |
610832 KB |
Output is correct |
88 |
Correct |
260 ms |
611080 KB |
Output is correct |
89 |
Correct |
247 ms |
610860 KB |
Output is correct |
90 |
Correct |
249 ms |
610872 KB |
Output is correct |
91 |
Correct |
252 ms |
610876 KB |
Output is correct |
92 |
Correct |
247 ms |
610892 KB |
Output is correct |
93 |
Correct |
247 ms |
610772 KB |
Output is correct |
94 |
Correct |
250 ms |
610772 KB |
Output is correct |
95 |
Correct |
252 ms |
610768 KB |
Output is correct |
96 |
Correct |
254 ms |
610884 KB |
Output is correct |
97 |
Correct |
249 ms |
610912 KB |
Output is correct |
98 |
Correct |
263 ms |
610932 KB |
Output is correct |
99 |
Correct |
248 ms |
610804 KB |
Output is correct |
100 |
Correct |
256 ms |
610756 KB |
Output is correct |
101 |
Correct |
259 ms |
610796 KB |
Output is correct |
102 |
Correct |
248 ms |
610868 KB |
Output is correct |
103 |
Correct |
253 ms |
610860 KB |
Output is correct |
104 |
Correct |
272 ms |
610868 KB |
Output is correct |
105 |
Correct |
270 ms |
610876 KB |
Output is correct |
106 |
Correct |
267 ms |
610884 KB |
Output is correct |
107 |
Correct |
268 ms |
610852 KB |
Output is correct |
108 |
Correct |
261 ms |
610892 KB |
Output is correct |
109 |
Correct |
250 ms |
610920 KB |
Output is correct |
110 |
Correct |
250 ms |
611416 KB |
Output is correct |
111 |
Correct |
257 ms |
611944 KB |
Output is correct |
112 |
Correct |
263 ms |
611960 KB |
Output is correct |
113 |
Correct |
256 ms |
611712 KB |
Output is correct |
114 |
Correct |
249 ms |
611660 KB |
Output is correct |
115 |
Correct |
258 ms |
611704 KB |
Output is correct |
116 |
Correct |
254 ms |
611896 KB |
Output is correct |
117 |
Correct |
251 ms |
611644 KB |
Output is correct |
118 |
Correct |
248 ms |
611616 KB |
Output is correct |
119 |
Correct |
268 ms |
613700 KB |
Output is correct |
120 |
Correct |
252 ms |
613080 KB |
Output is correct |
121 |
Correct |
262 ms |
613620 KB |
Output is correct |
122 |
Correct |
253 ms |
612912 KB |
Output is correct |
123 |
Correct |
253 ms |
612904 KB |
Output is correct |
124 |
Correct |
321 ms |
620920 KB |
Output is correct |
125 |
Correct |
393 ms |
639276 KB |
Output is correct |
126 |
Correct |
490 ms |
637272 KB |
Output is correct |
127 |
Correct |
347 ms |
641312 KB |
Output is correct |
128 |
Correct |
267 ms |
631040 KB |
Output is correct |
129 |
Correct |
263 ms |
630956 KB |
Output is correct |
130 |
Correct |
388 ms |
641724 KB |
Output is correct |
131 |
Correct |
409 ms |
643756 KB |
Output is correct |
132 |
Correct |
264 ms |
611704 KB |
Output is correct |
133 |
Correct |
261 ms |
610928 KB |
Output is correct |
134 |
Correct |
249 ms |
610892 KB |
Output is correct |
135 |
Correct |
249 ms |
611408 KB |
Output is correct |
136 |
Correct |
256 ms |
612680 KB |
Output is correct |
137 |
Correct |
261 ms |
611896 KB |
Output is correct |
138 |
Correct |
258 ms |
611916 KB |
Output is correct |
139 |
Correct |
264 ms |
611644 KB |
Output is correct |
140 |
Correct |
261 ms |
611708 KB |
Output is correct |
141 |
Correct |
249 ms |
611764 KB |
Output is correct |
142 |
Correct |
278 ms |
611692 KB |
Output is correct |
143 |
Correct |
246 ms |
611624 KB |
Output is correct |
144 |
Correct |
288 ms |
613304 KB |
Output is correct |
145 |
Correct |
255 ms |
613356 KB |
Output is correct |
146 |
Correct |
262 ms |
612376 KB |
Output is correct |
147 |
Correct |
268 ms |
611752 KB |
Output is correct |
148 |
Correct |
255 ms |
611688 KB |
Output is correct |
149 |
Correct |
268 ms |
611756 KB |
Output is correct |
150 |
Correct |
274 ms |
611696 KB |
Output is correct |
151 |
Correct |
253 ms |
611724 KB |
Output is correct |
152 |
Correct |
245 ms |
611708 KB |
Output is correct |
153 |
Correct |
258 ms |
611632 KB |
Output is correct |
154 |
Correct |
288 ms |
612964 KB |
Output is correct |
155 |
Correct |
270 ms |
612436 KB |
Output is correct |
156 |
Correct |
270 ms |
613724 KB |
Output is correct |
157 |
Correct |
276 ms |
612864 KB |
Output is correct |
158 |
Correct |
281 ms |
613224 KB |
Output is correct |
159 |
Correct |
294 ms |
613000 KB |
Output is correct |
160 |
Correct |
308 ms |
612844 KB |
Output is correct |
161 |
Correct |
279 ms |
613564 KB |
Output is correct |
162 |
Correct |
434 ms |
612968 KB |
Output is correct |
163 |
Correct |
263 ms |
613008 KB |
Output is correct |
164 |
Correct |
277 ms |
616980 KB |
Output is correct |
165 |
Correct |
300 ms |
617036 KB |
Output is correct |
166 |
Correct |
276 ms |
614620 KB |
Output is correct |
167 |
Correct |
270 ms |
613028 KB |
Output is correct |
168 |
Correct |
273 ms |
613052 KB |
Output is correct |
169 |
Correct |
278 ms |
613012 KB |
Output is correct |
170 |
Correct |
268 ms |
613204 KB |
Output is correct |
171 |
Correct |
272 ms |
613020 KB |
Output is correct |
172 |
Correct |
280 ms |
612992 KB |
Output is correct |
173 |
Correct |
261 ms |
613076 KB |
Output is correct |
174 |
Correct |
265 ms |
613628 KB |
Output is correct |
175 |
Correct |
312 ms |
615504 KB |
Output is correct |
176 |
Correct |
326 ms |
626324 KB |
Output is correct |
177 |
Correct |
452 ms |
625732 KB |
Output is correct |
178 |
Correct |
285 ms |
629064 KB |
Output is correct |
179 |
Correct |
381 ms |
631540 KB |
Output is correct |
180 |
Correct |
481 ms |
631508 KB |
Output is correct |
181 |
Correct |
484 ms |
631792 KB |
Output is correct |
182 |
Correct |
492 ms |
632504 KB |
Output is correct |
183 |
Correct |
610 ms |
633320 KB |
Output is correct |
184 |
Correct |
1368 ms |
650244 KB |
Output is correct |
185 |
Correct |
346 ms |
634156 KB |
Output is correct |
186 |
Correct |
554 ms |
650276 KB |
Output is correct |
187 |
Correct |
350 ms |
639872 KB |
Output is correct |
188 |
Correct |
671 ms |
661484 KB |
Output is correct |
189 |
Correct |
975 ms |
650288 KB |
Output is correct |
190 |
Correct |
638 ms |
650236 KB |
Output is correct |
191 |
Correct |
489 ms |
663476 KB |
Output is correct |
192 |
Correct |
287 ms |
650112 KB |
Output is correct |
193 |
Correct |
277 ms |
650088 KB |
Output is correct |
194 |
Correct |
1585 ms |
732236 KB |
Output is correct |
195 |
Correct |
1335 ms |
732216 KB |
Output is correct |
196 |
Correct |
688 ms |
651044 KB |
Output is correct |
197 |
Correct |
494 ms |
651532 KB |
Output is correct |
198 |
Correct |
498 ms |
651316 KB |
Output is correct |
199 |
Correct |
666 ms |
652344 KB |
Output is correct |
200 |
Correct |
583 ms |
650420 KB |
Output is correct |
201 |
Correct |
848 ms |
650316 KB |
Output is correct |
202 |
Correct |
1232 ms |
650168 KB |
Output is correct |
203 |
Execution timed out |
2071 ms |
688440 KB |
Time limit exceeded |
204 |
Halted |
0 ms |
0 KB |
- |