# |
제출 시각 |
아이디 |
문제 |
언어 |
결과 |
실행 시간 |
메모리 |
792705 |
2023-07-25T08:11:24 Z |
WLZ |
Maze (JOI23_ho_t3) |
C++17 |
|
2000 ms |
1625504 KB |
#include <bits/stdc++.h>
using namespace std;
#ifdef DEBUG
#include "templates/debug.h"
#else
#define debug(...) 0
#endif
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
#define eb emplace_back
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define SZ(x) (int) x.size()
using ll = long long;
using ull = unsigned ll;
using lll = __int128_t;
using ulll = __uint128_t;
using ld = long double;
using ii = pair<int, int>;
using vi = vector<int>;
using vll = vector<ll>;
using vii = vector<ii>;
template<typename T> using mx_pq = priority_queue<T>;
template<typename T> using mn_pq = priority_queue<T, vector<T>, greater<T>>;
template<typename T> void cmax(T &a, const T &b) { a = max(a, b); }
template<typename T> void cmin(T &a, const T &b) { a = min(a, b); }
const int INF = 0x3f3f3f3f;
const ll LINF = (ll) 1e18;
const double DINF = 1.0 / 0.0;
const double pi = acos(-1);
const double EPS = 1e-9;
void solve(int current_case);
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int t = 1;
//cin >> t;
for (int q = 1; q <= t; q++) solve(q);
return 0;
}
const vector<int> dx = {1, -1, 0, 0};
const vector<int> dy = {0, 0, 1, -1};
int r, c, n;
int sr, sc, gr, gc;
vector<string> grid;
vector<vii> g;
bool in_grid(int i, int j) {
return i >= 0 && i < r && j >= 0 && j < c;
}
int idx(int i, int j) {
return i * c + j;
}
void solve(int current_case) {
cin >> r >> c >> n;
cin >> sr >> sc; sr--; sc--;
cin >> gr >> gc; gr--; gc--;
grid.resize(r);
rep(i, 0, r) cin >> grid[i];
g.resize(3 * r * c);
rep(i, 0, r) {
rep(j, 0, c) {
rep(k, 0, 4) {
int ni = i + dx[k], nj = j + dy[k];
if (in_grid(ni, nj) && grid[ni][nj] == '.') g[idx(i, j)].eb(idx(ni, nj), 0);
}
rep(ni, i, i + n) rep(nj, j, j + n) if (in_grid(ni, nj)) g[idx(i, j) + r * c].eb(idx(ni, nj), 0);
rep(k, 0, n) {
int ni = i - 1, nj = j + k;
if (in_grid(ni, nj)) g[idx(ni, nj)].eb(idx(i, j) + r * c, 1);
ni = i + n;
if (in_grid(ni, nj)) g[idx(ni, nj)].eb(idx(i, j) + r * c, 1);
ni = i + k, nj = j - 1;
if (in_grid(ni, nj)) g[idx(ni, nj)].eb(idx(i, j) + r * c, 1);
nj = j + n;
if (in_grid(ni, nj)) g[idx(ni, nj)].eb(idx(i, j) + r * c, 1);
}
}
}
debug(idx(5, 3));
debug(idx(2, 0));
vi dist(3 * r * c, INF); dist[idx(sr, sc)] = 0;
deque<ii> pq; pq.push_back({idx(sr, sc), 0});
while (!pq.empty()) {
int u = pq.back().first, d = pq.back().second;
//debug(u, d);
pq.pop_back();
if (d > dist[u]) continue;
for (auto &v : g[u]) {
if (d + v.second >= dist[v.first]) continue;
dist[v.first] = d + v.second;
if (v.second == 0) pq.push_back({v.first, dist[v.first]});
else pq.push_front({v.first, dist[v.first]});
}
}
debug(dist);
rep(i, 0, r) rep(j, 0, c) if (max(abs(i - gr), abs(j - gc)) < n) cmin(dist[idx(gr, gc)], dist[idx(i, j)] + 1);
cout << dist[idx(gr, gc)] << '\n';
}
Compilation message
Main.cpp: In function 'void solve(int)':
Main.cpp:7:20: warning: statement has no effect [-Wunused-value]
7 | #define debug(...) 0
| ^
Main.cpp:90:3: note: in expansion of macro 'debug'
90 | debug(idx(5, 3));
| ^~~~~
Main.cpp:7:20: warning: statement has no effect [-Wunused-value]
7 | #define debug(...) 0
| ^
Main.cpp:91:3: note: in expansion of macro 'debug'
91 | debug(idx(2, 0));
| ^~~~~
Main.cpp:7:20: warning: statement has no effect [-Wunused-value]
7 | #define debug(...) 0
| ^
Main.cpp:106:3: note: in expansion of macro 'debug'
106 | debug(dist);
| ^~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
468 KB |
Output is correct |
4 |
Correct |
1 ms |
448 KB |
Output is correct |
5 |
Correct |
1 ms |
468 KB |
Output is correct |
6 |
Correct |
1 ms |
468 KB |
Output is correct |
7 |
Correct |
1 ms |
468 KB |
Output is correct |
8 |
Correct |
1 ms |
468 KB |
Output is correct |
9 |
Correct |
0 ms |
212 KB |
Output is correct |
10 |
Correct |
0 ms |
316 KB |
Output is correct |
11 |
Correct |
0 ms |
324 KB |
Output is correct |
12 |
Correct |
0 ms |
212 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
316 KB |
Output is correct |
15 |
Correct |
1 ms |
320 KB |
Output is correct |
16 |
Correct |
1 ms |
448 KB |
Output is correct |
17 |
Correct |
1 ms |
468 KB |
Output is correct |
18 |
Correct |
1 ms |
444 KB |
Output is correct |
19 |
Correct |
21 ms |
10464 KB |
Output is correct |
20 |
Correct |
10 ms |
7132 KB |
Output is correct |
21 |
Correct |
16 ms |
12356 KB |
Output is correct |
22 |
Correct |
20 ms |
11604 KB |
Output is correct |
23 |
Correct |
21 ms |
10096 KB |
Output is correct |
24 |
Correct |
13 ms |
10068 KB |
Output is correct |
25 |
Correct |
11 ms |
9132 KB |
Output is correct |
26 |
Correct |
20 ms |
11860 KB |
Output is correct |
27 |
Correct |
20 ms |
11732 KB |
Output is correct |
28 |
Correct |
15 ms |
10196 KB |
Output is correct |
29 |
Correct |
44 ms |
25680 KB |
Output is correct |
30 |
Correct |
17 ms |
11092 KB |
Output is correct |
31 |
Correct |
43 ms |
31052 KB |
Output is correct |
32 |
Correct |
57 ms |
28736 KB |
Output is correct |
33 |
Correct |
44 ms |
24780 KB |
Output is correct |
34 |
Correct |
36 ms |
24688 KB |
Output is correct |
35 |
Correct |
30 ms |
22340 KB |
Output is correct |
36 |
Correct |
57 ms |
29132 KB |
Output is correct |
37 |
Correct |
57 ms |
28748 KB |
Output is correct |
38 |
Correct |
45 ms |
24988 KB |
Output is correct |
39 |
Correct |
670 ms |
254192 KB |
Output is correct |
40 |
Correct |
68 ms |
32556 KB |
Output is correct |
41 |
Correct |
42 ms |
30152 KB |
Output is correct |
42 |
Correct |
78 ms |
38348 KB |
Output is correct |
43 |
Correct |
107 ms |
42484 KB |
Output is correct |
44 |
Correct |
334 ms |
142432 KB |
Output is correct |
45 |
Correct |
270 ms |
137564 KB |
Output is correct |
46 |
Correct |
467 ms |
306468 KB |
Output is correct |
47 |
Correct |
695 ms |
284808 KB |
Output is correct |
48 |
Correct |
627 ms |
245756 KB |
Output is correct |
49 |
Correct |
308 ms |
243944 KB |
Output is correct |
50 |
Correct |
265 ms |
220904 KB |
Output is correct |
51 |
Correct |
725 ms |
288556 KB |
Output is correct |
52 |
Correct |
760 ms |
285120 KB |
Output is correct |
53 |
Correct |
550 ms |
246304 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
324 KB |
Output is correct |
3 |
Correct |
0 ms |
340 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
1 ms |
468 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
340 KB |
Output is correct |
8 |
Correct |
1 ms |
320 KB |
Output is correct |
9 |
Correct |
1 ms |
468 KB |
Output is correct |
10 |
Correct |
1 ms |
468 KB |
Output is correct |
11 |
Correct |
1 ms |
444 KB |
Output is correct |
12 |
Correct |
4 ms |
3796 KB |
Output is correct |
13 |
Correct |
5 ms |
3796 KB |
Output is correct |
14 |
Correct |
4 ms |
3668 KB |
Output is correct |
15 |
Correct |
1 ms |
468 KB |
Output is correct |
16 |
Correct |
1 ms |
468 KB |
Output is correct |
17 |
Correct |
1 ms |
468 KB |
Output is correct |
18 |
Correct |
1 ms |
212 KB |
Output is correct |
19 |
Correct |
1 ms |
832 KB |
Output is correct |
20 |
Correct |
1 ms |
340 KB |
Output is correct |
21 |
Correct |
1 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
468 KB |
Output is correct |
23 |
Correct |
1 ms |
320 KB |
Output is correct |
24 |
Correct |
0 ms |
212 KB |
Output is correct |
25 |
Correct |
0 ms |
212 KB |
Output is correct |
26 |
Correct |
1 ms |
340 KB |
Output is correct |
27 |
Correct |
0 ms |
340 KB |
Output is correct |
28 |
Correct |
1 ms |
444 KB |
Output is correct |
29 |
Correct |
0 ms |
212 KB |
Output is correct |
30 |
Correct |
1 ms |
468 KB |
Output is correct |
31 |
Correct |
1 ms |
468 KB |
Output is correct |
32 |
Correct |
1 ms |
468 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
320 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
320 KB |
Output is correct |
4 |
Correct |
1 ms |
340 KB |
Output is correct |
5 |
Correct |
0 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
324 KB |
Output is correct |
7 |
Correct |
1 ms |
468 KB |
Output is correct |
8 |
Correct |
1 ms |
468 KB |
Output is correct |
9 |
Correct |
5 ms |
3796 KB |
Output is correct |
10 |
Correct |
5 ms |
3796 KB |
Output is correct |
11 |
Correct |
5 ms |
3668 KB |
Output is correct |
12 |
Correct |
1 ms |
468 KB |
Output is correct |
13 |
Correct |
0 ms |
212 KB |
Output is correct |
14 |
Correct |
1 ms |
852 KB |
Output is correct |
15 |
Correct |
0 ms |
212 KB |
Output is correct |
16 |
Correct |
1 ms |
468 KB |
Output is correct |
17 |
Correct |
1 ms |
340 KB |
Output is correct |
18 |
Correct |
0 ms |
212 KB |
Output is correct |
19 |
Correct |
0 ms |
212 KB |
Output is correct |
20 |
Correct |
0 ms |
340 KB |
Output is correct |
21 |
Correct |
1 ms |
448 KB |
Output is correct |
22 |
Correct |
1 ms |
444 KB |
Output is correct |
23 |
Correct |
1 ms |
468 KB |
Output is correct |
24 |
Correct |
8 ms |
7600 KB |
Output is correct |
25 |
Correct |
24 ms |
14052 KB |
Output is correct |
26 |
Correct |
55 ms |
33108 KB |
Output is correct |
27 |
Correct |
16 ms |
12380 KB |
Output is correct |
28 |
Execution timed out |
2112 ms |
1171232 KB |
Time limit exceeded |
29 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
324 KB |
Output is correct |
3 |
Correct |
0 ms |
340 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
1 ms |
468 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
340 KB |
Output is correct |
8 |
Correct |
1 ms |
320 KB |
Output is correct |
9 |
Correct |
1 ms |
468 KB |
Output is correct |
10 |
Correct |
1 ms |
468 KB |
Output is correct |
11 |
Correct |
1 ms |
444 KB |
Output is correct |
12 |
Correct |
4 ms |
3796 KB |
Output is correct |
13 |
Correct |
5 ms |
3796 KB |
Output is correct |
14 |
Correct |
4 ms |
3668 KB |
Output is correct |
15 |
Correct |
1 ms |
468 KB |
Output is correct |
16 |
Correct |
1 ms |
468 KB |
Output is correct |
17 |
Correct |
1 ms |
468 KB |
Output is correct |
18 |
Correct |
1 ms |
212 KB |
Output is correct |
19 |
Correct |
1 ms |
832 KB |
Output is correct |
20 |
Correct |
1 ms |
340 KB |
Output is correct |
21 |
Correct |
1 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
468 KB |
Output is correct |
23 |
Correct |
1 ms |
320 KB |
Output is correct |
24 |
Correct |
0 ms |
212 KB |
Output is correct |
25 |
Correct |
0 ms |
212 KB |
Output is correct |
26 |
Correct |
1 ms |
340 KB |
Output is correct |
27 |
Correct |
0 ms |
340 KB |
Output is correct |
28 |
Correct |
1 ms |
444 KB |
Output is correct |
29 |
Correct |
0 ms |
212 KB |
Output is correct |
30 |
Correct |
1 ms |
468 KB |
Output is correct |
31 |
Correct |
1 ms |
468 KB |
Output is correct |
32 |
Correct |
1 ms |
468 KB |
Output is correct |
33 |
Correct |
27 ms |
10404 KB |
Output is correct |
34 |
Correct |
13 ms |
7652 KB |
Output is correct |
35 |
Correct |
2 ms |
1092 KB |
Output is correct |
36 |
Correct |
24 ms |
14104 KB |
Output is correct |
37 |
Correct |
9 ms |
7124 KB |
Output is correct |
38 |
Correct |
58 ms |
33100 KB |
Output is correct |
39 |
Correct |
17 ms |
12364 KB |
Output is correct |
40 |
Correct |
20 ms |
11604 KB |
Output is correct |
41 |
Correct |
15 ms |
10116 KB |
Output is correct |
42 |
Execution timed out |
2158 ms |
1625504 KB |
Time limit exceeded |
43 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
324 KB |
Output is correct |
3 |
Correct |
0 ms |
340 KB |
Output is correct |
4 |
Correct |
0 ms |
212 KB |
Output is correct |
5 |
Correct |
1 ms |
468 KB |
Output is correct |
6 |
Correct |
0 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
340 KB |
Output is correct |
8 |
Correct |
1 ms |
320 KB |
Output is correct |
9 |
Correct |
1 ms |
468 KB |
Output is correct |
10 |
Correct |
1 ms |
468 KB |
Output is correct |
11 |
Correct |
1 ms |
444 KB |
Output is correct |
12 |
Correct |
4 ms |
3796 KB |
Output is correct |
13 |
Correct |
5 ms |
3796 KB |
Output is correct |
14 |
Correct |
4 ms |
3668 KB |
Output is correct |
15 |
Correct |
1 ms |
468 KB |
Output is correct |
16 |
Correct |
1 ms |
468 KB |
Output is correct |
17 |
Correct |
1 ms |
468 KB |
Output is correct |
18 |
Correct |
1 ms |
212 KB |
Output is correct |
19 |
Correct |
1 ms |
832 KB |
Output is correct |
20 |
Correct |
1 ms |
340 KB |
Output is correct |
21 |
Correct |
1 ms |
212 KB |
Output is correct |
22 |
Correct |
1 ms |
468 KB |
Output is correct |
23 |
Correct |
1 ms |
320 KB |
Output is correct |
24 |
Correct |
0 ms |
212 KB |
Output is correct |
25 |
Correct |
0 ms |
212 KB |
Output is correct |
26 |
Correct |
1 ms |
340 KB |
Output is correct |
27 |
Correct |
0 ms |
340 KB |
Output is correct |
28 |
Correct |
1 ms |
444 KB |
Output is correct |
29 |
Correct |
0 ms |
212 KB |
Output is correct |
30 |
Correct |
1 ms |
468 KB |
Output is correct |
31 |
Correct |
1 ms |
468 KB |
Output is correct |
32 |
Correct |
1 ms |
468 KB |
Output is correct |
33 |
Correct |
27 ms |
10404 KB |
Output is correct |
34 |
Correct |
13 ms |
7652 KB |
Output is correct |
35 |
Correct |
2 ms |
1092 KB |
Output is correct |
36 |
Correct |
24 ms |
14104 KB |
Output is correct |
37 |
Correct |
9 ms |
7124 KB |
Output is correct |
38 |
Correct |
58 ms |
33100 KB |
Output is correct |
39 |
Correct |
17 ms |
12364 KB |
Output is correct |
40 |
Correct |
20 ms |
11604 KB |
Output is correct |
41 |
Correct |
15 ms |
10116 KB |
Output is correct |
42 |
Execution timed out |
2158 ms |
1625504 KB |
Time limit exceeded |
43 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
468 KB |
Output is correct |
4 |
Correct |
1 ms |
448 KB |
Output is correct |
5 |
Correct |
1 ms |
468 KB |
Output is correct |
6 |
Correct |
1 ms |
468 KB |
Output is correct |
7 |
Correct |
1 ms |
468 KB |
Output is correct |
8 |
Correct |
1 ms |
468 KB |
Output is correct |
9 |
Correct |
0 ms |
212 KB |
Output is correct |
10 |
Correct |
0 ms |
316 KB |
Output is correct |
11 |
Correct |
0 ms |
324 KB |
Output is correct |
12 |
Correct |
0 ms |
212 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
316 KB |
Output is correct |
15 |
Correct |
1 ms |
320 KB |
Output is correct |
16 |
Correct |
1 ms |
448 KB |
Output is correct |
17 |
Correct |
1 ms |
468 KB |
Output is correct |
18 |
Correct |
1 ms |
444 KB |
Output is correct |
19 |
Correct |
21 ms |
10464 KB |
Output is correct |
20 |
Correct |
10 ms |
7132 KB |
Output is correct |
21 |
Correct |
16 ms |
12356 KB |
Output is correct |
22 |
Correct |
20 ms |
11604 KB |
Output is correct |
23 |
Correct |
21 ms |
10096 KB |
Output is correct |
24 |
Correct |
13 ms |
10068 KB |
Output is correct |
25 |
Correct |
11 ms |
9132 KB |
Output is correct |
26 |
Correct |
20 ms |
11860 KB |
Output is correct |
27 |
Correct |
20 ms |
11732 KB |
Output is correct |
28 |
Correct |
15 ms |
10196 KB |
Output is correct |
29 |
Correct |
44 ms |
25680 KB |
Output is correct |
30 |
Correct |
17 ms |
11092 KB |
Output is correct |
31 |
Correct |
43 ms |
31052 KB |
Output is correct |
32 |
Correct |
57 ms |
28736 KB |
Output is correct |
33 |
Correct |
44 ms |
24780 KB |
Output is correct |
34 |
Correct |
36 ms |
24688 KB |
Output is correct |
35 |
Correct |
30 ms |
22340 KB |
Output is correct |
36 |
Correct |
57 ms |
29132 KB |
Output is correct |
37 |
Correct |
57 ms |
28748 KB |
Output is correct |
38 |
Correct |
45 ms |
24988 KB |
Output is correct |
39 |
Correct |
670 ms |
254192 KB |
Output is correct |
40 |
Correct |
68 ms |
32556 KB |
Output is correct |
41 |
Correct |
42 ms |
30152 KB |
Output is correct |
42 |
Correct |
78 ms |
38348 KB |
Output is correct |
43 |
Correct |
107 ms |
42484 KB |
Output is correct |
44 |
Correct |
334 ms |
142432 KB |
Output is correct |
45 |
Correct |
270 ms |
137564 KB |
Output is correct |
46 |
Correct |
467 ms |
306468 KB |
Output is correct |
47 |
Correct |
695 ms |
284808 KB |
Output is correct |
48 |
Correct |
627 ms |
245756 KB |
Output is correct |
49 |
Correct |
308 ms |
243944 KB |
Output is correct |
50 |
Correct |
265 ms |
220904 KB |
Output is correct |
51 |
Correct |
725 ms |
288556 KB |
Output is correct |
52 |
Correct |
760 ms |
285120 KB |
Output is correct |
53 |
Correct |
550 ms |
246304 KB |
Output is correct |
54 |
Correct |
0 ms |
212 KB |
Output is correct |
55 |
Correct |
1 ms |
324 KB |
Output is correct |
56 |
Correct |
0 ms |
340 KB |
Output is correct |
57 |
Correct |
0 ms |
212 KB |
Output is correct |
58 |
Correct |
1 ms |
468 KB |
Output is correct |
59 |
Correct |
0 ms |
212 KB |
Output is correct |
60 |
Correct |
1 ms |
340 KB |
Output is correct |
61 |
Correct |
1 ms |
320 KB |
Output is correct |
62 |
Correct |
1 ms |
468 KB |
Output is correct |
63 |
Correct |
1 ms |
468 KB |
Output is correct |
64 |
Correct |
1 ms |
444 KB |
Output is correct |
65 |
Correct |
4 ms |
3796 KB |
Output is correct |
66 |
Correct |
5 ms |
3796 KB |
Output is correct |
67 |
Correct |
4 ms |
3668 KB |
Output is correct |
68 |
Correct |
1 ms |
468 KB |
Output is correct |
69 |
Correct |
1 ms |
468 KB |
Output is correct |
70 |
Correct |
1 ms |
468 KB |
Output is correct |
71 |
Correct |
1 ms |
212 KB |
Output is correct |
72 |
Correct |
1 ms |
832 KB |
Output is correct |
73 |
Correct |
1 ms |
340 KB |
Output is correct |
74 |
Correct |
1 ms |
212 KB |
Output is correct |
75 |
Correct |
1 ms |
468 KB |
Output is correct |
76 |
Correct |
1 ms |
320 KB |
Output is correct |
77 |
Correct |
0 ms |
212 KB |
Output is correct |
78 |
Correct |
0 ms |
212 KB |
Output is correct |
79 |
Correct |
1 ms |
340 KB |
Output is correct |
80 |
Correct |
0 ms |
340 KB |
Output is correct |
81 |
Correct |
1 ms |
444 KB |
Output is correct |
82 |
Correct |
0 ms |
212 KB |
Output is correct |
83 |
Correct |
1 ms |
468 KB |
Output is correct |
84 |
Correct |
1 ms |
468 KB |
Output is correct |
85 |
Correct |
1 ms |
468 KB |
Output is correct |
86 |
Correct |
0 ms |
320 KB |
Output is correct |
87 |
Correct |
0 ms |
212 KB |
Output is correct |
88 |
Correct |
1 ms |
320 KB |
Output is correct |
89 |
Correct |
1 ms |
340 KB |
Output is correct |
90 |
Correct |
0 ms |
212 KB |
Output is correct |
91 |
Correct |
1 ms |
324 KB |
Output is correct |
92 |
Correct |
1 ms |
468 KB |
Output is correct |
93 |
Correct |
1 ms |
468 KB |
Output is correct |
94 |
Correct |
5 ms |
3796 KB |
Output is correct |
95 |
Correct |
5 ms |
3796 KB |
Output is correct |
96 |
Correct |
5 ms |
3668 KB |
Output is correct |
97 |
Correct |
1 ms |
468 KB |
Output is correct |
98 |
Correct |
0 ms |
212 KB |
Output is correct |
99 |
Correct |
1 ms |
852 KB |
Output is correct |
100 |
Correct |
0 ms |
212 KB |
Output is correct |
101 |
Correct |
1 ms |
468 KB |
Output is correct |
102 |
Correct |
1 ms |
340 KB |
Output is correct |
103 |
Correct |
0 ms |
212 KB |
Output is correct |
104 |
Correct |
0 ms |
212 KB |
Output is correct |
105 |
Correct |
0 ms |
340 KB |
Output is correct |
106 |
Correct |
1 ms |
448 KB |
Output is correct |
107 |
Correct |
1 ms |
444 KB |
Output is correct |
108 |
Correct |
1 ms |
468 KB |
Output is correct |
109 |
Correct |
8 ms |
7600 KB |
Output is correct |
110 |
Correct |
24 ms |
14052 KB |
Output is correct |
111 |
Correct |
55 ms |
33108 KB |
Output is correct |
112 |
Correct |
16 ms |
12380 KB |
Output is correct |
113 |
Execution timed out |
2112 ms |
1171232 KB |
Time limit exceeded |
114 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
468 KB |
Output is correct |
4 |
Correct |
1 ms |
448 KB |
Output is correct |
5 |
Correct |
1 ms |
468 KB |
Output is correct |
6 |
Correct |
1 ms |
468 KB |
Output is correct |
7 |
Correct |
1 ms |
468 KB |
Output is correct |
8 |
Correct |
1 ms |
468 KB |
Output is correct |
9 |
Correct |
0 ms |
212 KB |
Output is correct |
10 |
Correct |
0 ms |
316 KB |
Output is correct |
11 |
Correct |
0 ms |
324 KB |
Output is correct |
12 |
Correct |
0 ms |
212 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
316 KB |
Output is correct |
15 |
Correct |
1 ms |
320 KB |
Output is correct |
16 |
Correct |
1 ms |
448 KB |
Output is correct |
17 |
Correct |
1 ms |
468 KB |
Output is correct |
18 |
Correct |
1 ms |
444 KB |
Output is correct |
19 |
Correct |
21 ms |
10464 KB |
Output is correct |
20 |
Correct |
10 ms |
7132 KB |
Output is correct |
21 |
Correct |
16 ms |
12356 KB |
Output is correct |
22 |
Correct |
20 ms |
11604 KB |
Output is correct |
23 |
Correct |
21 ms |
10096 KB |
Output is correct |
24 |
Correct |
13 ms |
10068 KB |
Output is correct |
25 |
Correct |
11 ms |
9132 KB |
Output is correct |
26 |
Correct |
20 ms |
11860 KB |
Output is correct |
27 |
Correct |
20 ms |
11732 KB |
Output is correct |
28 |
Correct |
15 ms |
10196 KB |
Output is correct |
29 |
Correct |
44 ms |
25680 KB |
Output is correct |
30 |
Correct |
17 ms |
11092 KB |
Output is correct |
31 |
Correct |
43 ms |
31052 KB |
Output is correct |
32 |
Correct |
57 ms |
28736 KB |
Output is correct |
33 |
Correct |
44 ms |
24780 KB |
Output is correct |
34 |
Correct |
36 ms |
24688 KB |
Output is correct |
35 |
Correct |
30 ms |
22340 KB |
Output is correct |
36 |
Correct |
57 ms |
29132 KB |
Output is correct |
37 |
Correct |
57 ms |
28748 KB |
Output is correct |
38 |
Correct |
45 ms |
24988 KB |
Output is correct |
39 |
Correct |
670 ms |
254192 KB |
Output is correct |
40 |
Correct |
68 ms |
32556 KB |
Output is correct |
41 |
Correct |
42 ms |
30152 KB |
Output is correct |
42 |
Correct |
78 ms |
38348 KB |
Output is correct |
43 |
Correct |
107 ms |
42484 KB |
Output is correct |
44 |
Correct |
334 ms |
142432 KB |
Output is correct |
45 |
Correct |
270 ms |
137564 KB |
Output is correct |
46 |
Correct |
467 ms |
306468 KB |
Output is correct |
47 |
Correct |
695 ms |
284808 KB |
Output is correct |
48 |
Correct |
627 ms |
245756 KB |
Output is correct |
49 |
Correct |
308 ms |
243944 KB |
Output is correct |
50 |
Correct |
265 ms |
220904 KB |
Output is correct |
51 |
Correct |
725 ms |
288556 KB |
Output is correct |
52 |
Correct |
760 ms |
285120 KB |
Output is correct |
53 |
Correct |
550 ms |
246304 KB |
Output is correct |
54 |
Correct |
0 ms |
212 KB |
Output is correct |
55 |
Correct |
1 ms |
324 KB |
Output is correct |
56 |
Correct |
0 ms |
340 KB |
Output is correct |
57 |
Correct |
0 ms |
212 KB |
Output is correct |
58 |
Correct |
1 ms |
468 KB |
Output is correct |
59 |
Correct |
0 ms |
212 KB |
Output is correct |
60 |
Correct |
1 ms |
340 KB |
Output is correct |
61 |
Correct |
1 ms |
320 KB |
Output is correct |
62 |
Correct |
1 ms |
468 KB |
Output is correct |
63 |
Correct |
1 ms |
468 KB |
Output is correct |
64 |
Correct |
1 ms |
444 KB |
Output is correct |
65 |
Correct |
4 ms |
3796 KB |
Output is correct |
66 |
Correct |
5 ms |
3796 KB |
Output is correct |
67 |
Correct |
4 ms |
3668 KB |
Output is correct |
68 |
Correct |
1 ms |
468 KB |
Output is correct |
69 |
Correct |
1 ms |
468 KB |
Output is correct |
70 |
Correct |
1 ms |
468 KB |
Output is correct |
71 |
Correct |
1 ms |
212 KB |
Output is correct |
72 |
Correct |
1 ms |
832 KB |
Output is correct |
73 |
Correct |
1 ms |
340 KB |
Output is correct |
74 |
Correct |
1 ms |
212 KB |
Output is correct |
75 |
Correct |
1 ms |
468 KB |
Output is correct |
76 |
Correct |
1 ms |
320 KB |
Output is correct |
77 |
Correct |
0 ms |
212 KB |
Output is correct |
78 |
Correct |
0 ms |
212 KB |
Output is correct |
79 |
Correct |
1 ms |
340 KB |
Output is correct |
80 |
Correct |
0 ms |
340 KB |
Output is correct |
81 |
Correct |
1 ms |
444 KB |
Output is correct |
82 |
Correct |
0 ms |
212 KB |
Output is correct |
83 |
Correct |
1 ms |
468 KB |
Output is correct |
84 |
Correct |
1 ms |
468 KB |
Output is correct |
85 |
Correct |
1 ms |
468 KB |
Output is correct |
86 |
Correct |
0 ms |
320 KB |
Output is correct |
87 |
Correct |
0 ms |
212 KB |
Output is correct |
88 |
Correct |
1 ms |
320 KB |
Output is correct |
89 |
Correct |
1 ms |
340 KB |
Output is correct |
90 |
Correct |
0 ms |
212 KB |
Output is correct |
91 |
Correct |
1 ms |
324 KB |
Output is correct |
92 |
Correct |
1 ms |
468 KB |
Output is correct |
93 |
Correct |
1 ms |
468 KB |
Output is correct |
94 |
Correct |
5 ms |
3796 KB |
Output is correct |
95 |
Correct |
5 ms |
3796 KB |
Output is correct |
96 |
Correct |
5 ms |
3668 KB |
Output is correct |
97 |
Correct |
1 ms |
468 KB |
Output is correct |
98 |
Correct |
0 ms |
212 KB |
Output is correct |
99 |
Correct |
1 ms |
852 KB |
Output is correct |
100 |
Correct |
0 ms |
212 KB |
Output is correct |
101 |
Correct |
1 ms |
468 KB |
Output is correct |
102 |
Correct |
1 ms |
340 KB |
Output is correct |
103 |
Correct |
0 ms |
212 KB |
Output is correct |
104 |
Correct |
0 ms |
212 KB |
Output is correct |
105 |
Correct |
0 ms |
340 KB |
Output is correct |
106 |
Correct |
1 ms |
448 KB |
Output is correct |
107 |
Correct |
1 ms |
444 KB |
Output is correct |
108 |
Correct |
1 ms |
468 KB |
Output is correct |
109 |
Correct |
8 ms |
7600 KB |
Output is correct |
110 |
Correct |
24 ms |
14052 KB |
Output is correct |
111 |
Correct |
55 ms |
33108 KB |
Output is correct |
112 |
Correct |
16 ms |
12380 KB |
Output is correct |
113 |
Execution timed out |
2112 ms |
1171232 KB |
Time limit exceeded |
114 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
468 KB |
Output is correct |
4 |
Correct |
1 ms |
448 KB |
Output is correct |
5 |
Correct |
1 ms |
468 KB |
Output is correct |
6 |
Correct |
1 ms |
468 KB |
Output is correct |
7 |
Correct |
1 ms |
468 KB |
Output is correct |
8 |
Correct |
1 ms |
468 KB |
Output is correct |
9 |
Correct |
0 ms |
212 KB |
Output is correct |
10 |
Correct |
0 ms |
316 KB |
Output is correct |
11 |
Correct |
0 ms |
324 KB |
Output is correct |
12 |
Correct |
0 ms |
212 KB |
Output is correct |
13 |
Correct |
1 ms |
340 KB |
Output is correct |
14 |
Correct |
1 ms |
316 KB |
Output is correct |
15 |
Correct |
1 ms |
320 KB |
Output is correct |
16 |
Correct |
1 ms |
448 KB |
Output is correct |
17 |
Correct |
1 ms |
468 KB |
Output is correct |
18 |
Correct |
1 ms |
444 KB |
Output is correct |
19 |
Correct |
21 ms |
10464 KB |
Output is correct |
20 |
Correct |
10 ms |
7132 KB |
Output is correct |
21 |
Correct |
16 ms |
12356 KB |
Output is correct |
22 |
Correct |
20 ms |
11604 KB |
Output is correct |
23 |
Correct |
21 ms |
10096 KB |
Output is correct |
24 |
Correct |
13 ms |
10068 KB |
Output is correct |
25 |
Correct |
11 ms |
9132 KB |
Output is correct |
26 |
Correct |
20 ms |
11860 KB |
Output is correct |
27 |
Correct |
20 ms |
11732 KB |
Output is correct |
28 |
Correct |
15 ms |
10196 KB |
Output is correct |
29 |
Correct |
44 ms |
25680 KB |
Output is correct |
30 |
Correct |
17 ms |
11092 KB |
Output is correct |
31 |
Correct |
43 ms |
31052 KB |
Output is correct |
32 |
Correct |
57 ms |
28736 KB |
Output is correct |
33 |
Correct |
44 ms |
24780 KB |
Output is correct |
34 |
Correct |
36 ms |
24688 KB |
Output is correct |
35 |
Correct |
30 ms |
22340 KB |
Output is correct |
36 |
Correct |
57 ms |
29132 KB |
Output is correct |
37 |
Correct |
57 ms |
28748 KB |
Output is correct |
38 |
Correct |
45 ms |
24988 KB |
Output is correct |
39 |
Correct |
670 ms |
254192 KB |
Output is correct |
40 |
Correct |
68 ms |
32556 KB |
Output is correct |
41 |
Correct |
42 ms |
30152 KB |
Output is correct |
42 |
Correct |
78 ms |
38348 KB |
Output is correct |
43 |
Correct |
107 ms |
42484 KB |
Output is correct |
44 |
Correct |
334 ms |
142432 KB |
Output is correct |
45 |
Correct |
270 ms |
137564 KB |
Output is correct |
46 |
Correct |
467 ms |
306468 KB |
Output is correct |
47 |
Correct |
695 ms |
284808 KB |
Output is correct |
48 |
Correct |
627 ms |
245756 KB |
Output is correct |
49 |
Correct |
308 ms |
243944 KB |
Output is correct |
50 |
Correct |
265 ms |
220904 KB |
Output is correct |
51 |
Correct |
725 ms |
288556 KB |
Output is correct |
52 |
Correct |
760 ms |
285120 KB |
Output is correct |
53 |
Correct |
550 ms |
246304 KB |
Output is correct |
54 |
Correct |
0 ms |
212 KB |
Output is correct |
55 |
Correct |
1 ms |
324 KB |
Output is correct |
56 |
Correct |
0 ms |
340 KB |
Output is correct |
57 |
Correct |
0 ms |
212 KB |
Output is correct |
58 |
Correct |
1 ms |
468 KB |
Output is correct |
59 |
Correct |
0 ms |
212 KB |
Output is correct |
60 |
Correct |
1 ms |
340 KB |
Output is correct |
61 |
Correct |
1 ms |
320 KB |
Output is correct |
62 |
Correct |
1 ms |
468 KB |
Output is correct |
63 |
Correct |
1 ms |
468 KB |
Output is correct |
64 |
Correct |
1 ms |
444 KB |
Output is correct |
65 |
Correct |
4 ms |
3796 KB |
Output is correct |
66 |
Correct |
5 ms |
3796 KB |
Output is correct |
67 |
Correct |
4 ms |
3668 KB |
Output is correct |
68 |
Correct |
1 ms |
468 KB |
Output is correct |
69 |
Correct |
1 ms |
468 KB |
Output is correct |
70 |
Correct |
1 ms |
468 KB |
Output is correct |
71 |
Correct |
1 ms |
212 KB |
Output is correct |
72 |
Correct |
1 ms |
832 KB |
Output is correct |
73 |
Correct |
1 ms |
340 KB |
Output is correct |
74 |
Correct |
1 ms |
212 KB |
Output is correct |
75 |
Correct |
1 ms |
468 KB |
Output is correct |
76 |
Correct |
1 ms |
320 KB |
Output is correct |
77 |
Correct |
0 ms |
212 KB |
Output is correct |
78 |
Correct |
0 ms |
212 KB |
Output is correct |
79 |
Correct |
1 ms |
340 KB |
Output is correct |
80 |
Correct |
0 ms |
340 KB |
Output is correct |
81 |
Correct |
1 ms |
444 KB |
Output is correct |
82 |
Correct |
0 ms |
212 KB |
Output is correct |
83 |
Correct |
1 ms |
468 KB |
Output is correct |
84 |
Correct |
1 ms |
468 KB |
Output is correct |
85 |
Correct |
1 ms |
468 KB |
Output is correct |
86 |
Correct |
0 ms |
320 KB |
Output is correct |
87 |
Correct |
0 ms |
212 KB |
Output is correct |
88 |
Correct |
1 ms |
320 KB |
Output is correct |
89 |
Correct |
1 ms |
340 KB |
Output is correct |
90 |
Correct |
0 ms |
212 KB |
Output is correct |
91 |
Correct |
1 ms |
324 KB |
Output is correct |
92 |
Correct |
1 ms |
468 KB |
Output is correct |
93 |
Correct |
1 ms |
468 KB |
Output is correct |
94 |
Correct |
5 ms |
3796 KB |
Output is correct |
95 |
Correct |
5 ms |
3796 KB |
Output is correct |
96 |
Correct |
5 ms |
3668 KB |
Output is correct |
97 |
Correct |
1 ms |
468 KB |
Output is correct |
98 |
Correct |
0 ms |
212 KB |
Output is correct |
99 |
Correct |
1 ms |
852 KB |
Output is correct |
100 |
Correct |
0 ms |
212 KB |
Output is correct |
101 |
Correct |
1 ms |
468 KB |
Output is correct |
102 |
Correct |
1 ms |
340 KB |
Output is correct |
103 |
Correct |
0 ms |
212 KB |
Output is correct |
104 |
Correct |
0 ms |
212 KB |
Output is correct |
105 |
Correct |
0 ms |
340 KB |
Output is correct |
106 |
Correct |
1 ms |
448 KB |
Output is correct |
107 |
Correct |
1 ms |
444 KB |
Output is correct |
108 |
Correct |
1 ms |
468 KB |
Output is correct |
109 |
Correct |
8 ms |
7600 KB |
Output is correct |
110 |
Correct |
24 ms |
14052 KB |
Output is correct |
111 |
Correct |
55 ms |
33108 KB |
Output is correct |
112 |
Correct |
16 ms |
12380 KB |
Output is correct |
113 |
Execution timed out |
2112 ms |
1171232 KB |
Time limit exceeded |
114 |
Halted |
0 ms |
0 KB |
- |