/* Author : Mychecksdead */
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define MOD (1000000000+7)
#define MOD1 (998244353)
#define pb push_back
#define all(x) x.begin(), x.end()
#define en cout << '\n'
const int N = 6e6+100, M = 1e5+10, K = 52, MX = 30;
int r, c, n, sx, sy, ex, ey, arr[4][2]={{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
string s[N];
vector<vector<int>> dp, dist;
vector<array<int, 2>> g[N];
int calc(int x, int y, int ax, int ay){
if(x==ax) return dp[0][abs(y-ay)-1];
if(y==ay) return dp[abs(x-ax)-1][0];
return min(dp[abs(x-ax)][abs(y-ay)-1], dp[abs(x-ax)-1][abs(y-ay)]);
}
void solve(){
cin >> r >> c >> n >> sx >> sy >> ex >> ey;
sx--, sy--, ex--, ey--;
for(int i = 0; i < r; ++i) cin >> s[i];
dp.resize(r + 5);
dist.resize(r + 5);
for(int i = 0; i < r + 5; ++i){
dp[i].resize(c + 5);
dist[i].resize(c + 5);
for(int j = 0; j < c + 5; ++j){
if(i==j && i==0) dp[i][j] = 0;
else{
if(i < n || j < n) dp[i][j] = max((i+n-1)/n, (j+n-1)/n);
else dp[i][j] = min({dp[i-n][j-n+1], dp[i-n+1][j-n], dp[i-n][j], dp[i][j-n]}) + 1;
}
}
}
// for(int i = 0; i <= r; ++i){
// for(int j = 0; j <= c; ++j){
// cout << i << ' ' << j << ' ' << dp[i][j] << '\n';
// }
// en;
// }
vector<vector<pair<int, int>>> C;
vector<vector<int>> vis(r, vector<int>(c));
for(int i = 0; i < r; ++i){
for(int j = 0; j < c; ++j){
if(s[i][j] == '#' || vis[i][j]) continue;
queue<pair<int, int>> q;
q.push({i, j});
vis[i][j] = C.size() + 1;
C.pb({});
while(!q.empty()){
int x = q.front().first, y = q.front().second;
q.pop();
C.back().pb({x, y});
for(int l = 0; l < 4; ++l){
int x1 = x + arr[l][0], x2 = y + arr[l][1];
if(x1 >= 0 && x2 >= 0 && x1 < r && x2 < c && s[x1][x2] != '#' && !vis[x1][x2]){
q.push({x1, x2});
vis[x1][x2] = C.size();
}
}
}
}
}
for(int i = 0; i < r; ++i){
int last = -1;
for(int j = c - 1; j >= 0; --j){
if(s[i][j] == '.') last = j;
dist[i][j] = last;
}
}
for(int i = 0; i < r; ++i){
for(int j = 0; j < c; ++j){
if(s[i][j] == '#') continue;
int x = i;
int v = vis[i][j];
if(j < c - 1){
if(dist[i][j + 1] != -1){
int u = vis[i][dist[i][j + 1]];
if(u != v){
g[v].pb({u, calc(i, j, i, dist[i][j+1])});
g[u].pb({v, calc(i, j, i, dist[i][j+1])});
}
}
}
for(int l = x - 1; l >= 0; --l){
if(s[l][j] != '#'){
int u = vis[l][j];
if(u==v) break;
g[v].pb({u, calc(i, j, l, j)});
g[u].pb({v, calc(i, j, l, j)});
break;
}
if(dist[l][j] != -1){
int u = vis[l][dist[l][j]];
g[v].pb({u, calc(i, j, l, dist[l][j])});
g[u].pb({v, calc(i, j, l, dist[l][j])});
}
}
for(int l = x + 1; l < r; ++l){
if(s[l][j] != '#'){
int u = vis[l][j];
if(u==v) break;
g[v].pb({u, calc(i, j, l, j)});
g[u].pb({v, calc(i, j, l, j)});
break;
}
if(dist[l][j] != -1){
int u = vis[l][dist[l][j]];
g[v].pb({u, calc(i, j, l, dist[l][j])});
g[u].pb({v, calc(i, j, l, dist[l][j])});
}
}
}
}
priority_queue<pair<int, int>> Q;
Q.push({0, vis[sx][sy]});
vector<int> D(N, MOD);
vector<bool> used(N);
D[vis[sx][sy]] = 0;
while(!Q.empty()){
int v = Q.top().second; Q.pop();
if(used[v]) continue;
used[v] = 1;
for(auto U: g[v]){
int u = U[0];
if(!used[u] && D[u] > D[v] + U[1]){
D[u] = D[v] + U[1];
Q.push({-D[u], u});
}
}
}
// int c = 0;
// for(auto v: C){
// cout << c+1 << '\n';
// ++c;
// for(auto p: v) cout << p.first << ' ' << p.second << '\n';
// en;
// }
// en;
// en;
// for(int i = 1; i <= C.size(); ++i){
// cout << i << '\n';
// for(auto u: g[i]){
// cout << u[0] << ' ' << u[1] << '\n';
// }
// en;
// }
cout << min(D[vis[ex][ey]], calc(sx, sy, ex, ey));
}
int main(){
cin.tie(0); ios::sync_with_stdio(0);
int tt = 1, aa;
// freopen("in.txt", "r", stdin);
// freopen("out.txt", "w", stdout);
while(tt--){
solve();
en;
}
cerr<<"time taken : "<<(float)clock()/CLOCKS_PER_SEC<<" seconds\n";
return 0;
}
Compilation message
Main.cpp: In function 'int main()':
Main.cpp:160:15: warning: unused variable 'aa' [-Wunused-variable]
160 | int tt = 1, aa;
| ^~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
108 ms |
353364 KB |
Output is correct |
2 |
Correct |
107 ms |
353252 KB |
Output is correct |
3 |
Correct |
106 ms |
353360 KB |
Output is correct |
4 |
Correct |
105 ms |
353360 KB |
Output is correct |
5 |
Correct |
108 ms |
353364 KB |
Output is correct |
6 |
Correct |
107 ms |
353360 KB |
Output is correct |
7 |
Correct |
107 ms |
353364 KB |
Output is correct |
8 |
Correct |
106 ms |
353356 KB |
Output is correct |
9 |
Correct |
106 ms |
353360 KB |
Output is correct |
10 |
Correct |
104 ms |
353364 KB |
Output is correct |
11 |
Correct |
105 ms |
353432 KB |
Output is correct |
12 |
Correct |
105 ms |
353408 KB |
Output is correct |
13 |
Correct |
104 ms |
353268 KB |
Output is correct |
14 |
Correct |
106 ms |
353364 KB |
Output is correct |
15 |
Correct |
107 ms |
353208 KB |
Output is correct |
16 |
Correct |
104 ms |
353360 KB |
Output is correct |
17 |
Correct |
107 ms |
353320 KB |
Output is correct |
18 |
Correct |
104 ms |
353412 KB |
Output is correct |
19 |
Correct |
112 ms |
356696 KB |
Output is correct |
20 |
Correct |
110 ms |
355740 KB |
Output is correct |
21 |
Correct |
108 ms |
354768 KB |
Output is correct |
22 |
Correct |
117 ms |
357312 KB |
Output is correct |
23 |
Correct |
110 ms |
355544 KB |
Output is correct |
24 |
Correct |
111 ms |
357152 KB |
Output is correct |
25 |
Correct |
110 ms |
356476 KB |
Output is correct |
26 |
Correct |
114 ms |
356728 KB |
Output is correct |
27 |
Correct |
121 ms |
357460 KB |
Output is correct |
28 |
Correct |
113 ms |
356836 KB |
Output is correct |
29 |
Correct |
122 ms |
361812 KB |
Output is correct |
30 |
Correct |
116 ms |
356748 KB |
Output is correct |
31 |
Correct |
117 ms |
356580 KB |
Output is correct |
32 |
Correct |
134 ms |
363148 KB |
Output is correct |
33 |
Correct |
119 ms |
359508 KB |
Output is correct |
34 |
Correct |
119 ms |
362880 KB |
Output is correct |
35 |
Correct |
116 ms |
361152 KB |
Output is correct |
36 |
Correct |
130 ms |
361796 KB |
Output is correct |
37 |
Correct |
135 ms |
363152 KB |
Output is correct |
38 |
Correct |
124 ms |
362352 KB |
Output is correct |
39 |
Correct |
358 ms |
441480 KB |
Output is correct |
40 |
Correct |
133 ms |
362792 KB |
Output is correct |
41 |
Correct |
128 ms |
366296 KB |
Output is correct |
42 |
Correct |
152 ms |
367548 KB |
Output is correct |
43 |
Correct |
137 ms |
366448 KB |
Output is correct |
44 |
Correct |
197 ms |
385788 KB |
Output is correct |
45 |
Correct |
201 ms |
386276 KB |
Output is correct |
46 |
Correct |
181 ms |
386992 KB |
Output is correct |
47 |
Correct |
441 ms |
450292 KB |
Output is correct |
48 |
Correct |
353 ms |
433032 KB |
Output is correct |
49 |
Correct |
254 ms |
448884 KB |
Output is correct |
50 |
Correct |
212 ms |
432396 KB |
Output is correct |
51 |
Correct |
371 ms |
439040 KB |
Output is correct |
52 |
Correct |
436 ms |
450972 KB |
Output is correct |
53 |
Correct |
366 ms |
444024 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
106 ms |
353280 KB |
Output is correct |
2 |
Correct |
104 ms |
353240 KB |
Output is correct |
3 |
Correct |
105 ms |
353364 KB |
Output is correct |
4 |
Correct |
105 ms |
353288 KB |
Output is correct |
5 |
Correct |
107 ms |
353364 KB |
Output is correct |
6 |
Correct |
106 ms |
353352 KB |
Output is correct |
7 |
Correct |
105 ms |
353364 KB |
Output is correct |
8 |
Correct |
107 ms |
353364 KB |
Output is correct |
9 |
Correct |
104 ms |
353360 KB |
Output is correct |
10 |
Correct |
106 ms |
353284 KB |
Output is correct |
11 |
Correct |
106 ms |
353364 KB |
Output is correct |
12 |
Correct |
106 ms |
353364 KB |
Output is correct |
13 |
Correct |
105 ms |
353344 KB |
Output is correct |
14 |
Correct |
106 ms |
353364 KB |
Output is correct |
15 |
Correct |
105 ms |
353360 KB |
Output is correct |
16 |
Correct |
105 ms |
353364 KB |
Output is correct |
17 |
Incorrect |
109 ms |
353352 KB |
Output isn't correct |
18 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
107 ms |
353272 KB |
Output is correct |
2 |
Correct |
106 ms |
353360 KB |
Output is correct |
3 |
Correct |
111 ms |
353368 KB |
Output is correct |
4 |
Correct |
106 ms |
353364 KB |
Output is correct |
5 |
Correct |
111 ms |
353364 KB |
Output is correct |
6 |
Correct |
107 ms |
353360 KB |
Output is correct |
7 |
Correct |
108 ms |
353360 KB |
Output is correct |
8 |
Correct |
108 ms |
353360 KB |
Output is correct |
9 |
Correct |
113 ms |
353684 KB |
Output is correct |
10 |
Correct |
108 ms |
353364 KB |
Output is correct |
11 |
Correct |
106 ms |
353360 KB |
Output is correct |
12 |
Correct |
106 ms |
353496 KB |
Output is correct |
13 |
Correct |
109 ms |
353516 KB |
Output is correct |
14 |
Correct |
106 ms |
353388 KB |
Output is correct |
15 |
Correct |
107 ms |
353324 KB |
Output is correct |
16 |
Correct |
108 ms |
353444 KB |
Output is correct |
17 |
Correct |
109 ms |
353364 KB |
Output is correct |
18 |
Correct |
109 ms |
353412 KB |
Output is correct |
19 |
Correct |
106 ms |
353296 KB |
Output is correct |
20 |
Correct |
107 ms |
353256 KB |
Output is correct |
21 |
Correct |
110 ms |
353536 KB |
Output is correct |
22 |
Correct |
108 ms |
353396 KB |
Output is correct |
23 |
Correct |
111 ms |
353452 KB |
Output is correct |
24 |
Correct |
106 ms |
353520 KB |
Output is correct |
25 |
Incorrect |
116 ms |
355968 KB |
Output isn't correct |
26 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
106 ms |
353280 KB |
Output is correct |
2 |
Correct |
104 ms |
353240 KB |
Output is correct |
3 |
Correct |
105 ms |
353364 KB |
Output is correct |
4 |
Correct |
105 ms |
353288 KB |
Output is correct |
5 |
Correct |
107 ms |
353364 KB |
Output is correct |
6 |
Correct |
106 ms |
353352 KB |
Output is correct |
7 |
Correct |
105 ms |
353364 KB |
Output is correct |
8 |
Correct |
107 ms |
353364 KB |
Output is correct |
9 |
Correct |
104 ms |
353360 KB |
Output is correct |
10 |
Correct |
106 ms |
353284 KB |
Output is correct |
11 |
Correct |
106 ms |
353364 KB |
Output is correct |
12 |
Correct |
106 ms |
353364 KB |
Output is correct |
13 |
Correct |
105 ms |
353344 KB |
Output is correct |
14 |
Correct |
106 ms |
353364 KB |
Output is correct |
15 |
Correct |
105 ms |
353360 KB |
Output is correct |
16 |
Correct |
105 ms |
353364 KB |
Output is correct |
17 |
Incorrect |
109 ms |
353352 KB |
Output isn't correct |
18 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
106 ms |
353280 KB |
Output is correct |
2 |
Correct |
104 ms |
353240 KB |
Output is correct |
3 |
Correct |
105 ms |
353364 KB |
Output is correct |
4 |
Correct |
105 ms |
353288 KB |
Output is correct |
5 |
Correct |
107 ms |
353364 KB |
Output is correct |
6 |
Correct |
106 ms |
353352 KB |
Output is correct |
7 |
Correct |
105 ms |
353364 KB |
Output is correct |
8 |
Correct |
107 ms |
353364 KB |
Output is correct |
9 |
Correct |
104 ms |
353360 KB |
Output is correct |
10 |
Correct |
106 ms |
353284 KB |
Output is correct |
11 |
Correct |
106 ms |
353364 KB |
Output is correct |
12 |
Correct |
106 ms |
353364 KB |
Output is correct |
13 |
Correct |
105 ms |
353344 KB |
Output is correct |
14 |
Correct |
106 ms |
353364 KB |
Output is correct |
15 |
Correct |
105 ms |
353360 KB |
Output is correct |
16 |
Correct |
105 ms |
353364 KB |
Output is correct |
17 |
Incorrect |
109 ms |
353352 KB |
Output isn't correct |
18 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
108 ms |
353364 KB |
Output is correct |
2 |
Correct |
107 ms |
353252 KB |
Output is correct |
3 |
Correct |
106 ms |
353360 KB |
Output is correct |
4 |
Correct |
105 ms |
353360 KB |
Output is correct |
5 |
Correct |
108 ms |
353364 KB |
Output is correct |
6 |
Correct |
107 ms |
353360 KB |
Output is correct |
7 |
Correct |
107 ms |
353364 KB |
Output is correct |
8 |
Correct |
106 ms |
353356 KB |
Output is correct |
9 |
Correct |
106 ms |
353360 KB |
Output is correct |
10 |
Correct |
104 ms |
353364 KB |
Output is correct |
11 |
Correct |
105 ms |
353432 KB |
Output is correct |
12 |
Correct |
105 ms |
353408 KB |
Output is correct |
13 |
Correct |
104 ms |
353268 KB |
Output is correct |
14 |
Correct |
106 ms |
353364 KB |
Output is correct |
15 |
Correct |
107 ms |
353208 KB |
Output is correct |
16 |
Correct |
104 ms |
353360 KB |
Output is correct |
17 |
Correct |
107 ms |
353320 KB |
Output is correct |
18 |
Correct |
104 ms |
353412 KB |
Output is correct |
19 |
Correct |
112 ms |
356696 KB |
Output is correct |
20 |
Correct |
110 ms |
355740 KB |
Output is correct |
21 |
Correct |
108 ms |
354768 KB |
Output is correct |
22 |
Correct |
117 ms |
357312 KB |
Output is correct |
23 |
Correct |
110 ms |
355544 KB |
Output is correct |
24 |
Correct |
111 ms |
357152 KB |
Output is correct |
25 |
Correct |
110 ms |
356476 KB |
Output is correct |
26 |
Correct |
114 ms |
356728 KB |
Output is correct |
27 |
Correct |
121 ms |
357460 KB |
Output is correct |
28 |
Correct |
113 ms |
356836 KB |
Output is correct |
29 |
Correct |
122 ms |
361812 KB |
Output is correct |
30 |
Correct |
116 ms |
356748 KB |
Output is correct |
31 |
Correct |
117 ms |
356580 KB |
Output is correct |
32 |
Correct |
134 ms |
363148 KB |
Output is correct |
33 |
Correct |
119 ms |
359508 KB |
Output is correct |
34 |
Correct |
119 ms |
362880 KB |
Output is correct |
35 |
Correct |
116 ms |
361152 KB |
Output is correct |
36 |
Correct |
130 ms |
361796 KB |
Output is correct |
37 |
Correct |
135 ms |
363152 KB |
Output is correct |
38 |
Correct |
124 ms |
362352 KB |
Output is correct |
39 |
Correct |
358 ms |
441480 KB |
Output is correct |
40 |
Correct |
133 ms |
362792 KB |
Output is correct |
41 |
Correct |
128 ms |
366296 KB |
Output is correct |
42 |
Correct |
152 ms |
367548 KB |
Output is correct |
43 |
Correct |
137 ms |
366448 KB |
Output is correct |
44 |
Correct |
197 ms |
385788 KB |
Output is correct |
45 |
Correct |
201 ms |
386276 KB |
Output is correct |
46 |
Correct |
181 ms |
386992 KB |
Output is correct |
47 |
Correct |
441 ms |
450292 KB |
Output is correct |
48 |
Correct |
353 ms |
433032 KB |
Output is correct |
49 |
Correct |
254 ms |
448884 KB |
Output is correct |
50 |
Correct |
212 ms |
432396 KB |
Output is correct |
51 |
Correct |
371 ms |
439040 KB |
Output is correct |
52 |
Correct |
436 ms |
450972 KB |
Output is correct |
53 |
Correct |
366 ms |
444024 KB |
Output is correct |
54 |
Correct |
106 ms |
353280 KB |
Output is correct |
55 |
Correct |
104 ms |
353240 KB |
Output is correct |
56 |
Correct |
105 ms |
353364 KB |
Output is correct |
57 |
Correct |
105 ms |
353288 KB |
Output is correct |
58 |
Correct |
107 ms |
353364 KB |
Output is correct |
59 |
Correct |
106 ms |
353352 KB |
Output is correct |
60 |
Correct |
105 ms |
353364 KB |
Output is correct |
61 |
Correct |
107 ms |
353364 KB |
Output is correct |
62 |
Correct |
104 ms |
353360 KB |
Output is correct |
63 |
Correct |
106 ms |
353284 KB |
Output is correct |
64 |
Correct |
106 ms |
353364 KB |
Output is correct |
65 |
Correct |
106 ms |
353364 KB |
Output is correct |
66 |
Correct |
105 ms |
353344 KB |
Output is correct |
67 |
Correct |
106 ms |
353364 KB |
Output is correct |
68 |
Correct |
105 ms |
353360 KB |
Output is correct |
69 |
Correct |
105 ms |
353364 KB |
Output is correct |
70 |
Incorrect |
109 ms |
353352 KB |
Output isn't correct |
71 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
108 ms |
353364 KB |
Output is correct |
2 |
Correct |
107 ms |
353252 KB |
Output is correct |
3 |
Correct |
106 ms |
353360 KB |
Output is correct |
4 |
Correct |
105 ms |
353360 KB |
Output is correct |
5 |
Correct |
108 ms |
353364 KB |
Output is correct |
6 |
Correct |
107 ms |
353360 KB |
Output is correct |
7 |
Correct |
107 ms |
353364 KB |
Output is correct |
8 |
Correct |
106 ms |
353356 KB |
Output is correct |
9 |
Correct |
106 ms |
353360 KB |
Output is correct |
10 |
Correct |
104 ms |
353364 KB |
Output is correct |
11 |
Correct |
105 ms |
353432 KB |
Output is correct |
12 |
Correct |
105 ms |
353408 KB |
Output is correct |
13 |
Correct |
104 ms |
353268 KB |
Output is correct |
14 |
Correct |
106 ms |
353364 KB |
Output is correct |
15 |
Correct |
107 ms |
353208 KB |
Output is correct |
16 |
Correct |
104 ms |
353360 KB |
Output is correct |
17 |
Correct |
107 ms |
353320 KB |
Output is correct |
18 |
Correct |
104 ms |
353412 KB |
Output is correct |
19 |
Correct |
112 ms |
356696 KB |
Output is correct |
20 |
Correct |
110 ms |
355740 KB |
Output is correct |
21 |
Correct |
108 ms |
354768 KB |
Output is correct |
22 |
Correct |
117 ms |
357312 KB |
Output is correct |
23 |
Correct |
110 ms |
355544 KB |
Output is correct |
24 |
Correct |
111 ms |
357152 KB |
Output is correct |
25 |
Correct |
110 ms |
356476 KB |
Output is correct |
26 |
Correct |
114 ms |
356728 KB |
Output is correct |
27 |
Correct |
121 ms |
357460 KB |
Output is correct |
28 |
Correct |
113 ms |
356836 KB |
Output is correct |
29 |
Correct |
122 ms |
361812 KB |
Output is correct |
30 |
Correct |
116 ms |
356748 KB |
Output is correct |
31 |
Correct |
117 ms |
356580 KB |
Output is correct |
32 |
Correct |
134 ms |
363148 KB |
Output is correct |
33 |
Correct |
119 ms |
359508 KB |
Output is correct |
34 |
Correct |
119 ms |
362880 KB |
Output is correct |
35 |
Correct |
116 ms |
361152 KB |
Output is correct |
36 |
Correct |
130 ms |
361796 KB |
Output is correct |
37 |
Correct |
135 ms |
363152 KB |
Output is correct |
38 |
Correct |
124 ms |
362352 KB |
Output is correct |
39 |
Correct |
358 ms |
441480 KB |
Output is correct |
40 |
Correct |
133 ms |
362792 KB |
Output is correct |
41 |
Correct |
128 ms |
366296 KB |
Output is correct |
42 |
Correct |
152 ms |
367548 KB |
Output is correct |
43 |
Correct |
137 ms |
366448 KB |
Output is correct |
44 |
Correct |
197 ms |
385788 KB |
Output is correct |
45 |
Correct |
201 ms |
386276 KB |
Output is correct |
46 |
Correct |
181 ms |
386992 KB |
Output is correct |
47 |
Correct |
441 ms |
450292 KB |
Output is correct |
48 |
Correct |
353 ms |
433032 KB |
Output is correct |
49 |
Correct |
254 ms |
448884 KB |
Output is correct |
50 |
Correct |
212 ms |
432396 KB |
Output is correct |
51 |
Correct |
371 ms |
439040 KB |
Output is correct |
52 |
Correct |
436 ms |
450972 KB |
Output is correct |
53 |
Correct |
366 ms |
444024 KB |
Output is correct |
54 |
Correct |
106 ms |
353280 KB |
Output is correct |
55 |
Correct |
104 ms |
353240 KB |
Output is correct |
56 |
Correct |
105 ms |
353364 KB |
Output is correct |
57 |
Correct |
105 ms |
353288 KB |
Output is correct |
58 |
Correct |
107 ms |
353364 KB |
Output is correct |
59 |
Correct |
106 ms |
353352 KB |
Output is correct |
60 |
Correct |
105 ms |
353364 KB |
Output is correct |
61 |
Correct |
107 ms |
353364 KB |
Output is correct |
62 |
Correct |
104 ms |
353360 KB |
Output is correct |
63 |
Correct |
106 ms |
353284 KB |
Output is correct |
64 |
Correct |
106 ms |
353364 KB |
Output is correct |
65 |
Correct |
106 ms |
353364 KB |
Output is correct |
66 |
Correct |
105 ms |
353344 KB |
Output is correct |
67 |
Correct |
106 ms |
353364 KB |
Output is correct |
68 |
Correct |
105 ms |
353360 KB |
Output is correct |
69 |
Correct |
105 ms |
353364 KB |
Output is correct |
70 |
Incorrect |
109 ms |
353352 KB |
Output isn't correct |
71 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
108 ms |
353364 KB |
Output is correct |
2 |
Correct |
107 ms |
353252 KB |
Output is correct |
3 |
Correct |
106 ms |
353360 KB |
Output is correct |
4 |
Correct |
105 ms |
353360 KB |
Output is correct |
5 |
Correct |
108 ms |
353364 KB |
Output is correct |
6 |
Correct |
107 ms |
353360 KB |
Output is correct |
7 |
Correct |
107 ms |
353364 KB |
Output is correct |
8 |
Correct |
106 ms |
353356 KB |
Output is correct |
9 |
Correct |
106 ms |
353360 KB |
Output is correct |
10 |
Correct |
104 ms |
353364 KB |
Output is correct |
11 |
Correct |
105 ms |
353432 KB |
Output is correct |
12 |
Correct |
105 ms |
353408 KB |
Output is correct |
13 |
Correct |
104 ms |
353268 KB |
Output is correct |
14 |
Correct |
106 ms |
353364 KB |
Output is correct |
15 |
Correct |
107 ms |
353208 KB |
Output is correct |
16 |
Correct |
104 ms |
353360 KB |
Output is correct |
17 |
Correct |
107 ms |
353320 KB |
Output is correct |
18 |
Correct |
104 ms |
353412 KB |
Output is correct |
19 |
Correct |
112 ms |
356696 KB |
Output is correct |
20 |
Correct |
110 ms |
355740 KB |
Output is correct |
21 |
Correct |
108 ms |
354768 KB |
Output is correct |
22 |
Correct |
117 ms |
357312 KB |
Output is correct |
23 |
Correct |
110 ms |
355544 KB |
Output is correct |
24 |
Correct |
111 ms |
357152 KB |
Output is correct |
25 |
Correct |
110 ms |
356476 KB |
Output is correct |
26 |
Correct |
114 ms |
356728 KB |
Output is correct |
27 |
Correct |
121 ms |
357460 KB |
Output is correct |
28 |
Correct |
113 ms |
356836 KB |
Output is correct |
29 |
Correct |
122 ms |
361812 KB |
Output is correct |
30 |
Correct |
116 ms |
356748 KB |
Output is correct |
31 |
Correct |
117 ms |
356580 KB |
Output is correct |
32 |
Correct |
134 ms |
363148 KB |
Output is correct |
33 |
Correct |
119 ms |
359508 KB |
Output is correct |
34 |
Correct |
119 ms |
362880 KB |
Output is correct |
35 |
Correct |
116 ms |
361152 KB |
Output is correct |
36 |
Correct |
130 ms |
361796 KB |
Output is correct |
37 |
Correct |
135 ms |
363152 KB |
Output is correct |
38 |
Correct |
124 ms |
362352 KB |
Output is correct |
39 |
Correct |
358 ms |
441480 KB |
Output is correct |
40 |
Correct |
133 ms |
362792 KB |
Output is correct |
41 |
Correct |
128 ms |
366296 KB |
Output is correct |
42 |
Correct |
152 ms |
367548 KB |
Output is correct |
43 |
Correct |
137 ms |
366448 KB |
Output is correct |
44 |
Correct |
197 ms |
385788 KB |
Output is correct |
45 |
Correct |
201 ms |
386276 KB |
Output is correct |
46 |
Correct |
181 ms |
386992 KB |
Output is correct |
47 |
Correct |
441 ms |
450292 KB |
Output is correct |
48 |
Correct |
353 ms |
433032 KB |
Output is correct |
49 |
Correct |
254 ms |
448884 KB |
Output is correct |
50 |
Correct |
212 ms |
432396 KB |
Output is correct |
51 |
Correct |
371 ms |
439040 KB |
Output is correct |
52 |
Correct |
436 ms |
450972 KB |
Output is correct |
53 |
Correct |
366 ms |
444024 KB |
Output is correct |
54 |
Correct |
106 ms |
353280 KB |
Output is correct |
55 |
Correct |
104 ms |
353240 KB |
Output is correct |
56 |
Correct |
105 ms |
353364 KB |
Output is correct |
57 |
Correct |
105 ms |
353288 KB |
Output is correct |
58 |
Correct |
107 ms |
353364 KB |
Output is correct |
59 |
Correct |
106 ms |
353352 KB |
Output is correct |
60 |
Correct |
105 ms |
353364 KB |
Output is correct |
61 |
Correct |
107 ms |
353364 KB |
Output is correct |
62 |
Correct |
104 ms |
353360 KB |
Output is correct |
63 |
Correct |
106 ms |
353284 KB |
Output is correct |
64 |
Correct |
106 ms |
353364 KB |
Output is correct |
65 |
Correct |
106 ms |
353364 KB |
Output is correct |
66 |
Correct |
105 ms |
353344 KB |
Output is correct |
67 |
Correct |
106 ms |
353364 KB |
Output is correct |
68 |
Correct |
105 ms |
353360 KB |
Output is correct |
69 |
Correct |
105 ms |
353364 KB |
Output is correct |
70 |
Incorrect |
109 ms |
353352 KB |
Output isn't correct |
71 |
Halted |
0 ms |
0 KB |
- |