/* 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]) + 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 |
107 ms |
353452 KB |
Output is correct |
2 |
Correct |
107 ms |
353364 KB |
Output is correct |
3 |
Correct |
110 ms |
353364 KB |
Output is correct |
4 |
Correct |
104 ms |
353364 KB |
Output is correct |
5 |
Correct |
102 ms |
353364 KB |
Output is correct |
6 |
Correct |
102 ms |
353404 KB |
Output is correct |
7 |
Correct |
103 ms |
353364 KB |
Output is correct |
8 |
Correct |
103 ms |
353364 KB |
Output is correct |
9 |
Correct |
101 ms |
353216 KB |
Output is correct |
10 |
Correct |
104 ms |
353508 KB |
Output is correct |
11 |
Correct |
103 ms |
353320 KB |
Output is correct |
12 |
Correct |
102 ms |
353360 KB |
Output is correct |
13 |
Correct |
102 ms |
353364 KB |
Output is correct |
14 |
Correct |
102 ms |
353424 KB |
Output is correct |
15 |
Correct |
102 ms |
353364 KB |
Output is correct |
16 |
Correct |
104 ms |
353488 KB |
Output is correct |
17 |
Correct |
103 ms |
353364 KB |
Output is correct |
18 |
Correct |
103 ms |
353408 KB |
Output is correct |
19 |
Correct |
109 ms |
356652 KB |
Output is correct |
20 |
Correct |
104 ms |
356000 KB |
Output is correct |
21 |
Correct |
105 ms |
354672 KB |
Output is correct |
22 |
Correct |
122 ms |
357180 KB |
Output is correct |
23 |
Correct |
106 ms |
355628 KB |
Output is correct |
24 |
Correct |
109 ms |
357272 KB |
Output is correct |
25 |
Correct |
106 ms |
356500 KB |
Output is correct |
26 |
Correct |
115 ms |
356692 KB |
Output is correct |
27 |
Correct |
114 ms |
357204 KB |
Output is correct |
28 |
Correct |
110 ms |
357064 KB |
Output is correct |
29 |
Correct |
122 ms |
361884 KB |
Output is correct |
30 |
Correct |
111 ms |
356888 KB |
Output is correct |
31 |
Correct |
112 ms |
356792 KB |
Output is correct |
32 |
Correct |
132 ms |
363152 KB |
Output is correct |
33 |
Correct |
114 ms |
359660 KB |
Output is correct |
34 |
Correct |
115 ms |
363156 KB |
Output is correct |
35 |
Correct |
112 ms |
361364 KB |
Output is correct |
36 |
Correct |
128 ms |
361872 KB |
Output is correct |
37 |
Correct |
135 ms |
363332 KB |
Output is correct |
38 |
Correct |
123 ms |
362672 KB |
Output is correct |
39 |
Correct |
369 ms |
443068 KB |
Output is correct |
40 |
Correct |
130 ms |
363148 KB |
Output is correct |
41 |
Correct |
122 ms |
366604 KB |
Output is correct |
42 |
Correct |
149 ms |
367888 KB |
Output is correct |
43 |
Correct |
134 ms |
366572 KB |
Output is correct |
44 |
Correct |
187 ms |
386580 KB |
Output is correct |
45 |
Correct |
199 ms |
387928 KB |
Output is correct |
46 |
Correct |
181 ms |
388300 KB |
Output is correct |
47 |
Correct |
440 ms |
452088 KB |
Output is correct |
48 |
Correct |
363 ms |
434500 KB |
Output is correct |
49 |
Correct |
241 ms |
450384 KB |
Output is correct |
50 |
Correct |
205 ms |
433784 KB |
Output is correct |
51 |
Correct |
382 ms |
440568 KB |
Output is correct |
52 |
Correct |
448 ms |
452344 KB |
Output is correct |
53 |
Correct |
380 ms |
445820 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
108 ms |
353288 KB |
Output is correct |
2 |
Correct |
106 ms |
353256 KB |
Output is correct |
3 |
Correct |
103 ms |
353284 KB |
Output is correct |
4 |
Correct |
108 ms |
353364 KB |
Output is correct |
5 |
Correct |
103 ms |
353364 KB |
Output is correct |
6 |
Correct |
104 ms |
353364 KB |
Output is correct |
7 |
Correct |
102 ms |
353212 KB |
Output is correct |
8 |
Correct |
106 ms |
353432 KB |
Output is correct |
9 |
Correct |
103 ms |
353328 KB |
Output is correct |
10 |
Correct |
103 ms |
353364 KB |
Output is correct |
11 |
Correct |
104 ms |
353364 KB |
Output is correct |
12 |
Correct |
106 ms |
353364 KB |
Output is correct |
13 |
Correct |
102 ms |
353364 KB |
Output is correct |
14 |
Correct |
102 ms |
353288 KB |
Output is correct |
15 |
Correct |
111 ms |
353364 KB |
Output is correct |
16 |
Correct |
108 ms |
353692 KB |
Output is correct |
17 |
Incorrect |
102 ms |
353292 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 |
353364 KB |
Output is correct |
3 |
Correct |
105 ms |
353364 KB |
Output is correct |
4 |
Correct |
104 ms |
353364 KB |
Output is correct |
5 |
Correct |
103 ms |
353400 KB |
Output is correct |
6 |
Correct |
104 ms |
353208 KB |
Output is correct |
7 |
Correct |
107 ms |
353444 KB |
Output is correct |
8 |
Correct |
105 ms |
353364 KB |
Output is correct |
9 |
Correct |
106 ms |
353364 KB |
Output is correct |
10 |
Correct |
107 ms |
353440 KB |
Output is correct |
11 |
Correct |
108 ms |
353400 KB |
Output is correct |
12 |
Correct |
115 ms |
353288 KB |
Output is correct |
13 |
Correct |
105 ms |
353364 KB |
Output is correct |
14 |
Correct |
109 ms |
353280 KB |
Output is correct |
15 |
Correct |
105 ms |
353364 KB |
Output is correct |
16 |
Correct |
106 ms |
353392 KB |
Output is correct |
17 |
Correct |
107 ms |
353364 KB |
Output is correct |
18 |
Correct |
104 ms |
353336 KB |
Output is correct |
19 |
Correct |
108 ms |
353280 KB |
Output is correct |
20 |
Correct |
106 ms |
353408 KB |
Output is correct |
21 |
Correct |
105 ms |
353364 KB |
Output is correct |
22 |
Correct |
105 ms |
353328 KB |
Output is correct |
23 |
Correct |
107 ms |
353364 KB |
Output is correct |
24 |
Correct |
105 ms |
353364 KB |
Output is correct |
25 |
Incorrect |
111 ms |
355768 KB |
Output isn't correct |
26 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
108 ms |
353288 KB |
Output is correct |
2 |
Correct |
106 ms |
353256 KB |
Output is correct |
3 |
Correct |
103 ms |
353284 KB |
Output is correct |
4 |
Correct |
108 ms |
353364 KB |
Output is correct |
5 |
Correct |
103 ms |
353364 KB |
Output is correct |
6 |
Correct |
104 ms |
353364 KB |
Output is correct |
7 |
Correct |
102 ms |
353212 KB |
Output is correct |
8 |
Correct |
106 ms |
353432 KB |
Output is correct |
9 |
Correct |
103 ms |
353328 KB |
Output is correct |
10 |
Correct |
103 ms |
353364 KB |
Output is correct |
11 |
Correct |
104 ms |
353364 KB |
Output is correct |
12 |
Correct |
106 ms |
353364 KB |
Output is correct |
13 |
Correct |
102 ms |
353364 KB |
Output is correct |
14 |
Correct |
102 ms |
353288 KB |
Output is correct |
15 |
Correct |
111 ms |
353364 KB |
Output is correct |
16 |
Correct |
108 ms |
353692 KB |
Output is correct |
17 |
Incorrect |
102 ms |
353292 KB |
Output isn't correct |
18 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
108 ms |
353288 KB |
Output is correct |
2 |
Correct |
106 ms |
353256 KB |
Output is correct |
3 |
Correct |
103 ms |
353284 KB |
Output is correct |
4 |
Correct |
108 ms |
353364 KB |
Output is correct |
5 |
Correct |
103 ms |
353364 KB |
Output is correct |
6 |
Correct |
104 ms |
353364 KB |
Output is correct |
7 |
Correct |
102 ms |
353212 KB |
Output is correct |
8 |
Correct |
106 ms |
353432 KB |
Output is correct |
9 |
Correct |
103 ms |
353328 KB |
Output is correct |
10 |
Correct |
103 ms |
353364 KB |
Output is correct |
11 |
Correct |
104 ms |
353364 KB |
Output is correct |
12 |
Correct |
106 ms |
353364 KB |
Output is correct |
13 |
Correct |
102 ms |
353364 KB |
Output is correct |
14 |
Correct |
102 ms |
353288 KB |
Output is correct |
15 |
Correct |
111 ms |
353364 KB |
Output is correct |
16 |
Correct |
108 ms |
353692 KB |
Output is correct |
17 |
Incorrect |
102 ms |
353292 KB |
Output isn't correct |
18 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
107 ms |
353452 KB |
Output is correct |
2 |
Correct |
107 ms |
353364 KB |
Output is correct |
3 |
Correct |
110 ms |
353364 KB |
Output is correct |
4 |
Correct |
104 ms |
353364 KB |
Output is correct |
5 |
Correct |
102 ms |
353364 KB |
Output is correct |
6 |
Correct |
102 ms |
353404 KB |
Output is correct |
7 |
Correct |
103 ms |
353364 KB |
Output is correct |
8 |
Correct |
103 ms |
353364 KB |
Output is correct |
9 |
Correct |
101 ms |
353216 KB |
Output is correct |
10 |
Correct |
104 ms |
353508 KB |
Output is correct |
11 |
Correct |
103 ms |
353320 KB |
Output is correct |
12 |
Correct |
102 ms |
353360 KB |
Output is correct |
13 |
Correct |
102 ms |
353364 KB |
Output is correct |
14 |
Correct |
102 ms |
353424 KB |
Output is correct |
15 |
Correct |
102 ms |
353364 KB |
Output is correct |
16 |
Correct |
104 ms |
353488 KB |
Output is correct |
17 |
Correct |
103 ms |
353364 KB |
Output is correct |
18 |
Correct |
103 ms |
353408 KB |
Output is correct |
19 |
Correct |
109 ms |
356652 KB |
Output is correct |
20 |
Correct |
104 ms |
356000 KB |
Output is correct |
21 |
Correct |
105 ms |
354672 KB |
Output is correct |
22 |
Correct |
122 ms |
357180 KB |
Output is correct |
23 |
Correct |
106 ms |
355628 KB |
Output is correct |
24 |
Correct |
109 ms |
357272 KB |
Output is correct |
25 |
Correct |
106 ms |
356500 KB |
Output is correct |
26 |
Correct |
115 ms |
356692 KB |
Output is correct |
27 |
Correct |
114 ms |
357204 KB |
Output is correct |
28 |
Correct |
110 ms |
357064 KB |
Output is correct |
29 |
Correct |
122 ms |
361884 KB |
Output is correct |
30 |
Correct |
111 ms |
356888 KB |
Output is correct |
31 |
Correct |
112 ms |
356792 KB |
Output is correct |
32 |
Correct |
132 ms |
363152 KB |
Output is correct |
33 |
Correct |
114 ms |
359660 KB |
Output is correct |
34 |
Correct |
115 ms |
363156 KB |
Output is correct |
35 |
Correct |
112 ms |
361364 KB |
Output is correct |
36 |
Correct |
128 ms |
361872 KB |
Output is correct |
37 |
Correct |
135 ms |
363332 KB |
Output is correct |
38 |
Correct |
123 ms |
362672 KB |
Output is correct |
39 |
Correct |
369 ms |
443068 KB |
Output is correct |
40 |
Correct |
130 ms |
363148 KB |
Output is correct |
41 |
Correct |
122 ms |
366604 KB |
Output is correct |
42 |
Correct |
149 ms |
367888 KB |
Output is correct |
43 |
Correct |
134 ms |
366572 KB |
Output is correct |
44 |
Correct |
187 ms |
386580 KB |
Output is correct |
45 |
Correct |
199 ms |
387928 KB |
Output is correct |
46 |
Correct |
181 ms |
388300 KB |
Output is correct |
47 |
Correct |
440 ms |
452088 KB |
Output is correct |
48 |
Correct |
363 ms |
434500 KB |
Output is correct |
49 |
Correct |
241 ms |
450384 KB |
Output is correct |
50 |
Correct |
205 ms |
433784 KB |
Output is correct |
51 |
Correct |
382 ms |
440568 KB |
Output is correct |
52 |
Correct |
448 ms |
452344 KB |
Output is correct |
53 |
Correct |
380 ms |
445820 KB |
Output is correct |
54 |
Correct |
108 ms |
353288 KB |
Output is correct |
55 |
Correct |
106 ms |
353256 KB |
Output is correct |
56 |
Correct |
103 ms |
353284 KB |
Output is correct |
57 |
Correct |
108 ms |
353364 KB |
Output is correct |
58 |
Correct |
103 ms |
353364 KB |
Output is correct |
59 |
Correct |
104 ms |
353364 KB |
Output is correct |
60 |
Correct |
102 ms |
353212 KB |
Output is correct |
61 |
Correct |
106 ms |
353432 KB |
Output is correct |
62 |
Correct |
103 ms |
353328 KB |
Output is correct |
63 |
Correct |
103 ms |
353364 KB |
Output is correct |
64 |
Correct |
104 ms |
353364 KB |
Output is correct |
65 |
Correct |
106 ms |
353364 KB |
Output is correct |
66 |
Correct |
102 ms |
353364 KB |
Output is correct |
67 |
Correct |
102 ms |
353288 KB |
Output is correct |
68 |
Correct |
111 ms |
353364 KB |
Output is correct |
69 |
Correct |
108 ms |
353692 KB |
Output is correct |
70 |
Incorrect |
102 ms |
353292 KB |
Output isn't correct |
71 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
107 ms |
353452 KB |
Output is correct |
2 |
Correct |
107 ms |
353364 KB |
Output is correct |
3 |
Correct |
110 ms |
353364 KB |
Output is correct |
4 |
Correct |
104 ms |
353364 KB |
Output is correct |
5 |
Correct |
102 ms |
353364 KB |
Output is correct |
6 |
Correct |
102 ms |
353404 KB |
Output is correct |
7 |
Correct |
103 ms |
353364 KB |
Output is correct |
8 |
Correct |
103 ms |
353364 KB |
Output is correct |
9 |
Correct |
101 ms |
353216 KB |
Output is correct |
10 |
Correct |
104 ms |
353508 KB |
Output is correct |
11 |
Correct |
103 ms |
353320 KB |
Output is correct |
12 |
Correct |
102 ms |
353360 KB |
Output is correct |
13 |
Correct |
102 ms |
353364 KB |
Output is correct |
14 |
Correct |
102 ms |
353424 KB |
Output is correct |
15 |
Correct |
102 ms |
353364 KB |
Output is correct |
16 |
Correct |
104 ms |
353488 KB |
Output is correct |
17 |
Correct |
103 ms |
353364 KB |
Output is correct |
18 |
Correct |
103 ms |
353408 KB |
Output is correct |
19 |
Correct |
109 ms |
356652 KB |
Output is correct |
20 |
Correct |
104 ms |
356000 KB |
Output is correct |
21 |
Correct |
105 ms |
354672 KB |
Output is correct |
22 |
Correct |
122 ms |
357180 KB |
Output is correct |
23 |
Correct |
106 ms |
355628 KB |
Output is correct |
24 |
Correct |
109 ms |
357272 KB |
Output is correct |
25 |
Correct |
106 ms |
356500 KB |
Output is correct |
26 |
Correct |
115 ms |
356692 KB |
Output is correct |
27 |
Correct |
114 ms |
357204 KB |
Output is correct |
28 |
Correct |
110 ms |
357064 KB |
Output is correct |
29 |
Correct |
122 ms |
361884 KB |
Output is correct |
30 |
Correct |
111 ms |
356888 KB |
Output is correct |
31 |
Correct |
112 ms |
356792 KB |
Output is correct |
32 |
Correct |
132 ms |
363152 KB |
Output is correct |
33 |
Correct |
114 ms |
359660 KB |
Output is correct |
34 |
Correct |
115 ms |
363156 KB |
Output is correct |
35 |
Correct |
112 ms |
361364 KB |
Output is correct |
36 |
Correct |
128 ms |
361872 KB |
Output is correct |
37 |
Correct |
135 ms |
363332 KB |
Output is correct |
38 |
Correct |
123 ms |
362672 KB |
Output is correct |
39 |
Correct |
369 ms |
443068 KB |
Output is correct |
40 |
Correct |
130 ms |
363148 KB |
Output is correct |
41 |
Correct |
122 ms |
366604 KB |
Output is correct |
42 |
Correct |
149 ms |
367888 KB |
Output is correct |
43 |
Correct |
134 ms |
366572 KB |
Output is correct |
44 |
Correct |
187 ms |
386580 KB |
Output is correct |
45 |
Correct |
199 ms |
387928 KB |
Output is correct |
46 |
Correct |
181 ms |
388300 KB |
Output is correct |
47 |
Correct |
440 ms |
452088 KB |
Output is correct |
48 |
Correct |
363 ms |
434500 KB |
Output is correct |
49 |
Correct |
241 ms |
450384 KB |
Output is correct |
50 |
Correct |
205 ms |
433784 KB |
Output is correct |
51 |
Correct |
382 ms |
440568 KB |
Output is correct |
52 |
Correct |
448 ms |
452344 KB |
Output is correct |
53 |
Correct |
380 ms |
445820 KB |
Output is correct |
54 |
Correct |
108 ms |
353288 KB |
Output is correct |
55 |
Correct |
106 ms |
353256 KB |
Output is correct |
56 |
Correct |
103 ms |
353284 KB |
Output is correct |
57 |
Correct |
108 ms |
353364 KB |
Output is correct |
58 |
Correct |
103 ms |
353364 KB |
Output is correct |
59 |
Correct |
104 ms |
353364 KB |
Output is correct |
60 |
Correct |
102 ms |
353212 KB |
Output is correct |
61 |
Correct |
106 ms |
353432 KB |
Output is correct |
62 |
Correct |
103 ms |
353328 KB |
Output is correct |
63 |
Correct |
103 ms |
353364 KB |
Output is correct |
64 |
Correct |
104 ms |
353364 KB |
Output is correct |
65 |
Correct |
106 ms |
353364 KB |
Output is correct |
66 |
Correct |
102 ms |
353364 KB |
Output is correct |
67 |
Correct |
102 ms |
353288 KB |
Output is correct |
68 |
Correct |
111 ms |
353364 KB |
Output is correct |
69 |
Correct |
108 ms |
353692 KB |
Output is correct |
70 |
Incorrect |
102 ms |
353292 KB |
Output isn't correct |
71 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
107 ms |
353452 KB |
Output is correct |
2 |
Correct |
107 ms |
353364 KB |
Output is correct |
3 |
Correct |
110 ms |
353364 KB |
Output is correct |
4 |
Correct |
104 ms |
353364 KB |
Output is correct |
5 |
Correct |
102 ms |
353364 KB |
Output is correct |
6 |
Correct |
102 ms |
353404 KB |
Output is correct |
7 |
Correct |
103 ms |
353364 KB |
Output is correct |
8 |
Correct |
103 ms |
353364 KB |
Output is correct |
9 |
Correct |
101 ms |
353216 KB |
Output is correct |
10 |
Correct |
104 ms |
353508 KB |
Output is correct |
11 |
Correct |
103 ms |
353320 KB |
Output is correct |
12 |
Correct |
102 ms |
353360 KB |
Output is correct |
13 |
Correct |
102 ms |
353364 KB |
Output is correct |
14 |
Correct |
102 ms |
353424 KB |
Output is correct |
15 |
Correct |
102 ms |
353364 KB |
Output is correct |
16 |
Correct |
104 ms |
353488 KB |
Output is correct |
17 |
Correct |
103 ms |
353364 KB |
Output is correct |
18 |
Correct |
103 ms |
353408 KB |
Output is correct |
19 |
Correct |
109 ms |
356652 KB |
Output is correct |
20 |
Correct |
104 ms |
356000 KB |
Output is correct |
21 |
Correct |
105 ms |
354672 KB |
Output is correct |
22 |
Correct |
122 ms |
357180 KB |
Output is correct |
23 |
Correct |
106 ms |
355628 KB |
Output is correct |
24 |
Correct |
109 ms |
357272 KB |
Output is correct |
25 |
Correct |
106 ms |
356500 KB |
Output is correct |
26 |
Correct |
115 ms |
356692 KB |
Output is correct |
27 |
Correct |
114 ms |
357204 KB |
Output is correct |
28 |
Correct |
110 ms |
357064 KB |
Output is correct |
29 |
Correct |
122 ms |
361884 KB |
Output is correct |
30 |
Correct |
111 ms |
356888 KB |
Output is correct |
31 |
Correct |
112 ms |
356792 KB |
Output is correct |
32 |
Correct |
132 ms |
363152 KB |
Output is correct |
33 |
Correct |
114 ms |
359660 KB |
Output is correct |
34 |
Correct |
115 ms |
363156 KB |
Output is correct |
35 |
Correct |
112 ms |
361364 KB |
Output is correct |
36 |
Correct |
128 ms |
361872 KB |
Output is correct |
37 |
Correct |
135 ms |
363332 KB |
Output is correct |
38 |
Correct |
123 ms |
362672 KB |
Output is correct |
39 |
Correct |
369 ms |
443068 KB |
Output is correct |
40 |
Correct |
130 ms |
363148 KB |
Output is correct |
41 |
Correct |
122 ms |
366604 KB |
Output is correct |
42 |
Correct |
149 ms |
367888 KB |
Output is correct |
43 |
Correct |
134 ms |
366572 KB |
Output is correct |
44 |
Correct |
187 ms |
386580 KB |
Output is correct |
45 |
Correct |
199 ms |
387928 KB |
Output is correct |
46 |
Correct |
181 ms |
388300 KB |
Output is correct |
47 |
Correct |
440 ms |
452088 KB |
Output is correct |
48 |
Correct |
363 ms |
434500 KB |
Output is correct |
49 |
Correct |
241 ms |
450384 KB |
Output is correct |
50 |
Correct |
205 ms |
433784 KB |
Output is correct |
51 |
Correct |
382 ms |
440568 KB |
Output is correct |
52 |
Correct |
448 ms |
452344 KB |
Output is correct |
53 |
Correct |
380 ms |
445820 KB |
Output is correct |
54 |
Correct |
108 ms |
353288 KB |
Output is correct |
55 |
Correct |
106 ms |
353256 KB |
Output is correct |
56 |
Correct |
103 ms |
353284 KB |
Output is correct |
57 |
Correct |
108 ms |
353364 KB |
Output is correct |
58 |
Correct |
103 ms |
353364 KB |
Output is correct |
59 |
Correct |
104 ms |
353364 KB |
Output is correct |
60 |
Correct |
102 ms |
353212 KB |
Output is correct |
61 |
Correct |
106 ms |
353432 KB |
Output is correct |
62 |
Correct |
103 ms |
353328 KB |
Output is correct |
63 |
Correct |
103 ms |
353364 KB |
Output is correct |
64 |
Correct |
104 ms |
353364 KB |
Output is correct |
65 |
Correct |
106 ms |
353364 KB |
Output is correct |
66 |
Correct |
102 ms |
353364 KB |
Output is correct |
67 |
Correct |
102 ms |
353288 KB |
Output is correct |
68 |
Correct |
111 ms |
353364 KB |
Output is correct |
69 |
Correct |
108 ms |
353692 KB |
Output is correct |
70 |
Incorrect |
102 ms |
353292 KB |
Output isn't correct |
71 |
Halted |
0 ms |
0 KB |
- |