/* 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 = 5000+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[M];
vector<vector<int>> dp;
queue<array<int, 2>> Q[M];
void solve(){
cin >> r >> c >> n >> sx >> sy >> ex >> ey;
sx--, sy--, ex--, ey--;
for(int i = 0; i < r; ++i) cin >> s[i];
vector<vector<pair<int, int>>> C;
vector<vector<int>> vis(r, vector<int>(c));
vector<vector<array<int, 2>>> dist(r, vector<array<int, 2>>(c));
vector<vector<int>> dp(r, vector<int>(c, MOD));
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();
}
}
}
}
}
// auto comp = [&](const array<int, 2> &x, const array<int, 2> &y){
// return max(abs(dist[x[0]][x[1]][0]), abs(dist[x[0]][x[1]][1])) > max(abs(dist[y[0]][y[1]][0]), abs(dist[y[0]][y[1]][1]));
// };
// priority_queue<array<int, 2>, vector<array<int, 2>>, decltype(comp)> Q(comp);
for(auto p: C[vis[sx][sy] - 1]){
int x = 0, req = 4;
for(int l = 0; l < 4; ++l){
int a = arr[l][0] + p.first, b = arr[l][1] + p.second;
if(a >= 0 && b >= 0 && a < r && b < c){
if(vis[a][b] == vis[p.first][p.second]) ++x;
}else --req;
}
dp[p.first][p.second] = 0;
dist[p.first][p.second] = {0};
if(x < req) Q[0].push({p.first, p.second});
}
int cur = 0;
while(dp[ex][ey] == MOD){
vector<pair<int, int>> Sn;
for(int i = 0; i <= n; ++i) while(!Q[i].empty()){
int x = Q[i].front()[0], y = Q[i].front()[1]; Q[i].pop();
if(max(abs(dist[x][y][0]), abs(dist[x][y][1])) < i) continue;
// cout << x << ' '<< y << ' ' << cur << ' ' << dist[x][y][0] << ' ' << dist[x][y][1] << endl;
int curx = dist[x][y][0], cury = dist[x][y][1];
for(int l = 0; l < 4; ++l){
int a = x + arr[l][0], b = y + arr[l][1];
if(a >= 0 && b >= 0 && a < r && b < c){
if(max(abs(curx + arr[l][0]), abs(cury + arr[l][1])) > n || abs(curx + arr[l][0]) + abs(cury + arr[l][1]) == 2*n){
if(dp[a][b] == MOD && vis[a][b] > 0){
for(auto p: C[vis[a][b] - 1]){
dp[p.first][p.second] = cur + 1;
Sn.pb(p);
}
}
continue;
}
if(dp[a][b] < MOD){
if(max(abs(dist[a][b][0]), abs(dist[a][b][1])) > max(abs(curx + arr[l][0]), abs(cury + arr[l][1]))){
dist[a][b] = {curx + arr[l][0], cury + arr[l][1]};
}
}else{
dp[a][b] = cur + 1;
dist[a][b] = {curx + arr[l][0], cury + arr[l][1]};
Sn.pb({a, b});
Q[max(abs(dist[x][y][0]), abs(dist[x][y][1]))].push({a, b});
}
}
}
}
for(auto p: Sn){
int x = 0, req = 4;
for(int l = 0; l < 4; ++l){
int a = arr[l][0] + p.first, b = arr[l][1] + p.second;
if(a >= 0 && b >= 0 && a < r && b < c){
if(dp[a][b] < MOD) ++x;
}else --req;
}
if(x < req){
Q[0].push({p.first, p.second});
dist[p.first][p.second] = {0};
}
}
++cur;
}
// for(int i = 0; i < r; ++i){
// for(int j = 0 ;j < c; ++j) cout << dp[i][j] << ' ';
// en;
// }
cout << dp[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:124:15: warning: unused variable 'aa' [-Wunused-variable]
124 | int tt = 1, aa;
| ^~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
4184 KB |
Output is correct |
2 |
Correct |
2 ms |
3932 KB |
Output is correct |
3 |
Correct |
2 ms |
3932 KB |
Output is correct |
4 |
Correct |
2 ms |
3828 KB |
Output is correct |
5 |
Correct |
3 ms |
3932 KB |
Output is correct |
6 |
Correct |
2 ms |
3932 KB |
Output is correct |
7 |
Correct |
2 ms |
3932 KB |
Output is correct |
8 |
Correct |
2 ms |
4184 KB |
Output is correct |
9 |
Correct |
2 ms |
3928 KB |
Output is correct |
10 |
Correct |
2 ms |
3928 KB |
Output is correct |
11 |
Correct |
2 ms |
3932 KB |
Output is correct |
12 |
Correct |
2 ms |
3932 KB |
Output is correct |
13 |
Correct |
2 ms |
3932 KB |
Output is correct |
14 |
Correct |
2 ms |
3932 KB |
Output is correct |
15 |
Correct |
2 ms |
3932 KB |
Output is correct |
16 |
Correct |
2 ms |
3928 KB |
Output is correct |
17 |
Correct |
2 ms |
3932 KB |
Output is correct |
18 |
Correct |
2 ms |
3932 KB |
Output is correct |
19 |
Correct |
7 ms |
4952 KB |
Output is correct |
20 |
Correct |
6 ms |
4920 KB |
Output is correct |
21 |
Correct |
5 ms |
5592 KB |
Output is correct |
22 |
Correct |
9 ms |
5468 KB |
Output is correct |
23 |
Correct |
8 ms |
4956 KB |
Output is correct |
24 |
Correct |
5 ms |
5528 KB |
Output is correct |
25 |
Correct |
6 ms |
5272 KB |
Output is correct |
26 |
Correct |
5 ms |
5468 KB |
Output is correct |
27 |
Correct |
5 ms |
5400 KB |
Output is correct |
28 |
Correct |
5 ms |
4956 KB |
Output is correct |
29 |
Correct |
22 ms |
6924 KB |
Output is correct |
30 |
Correct |
7 ms |
5740 KB |
Output is correct |
31 |
Correct |
11 ms |
8664 KB |
Output is correct |
32 |
Correct |
20 ms |
8032 KB |
Output is correct |
33 |
Correct |
16 ms |
6492 KB |
Output is correct |
34 |
Correct |
9 ms |
8200 KB |
Output is correct |
35 |
Correct |
15 ms |
7068 KB |
Output is correct |
36 |
Correct |
15 ms |
8032 KB |
Output is correct |
37 |
Correct |
18 ms |
7828 KB |
Output is correct |
38 |
Correct |
4 ms |
6488 KB |
Output is correct |
39 |
Correct |
233 ms |
31732 KB |
Output is correct |
40 |
Correct |
12 ms |
8084 KB |
Output is correct |
41 |
Correct |
13 ms |
9584 KB |
Output is correct |
42 |
Correct |
30 ms |
8952 KB |
Output is correct |
43 |
Correct |
25 ms |
10948 KB |
Output is correct |
44 |
Correct |
49 ms |
22832 KB |
Output is correct |
45 |
Correct |
50 ms |
23940 KB |
Output is correct |
46 |
Correct |
94 ms |
47776 KB |
Output is correct |
47 |
Correct |
214 ms |
44388 KB |
Output is correct |
48 |
Correct |
161 ms |
29848 KB |
Output is correct |
49 |
Correct |
68 ms |
46144 KB |
Output is correct |
50 |
Correct |
84 ms |
34844 KB |
Output is correct |
51 |
Correct |
174 ms |
42364 KB |
Output is correct |
52 |
Correct |
142 ms |
43544 KB |
Output is correct |
53 |
Correct |
187 ms |
30104 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
3932 KB |
Output is correct |
2 |
Correct |
3 ms |
3932 KB |
Output is correct |
3 |
Correct |
2 ms |
3932 KB |
Output is correct |
4 |
Correct |
2 ms |
3932 KB |
Output is correct |
5 |
Correct |
2 ms |
3932 KB |
Output is correct |
6 |
Correct |
2 ms |
3932 KB |
Output is correct |
7 |
Correct |
2 ms |
3932 KB |
Output is correct |
8 |
Correct |
2 ms |
3932 KB |
Output is correct |
9 |
Correct |
2 ms |
3932 KB |
Output is correct |
10 |
Correct |
2 ms |
3928 KB |
Output is correct |
11 |
Correct |
2 ms |
3932 KB |
Output is correct |
12 |
Correct |
2 ms |
3932 KB |
Output is correct |
13 |
Correct |
2 ms |
3932 KB |
Output is correct |
14 |
Correct |
3 ms |
3932 KB |
Output is correct |
15 |
Correct |
2 ms |
3932 KB |
Output is correct |
16 |
Correct |
3 ms |
3792 KB |
Output is correct |
17 |
Correct |
2 ms |
3932 KB |
Output is correct |
18 |
Correct |
2 ms |
3932 KB |
Output is correct |
19 |
Correct |
3 ms |
4116 KB |
Output is correct |
20 |
Correct |
2 ms |
3896 KB |
Output is correct |
21 |
Correct |
2 ms |
3928 KB |
Output is correct |
22 |
Correct |
2 ms |
3932 KB |
Output is correct |
23 |
Correct |
2 ms |
3932 KB |
Output is correct |
24 |
Correct |
2 ms |
4084 KB |
Output is correct |
25 |
Correct |
2 ms |
3932 KB |
Output is correct |
26 |
Correct |
2 ms |
3932 KB |
Output is correct |
27 |
Correct |
2 ms |
3932 KB |
Output is correct |
28 |
Correct |
2 ms |
3932 KB |
Output is correct |
29 |
Correct |
2 ms |
3932 KB |
Output is correct |
30 |
Correct |
2 ms |
3932 KB |
Output is correct |
31 |
Correct |
2 ms |
3932 KB |
Output is correct |
32 |
Correct |
2 ms |
3932 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
3932 KB |
Output is correct |
2 |
Correct |
2 ms |
3932 KB |
Output is correct |
3 |
Correct |
2 ms |
3932 KB |
Output is correct |
4 |
Correct |
2 ms |
3932 KB |
Output is correct |
5 |
Correct |
2 ms |
3932 KB |
Output is correct |
6 |
Correct |
2 ms |
3932 KB |
Output is correct |
7 |
Correct |
2 ms |
3932 KB |
Output is correct |
8 |
Correct |
2 ms |
3932 KB |
Output is correct |
9 |
Correct |
2 ms |
3932 KB |
Output is correct |
10 |
Correct |
2 ms |
3932 KB |
Output is correct |
11 |
Correct |
2 ms |
3932 KB |
Output is correct |
12 |
Correct |
2 ms |
3932 KB |
Output is correct |
13 |
Correct |
2 ms |
3932 KB |
Output is correct |
14 |
Correct |
2 ms |
3932 KB |
Output is correct |
15 |
Correct |
2 ms |
3932 KB |
Output is correct |
16 |
Correct |
2 ms |
3932 KB |
Output is correct |
17 |
Correct |
2 ms |
3928 KB |
Output is correct |
18 |
Correct |
2 ms |
3932 KB |
Output is correct |
19 |
Correct |
2 ms |
3932 KB |
Output is correct |
20 |
Correct |
2 ms |
3928 KB |
Output is correct |
21 |
Correct |
2 ms |
3932 KB |
Output is correct |
22 |
Correct |
2 ms |
3928 KB |
Output is correct |
23 |
Correct |
2 ms |
3932 KB |
Output is correct |
24 |
Correct |
2 ms |
3932 KB |
Output is correct |
25 |
Correct |
4 ms |
4872 KB |
Output is correct |
26 |
Correct |
5 ms |
5340 KB |
Output is correct |
27 |
Correct |
5 ms |
5592 KB |
Output is correct |
28 |
Correct |
5 ms |
5588 KB |
Output is correct |
29 |
Correct |
7 ms |
6104 KB |
Output is correct |
30 |
Correct |
7 ms |
5588 KB |
Output is correct |
31 |
Correct |
6 ms |
5468 KB |
Output is correct |
32 |
Correct |
5 ms |
5604 KB |
Output is correct |
33 |
Correct |
8 ms |
5468 KB |
Output is correct |
34 |
Correct |
9 ms |
7284 KB |
Output is correct |
35 |
Correct |
9 ms |
8664 KB |
Output is correct |
36 |
Correct |
10 ms |
8664 KB |
Output is correct |
37 |
Correct |
17 ms |
10128 KB |
Output is correct |
38 |
Correct |
11 ms |
8652 KB |
Output is correct |
39 |
Correct |
30 ms |
17356 KB |
Output is correct |
40 |
Correct |
73 ms |
38064 KB |
Output is correct |
41 |
Correct |
93 ms |
47552 KB |
Output is correct |
42 |
Correct |
89 ms |
47608 KB |
Output is correct |
43 |
Correct |
166 ms |
66020 KB |
Output is correct |
44 |
Correct |
118 ms |
48504 KB |
Output is correct |
45 |
Correct |
95 ms |
44876 KB |
Output is correct |
46 |
Correct |
89 ms |
44020 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
3932 KB |
Output is correct |
2 |
Correct |
3 ms |
3932 KB |
Output is correct |
3 |
Correct |
2 ms |
3932 KB |
Output is correct |
4 |
Correct |
2 ms |
3932 KB |
Output is correct |
5 |
Correct |
2 ms |
3932 KB |
Output is correct |
6 |
Correct |
2 ms |
3932 KB |
Output is correct |
7 |
Correct |
2 ms |
3932 KB |
Output is correct |
8 |
Correct |
2 ms |
3932 KB |
Output is correct |
9 |
Correct |
2 ms |
3932 KB |
Output is correct |
10 |
Correct |
2 ms |
3928 KB |
Output is correct |
11 |
Correct |
2 ms |
3932 KB |
Output is correct |
12 |
Correct |
2 ms |
3932 KB |
Output is correct |
13 |
Correct |
2 ms |
3932 KB |
Output is correct |
14 |
Correct |
3 ms |
3932 KB |
Output is correct |
15 |
Correct |
2 ms |
3932 KB |
Output is correct |
16 |
Correct |
3 ms |
3792 KB |
Output is correct |
17 |
Correct |
2 ms |
3932 KB |
Output is correct |
18 |
Correct |
2 ms |
3932 KB |
Output is correct |
19 |
Correct |
3 ms |
4116 KB |
Output is correct |
20 |
Correct |
2 ms |
3896 KB |
Output is correct |
21 |
Correct |
2 ms |
3928 KB |
Output is correct |
22 |
Correct |
2 ms |
3932 KB |
Output is correct |
23 |
Correct |
2 ms |
3932 KB |
Output is correct |
24 |
Correct |
2 ms |
4084 KB |
Output is correct |
25 |
Correct |
2 ms |
3932 KB |
Output is correct |
26 |
Correct |
2 ms |
3932 KB |
Output is correct |
27 |
Correct |
2 ms |
3932 KB |
Output is correct |
28 |
Correct |
2 ms |
3932 KB |
Output is correct |
29 |
Correct |
2 ms |
3932 KB |
Output is correct |
30 |
Correct |
2 ms |
3932 KB |
Output is correct |
31 |
Correct |
2 ms |
3932 KB |
Output is correct |
32 |
Correct |
2 ms |
3932 KB |
Output is correct |
33 |
Correct |
7 ms |
4956 KB |
Output is correct |
34 |
Correct |
2 ms |
3932 KB |
Output is correct |
35 |
Correct |
2 ms |
3932 KB |
Output is correct |
36 |
Correct |
4 ms |
4956 KB |
Output is correct |
37 |
Correct |
6 ms |
4920 KB |
Output is correct |
38 |
Correct |
5 ms |
5340 KB |
Output is correct |
39 |
Correct |
5 ms |
5588 KB |
Output is correct |
40 |
Correct |
8 ms |
5468 KB |
Output is correct |
41 |
Correct |
8 ms |
4956 KB |
Output is correct |
42 |
Correct |
5 ms |
5592 KB |
Output is correct |
43 |
Correct |
8 ms |
6100 KB |
Output is correct |
44 |
Correct |
5 ms |
5592 KB |
Output is correct |
45 |
Correct |
5 ms |
5584 KB |
Output is correct |
46 |
Correct |
6 ms |
5272 KB |
Output is correct |
47 |
Correct |
8 ms |
5744 KB |
Output is correct |
48 |
Correct |
7 ms |
5464 KB |
Output is correct |
49 |
Correct |
6 ms |
5468 KB |
Output is correct |
50 |
Correct |
8 ms |
5464 KB |
Output is correct |
51 |
Correct |
6 ms |
5468 KB |
Output is correct |
52 |
Correct |
5 ms |
5468 KB |
Output is correct |
53 |
Correct |
5 ms |
5464 KB |
Output is correct |
54 |
Correct |
5 ms |
4956 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
3932 KB |
Output is correct |
2 |
Correct |
3 ms |
3932 KB |
Output is correct |
3 |
Correct |
2 ms |
3932 KB |
Output is correct |
4 |
Correct |
2 ms |
3932 KB |
Output is correct |
5 |
Correct |
2 ms |
3932 KB |
Output is correct |
6 |
Correct |
2 ms |
3932 KB |
Output is correct |
7 |
Correct |
2 ms |
3932 KB |
Output is correct |
8 |
Correct |
2 ms |
3932 KB |
Output is correct |
9 |
Correct |
2 ms |
3932 KB |
Output is correct |
10 |
Correct |
2 ms |
3928 KB |
Output is correct |
11 |
Correct |
2 ms |
3932 KB |
Output is correct |
12 |
Correct |
2 ms |
3932 KB |
Output is correct |
13 |
Correct |
2 ms |
3932 KB |
Output is correct |
14 |
Correct |
3 ms |
3932 KB |
Output is correct |
15 |
Correct |
2 ms |
3932 KB |
Output is correct |
16 |
Correct |
3 ms |
3792 KB |
Output is correct |
17 |
Correct |
2 ms |
3932 KB |
Output is correct |
18 |
Correct |
2 ms |
3932 KB |
Output is correct |
19 |
Correct |
3 ms |
4116 KB |
Output is correct |
20 |
Correct |
2 ms |
3896 KB |
Output is correct |
21 |
Correct |
2 ms |
3928 KB |
Output is correct |
22 |
Correct |
2 ms |
3932 KB |
Output is correct |
23 |
Correct |
2 ms |
3932 KB |
Output is correct |
24 |
Correct |
2 ms |
4084 KB |
Output is correct |
25 |
Correct |
2 ms |
3932 KB |
Output is correct |
26 |
Correct |
2 ms |
3932 KB |
Output is correct |
27 |
Correct |
2 ms |
3932 KB |
Output is correct |
28 |
Correct |
2 ms |
3932 KB |
Output is correct |
29 |
Correct |
2 ms |
3932 KB |
Output is correct |
30 |
Correct |
2 ms |
3932 KB |
Output is correct |
31 |
Correct |
2 ms |
3932 KB |
Output is correct |
32 |
Correct |
2 ms |
3932 KB |
Output is correct |
33 |
Correct |
7 ms |
4956 KB |
Output is correct |
34 |
Correct |
2 ms |
3932 KB |
Output is correct |
35 |
Correct |
2 ms |
3932 KB |
Output is correct |
36 |
Correct |
4 ms |
4956 KB |
Output is correct |
37 |
Correct |
6 ms |
4920 KB |
Output is correct |
38 |
Correct |
5 ms |
5340 KB |
Output is correct |
39 |
Correct |
5 ms |
5588 KB |
Output is correct |
40 |
Correct |
8 ms |
5468 KB |
Output is correct |
41 |
Correct |
8 ms |
4956 KB |
Output is correct |
42 |
Correct |
5 ms |
5592 KB |
Output is correct |
43 |
Correct |
8 ms |
6100 KB |
Output is correct |
44 |
Correct |
5 ms |
5592 KB |
Output is correct |
45 |
Correct |
5 ms |
5584 KB |
Output is correct |
46 |
Correct |
6 ms |
5272 KB |
Output is correct |
47 |
Correct |
8 ms |
5744 KB |
Output is correct |
48 |
Correct |
7 ms |
5464 KB |
Output is correct |
49 |
Correct |
6 ms |
5468 KB |
Output is correct |
50 |
Correct |
8 ms |
5464 KB |
Output is correct |
51 |
Correct |
6 ms |
5468 KB |
Output is correct |
52 |
Correct |
5 ms |
5468 KB |
Output is correct |
53 |
Correct |
5 ms |
5464 KB |
Output is correct |
54 |
Correct |
5 ms |
4956 KB |
Output is correct |
55 |
Correct |
18 ms |
6780 KB |
Output is correct |
56 |
Correct |
8 ms |
5740 KB |
Output is correct |
57 |
Correct |
10 ms |
7208 KB |
Output is correct |
58 |
Correct |
15 ms |
7732 KB |
Output is correct |
59 |
Correct |
9 ms |
8660 KB |
Output is correct |
60 |
Correct |
24 ms |
7828 KB |
Output is correct |
61 |
Correct |
15 ms |
6488 KB |
Output is correct |
62 |
Correct |
9 ms |
8664 KB |
Output is correct |
63 |
Correct |
17 ms |
10012 KB |
Output is correct |
64 |
Correct |
11 ms |
8656 KB |
Output is correct |
65 |
Correct |
9 ms |
8120 KB |
Output is correct |
66 |
Correct |
14 ms |
7064 KB |
Output is correct |
67 |
Correct |
18 ms |
8168 KB |
Output is correct |
68 |
Correct |
16 ms |
8048 KB |
Output is correct |
69 |
Correct |
16 ms |
7828 KB |
Output is correct |
70 |
Correct |
15 ms |
7832 KB |
Output is correct |
71 |
Correct |
14 ms |
7832 KB |
Output is correct |
72 |
Correct |
14 ms |
7828 KB |
Output is correct |
73 |
Correct |
22 ms |
7832 KB |
Output is correct |
74 |
Correct |
4 ms |
6492 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
4184 KB |
Output is correct |
2 |
Correct |
2 ms |
3932 KB |
Output is correct |
3 |
Correct |
2 ms |
3932 KB |
Output is correct |
4 |
Correct |
2 ms |
3828 KB |
Output is correct |
5 |
Correct |
3 ms |
3932 KB |
Output is correct |
6 |
Correct |
2 ms |
3932 KB |
Output is correct |
7 |
Correct |
2 ms |
3932 KB |
Output is correct |
8 |
Correct |
2 ms |
4184 KB |
Output is correct |
9 |
Correct |
2 ms |
3928 KB |
Output is correct |
10 |
Correct |
2 ms |
3928 KB |
Output is correct |
11 |
Correct |
2 ms |
3932 KB |
Output is correct |
12 |
Correct |
2 ms |
3932 KB |
Output is correct |
13 |
Correct |
2 ms |
3932 KB |
Output is correct |
14 |
Correct |
2 ms |
3932 KB |
Output is correct |
15 |
Correct |
2 ms |
3932 KB |
Output is correct |
16 |
Correct |
2 ms |
3928 KB |
Output is correct |
17 |
Correct |
2 ms |
3932 KB |
Output is correct |
18 |
Correct |
2 ms |
3932 KB |
Output is correct |
19 |
Correct |
7 ms |
4952 KB |
Output is correct |
20 |
Correct |
6 ms |
4920 KB |
Output is correct |
21 |
Correct |
5 ms |
5592 KB |
Output is correct |
22 |
Correct |
9 ms |
5468 KB |
Output is correct |
23 |
Correct |
8 ms |
4956 KB |
Output is correct |
24 |
Correct |
5 ms |
5528 KB |
Output is correct |
25 |
Correct |
6 ms |
5272 KB |
Output is correct |
26 |
Correct |
5 ms |
5468 KB |
Output is correct |
27 |
Correct |
5 ms |
5400 KB |
Output is correct |
28 |
Correct |
5 ms |
4956 KB |
Output is correct |
29 |
Correct |
22 ms |
6924 KB |
Output is correct |
30 |
Correct |
7 ms |
5740 KB |
Output is correct |
31 |
Correct |
11 ms |
8664 KB |
Output is correct |
32 |
Correct |
20 ms |
8032 KB |
Output is correct |
33 |
Correct |
16 ms |
6492 KB |
Output is correct |
34 |
Correct |
9 ms |
8200 KB |
Output is correct |
35 |
Correct |
15 ms |
7068 KB |
Output is correct |
36 |
Correct |
15 ms |
8032 KB |
Output is correct |
37 |
Correct |
18 ms |
7828 KB |
Output is correct |
38 |
Correct |
4 ms |
6488 KB |
Output is correct |
39 |
Correct |
233 ms |
31732 KB |
Output is correct |
40 |
Correct |
12 ms |
8084 KB |
Output is correct |
41 |
Correct |
13 ms |
9584 KB |
Output is correct |
42 |
Correct |
30 ms |
8952 KB |
Output is correct |
43 |
Correct |
25 ms |
10948 KB |
Output is correct |
44 |
Correct |
49 ms |
22832 KB |
Output is correct |
45 |
Correct |
50 ms |
23940 KB |
Output is correct |
46 |
Correct |
94 ms |
47776 KB |
Output is correct |
47 |
Correct |
214 ms |
44388 KB |
Output is correct |
48 |
Correct |
161 ms |
29848 KB |
Output is correct |
49 |
Correct |
68 ms |
46144 KB |
Output is correct |
50 |
Correct |
84 ms |
34844 KB |
Output is correct |
51 |
Correct |
174 ms |
42364 KB |
Output is correct |
52 |
Correct |
142 ms |
43544 KB |
Output is correct |
53 |
Correct |
187 ms |
30104 KB |
Output is correct |
54 |
Correct |
2 ms |
3932 KB |
Output is correct |
55 |
Correct |
3 ms |
3932 KB |
Output is correct |
56 |
Correct |
2 ms |
3932 KB |
Output is correct |
57 |
Correct |
2 ms |
3932 KB |
Output is correct |
58 |
Correct |
2 ms |
3932 KB |
Output is correct |
59 |
Correct |
2 ms |
3932 KB |
Output is correct |
60 |
Correct |
2 ms |
3932 KB |
Output is correct |
61 |
Correct |
2 ms |
3932 KB |
Output is correct |
62 |
Correct |
2 ms |
3932 KB |
Output is correct |
63 |
Correct |
2 ms |
3928 KB |
Output is correct |
64 |
Correct |
2 ms |
3932 KB |
Output is correct |
65 |
Correct |
2 ms |
3932 KB |
Output is correct |
66 |
Correct |
2 ms |
3932 KB |
Output is correct |
67 |
Correct |
3 ms |
3932 KB |
Output is correct |
68 |
Correct |
2 ms |
3932 KB |
Output is correct |
69 |
Correct |
3 ms |
3792 KB |
Output is correct |
70 |
Correct |
2 ms |
3932 KB |
Output is correct |
71 |
Correct |
2 ms |
3932 KB |
Output is correct |
72 |
Correct |
3 ms |
4116 KB |
Output is correct |
73 |
Correct |
2 ms |
3896 KB |
Output is correct |
74 |
Correct |
2 ms |
3928 KB |
Output is correct |
75 |
Correct |
2 ms |
3932 KB |
Output is correct |
76 |
Correct |
2 ms |
3932 KB |
Output is correct |
77 |
Correct |
2 ms |
4084 KB |
Output is correct |
78 |
Correct |
2 ms |
3932 KB |
Output is correct |
79 |
Correct |
2 ms |
3932 KB |
Output is correct |
80 |
Correct |
2 ms |
3932 KB |
Output is correct |
81 |
Correct |
2 ms |
3932 KB |
Output is correct |
82 |
Correct |
2 ms |
3932 KB |
Output is correct |
83 |
Correct |
2 ms |
3932 KB |
Output is correct |
84 |
Correct |
2 ms |
3932 KB |
Output is correct |
85 |
Correct |
2 ms |
3932 KB |
Output is correct |
86 |
Correct |
2 ms |
3932 KB |
Output is correct |
87 |
Correct |
2 ms |
3932 KB |
Output is correct |
88 |
Correct |
2 ms |
3932 KB |
Output is correct |
89 |
Correct |
2 ms |
3932 KB |
Output is correct |
90 |
Correct |
2 ms |
3932 KB |
Output is correct |
91 |
Correct |
2 ms |
3932 KB |
Output is correct |
92 |
Correct |
2 ms |
3932 KB |
Output is correct |
93 |
Correct |
2 ms |
3932 KB |
Output is correct |
94 |
Correct |
2 ms |
3932 KB |
Output is correct |
95 |
Correct |
2 ms |
3932 KB |
Output is correct |
96 |
Correct |
2 ms |
3932 KB |
Output is correct |
97 |
Correct |
2 ms |
3932 KB |
Output is correct |
98 |
Correct |
2 ms |
3932 KB |
Output is correct |
99 |
Correct |
2 ms |
3932 KB |
Output is correct |
100 |
Correct |
2 ms |
3932 KB |
Output is correct |
101 |
Correct |
2 ms |
3932 KB |
Output is correct |
102 |
Correct |
2 ms |
3928 KB |
Output is correct |
103 |
Correct |
2 ms |
3932 KB |
Output is correct |
104 |
Correct |
2 ms |
3932 KB |
Output is correct |
105 |
Correct |
2 ms |
3928 KB |
Output is correct |
106 |
Correct |
2 ms |
3932 KB |
Output is correct |
107 |
Correct |
2 ms |
3928 KB |
Output is correct |
108 |
Correct |
2 ms |
3932 KB |
Output is correct |
109 |
Correct |
2 ms |
3932 KB |
Output is correct |
110 |
Correct |
4 ms |
4872 KB |
Output is correct |
111 |
Correct |
5 ms |
5340 KB |
Output is correct |
112 |
Correct |
5 ms |
5592 KB |
Output is correct |
113 |
Correct |
5 ms |
5588 KB |
Output is correct |
114 |
Correct |
7 ms |
6104 KB |
Output is correct |
115 |
Correct |
7 ms |
5588 KB |
Output is correct |
116 |
Correct |
6 ms |
5468 KB |
Output is correct |
117 |
Correct |
5 ms |
5604 KB |
Output is correct |
118 |
Correct |
8 ms |
5468 KB |
Output is correct |
119 |
Correct |
9 ms |
7284 KB |
Output is correct |
120 |
Correct |
9 ms |
8664 KB |
Output is correct |
121 |
Correct |
10 ms |
8664 KB |
Output is correct |
122 |
Correct |
17 ms |
10128 KB |
Output is correct |
123 |
Correct |
11 ms |
8652 KB |
Output is correct |
124 |
Correct |
30 ms |
17356 KB |
Output is correct |
125 |
Correct |
73 ms |
38064 KB |
Output is correct |
126 |
Correct |
93 ms |
47552 KB |
Output is correct |
127 |
Correct |
89 ms |
47608 KB |
Output is correct |
128 |
Correct |
166 ms |
66020 KB |
Output is correct |
129 |
Correct |
118 ms |
48504 KB |
Output is correct |
130 |
Correct |
95 ms |
44876 KB |
Output is correct |
131 |
Correct |
89 ms |
44020 KB |
Output is correct |
132 |
Correct |
7 ms |
4956 KB |
Output is correct |
133 |
Correct |
2 ms |
3932 KB |
Output is correct |
134 |
Correct |
2 ms |
3932 KB |
Output is correct |
135 |
Correct |
4 ms |
4956 KB |
Output is correct |
136 |
Correct |
6 ms |
4920 KB |
Output is correct |
137 |
Correct |
5 ms |
5340 KB |
Output is correct |
138 |
Correct |
5 ms |
5588 KB |
Output is correct |
139 |
Correct |
8 ms |
5468 KB |
Output is correct |
140 |
Correct |
8 ms |
4956 KB |
Output is correct |
141 |
Correct |
5 ms |
5592 KB |
Output is correct |
142 |
Correct |
8 ms |
6100 KB |
Output is correct |
143 |
Correct |
5 ms |
5592 KB |
Output is correct |
144 |
Correct |
5 ms |
5584 KB |
Output is correct |
145 |
Correct |
6 ms |
5272 KB |
Output is correct |
146 |
Correct |
8 ms |
5744 KB |
Output is correct |
147 |
Correct |
7 ms |
5464 KB |
Output is correct |
148 |
Correct |
6 ms |
5468 KB |
Output is correct |
149 |
Correct |
8 ms |
5464 KB |
Output is correct |
150 |
Correct |
6 ms |
5468 KB |
Output is correct |
151 |
Correct |
5 ms |
5468 KB |
Output is correct |
152 |
Correct |
5 ms |
5464 KB |
Output is correct |
153 |
Correct |
5 ms |
4956 KB |
Output is correct |
154 |
Correct |
18 ms |
6780 KB |
Output is correct |
155 |
Correct |
8 ms |
5740 KB |
Output is correct |
156 |
Correct |
10 ms |
7208 KB |
Output is correct |
157 |
Correct |
15 ms |
7732 KB |
Output is correct |
158 |
Correct |
9 ms |
8660 KB |
Output is correct |
159 |
Correct |
24 ms |
7828 KB |
Output is correct |
160 |
Correct |
15 ms |
6488 KB |
Output is correct |
161 |
Correct |
9 ms |
8664 KB |
Output is correct |
162 |
Correct |
17 ms |
10012 KB |
Output is correct |
163 |
Correct |
11 ms |
8656 KB |
Output is correct |
164 |
Correct |
9 ms |
8120 KB |
Output is correct |
165 |
Correct |
14 ms |
7064 KB |
Output is correct |
166 |
Correct |
18 ms |
8168 KB |
Output is correct |
167 |
Correct |
16 ms |
8048 KB |
Output is correct |
168 |
Correct |
16 ms |
7828 KB |
Output is correct |
169 |
Correct |
15 ms |
7832 KB |
Output is correct |
170 |
Correct |
14 ms |
7832 KB |
Output is correct |
171 |
Correct |
14 ms |
7828 KB |
Output is correct |
172 |
Correct |
22 ms |
7832 KB |
Output is correct |
173 |
Correct |
4 ms |
6492 KB |
Output is correct |
174 |
Correct |
15 ms |
8840 KB |
Output is correct |
175 |
Correct |
37 ms |
12308 KB |
Output is correct |
176 |
Correct |
49 ms |
23384 KB |
Output is correct |
177 |
Correct |
93 ms |
33192 KB |
Output is correct |
178 |
Correct |
73 ms |
37236 KB |
Output is correct |
179 |
Correct |
108 ms |
44408 KB |
Output is correct |
180 |
Correct |
164 ms |
44112 KB |
Output is correct |
181 |
Correct |
143 ms |
44580 KB |
Output is correct |
182 |
Correct |
144 ms |
44796 KB |
Output is correct |
183 |
Correct |
144 ms |
42704 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
4184 KB |
Output is correct |
2 |
Correct |
2 ms |
3932 KB |
Output is correct |
3 |
Correct |
2 ms |
3932 KB |
Output is correct |
4 |
Correct |
2 ms |
3828 KB |
Output is correct |
5 |
Correct |
3 ms |
3932 KB |
Output is correct |
6 |
Correct |
2 ms |
3932 KB |
Output is correct |
7 |
Correct |
2 ms |
3932 KB |
Output is correct |
8 |
Correct |
2 ms |
4184 KB |
Output is correct |
9 |
Correct |
2 ms |
3928 KB |
Output is correct |
10 |
Correct |
2 ms |
3928 KB |
Output is correct |
11 |
Correct |
2 ms |
3932 KB |
Output is correct |
12 |
Correct |
2 ms |
3932 KB |
Output is correct |
13 |
Correct |
2 ms |
3932 KB |
Output is correct |
14 |
Correct |
2 ms |
3932 KB |
Output is correct |
15 |
Correct |
2 ms |
3932 KB |
Output is correct |
16 |
Correct |
2 ms |
3928 KB |
Output is correct |
17 |
Correct |
2 ms |
3932 KB |
Output is correct |
18 |
Correct |
2 ms |
3932 KB |
Output is correct |
19 |
Correct |
7 ms |
4952 KB |
Output is correct |
20 |
Correct |
6 ms |
4920 KB |
Output is correct |
21 |
Correct |
5 ms |
5592 KB |
Output is correct |
22 |
Correct |
9 ms |
5468 KB |
Output is correct |
23 |
Correct |
8 ms |
4956 KB |
Output is correct |
24 |
Correct |
5 ms |
5528 KB |
Output is correct |
25 |
Correct |
6 ms |
5272 KB |
Output is correct |
26 |
Correct |
5 ms |
5468 KB |
Output is correct |
27 |
Correct |
5 ms |
5400 KB |
Output is correct |
28 |
Correct |
5 ms |
4956 KB |
Output is correct |
29 |
Correct |
22 ms |
6924 KB |
Output is correct |
30 |
Correct |
7 ms |
5740 KB |
Output is correct |
31 |
Correct |
11 ms |
8664 KB |
Output is correct |
32 |
Correct |
20 ms |
8032 KB |
Output is correct |
33 |
Correct |
16 ms |
6492 KB |
Output is correct |
34 |
Correct |
9 ms |
8200 KB |
Output is correct |
35 |
Correct |
15 ms |
7068 KB |
Output is correct |
36 |
Correct |
15 ms |
8032 KB |
Output is correct |
37 |
Correct |
18 ms |
7828 KB |
Output is correct |
38 |
Correct |
4 ms |
6488 KB |
Output is correct |
39 |
Correct |
233 ms |
31732 KB |
Output is correct |
40 |
Correct |
12 ms |
8084 KB |
Output is correct |
41 |
Correct |
13 ms |
9584 KB |
Output is correct |
42 |
Correct |
30 ms |
8952 KB |
Output is correct |
43 |
Correct |
25 ms |
10948 KB |
Output is correct |
44 |
Correct |
49 ms |
22832 KB |
Output is correct |
45 |
Correct |
50 ms |
23940 KB |
Output is correct |
46 |
Correct |
94 ms |
47776 KB |
Output is correct |
47 |
Correct |
214 ms |
44388 KB |
Output is correct |
48 |
Correct |
161 ms |
29848 KB |
Output is correct |
49 |
Correct |
68 ms |
46144 KB |
Output is correct |
50 |
Correct |
84 ms |
34844 KB |
Output is correct |
51 |
Correct |
174 ms |
42364 KB |
Output is correct |
52 |
Correct |
142 ms |
43544 KB |
Output is correct |
53 |
Correct |
187 ms |
30104 KB |
Output is correct |
54 |
Correct |
2 ms |
3932 KB |
Output is correct |
55 |
Correct |
3 ms |
3932 KB |
Output is correct |
56 |
Correct |
2 ms |
3932 KB |
Output is correct |
57 |
Correct |
2 ms |
3932 KB |
Output is correct |
58 |
Correct |
2 ms |
3932 KB |
Output is correct |
59 |
Correct |
2 ms |
3932 KB |
Output is correct |
60 |
Correct |
2 ms |
3932 KB |
Output is correct |
61 |
Correct |
2 ms |
3932 KB |
Output is correct |
62 |
Correct |
2 ms |
3932 KB |
Output is correct |
63 |
Correct |
2 ms |
3928 KB |
Output is correct |
64 |
Correct |
2 ms |
3932 KB |
Output is correct |
65 |
Correct |
2 ms |
3932 KB |
Output is correct |
66 |
Correct |
2 ms |
3932 KB |
Output is correct |
67 |
Correct |
3 ms |
3932 KB |
Output is correct |
68 |
Correct |
2 ms |
3932 KB |
Output is correct |
69 |
Correct |
3 ms |
3792 KB |
Output is correct |
70 |
Correct |
2 ms |
3932 KB |
Output is correct |
71 |
Correct |
2 ms |
3932 KB |
Output is correct |
72 |
Correct |
3 ms |
4116 KB |
Output is correct |
73 |
Correct |
2 ms |
3896 KB |
Output is correct |
74 |
Correct |
2 ms |
3928 KB |
Output is correct |
75 |
Correct |
2 ms |
3932 KB |
Output is correct |
76 |
Correct |
2 ms |
3932 KB |
Output is correct |
77 |
Correct |
2 ms |
4084 KB |
Output is correct |
78 |
Correct |
2 ms |
3932 KB |
Output is correct |
79 |
Correct |
2 ms |
3932 KB |
Output is correct |
80 |
Correct |
2 ms |
3932 KB |
Output is correct |
81 |
Correct |
2 ms |
3932 KB |
Output is correct |
82 |
Correct |
2 ms |
3932 KB |
Output is correct |
83 |
Correct |
2 ms |
3932 KB |
Output is correct |
84 |
Correct |
2 ms |
3932 KB |
Output is correct |
85 |
Correct |
2 ms |
3932 KB |
Output is correct |
86 |
Correct |
2 ms |
3932 KB |
Output is correct |
87 |
Correct |
2 ms |
3932 KB |
Output is correct |
88 |
Correct |
2 ms |
3932 KB |
Output is correct |
89 |
Correct |
2 ms |
3932 KB |
Output is correct |
90 |
Correct |
2 ms |
3932 KB |
Output is correct |
91 |
Correct |
2 ms |
3932 KB |
Output is correct |
92 |
Correct |
2 ms |
3932 KB |
Output is correct |
93 |
Correct |
2 ms |
3932 KB |
Output is correct |
94 |
Correct |
2 ms |
3932 KB |
Output is correct |
95 |
Correct |
2 ms |
3932 KB |
Output is correct |
96 |
Correct |
2 ms |
3932 KB |
Output is correct |
97 |
Correct |
2 ms |
3932 KB |
Output is correct |
98 |
Correct |
2 ms |
3932 KB |
Output is correct |
99 |
Correct |
2 ms |
3932 KB |
Output is correct |
100 |
Correct |
2 ms |
3932 KB |
Output is correct |
101 |
Correct |
2 ms |
3932 KB |
Output is correct |
102 |
Correct |
2 ms |
3928 KB |
Output is correct |
103 |
Correct |
2 ms |
3932 KB |
Output is correct |
104 |
Correct |
2 ms |
3932 KB |
Output is correct |
105 |
Correct |
2 ms |
3928 KB |
Output is correct |
106 |
Correct |
2 ms |
3932 KB |
Output is correct |
107 |
Correct |
2 ms |
3928 KB |
Output is correct |
108 |
Correct |
2 ms |
3932 KB |
Output is correct |
109 |
Correct |
2 ms |
3932 KB |
Output is correct |
110 |
Correct |
4 ms |
4872 KB |
Output is correct |
111 |
Correct |
5 ms |
5340 KB |
Output is correct |
112 |
Correct |
5 ms |
5592 KB |
Output is correct |
113 |
Correct |
5 ms |
5588 KB |
Output is correct |
114 |
Correct |
7 ms |
6104 KB |
Output is correct |
115 |
Correct |
7 ms |
5588 KB |
Output is correct |
116 |
Correct |
6 ms |
5468 KB |
Output is correct |
117 |
Correct |
5 ms |
5604 KB |
Output is correct |
118 |
Correct |
8 ms |
5468 KB |
Output is correct |
119 |
Correct |
9 ms |
7284 KB |
Output is correct |
120 |
Correct |
9 ms |
8664 KB |
Output is correct |
121 |
Correct |
10 ms |
8664 KB |
Output is correct |
122 |
Correct |
17 ms |
10128 KB |
Output is correct |
123 |
Correct |
11 ms |
8652 KB |
Output is correct |
124 |
Correct |
30 ms |
17356 KB |
Output is correct |
125 |
Correct |
73 ms |
38064 KB |
Output is correct |
126 |
Correct |
93 ms |
47552 KB |
Output is correct |
127 |
Correct |
89 ms |
47608 KB |
Output is correct |
128 |
Correct |
166 ms |
66020 KB |
Output is correct |
129 |
Correct |
118 ms |
48504 KB |
Output is correct |
130 |
Correct |
95 ms |
44876 KB |
Output is correct |
131 |
Correct |
89 ms |
44020 KB |
Output is correct |
132 |
Correct |
7 ms |
4956 KB |
Output is correct |
133 |
Correct |
2 ms |
3932 KB |
Output is correct |
134 |
Correct |
2 ms |
3932 KB |
Output is correct |
135 |
Correct |
4 ms |
4956 KB |
Output is correct |
136 |
Correct |
6 ms |
4920 KB |
Output is correct |
137 |
Correct |
5 ms |
5340 KB |
Output is correct |
138 |
Correct |
5 ms |
5588 KB |
Output is correct |
139 |
Correct |
8 ms |
5468 KB |
Output is correct |
140 |
Correct |
8 ms |
4956 KB |
Output is correct |
141 |
Correct |
5 ms |
5592 KB |
Output is correct |
142 |
Correct |
8 ms |
6100 KB |
Output is correct |
143 |
Correct |
5 ms |
5592 KB |
Output is correct |
144 |
Correct |
5 ms |
5584 KB |
Output is correct |
145 |
Correct |
6 ms |
5272 KB |
Output is correct |
146 |
Correct |
8 ms |
5744 KB |
Output is correct |
147 |
Correct |
7 ms |
5464 KB |
Output is correct |
148 |
Correct |
6 ms |
5468 KB |
Output is correct |
149 |
Correct |
8 ms |
5464 KB |
Output is correct |
150 |
Correct |
6 ms |
5468 KB |
Output is correct |
151 |
Correct |
5 ms |
5468 KB |
Output is correct |
152 |
Correct |
5 ms |
5464 KB |
Output is correct |
153 |
Correct |
5 ms |
4956 KB |
Output is correct |
154 |
Correct |
18 ms |
6780 KB |
Output is correct |
155 |
Correct |
8 ms |
5740 KB |
Output is correct |
156 |
Correct |
10 ms |
7208 KB |
Output is correct |
157 |
Correct |
15 ms |
7732 KB |
Output is correct |
158 |
Correct |
9 ms |
8660 KB |
Output is correct |
159 |
Correct |
24 ms |
7828 KB |
Output is correct |
160 |
Correct |
15 ms |
6488 KB |
Output is correct |
161 |
Correct |
9 ms |
8664 KB |
Output is correct |
162 |
Correct |
17 ms |
10012 KB |
Output is correct |
163 |
Correct |
11 ms |
8656 KB |
Output is correct |
164 |
Correct |
9 ms |
8120 KB |
Output is correct |
165 |
Correct |
14 ms |
7064 KB |
Output is correct |
166 |
Correct |
18 ms |
8168 KB |
Output is correct |
167 |
Correct |
16 ms |
8048 KB |
Output is correct |
168 |
Correct |
16 ms |
7828 KB |
Output is correct |
169 |
Correct |
15 ms |
7832 KB |
Output is correct |
170 |
Correct |
14 ms |
7832 KB |
Output is correct |
171 |
Correct |
14 ms |
7828 KB |
Output is correct |
172 |
Correct |
22 ms |
7832 KB |
Output is correct |
173 |
Correct |
4 ms |
6492 KB |
Output is correct |
174 |
Correct |
15 ms |
8840 KB |
Output is correct |
175 |
Correct |
37 ms |
12308 KB |
Output is correct |
176 |
Correct |
49 ms |
23384 KB |
Output is correct |
177 |
Correct |
93 ms |
33192 KB |
Output is correct |
178 |
Correct |
73 ms |
37236 KB |
Output is correct |
179 |
Correct |
108 ms |
44408 KB |
Output is correct |
180 |
Correct |
164 ms |
44112 KB |
Output is correct |
181 |
Correct |
143 ms |
44580 KB |
Output is correct |
182 |
Correct |
144 ms |
44796 KB |
Output is correct |
183 |
Correct |
144 ms |
42704 KB |
Output is correct |
184 |
Correct |
436 ms |
59396 KB |
Output is correct |
185 |
Correct |
90 ms |
45704 KB |
Output is correct |
186 |
Correct |
106 ms |
51756 KB |
Output is correct |
187 |
Correct |
46 ms |
42552 KB |
Output is correct |
188 |
Correct |
216 ms |
87928 KB |
Output is correct |
189 |
Correct |
384 ms |
82828 KB |
Output is correct |
190 |
Correct |
159 ms |
55944 KB |
Output is correct |
191 |
Correct |
188 ms |
88496 KB |
Output is correct |
192 |
Correct |
375 ms |
122084 KB |
Output is correct |
193 |
Correct |
243 ms |
90252 KB |
Output is correct |
194 |
Correct |
158 ms |
88388 KB |
Output is correct |
195 |
Correct |
179 ms |
66624 KB |
Output is correct |
196 |
Correct |
294 ms |
82444 KB |
Output is correct |
197 |
Correct |
212 ms |
82088 KB |
Output is correct |
198 |
Correct |
213 ms |
82112 KB |
Output is correct |
199 |
Correct |
278 ms |
83712 KB |
Output is correct |
200 |
Correct |
239 ms |
81688 KB |
Output is correct |
201 |
Correct |
333 ms |
82172 KB |
Output is correct |
202 |
Correct |
492 ms |
56488 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
4184 KB |
Output is correct |
2 |
Correct |
2 ms |
3932 KB |
Output is correct |
3 |
Correct |
2 ms |
3932 KB |
Output is correct |
4 |
Correct |
2 ms |
3828 KB |
Output is correct |
5 |
Correct |
3 ms |
3932 KB |
Output is correct |
6 |
Correct |
2 ms |
3932 KB |
Output is correct |
7 |
Correct |
2 ms |
3932 KB |
Output is correct |
8 |
Correct |
2 ms |
4184 KB |
Output is correct |
9 |
Correct |
2 ms |
3928 KB |
Output is correct |
10 |
Correct |
2 ms |
3928 KB |
Output is correct |
11 |
Correct |
2 ms |
3932 KB |
Output is correct |
12 |
Correct |
2 ms |
3932 KB |
Output is correct |
13 |
Correct |
2 ms |
3932 KB |
Output is correct |
14 |
Correct |
2 ms |
3932 KB |
Output is correct |
15 |
Correct |
2 ms |
3932 KB |
Output is correct |
16 |
Correct |
2 ms |
3928 KB |
Output is correct |
17 |
Correct |
2 ms |
3932 KB |
Output is correct |
18 |
Correct |
2 ms |
3932 KB |
Output is correct |
19 |
Correct |
7 ms |
4952 KB |
Output is correct |
20 |
Correct |
6 ms |
4920 KB |
Output is correct |
21 |
Correct |
5 ms |
5592 KB |
Output is correct |
22 |
Correct |
9 ms |
5468 KB |
Output is correct |
23 |
Correct |
8 ms |
4956 KB |
Output is correct |
24 |
Correct |
5 ms |
5528 KB |
Output is correct |
25 |
Correct |
6 ms |
5272 KB |
Output is correct |
26 |
Correct |
5 ms |
5468 KB |
Output is correct |
27 |
Correct |
5 ms |
5400 KB |
Output is correct |
28 |
Correct |
5 ms |
4956 KB |
Output is correct |
29 |
Correct |
22 ms |
6924 KB |
Output is correct |
30 |
Correct |
7 ms |
5740 KB |
Output is correct |
31 |
Correct |
11 ms |
8664 KB |
Output is correct |
32 |
Correct |
20 ms |
8032 KB |
Output is correct |
33 |
Correct |
16 ms |
6492 KB |
Output is correct |
34 |
Correct |
9 ms |
8200 KB |
Output is correct |
35 |
Correct |
15 ms |
7068 KB |
Output is correct |
36 |
Correct |
15 ms |
8032 KB |
Output is correct |
37 |
Correct |
18 ms |
7828 KB |
Output is correct |
38 |
Correct |
4 ms |
6488 KB |
Output is correct |
39 |
Correct |
233 ms |
31732 KB |
Output is correct |
40 |
Correct |
12 ms |
8084 KB |
Output is correct |
41 |
Correct |
13 ms |
9584 KB |
Output is correct |
42 |
Correct |
30 ms |
8952 KB |
Output is correct |
43 |
Correct |
25 ms |
10948 KB |
Output is correct |
44 |
Correct |
49 ms |
22832 KB |
Output is correct |
45 |
Correct |
50 ms |
23940 KB |
Output is correct |
46 |
Correct |
94 ms |
47776 KB |
Output is correct |
47 |
Correct |
214 ms |
44388 KB |
Output is correct |
48 |
Correct |
161 ms |
29848 KB |
Output is correct |
49 |
Correct |
68 ms |
46144 KB |
Output is correct |
50 |
Correct |
84 ms |
34844 KB |
Output is correct |
51 |
Correct |
174 ms |
42364 KB |
Output is correct |
52 |
Correct |
142 ms |
43544 KB |
Output is correct |
53 |
Correct |
187 ms |
30104 KB |
Output is correct |
54 |
Correct |
2 ms |
3932 KB |
Output is correct |
55 |
Correct |
3 ms |
3932 KB |
Output is correct |
56 |
Correct |
2 ms |
3932 KB |
Output is correct |
57 |
Correct |
2 ms |
3932 KB |
Output is correct |
58 |
Correct |
2 ms |
3932 KB |
Output is correct |
59 |
Correct |
2 ms |
3932 KB |
Output is correct |
60 |
Correct |
2 ms |
3932 KB |
Output is correct |
61 |
Correct |
2 ms |
3932 KB |
Output is correct |
62 |
Correct |
2 ms |
3932 KB |
Output is correct |
63 |
Correct |
2 ms |
3928 KB |
Output is correct |
64 |
Correct |
2 ms |
3932 KB |
Output is correct |
65 |
Correct |
2 ms |
3932 KB |
Output is correct |
66 |
Correct |
2 ms |
3932 KB |
Output is correct |
67 |
Correct |
3 ms |
3932 KB |
Output is correct |
68 |
Correct |
2 ms |
3932 KB |
Output is correct |
69 |
Correct |
3 ms |
3792 KB |
Output is correct |
70 |
Correct |
2 ms |
3932 KB |
Output is correct |
71 |
Correct |
2 ms |
3932 KB |
Output is correct |
72 |
Correct |
3 ms |
4116 KB |
Output is correct |
73 |
Correct |
2 ms |
3896 KB |
Output is correct |
74 |
Correct |
2 ms |
3928 KB |
Output is correct |
75 |
Correct |
2 ms |
3932 KB |
Output is correct |
76 |
Correct |
2 ms |
3932 KB |
Output is correct |
77 |
Correct |
2 ms |
4084 KB |
Output is correct |
78 |
Correct |
2 ms |
3932 KB |
Output is correct |
79 |
Correct |
2 ms |
3932 KB |
Output is correct |
80 |
Correct |
2 ms |
3932 KB |
Output is correct |
81 |
Correct |
2 ms |
3932 KB |
Output is correct |
82 |
Correct |
2 ms |
3932 KB |
Output is correct |
83 |
Correct |
2 ms |
3932 KB |
Output is correct |
84 |
Correct |
2 ms |
3932 KB |
Output is correct |
85 |
Correct |
2 ms |
3932 KB |
Output is correct |
86 |
Correct |
2 ms |
3932 KB |
Output is correct |
87 |
Correct |
2 ms |
3932 KB |
Output is correct |
88 |
Correct |
2 ms |
3932 KB |
Output is correct |
89 |
Correct |
2 ms |
3932 KB |
Output is correct |
90 |
Correct |
2 ms |
3932 KB |
Output is correct |
91 |
Correct |
2 ms |
3932 KB |
Output is correct |
92 |
Correct |
2 ms |
3932 KB |
Output is correct |
93 |
Correct |
2 ms |
3932 KB |
Output is correct |
94 |
Correct |
2 ms |
3932 KB |
Output is correct |
95 |
Correct |
2 ms |
3932 KB |
Output is correct |
96 |
Correct |
2 ms |
3932 KB |
Output is correct |
97 |
Correct |
2 ms |
3932 KB |
Output is correct |
98 |
Correct |
2 ms |
3932 KB |
Output is correct |
99 |
Correct |
2 ms |
3932 KB |
Output is correct |
100 |
Correct |
2 ms |
3932 KB |
Output is correct |
101 |
Correct |
2 ms |
3932 KB |
Output is correct |
102 |
Correct |
2 ms |
3928 KB |
Output is correct |
103 |
Correct |
2 ms |
3932 KB |
Output is correct |
104 |
Correct |
2 ms |
3932 KB |
Output is correct |
105 |
Correct |
2 ms |
3928 KB |
Output is correct |
106 |
Correct |
2 ms |
3932 KB |
Output is correct |
107 |
Correct |
2 ms |
3928 KB |
Output is correct |
108 |
Correct |
2 ms |
3932 KB |
Output is correct |
109 |
Correct |
2 ms |
3932 KB |
Output is correct |
110 |
Correct |
4 ms |
4872 KB |
Output is correct |
111 |
Correct |
5 ms |
5340 KB |
Output is correct |
112 |
Correct |
5 ms |
5592 KB |
Output is correct |
113 |
Correct |
5 ms |
5588 KB |
Output is correct |
114 |
Correct |
7 ms |
6104 KB |
Output is correct |
115 |
Correct |
7 ms |
5588 KB |
Output is correct |
116 |
Correct |
6 ms |
5468 KB |
Output is correct |
117 |
Correct |
5 ms |
5604 KB |
Output is correct |
118 |
Correct |
8 ms |
5468 KB |
Output is correct |
119 |
Correct |
9 ms |
7284 KB |
Output is correct |
120 |
Correct |
9 ms |
8664 KB |
Output is correct |
121 |
Correct |
10 ms |
8664 KB |
Output is correct |
122 |
Correct |
17 ms |
10128 KB |
Output is correct |
123 |
Correct |
11 ms |
8652 KB |
Output is correct |
124 |
Correct |
30 ms |
17356 KB |
Output is correct |
125 |
Correct |
73 ms |
38064 KB |
Output is correct |
126 |
Correct |
93 ms |
47552 KB |
Output is correct |
127 |
Correct |
89 ms |
47608 KB |
Output is correct |
128 |
Correct |
166 ms |
66020 KB |
Output is correct |
129 |
Correct |
118 ms |
48504 KB |
Output is correct |
130 |
Correct |
95 ms |
44876 KB |
Output is correct |
131 |
Correct |
89 ms |
44020 KB |
Output is correct |
132 |
Correct |
7 ms |
4956 KB |
Output is correct |
133 |
Correct |
2 ms |
3932 KB |
Output is correct |
134 |
Correct |
2 ms |
3932 KB |
Output is correct |
135 |
Correct |
4 ms |
4956 KB |
Output is correct |
136 |
Correct |
6 ms |
4920 KB |
Output is correct |
137 |
Correct |
5 ms |
5340 KB |
Output is correct |
138 |
Correct |
5 ms |
5588 KB |
Output is correct |
139 |
Correct |
8 ms |
5468 KB |
Output is correct |
140 |
Correct |
8 ms |
4956 KB |
Output is correct |
141 |
Correct |
5 ms |
5592 KB |
Output is correct |
142 |
Correct |
8 ms |
6100 KB |
Output is correct |
143 |
Correct |
5 ms |
5592 KB |
Output is correct |
144 |
Correct |
5 ms |
5584 KB |
Output is correct |
145 |
Correct |
6 ms |
5272 KB |
Output is correct |
146 |
Correct |
8 ms |
5744 KB |
Output is correct |
147 |
Correct |
7 ms |
5464 KB |
Output is correct |
148 |
Correct |
6 ms |
5468 KB |
Output is correct |
149 |
Correct |
8 ms |
5464 KB |
Output is correct |
150 |
Correct |
6 ms |
5468 KB |
Output is correct |
151 |
Correct |
5 ms |
5468 KB |
Output is correct |
152 |
Correct |
5 ms |
5464 KB |
Output is correct |
153 |
Correct |
5 ms |
4956 KB |
Output is correct |
154 |
Correct |
18 ms |
6780 KB |
Output is correct |
155 |
Correct |
8 ms |
5740 KB |
Output is correct |
156 |
Correct |
10 ms |
7208 KB |
Output is correct |
157 |
Correct |
15 ms |
7732 KB |
Output is correct |
158 |
Correct |
9 ms |
8660 KB |
Output is correct |
159 |
Correct |
24 ms |
7828 KB |
Output is correct |
160 |
Correct |
15 ms |
6488 KB |
Output is correct |
161 |
Correct |
9 ms |
8664 KB |
Output is correct |
162 |
Correct |
17 ms |
10012 KB |
Output is correct |
163 |
Correct |
11 ms |
8656 KB |
Output is correct |
164 |
Correct |
9 ms |
8120 KB |
Output is correct |
165 |
Correct |
14 ms |
7064 KB |
Output is correct |
166 |
Correct |
18 ms |
8168 KB |
Output is correct |
167 |
Correct |
16 ms |
8048 KB |
Output is correct |
168 |
Correct |
16 ms |
7828 KB |
Output is correct |
169 |
Correct |
15 ms |
7832 KB |
Output is correct |
170 |
Correct |
14 ms |
7832 KB |
Output is correct |
171 |
Correct |
14 ms |
7828 KB |
Output is correct |
172 |
Correct |
22 ms |
7832 KB |
Output is correct |
173 |
Correct |
4 ms |
6492 KB |
Output is correct |
174 |
Correct |
15 ms |
8840 KB |
Output is correct |
175 |
Correct |
37 ms |
12308 KB |
Output is correct |
176 |
Correct |
49 ms |
23384 KB |
Output is correct |
177 |
Correct |
93 ms |
33192 KB |
Output is correct |
178 |
Correct |
73 ms |
37236 KB |
Output is correct |
179 |
Correct |
108 ms |
44408 KB |
Output is correct |
180 |
Correct |
164 ms |
44112 KB |
Output is correct |
181 |
Correct |
143 ms |
44580 KB |
Output is correct |
182 |
Correct |
144 ms |
44796 KB |
Output is correct |
183 |
Correct |
144 ms |
42704 KB |
Output is correct |
184 |
Correct |
436 ms |
59396 KB |
Output is correct |
185 |
Correct |
90 ms |
45704 KB |
Output is correct |
186 |
Correct |
106 ms |
51756 KB |
Output is correct |
187 |
Correct |
46 ms |
42552 KB |
Output is correct |
188 |
Correct |
216 ms |
87928 KB |
Output is correct |
189 |
Correct |
384 ms |
82828 KB |
Output is correct |
190 |
Correct |
159 ms |
55944 KB |
Output is correct |
191 |
Correct |
188 ms |
88496 KB |
Output is correct |
192 |
Correct |
375 ms |
122084 KB |
Output is correct |
193 |
Correct |
243 ms |
90252 KB |
Output is correct |
194 |
Correct |
158 ms |
88388 KB |
Output is correct |
195 |
Correct |
179 ms |
66624 KB |
Output is correct |
196 |
Correct |
294 ms |
82444 KB |
Output is correct |
197 |
Correct |
212 ms |
82088 KB |
Output is correct |
198 |
Correct |
213 ms |
82112 KB |
Output is correct |
199 |
Correct |
278 ms |
83712 KB |
Output is correct |
200 |
Correct |
239 ms |
81688 KB |
Output is correct |
201 |
Correct |
333 ms |
82172 KB |
Output is correct |
202 |
Correct |
492 ms |
56488 KB |
Output is correct |
203 |
Correct |
939 ms |
115968 KB |
Output is correct |
204 |
Correct |
231 ms |
78204 KB |
Output is correct |
205 |
Correct |
428 ms |
100088 KB |
Output is correct |
206 |
Correct |
304 ms |
153708 KB |
Output is correct |
207 |
Correct |
426 ms |
176800 KB |
Output is correct |
208 |
Correct |
795 ms |
165524 KB |
Output is correct |
209 |
Correct |
891 ms |
113668 KB |
Output is correct |
210 |
Correct |
410 ms |
176804 KB |
Output is correct |
211 |
Correct |
660 ms |
246488 KB |
Output is correct |
212 |
Correct |
542 ms |
181484 KB |
Output is correct |
213 |
Correct |
268 ms |
178768 KB |
Output is correct |
214 |
Correct |
427 ms |
133484 KB |
Output is correct |
215 |
Correct |
620 ms |
167016 KB |
Output is correct |
216 |
Correct |
528 ms |
166980 KB |
Output is correct |
217 |
Correct |
574 ms |
167728 KB |
Output is correct |
218 |
Correct |
528 ms |
168644 KB |
Output is correct |
219 |
Correct |
508 ms |
184944 KB |
Output is correct |
220 |
Correct |
311 ms |
164084 KB |
Output is correct |
221 |
Correct |
361 ms |
170188 KB |
Output is correct |
222 |
Correct |
658 ms |
223664 KB |
Output is correct |
223 |
Correct |
659 ms |
163376 KB |
Output is correct |
224 |
Correct |
742 ms |
165484 KB |
Output is correct |
225 |
Correct |
475 ms |
113800 KB |
Output is correct |