#include <bits/stdc++.h>
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
using namespace std;
int inf = 1e9;
int dl[] = {-1,0,1,0};
int dc[] = {0,1,0,-1};
int r,c,n;
int xs,ys,xf,yf;
vector<vector<char>>a;
vector<vector<int>>d;
pair<short int,int> new_cells[6000005],cells[6000005];
int ncs,cs;
vector<vector<int>>s;
vector<vector<short int>>ss;
vector<int>ts;
vector<short int>tss;
int lgc,lgr;
void updates(int unde,int pos)
{
ts[unde]--;
#pragma GCC ivdep
for (int i = pos; i <= c; i += (i & -i))
s[unde][i]--;
}
void updatess(int unde,int pos)
{
tss[unde]--;
#pragma GCC ivdep
for (int i = pos; i <= r; i += (i & -i))
ss[unde][i]--;
}
int querys(int x,int y)
{
int rsp = 0;
#pragma GCC ivdep
for (int i = y; i > 0; i -= (i & -i))
rsp += s[x][i];
return rsp;
}
int queryss(int x,int y)
{
int rsp = 0;
#pragma GCC ivdep
for (int i = y; i > 0; i -= (i & -i))
rsp += ss[x][i];
return rsp;
}
int s_findnext(int x,int y)
{
int vv = querys(x,y - 1);
if (vv == ts[x])
return -1;
int sumaib = 0;
int st = 0,pas = 1 << lgc;
#pragma GCC ivdep
while (pas != 0)
{
if (st + pas <= c and sumaib + s[x][st + pas] <= vv)
{
st += pas;
sumaib += s[x][st];
}
pas >>= 1;
}
return st + 1;
}
int ss_findnext(int x,int y)
{
int vv = queryss(x,y - 1);
if (vv == tss[x])
return -1;
int sumaib = 0;
int st = 0,pas = 1 << lgr;
#pragma GCC ivdep
while (pas != 0)
{
if (st + pas <= r and sumaib + ss[x][st + pas] <= vv)
{
st += pas;
sumaib += ss[x][st];
}
pas >>= 1;
}
return st + 1;
}
void dfs(int x,int y)
{
//cout << "sus" << x << ' ' << y << endl;
for (int i = 0; i < 4; i++)
{
int nx = x + dl[i],ny = y + dc[i];
if (nx >= 1 and nx <= r and ny >= 1 and ny <= c and d[nx][ny] == inf and a[nx][ny] == '.')
{
d[nx][ny] = d[x][y];
//s[nx].erase(ny);
//ss[ny].erase(nx);
updates(nx,ny);
updatess(ny,nx);
cells[cs++] = {nx,ny};
dfs(nx,ny);
}
}
}
int dgl;
void orizontala(int x,int y1,int y2)
{
//cout << "h" << x << ' ' << y1 << ' ' << y2 << endl;
#pragma GCC ivdep
while (true)
{
/*auto it = s[x].lower_bound(y1);
if (it == s[x].end() or *it > y2)
return;
d[x][*it] = dgl;
new_cells.push_back({x,*it});
s[x].erase(*it);
ss[*it].erase(x);*/
int it = s_findnext(x,y1);
if (it == -1 or it > y2)
return;
d[x][it] = dgl;
new_cells[ncs++] = {x,it};
updates(x,it);
updatess(it,x);
}
}
void verticala(int y,int x1,int x2)
{
//cout << "v" << y << ' ' << x1 << ' ' << x2 << endl;
#pragma GCC ivdep
while (true)
{
/*auto it = ss[y].lower_bound(x1);
if (it == ss[y].end() or *it > x2)
return;
d[*it][y] = dgl;
new_cells.push_back({*it,y});
ss[y].erase(*it);
s[*it].erase(y);*/
int it = ss_findnext(y,x1);
if (it == -1 or it > x2)
return;
d[it][y] = dgl;
new_cells[ncs++] = {it,y};
updatess(y,it);
updates(it,y);
}
}
void baga(int x,int y)
{
//cout << "bagat" << ' ' << x << ' ' << y << endl;
dgl = d[x][y] + 1;
if (abs(x - xf) <= n and abs(y - yf) <= n and abs(x - xf) + abs(y - yf) < 2 * n)
{
d[xf][yf] = min(d[xf][yf],1 + d[x][y]);
return;
}
int x1 = x - n,x2 = x + n,y1 = y - n,y2 = y + n;
///teoretic pot tot patratul (x1,y1,x2,y2) fara colturi, daca ies din matrice ayaye
///pot sa iau intersectia dreptunghiurilor (x1,y1,x2,y2) cu matricea si daca e tai colturile
x1 = max(x1,1);
x2 = min(x2,r);
y1 = max(y1,1);
y2 = min(y2,c);
//cout << x1 << ' ' << x2 << ' ' << y1 << ' ' << y2 << endl;
if (x1 != x - n)
orizontala(x1,y1,y2);
else
{
int y1r = y1,y2r = y2;
if (y1 == y - n)
y1r++;
if (y2 == y + n)
y2r--;
orizontala(x1,y1r,y2r);
}
if (x2 != x + n)
orizontala(x2,y1,y2);
else
{
int y1r = y1,y2r = y2;
if (y1 == y - n)
y1r++;
if (y2 == y + n)
y2r--;
orizontala(x2,y1r,y2r);
}
if (y1 != y - n)
verticala(y1,x1,x2);
else
{
int x1r = x1,x2r = x2;
if (x1 == x - n)
x1r++;
if (x2 == x + n)
x2r--;
verticala(y1,x1r,x2r);
}
if (y2 != y + n)
verticala(y2,x1,x2);
else
{
int x1r = x1,x2r = x2;
if (x1 == x - n)
x1r++;
if (x2 == x + n)
x2r--;
verticala(y2,x1r,x2r);
}
}
vector<vector<bool>> rlv;
vector<vector<int>> splin,spcol;
int main()
{
srand(time(NULL));
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
cin >> r >> c >> n >> xs >> ys >> xf >> yf;
a.resize(r + 1);
s.resize(r + 1);
ss.resize(c + 1);
ts.resize(r + 1);
tss.resize(c + 1);
lgc = __lg(c);
lgr = __lg(r);
for (int i = 1; i <= r; i++)
ts[i] = c;
for (int i = 1; i <= c; i++)
tss[i] = r;
for (int i = 1; i <= r; i++)
s[i].resize(c + 1);
for (int i = 1; i <= c; i++)
ss[i].resize(r + 1);
rlv.resize(r + 1);
for (int i = 0; i <= r; i++)
rlv[i].resize(c + 1);
splin.resize(r + 1);
for (int i = 0; i <= r; i++)
splin[i].resize(c + 1);
spcol.resize(r + 1);
for (int i = 0; i <= r; i++)
spcol[i].resize(c + 1);
for (int i = 1; i <= r; i++)
{
for (int j = 1; j <= c; j++)
{
if (rand() % 1000 != 0 or r * c <= 4500000)
rlv[i][j] = true;
}
}
for (int i = 1; i <= r; i++)
{
for (int j = 1; j <= c; j++)
{
splin[i][j] = splin[i][j - 1],spcol[i][j] = spcol[i - 1][j];
if (!rlv[i][j])
splin[i][j]++,spcol[i][j]++;
}
}
for (int i = 1; i <= r; i++)
{
for (int j = 1; j <= c; j++)
{
s[i][j] = (j & -j) - (splin[i][j] - splin[i][j - (j & -j)]);
ss[j][i] = (i & -i) - (spcol[i][j] - spcol[i - (i & -i)][j]);
}
}
for (int i = 1; i <= r; i++)
{
a[i].resize(c + 1);
for (int j = 1; j <= c; j++)
cin >> a[i][j];
}
d.resize(r + 1);
for (int i = 1; i <= r; i++)
d[i].resize(c + 1);
for (int i = 1; i <= r; i++)
for (int j = 1; j <= c; j++)
d[i][j] = 1e9;
new_cells[ncs++] = {xs,ys};
d[xs][ys] = 0;
updates(xs,ys);
updatess(ys,xs);
while (true)
{
//cout << endl;
//for (auto it : new_cells)
// cout << "nc" << ' ' << it.first << ' ' << it.second << ' ' << d[it.first][it.second] << endl;
//cells = new_cells;
cs = ncs;
for (int i = 0; i < cs; i++)
cells[i] = new_cells[i];
for (int i = 0; i < ncs; i++)
dfs(new_cells[i].first,new_cells[i].second);
if (d[xf][yf] != inf)
break;
ncs = 0;
for (int i = 0; i < cs; i++)
if (rlv[cells[i].first][cells[i].second])
baga(cells[i].first,cells[i].second);
if (d[xf][yf] != inf)
break;
}
cout << d[xf][yf];
return 0;
}
/**
din (i,j) pot merge ori intr-un vecin care e si el alb
as mai putea merge in patratul de latura 2n + 1 centrat in (i,j) fara colturile lui
acum, faza funny e ca nu prea ma intereseaza de mersul inauntrul formei ci doar pe marini, unless este celula de finish in interior
asa ca, ori e celula de finish in interior si zic direct gen "boss, dute in aia", ori pun cu cost + 1 celulele de pe margini
acum, ca sa gasesc celulele de pe margini nevizitate inca, trebuie doar sa vad pe niste bucati de linii / coloane care mai sunt alive
asta pot cu un set, dar cu constanta aia :skull: mai bine nu, deci bag aib si cb pe aib
Acum, cum imi fac dfs-ul ca sa nu iasa nimic dubios
In etape, cat timp n-am ajuns la finish, mai intai imi iau celulele cu care n-am trecut prin faza 1 si le dau fill cat au in jur 0
Iar in faza 2 iau celulele care n-au trecut prin faza asta si le fac kinda patratul, iau alea de pe margini etc
**/
///hocus pocus ca sa treaca
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2392 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
0 ms |
2396 KB |
Output is correct |
4 |
Correct |
0 ms |
2396 KB |
Output is correct |
5 |
Correct |
0 ms |
2396 KB |
Output is correct |
6 |
Correct |
1 ms |
2396 KB |
Output is correct |
7 |
Correct |
1 ms |
2396 KB |
Output is correct |
8 |
Correct |
1 ms |
2396 KB |
Output is correct |
9 |
Correct |
0 ms |
2396 KB |
Output is correct |
10 |
Correct |
0 ms |
2396 KB |
Output is correct |
11 |
Correct |
0 ms |
2396 KB |
Output is correct |
12 |
Correct |
0 ms |
2396 KB |
Output is correct |
13 |
Correct |
0 ms |
2396 KB |
Output is correct |
14 |
Correct |
1 ms |
2392 KB |
Output is correct |
15 |
Correct |
1 ms |
2396 KB |
Output is correct |
16 |
Correct |
1 ms |
2396 KB |
Output is correct |
17 |
Correct |
0 ms |
2396 KB |
Output is correct |
18 |
Correct |
0 ms |
2396 KB |
Output is correct |
19 |
Correct |
8 ms |
3676 KB |
Output is correct |
20 |
Correct |
9 ms |
6236 KB |
Output is correct |
21 |
Correct |
6 ms |
10332 KB |
Output is correct |
22 |
Correct |
10 ms |
3716 KB |
Output is correct |
23 |
Correct |
10 ms |
3700 KB |
Output is correct |
24 |
Correct |
8 ms |
7256 KB |
Output is correct |
25 |
Correct |
10 ms |
7256 KB |
Output is correct |
26 |
Correct |
2 ms |
3676 KB |
Output is correct |
27 |
Correct |
2 ms |
3676 KB |
Output is correct |
28 |
Correct |
5 ms |
3676 KB |
Output is correct |
29 |
Correct |
28 ms |
5212 KB |
Output is correct |
30 |
Correct |
11 ms |
5300 KB |
Output is correct |
31 |
Correct |
14 ms |
18816 KB |
Output is correct |
32 |
Correct |
29 ms |
5212 KB |
Output is correct |
33 |
Correct |
30 ms |
5212 KB |
Output is correct |
34 |
Correct |
27 ms |
14684 KB |
Output is correct |
35 |
Correct |
41 ms |
14684 KB |
Output is correct |
36 |
Correct |
16 ms |
5464 KB |
Output is correct |
37 |
Correct |
24 ms |
5632 KB |
Output is correct |
38 |
Correct |
5 ms |
5468 KB |
Output is correct |
39 |
Correct |
450 ms |
30688 KB |
Output is correct |
40 |
Correct |
12 ms |
6232 KB |
Output is correct |
41 |
Correct |
28 ms |
17584 KB |
Output is correct |
42 |
Correct |
43 ms |
6492 KB |
Output is correct |
43 |
Correct |
49 ms |
14436 KB |
Output is correct |
44 |
Correct |
66 ms |
22868 KB |
Output is correct |
45 |
Correct |
107 ms |
26204 KB |
Output is correct |
46 |
Correct |
162 ms |
155872 KB |
Output is correct |
47 |
Correct |
304 ms |
30952 KB |
Output is correct |
48 |
Correct |
323 ms |
30812 KB |
Output is correct |
49 |
Correct |
311 ms |
122704 KB |
Output is correct |
50 |
Correct |
373 ms |
122456 KB |
Output is correct |
51 |
Correct |
247 ms |
33616 KB |
Output is correct |
52 |
Correct |
198 ms |
31316 KB |
Output is correct |
53 |
Correct |
345 ms |
31312 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2392 KB |
Output is correct |
2 |
Correct |
0 ms |
2396 KB |
Output is correct |
3 |
Correct |
0 ms |
2396 KB |
Output is correct |
4 |
Correct |
0 ms |
2396 KB |
Output is correct |
5 |
Correct |
1 ms |
2396 KB |
Output is correct |
6 |
Correct |
1 ms |
2396 KB |
Output is correct |
7 |
Correct |
1 ms |
2396 KB |
Output is correct |
8 |
Correct |
0 ms |
2396 KB |
Output is correct |
9 |
Correct |
0 ms |
2396 KB |
Output is correct |
10 |
Correct |
1 ms |
2396 KB |
Output is correct |
11 |
Correct |
1 ms |
2396 KB |
Output is correct |
12 |
Correct |
1 ms |
2396 KB |
Output is correct |
13 |
Correct |
0 ms |
2396 KB |
Output is correct |
14 |
Correct |
1 ms |
2396 KB |
Output is correct |
15 |
Correct |
1 ms |
2396 KB |
Output is correct |
16 |
Correct |
1 ms |
2396 KB |
Output is correct |
17 |
Correct |
0 ms |
2396 KB |
Output is correct |
18 |
Correct |
1 ms |
2396 KB |
Output is correct |
19 |
Correct |
0 ms |
2396 KB |
Output is correct |
20 |
Correct |
1 ms |
2396 KB |
Output is correct |
21 |
Correct |
0 ms |
2396 KB |
Output is correct |
22 |
Correct |
0 ms |
2396 KB |
Output is correct |
23 |
Correct |
1 ms |
2392 KB |
Output is correct |
24 |
Correct |
0 ms |
2396 KB |
Output is correct |
25 |
Correct |
0 ms |
2396 KB |
Output is correct |
26 |
Correct |
0 ms |
2396 KB |
Output is correct |
27 |
Correct |
0 ms |
2396 KB |
Output is correct |
28 |
Correct |
1 ms |
2396 KB |
Output is correct |
29 |
Correct |
0 ms |
2396 KB |
Output is correct |
30 |
Correct |
0 ms |
2396 KB |
Output is correct |
31 |
Correct |
0 ms |
2396 KB |
Output is correct |
32 |
Correct |
0 ms |
2396 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2396 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
0 ms |
2396 KB |
Output is correct |
4 |
Correct |
1 ms |
2396 KB |
Output is correct |
5 |
Correct |
0 ms |
2396 KB |
Output is correct |
6 |
Correct |
0 ms |
2396 KB |
Output is correct |
7 |
Correct |
1 ms |
2396 KB |
Output is correct |
8 |
Correct |
1 ms |
2396 KB |
Output is correct |
9 |
Correct |
1 ms |
2392 KB |
Output is correct |
10 |
Correct |
1 ms |
2396 KB |
Output is correct |
11 |
Correct |
0 ms |
2396 KB |
Output is correct |
12 |
Correct |
0 ms |
2396 KB |
Output is correct |
13 |
Correct |
0 ms |
2396 KB |
Output is correct |
14 |
Correct |
0 ms |
2396 KB |
Output is correct |
15 |
Correct |
0 ms |
2396 KB |
Output is correct |
16 |
Correct |
0 ms |
2396 KB |
Output is correct |
17 |
Correct |
1 ms |
2392 KB |
Output is correct |
18 |
Correct |
0 ms |
2396 KB |
Output is correct |
19 |
Correct |
1 ms |
2396 KB |
Output is correct |
20 |
Correct |
0 ms |
2392 KB |
Output is correct |
21 |
Correct |
0 ms |
2396 KB |
Output is correct |
22 |
Correct |
1 ms |
2396 KB |
Output is correct |
23 |
Correct |
0 ms |
2396 KB |
Output is correct |
24 |
Correct |
0 ms |
2396 KB |
Output is correct |
25 |
Correct |
2 ms |
3164 KB |
Output is correct |
26 |
Correct |
5 ms |
8024 KB |
Output is correct |
27 |
Correct |
6 ms |
10332 KB |
Output is correct |
28 |
Correct |
7 ms |
10332 KB |
Output is correct |
29 |
Correct |
2 ms |
3676 KB |
Output is correct |
30 |
Correct |
2 ms |
3676 KB |
Output is correct |
31 |
Correct |
4 ms |
3764 KB |
Output is correct |
32 |
Correct |
2 ms |
3676 KB |
Output is correct |
33 |
Correct |
2 ms |
3676 KB |
Output is correct |
34 |
Correct |
10 ms |
11100 KB |
Output is correct |
35 |
Correct |
17 ms |
18880 KB |
Output is correct |
36 |
Correct |
18 ms |
18776 KB |
Output is correct |
37 |
Correct |
5 ms |
5212 KB |
Output is correct |
38 |
Correct |
6 ms |
5212 KB |
Output is correct |
39 |
Correct |
34 ms |
25216 KB |
Output is correct |
40 |
Correct |
108 ms |
73556 KB |
Output is correct |
41 |
Correct |
164 ms |
154968 KB |
Output is correct |
42 |
Correct |
162 ms |
155216 KB |
Output is correct |
43 |
Correct |
39 ms |
30800 KB |
Output is correct |
44 |
Correct |
38 ms |
30692 KB |
Output is correct |
45 |
Correct |
111 ms |
51292 KB |
Output is correct |
46 |
Correct |
104 ms |
60244 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2392 KB |
Output is correct |
2 |
Correct |
0 ms |
2396 KB |
Output is correct |
3 |
Correct |
0 ms |
2396 KB |
Output is correct |
4 |
Correct |
0 ms |
2396 KB |
Output is correct |
5 |
Correct |
1 ms |
2396 KB |
Output is correct |
6 |
Correct |
1 ms |
2396 KB |
Output is correct |
7 |
Correct |
1 ms |
2396 KB |
Output is correct |
8 |
Correct |
0 ms |
2396 KB |
Output is correct |
9 |
Correct |
0 ms |
2396 KB |
Output is correct |
10 |
Correct |
1 ms |
2396 KB |
Output is correct |
11 |
Correct |
1 ms |
2396 KB |
Output is correct |
12 |
Correct |
1 ms |
2396 KB |
Output is correct |
13 |
Correct |
0 ms |
2396 KB |
Output is correct |
14 |
Correct |
1 ms |
2396 KB |
Output is correct |
15 |
Correct |
1 ms |
2396 KB |
Output is correct |
16 |
Correct |
1 ms |
2396 KB |
Output is correct |
17 |
Correct |
0 ms |
2396 KB |
Output is correct |
18 |
Correct |
1 ms |
2396 KB |
Output is correct |
19 |
Correct |
0 ms |
2396 KB |
Output is correct |
20 |
Correct |
1 ms |
2396 KB |
Output is correct |
21 |
Correct |
0 ms |
2396 KB |
Output is correct |
22 |
Correct |
0 ms |
2396 KB |
Output is correct |
23 |
Correct |
1 ms |
2392 KB |
Output is correct |
24 |
Correct |
0 ms |
2396 KB |
Output is correct |
25 |
Correct |
0 ms |
2396 KB |
Output is correct |
26 |
Correct |
0 ms |
2396 KB |
Output is correct |
27 |
Correct |
0 ms |
2396 KB |
Output is correct |
28 |
Correct |
1 ms |
2396 KB |
Output is correct |
29 |
Correct |
0 ms |
2396 KB |
Output is correct |
30 |
Correct |
0 ms |
2396 KB |
Output is correct |
31 |
Correct |
0 ms |
2396 KB |
Output is correct |
32 |
Correct |
0 ms |
2396 KB |
Output is correct |
33 |
Correct |
9 ms |
3676 KB |
Output is correct |
34 |
Correct |
1 ms |
2396 KB |
Output is correct |
35 |
Correct |
1 ms |
2652 KB |
Output is correct |
36 |
Correct |
2 ms |
3164 KB |
Output is correct |
37 |
Correct |
9 ms |
6316 KB |
Output is correct |
38 |
Correct |
5 ms |
8028 KB |
Output is correct |
39 |
Correct |
6 ms |
10228 KB |
Output is correct |
40 |
Correct |
9 ms |
3720 KB |
Output is correct |
41 |
Correct |
10 ms |
3704 KB |
Output is correct |
42 |
Correct |
6 ms |
10316 KB |
Output is correct |
43 |
Correct |
2 ms |
3676 KB |
Output is correct |
44 |
Correct |
3 ms |
3676 KB |
Output is correct |
45 |
Correct |
8 ms |
7260 KB |
Output is correct |
46 |
Correct |
10 ms |
7260 KB |
Output is correct |
47 |
Correct |
12 ms |
5464 KB |
Output is correct |
48 |
Correct |
7 ms |
3676 KB |
Output is correct |
49 |
Correct |
6 ms |
3676 KB |
Output is correct |
50 |
Correct |
8 ms |
3748 KB |
Output is correct |
51 |
Correct |
4 ms |
3676 KB |
Output is correct |
52 |
Correct |
2 ms |
3676 KB |
Output is correct |
53 |
Correct |
3 ms |
3672 KB |
Output is correct |
54 |
Correct |
5 ms |
3676 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2392 KB |
Output is correct |
2 |
Correct |
0 ms |
2396 KB |
Output is correct |
3 |
Correct |
0 ms |
2396 KB |
Output is correct |
4 |
Correct |
0 ms |
2396 KB |
Output is correct |
5 |
Correct |
1 ms |
2396 KB |
Output is correct |
6 |
Correct |
1 ms |
2396 KB |
Output is correct |
7 |
Correct |
1 ms |
2396 KB |
Output is correct |
8 |
Correct |
0 ms |
2396 KB |
Output is correct |
9 |
Correct |
0 ms |
2396 KB |
Output is correct |
10 |
Correct |
1 ms |
2396 KB |
Output is correct |
11 |
Correct |
1 ms |
2396 KB |
Output is correct |
12 |
Correct |
1 ms |
2396 KB |
Output is correct |
13 |
Correct |
0 ms |
2396 KB |
Output is correct |
14 |
Correct |
1 ms |
2396 KB |
Output is correct |
15 |
Correct |
1 ms |
2396 KB |
Output is correct |
16 |
Correct |
1 ms |
2396 KB |
Output is correct |
17 |
Correct |
0 ms |
2396 KB |
Output is correct |
18 |
Correct |
1 ms |
2396 KB |
Output is correct |
19 |
Correct |
0 ms |
2396 KB |
Output is correct |
20 |
Correct |
1 ms |
2396 KB |
Output is correct |
21 |
Correct |
0 ms |
2396 KB |
Output is correct |
22 |
Correct |
0 ms |
2396 KB |
Output is correct |
23 |
Correct |
1 ms |
2392 KB |
Output is correct |
24 |
Correct |
0 ms |
2396 KB |
Output is correct |
25 |
Correct |
0 ms |
2396 KB |
Output is correct |
26 |
Correct |
0 ms |
2396 KB |
Output is correct |
27 |
Correct |
0 ms |
2396 KB |
Output is correct |
28 |
Correct |
1 ms |
2396 KB |
Output is correct |
29 |
Correct |
0 ms |
2396 KB |
Output is correct |
30 |
Correct |
0 ms |
2396 KB |
Output is correct |
31 |
Correct |
0 ms |
2396 KB |
Output is correct |
32 |
Correct |
0 ms |
2396 KB |
Output is correct |
33 |
Correct |
9 ms |
3676 KB |
Output is correct |
34 |
Correct |
1 ms |
2396 KB |
Output is correct |
35 |
Correct |
1 ms |
2652 KB |
Output is correct |
36 |
Correct |
2 ms |
3164 KB |
Output is correct |
37 |
Correct |
9 ms |
6316 KB |
Output is correct |
38 |
Correct |
5 ms |
8028 KB |
Output is correct |
39 |
Correct |
6 ms |
10228 KB |
Output is correct |
40 |
Correct |
9 ms |
3720 KB |
Output is correct |
41 |
Correct |
10 ms |
3704 KB |
Output is correct |
42 |
Correct |
6 ms |
10316 KB |
Output is correct |
43 |
Correct |
2 ms |
3676 KB |
Output is correct |
44 |
Correct |
3 ms |
3676 KB |
Output is correct |
45 |
Correct |
8 ms |
7260 KB |
Output is correct |
46 |
Correct |
10 ms |
7260 KB |
Output is correct |
47 |
Correct |
12 ms |
5464 KB |
Output is correct |
48 |
Correct |
7 ms |
3676 KB |
Output is correct |
49 |
Correct |
6 ms |
3676 KB |
Output is correct |
50 |
Correct |
8 ms |
3748 KB |
Output is correct |
51 |
Correct |
4 ms |
3676 KB |
Output is correct |
52 |
Correct |
2 ms |
3676 KB |
Output is correct |
53 |
Correct |
3 ms |
3672 KB |
Output is correct |
54 |
Correct |
5 ms |
3676 KB |
Output is correct |
55 |
Correct |
36 ms |
5212 KB |
Output is correct |
56 |
Correct |
11 ms |
5468 KB |
Output is correct |
57 |
Correct |
10 ms |
11100 KB |
Output is correct |
58 |
Correct |
21 ms |
5468 KB |
Output is correct |
59 |
Correct |
15 ms |
18776 KB |
Output is correct |
60 |
Correct |
29 ms |
5212 KB |
Output is correct |
61 |
Correct |
30 ms |
5192 KB |
Output is correct |
62 |
Correct |
16 ms |
18780 KB |
Output is correct |
63 |
Correct |
4 ms |
5212 KB |
Output is correct |
64 |
Correct |
5 ms |
5212 KB |
Output is correct |
65 |
Correct |
28 ms |
14684 KB |
Output is correct |
66 |
Correct |
42 ms |
14680 KB |
Output is correct |
67 |
Correct |
30 ms |
9820 KB |
Output is correct |
68 |
Correct |
21 ms |
5724 KB |
Output is correct |
69 |
Correct |
22 ms |
5576 KB |
Output is correct |
70 |
Correct |
15 ms |
5468 KB |
Output is correct |
71 |
Correct |
17 ms |
7512 KB |
Output is correct |
72 |
Correct |
16 ms |
5468 KB |
Output is correct |
73 |
Correct |
25 ms |
5468 KB |
Output is correct |
74 |
Correct |
5 ms |
5564 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2392 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
0 ms |
2396 KB |
Output is correct |
4 |
Correct |
0 ms |
2396 KB |
Output is correct |
5 |
Correct |
0 ms |
2396 KB |
Output is correct |
6 |
Correct |
1 ms |
2396 KB |
Output is correct |
7 |
Correct |
1 ms |
2396 KB |
Output is correct |
8 |
Correct |
1 ms |
2396 KB |
Output is correct |
9 |
Correct |
0 ms |
2396 KB |
Output is correct |
10 |
Correct |
0 ms |
2396 KB |
Output is correct |
11 |
Correct |
0 ms |
2396 KB |
Output is correct |
12 |
Correct |
0 ms |
2396 KB |
Output is correct |
13 |
Correct |
0 ms |
2396 KB |
Output is correct |
14 |
Correct |
1 ms |
2392 KB |
Output is correct |
15 |
Correct |
1 ms |
2396 KB |
Output is correct |
16 |
Correct |
1 ms |
2396 KB |
Output is correct |
17 |
Correct |
0 ms |
2396 KB |
Output is correct |
18 |
Correct |
0 ms |
2396 KB |
Output is correct |
19 |
Correct |
8 ms |
3676 KB |
Output is correct |
20 |
Correct |
9 ms |
6236 KB |
Output is correct |
21 |
Correct |
6 ms |
10332 KB |
Output is correct |
22 |
Correct |
10 ms |
3716 KB |
Output is correct |
23 |
Correct |
10 ms |
3700 KB |
Output is correct |
24 |
Correct |
8 ms |
7256 KB |
Output is correct |
25 |
Correct |
10 ms |
7256 KB |
Output is correct |
26 |
Correct |
2 ms |
3676 KB |
Output is correct |
27 |
Correct |
2 ms |
3676 KB |
Output is correct |
28 |
Correct |
5 ms |
3676 KB |
Output is correct |
29 |
Correct |
28 ms |
5212 KB |
Output is correct |
30 |
Correct |
11 ms |
5300 KB |
Output is correct |
31 |
Correct |
14 ms |
18816 KB |
Output is correct |
32 |
Correct |
29 ms |
5212 KB |
Output is correct |
33 |
Correct |
30 ms |
5212 KB |
Output is correct |
34 |
Correct |
27 ms |
14684 KB |
Output is correct |
35 |
Correct |
41 ms |
14684 KB |
Output is correct |
36 |
Correct |
16 ms |
5464 KB |
Output is correct |
37 |
Correct |
24 ms |
5632 KB |
Output is correct |
38 |
Correct |
5 ms |
5468 KB |
Output is correct |
39 |
Correct |
450 ms |
30688 KB |
Output is correct |
40 |
Correct |
12 ms |
6232 KB |
Output is correct |
41 |
Correct |
28 ms |
17584 KB |
Output is correct |
42 |
Correct |
43 ms |
6492 KB |
Output is correct |
43 |
Correct |
49 ms |
14436 KB |
Output is correct |
44 |
Correct |
66 ms |
22868 KB |
Output is correct |
45 |
Correct |
107 ms |
26204 KB |
Output is correct |
46 |
Correct |
162 ms |
155872 KB |
Output is correct |
47 |
Correct |
304 ms |
30952 KB |
Output is correct |
48 |
Correct |
323 ms |
30812 KB |
Output is correct |
49 |
Correct |
311 ms |
122704 KB |
Output is correct |
50 |
Correct |
373 ms |
122456 KB |
Output is correct |
51 |
Correct |
247 ms |
33616 KB |
Output is correct |
52 |
Correct |
198 ms |
31316 KB |
Output is correct |
53 |
Correct |
345 ms |
31312 KB |
Output is correct |
54 |
Correct |
1 ms |
2392 KB |
Output is correct |
55 |
Correct |
0 ms |
2396 KB |
Output is correct |
56 |
Correct |
0 ms |
2396 KB |
Output is correct |
57 |
Correct |
0 ms |
2396 KB |
Output is correct |
58 |
Correct |
1 ms |
2396 KB |
Output is correct |
59 |
Correct |
1 ms |
2396 KB |
Output is correct |
60 |
Correct |
1 ms |
2396 KB |
Output is correct |
61 |
Correct |
0 ms |
2396 KB |
Output is correct |
62 |
Correct |
0 ms |
2396 KB |
Output is correct |
63 |
Correct |
1 ms |
2396 KB |
Output is correct |
64 |
Correct |
1 ms |
2396 KB |
Output is correct |
65 |
Correct |
1 ms |
2396 KB |
Output is correct |
66 |
Correct |
0 ms |
2396 KB |
Output is correct |
67 |
Correct |
1 ms |
2396 KB |
Output is correct |
68 |
Correct |
1 ms |
2396 KB |
Output is correct |
69 |
Correct |
1 ms |
2396 KB |
Output is correct |
70 |
Correct |
0 ms |
2396 KB |
Output is correct |
71 |
Correct |
1 ms |
2396 KB |
Output is correct |
72 |
Correct |
0 ms |
2396 KB |
Output is correct |
73 |
Correct |
1 ms |
2396 KB |
Output is correct |
74 |
Correct |
0 ms |
2396 KB |
Output is correct |
75 |
Correct |
0 ms |
2396 KB |
Output is correct |
76 |
Correct |
1 ms |
2392 KB |
Output is correct |
77 |
Correct |
0 ms |
2396 KB |
Output is correct |
78 |
Correct |
0 ms |
2396 KB |
Output is correct |
79 |
Correct |
0 ms |
2396 KB |
Output is correct |
80 |
Correct |
0 ms |
2396 KB |
Output is correct |
81 |
Correct |
1 ms |
2396 KB |
Output is correct |
82 |
Correct |
0 ms |
2396 KB |
Output is correct |
83 |
Correct |
0 ms |
2396 KB |
Output is correct |
84 |
Correct |
0 ms |
2396 KB |
Output is correct |
85 |
Correct |
0 ms |
2396 KB |
Output is correct |
86 |
Correct |
1 ms |
2396 KB |
Output is correct |
87 |
Correct |
1 ms |
2396 KB |
Output is correct |
88 |
Correct |
0 ms |
2396 KB |
Output is correct |
89 |
Correct |
1 ms |
2396 KB |
Output is correct |
90 |
Correct |
0 ms |
2396 KB |
Output is correct |
91 |
Correct |
0 ms |
2396 KB |
Output is correct |
92 |
Correct |
1 ms |
2396 KB |
Output is correct |
93 |
Correct |
1 ms |
2396 KB |
Output is correct |
94 |
Correct |
1 ms |
2392 KB |
Output is correct |
95 |
Correct |
1 ms |
2396 KB |
Output is correct |
96 |
Correct |
0 ms |
2396 KB |
Output is correct |
97 |
Correct |
0 ms |
2396 KB |
Output is correct |
98 |
Correct |
0 ms |
2396 KB |
Output is correct |
99 |
Correct |
0 ms |
2396 KB |
Output is correct |
100 |
Correct |
0 ms |
2396 KB |
Output is correct |
101 |
Correct |
0 ms |
2396 KB |
Output is correct |
102 |
Correct |
1 ms |
2392 KB |
Output is correct |
103 |
Correct |
0 ms |
2396 KB |
Output is correct |
104 |
Correct |
1 ms |
2396 KB |
Output is correct |
105 |
Correct |
0 ms |
2392 KB |
Output is correct |
106 |
Correct |
0 ms |
2396 KB |
Output is correct |
107 |
Correct |
1 ms |
2396 KB |
Output is correct |
108 |
Correct |
0 ms |
2396 KB |
Output is correct |
109 |
Correct |
0 ms |
2396 KB |
Output is correct |
110 |
Correct |
2 ms |
3164 KB |
Output is correct |
111 |
Correct |
5 ms |
8024 KB |
Output is correct |
112 |
Correct |
6 ms |
10332 KB |
Output is correct |
113 |
Correct |
7 ms |
10332 KB |
Output is correct |
114 |
Correct |
2 ms |
3676 KB |
Output is correct |
115 |
Correct |
2 ms |
3676 KB |
Output is correct |
116 |
Correct |
4 ms |
3764 KB |
Output is correct |
117 |
Correct |
2 ms |
3676 KB |
Output is correct |
118 |
Correct |
2 ms |
3676 KB |
Output is correct |
119 |
Correct |
10 ms |
11100 KB |
Output is correct |
120 |
Correct |
17 ms |
18880 KB |
Output is correct |
121 |
Correct |
18 ms |
18776 KB |
Output is correct |
122 |
Correct |
5 ms |
5212 KB |
Output is correct |
123 |
Correct |
6 ms |
5212 KB |
Output is correct |
124 |
Correct |
34 ms |
25216 KB |
Output is correct |
125 |
Correct |
108 ms |
73556 KB |
Output is correct |
126 |
Correct |
164 ms |
154968 KB |
Output is correct |
127 |
Correct |
162 ms |
155216 KB |
Output is correct |
128 |
Correct |
39 ms |
30800 KB |
Output is correct |
129 |
Correct |
38 ms |
30692 KB |
Output is correct |
130 |
Correct |
111 ms |
51292 KB |
Output is correct |
131 |
Correct |
104 ms |
60244 KB |
Output is correct |
132 |
Correct |
9 ms |
3676 KB |
Output is correct |
133 |
Correct |
1 ms |
2396 KB |
Output is correct |
134 |
Correct |
1 ms |
2652 KB |
Output is correct |
135 |
Correct |
2 ms |
3164 KB |
Output is correct |
136 |
Correct |
9 ms |
6316 KB |
Output is correct |
137 |
Correct |
5 ms |
8028 KB |
Output is correct |
138 |
Correct |
6 ms |
10228 KB |
Output is correct |
139 |
Correct |
9 ms |
3720 KB |
Output is correct |
140 |
Correct |
10 ms |
3704 KB |
Output is correct |
141 |
Correct |
6 ms |
10316 KB |
Output is correct |
142 |
Correct |
2 ms |
3676 KB |
Output is correct |
143 |
Correct |
3 ms |
3676 KB |
Output is correct |
144 |
Correct |
8 ms |
7260 KB |
Output is correct |
145 |
Correct |
10 ms |
7260 KB |
Output is correct |
146 |
Correct |
12 ms |
5464 KB |
Output is correct |
147 |
Correct |
7 ms |
3676 KB |
Output is correct |
148 |
Correct |
6 ms |
3676 KB |
Output is correct |
149 |
Correct |
8 ms |
3748 KB |
Output is correct |
150 |
Correct |
4 ms |
3676 KB |
Output is correct |
151 |
Correct |
2 ms |
3676 KB |
Output is correct |
152 |
Correct |
3 ms |
3672 KB |
Output is correct |
153 |
Correct |
5 ms |
3676 KB |
Output is correct |
154 |
Correct |
36 ms |
5212 KB |
Output is correct |
155 |
Correct |
11 ms |
5468 KB |
Output is correct |
156 |
Correct |
10 ms |
11100 KB |
Output is correct |
157 |
Correct |
21 ms |
5468 KB |
Output is correct |
158 |
Correct |
15 ms |
18776 KB |
Output is correct |
159 |
Correct |
29 ms |
5212 KB |
Output is correct |
160 |
Correct |
30 ms |
5192 KB |
Output is correct |
161 |
Correct |
16 ms |
18780 KB |
Output is correct |
162 |
Correct |
4 ms |
5212 KB |
Output is correct |
163 |
Correct |
5 ms |
5212 KB |
Output is correct |
164 |
Correct |
28 ms |
14684 KB |
Output is correct |
165 |
Correct |
42 ms |
14680 KB |
Output is correct |
166 |
Correct |
30 ms |
9820 KB |
Output is correct |
167 |
Correct |
21 ms |
5724 KB |
Output is correct |
168 |
Correct |
22 ms |
5576 KB |
Output is correct |
169 |
Correct |
15 ms |
5468 KB |
Output is correct |
170 |
Correct |
17 ms |
7512 KB |
Output is correct |
171 |
Correct |
16 ms |
5468 KB |
Output is correct |
172 |
Correct |
25 ms |
5468 KB |
Output is correct |
173 |
Correct |
5 ms |
5564 KB |
Output is correct |
174 |
Correct |
14 ms |
7004 KB |
Output is correct |
175 |
Correct |
61 ms |
9052 KB |
Output is correct |
176 |
Correct |
89 ms |
31568 KB |
Output is correct |
177 |
Correct |
161 ms |
23636 KB |
Output is correct |
178 |
Correct |
50 ms |
29008 KB |
Output is correct |
179 |
Correct |
177 ms |
32592 KB |
Output is correct |
180 |
Correct |
240 ms |
31576 KB |
Output is correct |
181 |
Correct |
216 ms |
35316 KB |
Output is correct |
182 |
Correct |
229 ms |
35156 KB |
Output is correct |
183 |
Correct |
303 ms |
38484 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2392 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
0 ms |
2396 KB |
Output is correct |
4 |
Correct |
0 ms |
2396 KB |
Output is correct |
5 |
Correct |
0 ms |
2396 KB |
Output is correct |
6 |
Correct |
1 ms |
2396 KB |
Output is correct |
7 |
Correct |
1 ms |
2396 KB |
Output is correct |
8 |
Correct |
1 ms |
2396 KB |
Output is correct |
9 |
Correct |
0 ms |
2396 KB |
Output is correct |
10 |
Correct |
0 ms |
2396 KB |
Output is correct |
11 |
Correct |
0 ms |
2396 KB |
Output is correct |
12 |
Correct |
0 ms |
2396 KB |
Output is correct |
13 |
Correct |
0 ms |
2396 KB |
Output is correct |
14 |
Correct |
1 ms |
2392 KB |
Output is correct |
15 |
Correct |
1 ms |
2396 KB |
Output is correct |
16 |
Correct |
1 ms |
2396 KB |
Output is correct |
17 |
Correct |
0 ms |
2396 KB |
Output is correct |
18 |
Correct |
0 ms |
2396 KB |
Output is correct |
19 |
Correct |
8 ms |
3676 KB |
Output is correct |
20 |
Correct |
9 ms |
6236 KB |
Output is correct |
21 |
Correct |
6 ms |
10332 KB |
Output is correct |
22 |
Correct |
10 ms |
3716 KB |
Output is correct |
23 |
Correct |
10 ms |
3700 KB |
Output is correct |
24 |
Correct |
8 ms |
7256 KB |
Output is correct |
25 |
Correct |
10 ms |
7256 KB |
Output is correct |
26 |
Correct |
2 ms |
3676 KB |
Output is correct |
27 |
Correct |
2 ms |
3676 KB |
Output is correct |
28 |
Correct |
5 ms |
3676 KB |
Output is correct |
29 |
Correct |
28 ms |
5212 KB |
Output is correct |
30 |
Correct |
11 ms |
5300 KB |
Output is correct |
31 |
Correct |
14 ms |
18816 KB |
Output is correct |
32 |
Correct |
29 ms |
5212 KB |
Output is correct |
33 |
Correct |
30 ms |
5212 KB |
Output is correct |
34 |
Correct |
27 ms |
14684 KB |
Output is correct |
35 |
Correct |
41 ms |
14684 KB |
Output is correct |
36 |
Correct |
16 ms |
5464 KB |
Output is correct |
37 |
Correct |
24 ms |
5632 KB |
Output is correct |
38 |
Correct |
5 ms |
5468 KB |
Output is correct |
39 |
Correct |
450 ms |
30688 KB |
Output is correct |
40 |
Correct |
12 ms |
6232 KB |
Output is correct |
41 |
Correct |
28 ms |
17584 KB |
Output is correct |
42 |
Correct |
43 ms |
6492 KB |
Output is correct |
43 |
Correct |
49 ms |
14436 KB |
Output is correct |
44 |
Correct |
66 ms |
22868 KB |
Output is correct |
45 |
Correct |
107 ms |
26204 KB |
Output is correct |
46 |
Correct |
162 ms |
155872 KB |
Output is correct |
47 |
Correct |
304 ms |
30952 KB |
Output is correct |
48 |
Correct |
323 ms |
30812 KB |
Output is correct |
49 |
Correct |
311 ms |
122704 KB |
Output is correct |
50 |
Correct |
373 ms |
122456 KB |
Output is correct |
51 |
Correct |
247 ms |
33616 KB |
Output is correct |
52 |
Correct |
198 ms |
31316 KB |
Output is correct |
53 |
Correct |
345 ms |
31312 KB |
Output is correct |
54 |
Correct |
1 ms |
2392 KB |
Output is correct |
55 |
Correct |
0 ms |
2396 KB |
Output is correct |
56 |
Correct |
0 ms |
2396 KB |
Output is correct |
57 |
Correct |
0 ms |
2396 KB |
Output is correct |
58 |
Correct |
1 ms |
2396 KB |
Output is correct |
59 |
Correct |
1 ms |
2396 KB |
Output is correct |
60 |
Correct |
1 ms |
2396 KB |
Output is correct |
61 |
Correct |
0 ms |
2396 KB |
Output is correct |
62 |
Correct |
0 ms |
2396 KB |
Output is correct |
63 |
Correct |
1 ms |
2396 KB |
Output is correct |
64 |
Correct |
1 ms |
2396 KB |
Output is correct |
65 |
Correct |
1 ms |
2396 KB |
Output is correct |
66 |
Correct |
0 ms |
2396 KB |
Output is correct |
67 |
Correct |
1 ms |
2396 KB |
Output is correct |
68 |
Correct |
1 ms |
2396 KB |
Output is correct |
69 |
Correct |
1 ms |
2396 KB |
Output is correct |
70 |
Correct |
0 ms |
2396 KB |
Output is correct |
71 |
Correct |
1 ms |
2396 KB |
Output is correct |
72 |
Correct |
0 ms |
2396 KB |
Output is correct |
73 |
Correct |
1 ms |
2396 KB |
Output is correct |
74 |
Correct |
0 ms |
2396 KB |
Output is correct |
75 |
Correct |
0 ms |
2396 KB |
Output is correct |
76 |
Correct |
1 ms |
2392 KB |
Output is correct |
77 |
Correct |
0 ms |
2396 KB |
Output is correct |
78 |
Correct |
0 ms |
2396 KB |
Output is correct |
79 |
Correct |
0 ms |
2396 KB |
Output is correct |
80 |
Correct |
0 ms |
2396 KB |
Output is correct |
81 |
Correct |
1 ms |
2396 KB |
Output is correct |
82 |
Correct |
0 ms |
2396 KB |
Output is correct |
83 |
Correct |
0 ms |
2396 KB |
Output is correct |
84 |
Correct |
0 ms |
2396 KB |
Output is correct |
85 |
Correct |
0 ms |
2396 KB |
Output is correct |
86 |
Correct |
1 ms |
2396 KB |
Output is correct |
87 |
Correct |
1 ms |
2396 KB |
Output is correct |
88 |
Correct |
0 ms |
2396 KB |
Output is correct |
89 |
Correct |
1 ms |
2396 KB |
Output is correct |
90 |
Correct |
0 ms |
2396 KB |
Output is correct |
91 |
Correct |
0 ms |
2396 KB |
Output is correct |
92 |
Correct |
1 ms |
2396 KB |
Output is correct |
93 |
Correct |
1 ms |
2396 KB |
Output is correct |
94 |
Correct |
1 ms |
2392 KB |
Output is correct |
95 |
Correct |
1 ms |
2396 KB |
Output is correct |
96 |
Correct |
0 ms |
2396 KB |
Output is correct |
97 |
Correct |
0 ms |
2396 KB |
Output is correct |
98 |
Correct |
0 ms |
2396 KB |
Output is correct |
99 |
Correct |
0 ms |
2396 KB |
Output is correct |
100 |
Correct |
0 ms |
2396 KB |
Output is correct |
101 |
Correct |
0 ms |
2396 KB |
Output is correct |
102 |
Correct |
1 ms |
2392 KB |
Output is correct |
103 |
Correct |
0 ms |
2396 KB |
Output is correct |
104 |
Correct |
1 ms |
2396 KB |
Output is correct |
105 |
Correct |
0 ms |
2392 KB |
Output is correct |
106 |
Correct |
0 ms |
2396 KB |
Output is correct |
107 |
Correct |
1 ms |
2396 KB |
Output is correct |
108 |
Correct |
0 ms |
2396 KB |
Output is correct |
109 |
Correct |
0 ms |
2396 KB |
Output is correct |
110 |
Correct |
2 ms |
3164 KB |
Output is correct |
111 |
Correct |
5 ms |
8024 KB |
Output is correct |
112 |
Correct |
6 ms |
10332 KB |
Output is correct |
113 |
Correct |
7 ms |
10332 KB |
Output is correct |
114 |
Correct |
2 ms |
3676 KB |
Output is correct |
115 |
Correct |
2 ms |
3676 KB |
Output is correct |
116 |
Correct |
4 ms |
3764 KB |
Output is correct |
117 |
Correct |
2 ms |
3676 KB |
Output is correct |
118 |
Correct |
2 ms |
3676 KB |
Output is correct |
119 |
Correct |
10 ms |
11100 KB |
Output is correct |
120 |
Correct |
17 ms |
18880 KB |
Output is correct |
121 |
Correct |
18 ms |
18776 KB |
Output is correct |
122 |
Correct |
5 ms |
5212 KB |
Output is correct |
123 |
Correct |
6 ms |
5212 KB |
Output is correct |
124 |
Correct |
34 ms |
25216 KB |
Output is correct |
125 |
Correct |
108 ms |
73556 KB |
Output is correct |
126 |
Correct |
164 ms |
154968 KB |
Output is correct |
127 |
Correct |
162 ms |
155216 KB |
Output is correct |
128 |
Correct |
39 ms |
30800 KB |
Output is correct |
129 |
Correct |
38 ms |
30692 KB |
Output is correct |
130 |
Correct |
111 ms |
51292 KB |
Output is correct |
131 |
Correct |
104 ms |
60244 KB |
Output is correct |
132 |
Correct |
9 ms |
3676 KB |
Output is correct |
133 |
Correct |
1 ms |
2396 KB |
Output is correct |
134 |
Correct |
1 ms |
2652 KB |
Output is correct |
135 |
Correct |
2 ms |
3164 KB |
Output is correct |
136 |
Correct |
9 ms |
6316 KB |
Output is correct |
137 |
Correct |
5 ms |
8028 KB |
Output is correct |
138 |
Correct |
6 ms |
10228 KB |
Output is correct |
139 |
Correct |
9 ms |
3720 KB |
Output is correct |
140 |
Correct |
10 ms |
3704 KB |
Output is correct |
141 |
Correct |
6 ms |
10316 KB |
Output is correct |
142 |
Correct |
2 ms |
3676 KB |
Output is correct |
143 |
Correct |
3 ms |
3676 KB |
Output is correct |
144 |
Correct |
8 ms |
7260 KB |
Output is correct |
145 |
Correct |
10 ms |
7260 KB |
Output is correct |
146 |
Correct |
12 ms |
5464 KB |
Output is correct |
147 |
Correct |
7 ms |
3676 KB |
Output is correct |
148 |
Correct |
6 ms |
3676 KB |
Output is correct |
149 |
Correct |
8 ms |
3748 KB |
Output is correct |
150 |
Correct |
4 ms |
3676 KB |
Output is correct |
151 |
Correct |
2 ms |
3676 KB |
Output is correct |
152 |
Correct |
3 ms |
3672 KB |
Output is correct |
153 |
Correct |
5 ms |
3676 KB |
Output is correct |
154 |
Correct |
36 ms |
5212 KB |
Output is correct |
155 |
Correct |
11 ms |
5468 KB |
Output is correct |
156 |
Correct |
10 ms |
11100 KB |
Output is correct |
157 |
Correct |
21 ms |
5468 KB |
Output is correct |
158 |
Correct |
15 ms |
18776 KB |
Output is correct |
159 |
Correct |
29 ms |
5212 KB |
Output is correct |
160 |
Correct |
30 ms |
5192 KB |
Output is correct |
161 |
Correct |
16 ms |
18780 KB |
Output is correct |
162 |
Correct |
4 ms |
5212 KB |
Output is correct |
163 |
Correct |
5 ms |
5212 KB |
Output is correct |
164 |
Correct |
28 ms |
14684 KB |
Output is correct |
165 |
Correct |
42 ms |
14680 KB |
Output is correct |
166 |
Correct |
30 ms |
9820 KB |
Output is correct |
167 |
Correct |
21 ms |
5724 KB |
Output is correct |
168 |
Correct |
22 ms |
5576 KB |
Output is correct |
169 |
Correct |
15 ms |
5468 KB |
Output is correct |
170 |
Correct |
17 ms |
7512 KB |
Output is correct |
171 |
Correct |
16 ms |
5468 KB |
Output is correct |
172 |
Correct |
25 ms |
5468 KB |
Output is correct |
173 |
Correct |
5 ms |
5564 KB |
Output is correct |
174 |
Correct |
14 ms |
7004 KB |
Output is correct |
175 |
Correct |
61 ms |
9052 KB |
Output is correct |
176 |
Correct |
89 ms |
31568 KB |
Output is correct |
177 |
Correct |
161 ms |
23636 KB |
Output is correct |
178 |
Correct |
50 ms |
29008 KB |
Output is correct |
179 |
Correct |
177 ms |
32592 KB |
Output is correct |
180 |
Correct |
240 ms |
31576 KB |
Output is correct |
181 |
Correct |
216 ms |
35316 KB |
Output is correct |
182 |
Correct |
229 ms |
35156 KB |
Output is correct |
183 |
Correct |
303 ms |
38484 KB |
Output is correct |
184 |
Correct |
1010 ms |
59248 KB |
Output is correct |
185 |
Correct |
120 ms |
35672 KB |
Output is correct |
186 |
Correct |
150 ms |
102128 KB |
Output is correct |
187 |
Correct |
110 ms |
46932 KB |
Output is correct |
188 |
Correct |
324 ms |
308304 KB |
Output is correct |
189 |
Correct |
665 ms |
59104 KB |
Output is correct |
190 |
Correct |
377 ms |
59220 KB |
Output is correct |
191 |
Correct |
332 ms |
308304 KB |
Output is correct |
192 |
Correct |
96 ms |
58964 KB |
Output is correct |
193 |
Correct |
76 ms |
58964 KB |
Output is correct |
194 |
Correct |
890 ms |
244816 KB |
Output is correct |
195 |
Correct |
828 ms |
244816 KB |
Output is correct |
196 |
Correct |
364 ms |
61776 KB |
Output is correct |
197 |
Correct |
218 ms |
62804 KB |
Output is correct |
198 |
Correct |
291 ms |
63828 KB |
Output is correct |
199 |
Correct |
320 ms |
63568 KB |
Output is correct |
200 |
Correct |
278 ms |
61828 KB |
Output is correct |
201 |
Correct |
483 ms |
62036 KB |
Output is correct |
202 |
Correct |
869 ms |
59776 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
2392 KB |
Output is correct |
2 |
Correct |
1 ms |
2396 KB |
Output is correct |
3 |
Correct |
0 ms |
2396 KB |
Output is correct |
4 |
Correct |
0 ms |
2396 KB |
Output is correct |
5 |
Correct |
0 ms |
2396 KB |
Output is correct |
6 |
Correct |
1 ms |
2396 KB |
Output is correct |
7 |
Correct |
1 ms |
2396 KB |
Output is correct |
8 |
Correct |
1 ms |
2396 KB |
Output is correct |
9 |
Correct |
0 ms |
2396 KB |
Output is correct |
10 |
Correct |
0 ms |
2396 KB |
Output is correct |
11 |
Correct |
0 ms |
2396 KB |
Output is correct |
12 |
Correct |
0 ms |
2396 KB |
Output is correct |
13 |
Correct |
0 ms |
2396 KB |
Output is correct |
14 |
Correct |
1 ms |
2392 KB |
Output is correct |
15 |
Correct |
1 ms |
2396 KB |
Output is correct |
16 |
Correct |
1 ms |
2396 KB |
Output is correct |
17 |
Correct |
0 ms |
2396 KB |
Output is correct |
18 |
Correct |
0 ms |
2396 KB |
Output is correct |
19 |
Correct |
8 ms |
3676 KB |
Output is correct |
20 |
Correct |
9 ms |
6236 KB |
Output is correct |
21 |
Correct |
6 ms |
10332 KB |
Output is correct |
22 |
Correct |
10 ms |
3716 KB |
Output is correct |
23 |
Correct |
10 ms |
3700 KB |
Output is correct |
24 |
Correct |
8 ms |
7256 KB |
Output is correct |
25 |
Correct |
10 ms |
7256 KB |
Output is correct |
26 |
Correct |
2 ms |
3676 KB |
Output is correct |
27 |
Correct |
2 ms |
3676 KB |
Output is correct |
28 |
Correct |
5 ms |
3676 KB |
Output is correct |
29 |
Correct |
28 ms |
5212 KB |
Output is correct |
30 |
Correct |
11 ms |
5300 KB |
Output is correct |
31 |
Correct |
14 ms |
18816 KB |
Output is correct |
32 |
Correct |
29 ms |
5212 KB |
Output is correct |
33 |
Correct |
30 ms |
5212 KB |
Output is correct |
34 |
Correct |
27 ms |
14684 KB |
Output is correct |
35 |
Correct |
41 ms |
14684 KB |
Output is correct |
36 |
Correct |
16 ms |
5464 KB |
Output is correct |
37 |
Correct |
24 ms |
5632 KB |
Output is correct |
38 |
Correct |
5 ms |
5468 KB |
Output is correct |
39 |
Correct |
450 ms |
30688 KB |
Output is correct |
40 |
Correct |
12 ms |
6232 KB |
Output is correct |
41 |
Correct |
28 ms |
17584 KB |
Output is correct |
42 |
Correct |
43 ms |
6492 KB |
Output is correct |
43 |
Correct |
49 ms |
14436 KB |
Output is correct |
44 |
Correct |
66 ms |
22868 KB |
Output is correct |
45 |
Correct |
107 ms |
26204 KB |
Output is correct |
46 |
Correct |
162 ms |
155872 KB |
Output is correct |
47 |
Correct |
304 ms |
30952 KB |
Output is correct |
48 |
Correct |
323 ms |
30812 KB |
Output is correct |
49 |
Correct |
311 ms |
122704 KB |
Output is correct |
50 |
Correct |
373 ms |
122456 KB |
Output is correct |
51 |
Correct |
247 ms |
33616 KB |
Output is correct |
52 |
Correct |
198 ms |
31316 KB |
Output is correct |
53 |
Correct |
345 ms |
31312 KB |
Output is correct |
54 |
Correct |
1 ms |
2392 KB |
Output is correct |
55 |
Correct |
0 ms |
2396 KB |
Output is correct |
56 |
Correct |
0 ms |
2396 KB |
Output is correct |
57 |
Correct |
0 ms |
2396 KB |
Output is correct |
58 |
Correct |
1 ms |
2396 KB |
Output is correct |
59 |
Correct |
1 ms |
2396 KB |
Output is correct |
60 |
Correct |
1 ms |
2396 KB |
Output is correct |
61 |
Correct |
0 ms |
2396 KB |
Output is correct |
62 |
Correct |
0 ms |
2396 KB |
Output is correct |
63 |
Correct |
1 ms |
2396 KB |
Output is correct |
64 |
Correct |
1 ms |
2396 KB |
Output is correct |
65 |
Correct |
1 ms |
2396 KB |
Output is correct |
66 |
Correct |
0 ms |
2396 KB |
Output is correct |
67 |
Correct |
1 ms |
2396 KB |
Output is correct |
68 |
Correct |
1 ms |
2396 KB |
Output is correct |
69 |
Correct |
1 ms |
2396 KB |
Output is correct |
70 |
Correct |
0 ms |
2396 KB |
Output is correct |
71 |
Correct |
1 ms |
2396 KB |
Output is correct |
72 |
Correct |
0 ms |
2396 KB |
Output is correct |
73 |
Correct |
1 ms |
2396 KB |
Output is correct |
74 |
Correct |
0 ms |
2396 KB |
Output is correct |
75 |
Correct |
0 ms |
2396 KB |
Output is correct |
76 |
Correct |
1 ms |
2392 KB |
Output is correct |
77 |
Correct |
0 ms |
2396 KB |
Output is correct |
78 |
Correct |
0 ms |
2396 KB |
Output is correct |
79 |
Correct |
0 ms |
2396 KB |
Output is correct |
80 |
Correct |
0 ms |
2396 KB |
Output is correct |
81 |
Correct |
1 ms |
2396 KB |
Output is correct |
82 |
Correct |
0 ms |
2396 KB |
Output is correct |
83 |
Correct |
0 ms |
2396 KB |
Output is correct |
84 |
Correct |
0 ms |
2396 KB |
Output is correct |
85 |
Correct |
0 ms |
2396 KB |
Output is correct |
86 |
Correct |
1 ms |
2396 KB |
Output is correct |
87 |
Correct |
1 ms |
2396 KB |
Output is correct |
88 |
Correct |
0 ms |
2396 KB |
Output is correct |
89 |
Correct |
1 ms |
2396 KB |
Output is correct |
90 |
Correct |
0 ms |
2396 KB |
Output is correct |
91 |
Correct |
0 ms |
2396 KB |
Output is correct |
92 |
Correct |
1 ms |
2396 KB |
Output is correct |
93 |
Correct |
1 ms |
2396 KB |
Output is correct |
94 |
Correct |
1 ms |
2392 KB |
Output is correct |
95 |
Correct |
1 ms |
2396 KB |
Output is correct |
96 |
Correct |
0 ms |
2396 KB |
Output is correct |
97 |
Correct |
0 ms |
2396 KB |
Output is correct |
98 |
Correct |
0 ms |
2396 KB |
Output is correct |
99 |
Correct |
0 ms |
2396 KB |
Output is correct |
100 |
Correct |
0 ms |
2396 KB |
Output is correct |
101 |
Correct |
0 ms |
2396 KB |
Output is correct |
102 |
Correct |
1 ms |
2392 KB |
Output is correct |
103 |
Correct |
0 ms |
2396 KB |
Output is correct |
104 |
Correct |
1 ms |
2396 KB |
Output is correct |
105 |
Correct |
0 ms |
2392 KB |
Output is correct |
106 |
Correct |
0 ms |
2396 KB |
Output is correct |
107 |
Correct |
1 ms |
2396 KB |
Output is correct |
108 |
Correct |
0 ms |
2396 KB |
Output is correct |
109 |
Correct |
0 ms |
2396 KB |
Output is correct |
110 |
Correct |
2 ms |
3164 KB |
Output is correct |
111 |
Correct |
5 ms |
8024 KB |
Output is correct |
112 |
Correct |
6 ms |
10332 KB |
Output is correct |
113 |
Correct |
7 ms |
10332 KB |
Output is correct |
114 |
Correct |
2 ms |
3676 KB |
Output is correct |
115 |
Correct |
2 ms |
3676 KB |
Output is correct |
116 |
Correct |
4 ms |
3764 KB |
Output is correct |
117 |
Correct |
2 ms |
3676 KB |
Output is correct |
118 |
Correct |
2 ms |
3676 KB |
Output is correct |
119 |
Correct |
10 ms |
11100 KB |
Output is correct |
120 |
Correct |
17 ms |
18880 KB |
Output is correct |
121 |
Correct |
18 ms |
18776 KB |
Output is correct |
122 |
Correct |
5 ms |
5212 KB |
Output is correct |
123 |
Correct |
6 ms |
5212 KB |
Output is correct |
124 |
Correct |
34 ms |
25216 KB |
Output is correct |
125 |
Correct |
108 ms |
73556 KB |
Output is correct |
126 |
Correct |
164 ms |
154968 KB |
Output is correct |
127 |
Correct |
162 ms |
155216 KB |
Output is correct |
128 |
Correct |
39 ms |
30800 KB |
Output is correct |
129 |
Correct |
38 ms |
30692 KB |
Output is correct |
130 |
Correct |
111 ms |
51292 KB |
Output is correct |
131 |
Correct |
104 ms |
60244 KB |
Output is correct |
132 |
Correct |
9 ms |
3676 KB |
Output is correct |
133 |
Correct |
1 ms |
2396 KB |
Output is correct |
134 |
Correct |
1 ms |
2652 KB |
Output is correct |
135 |
Correct |
2 ms |
3164 KB |
Output is correct |
136 |
Correct |
9 ms |
6316 KB |
Output is correct |
137 |
Correct |
5 ms |
8028 KB |
Output is correct |
138 |
Correct |
6 ms |
10228 KB |
Output is correct |
139 |
Correct |
9 ms |
3720 KB |
Output is correct |
140 |
Correct |
10 ms |
3704 KB |
Output is correct |
141 |
Correct |
6 ms |
10316 KB |
Output is correct |
142 |
Correct |
2 ms |
3676 KB |
Output is correct |
143 |
Correct |
3 ms |
3676 KB |
Output is correct |
144 |
Correct |
8 ms |
7260 KB |
Output is correct |
145 |
Correct |
10 ms |
7260 KB |
Output is correct |
146 |
Correct |
12 ms |
5464 KB |
Output is correct |
147 |
Correct |
7 ms |
3676 KB |
Output is correct |
148 |
Correct |
6 ms |
3676 KB |
Output is correct |
149 |
Correct |
8 ms |
3748 KB |
Output is correct |
150 |
Correct |
4 ms |
3676 KB |
Output is correct |
151 |
Correct |
2 ms |
3676 KB |
Output is correct |
152 |
Correct |
3 ms |
3672 KB |
Output is correct |
153 |
Correct |
5 ms |
3676 KB |
Output is correct |
154 |
Correct |
36 ms |
5212 KB |
Output is correct |
155 |
Correct |
11 ms |
5468 KB |
Output is correct |
156 |
Correct |
10 ms |
11100 KB |
Output is correct |
157 |
Correct |
21 ms |
5468 KB |
Output is correct |
158 |
Correct |
15 ms |
18776 KB |
Output is correct |
159 |
Correct |
29 ms |
5212 KB |
Output is correct |
160 |
Correct |
30 ms |
5192 KB |
Output is correct |
161 |
Correct |
16 ms |
18780 KB |
Output is correct |
162 |
Correct |
4 ms |
5212 KB |
Output is correct |
163 |
Correct |
5 ms |
5212 KB |
Output is correct |
164 |
Correct |
28 ms |
14684 KB |
Output is correct |
165 |
Correct |
42 ms |
14680 KB |
Output is correct |
166 |
Correct |
30 ms |
9820 KB |
Output is correct |
167 |
Correct |
21 ms |
5724 KB |
Output is correct |
168 |
Correct |
22 ms |
5576 KB |
Output is correct |
169 |
Correct |
15 ms |
5468 KB |
Output is correct |
170 |
Correct |
17 ms |
7512 KB |
Output is correct |
171 |
Correct |
16 ms |
5468 KB |
Output is correct |
172 |
Correct |
25 ms |
5468 KB |
Output is correct |
173 |
Correct |
5 ms |
5564 KB |
Output is correct |
174 |
Correct |
14 ms |
7004 KB |
Output is correct |
175 |
Correct |
61 ms |
9052 KB |
Output is correct |
176 |
Correct |
89 ms |
31568 KB |
Output is correct |
177 |
Correct |
161 ms |
23636 KB |
Output is correct |
178 |
Correct |
50 ms |
29008 KB |
Output is correct |
179 |
Correct |
177 ms |
32592 KB |
Output is correct |
180 |
Correct |
240 ms |
31576 KB |
Output is correct |
181 |
Correct |
216 ms |
35316 KB |
Output is correct |
182 |
Correct |
229 ms |
35156 KB |
Output is correct |
183 |
Correct |
303 ms |
38484 KB |
Output is correct |
184 |
Correct |
1010 ms |
59248 KB |
Output is correct |
185 |
Correct |
120 ms |
35672 KB |
Output is correct |
186 |
Correct |
150 ms |
102128 KB |
Output is correct |
187 |
Correct |
110 ms |
46932 KB |
Output is correct |
188 |
Correct |
324 ms |
308304 KB |
Output is correct |
189 |
Correct |
665 ms |
59104 KB |
Output is correct |
190 |
Correct |
377 ms |
59220 KB |
Output is correct |
191 |
Correct |
332 ms |
308304 KB |
Output is correct |
192 |
Correct |
96 ms |
58964 KB |
Output is correct |
193 |
Correct |
76 ms |
58964 KB |
Output is correct |
194 |
Correct |
890 ms |
244816 KB |
Output is correct |
195 |
Correct |
828 ms |
244816 KB |
Output is correct |
196 |
Correct |
364 ms |
61776 KB |
Output is correct |
197 |
Correct |
218 ms |
62804 KB |
Output is correct |
198 |
Correct |
291 ms |
63828 KB |
Output is correct |
199 |
Correct |
320 ms |
63568 KB |
Output is correct |
200 |
Correct |
278 ms |
61828 KB |
Output is correct |
201 |
Correct |
483 ms |
62036 KB |
Output is correct |
202 |
Correct |
869 ms |
59776 KB |
Output is correct |
203 |
Runtime error |
656 ms |
328080 KB |
Execution killed with signal 11 |
204 |
Halted |
0 ms |
0 KB |
- |