# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
936595 |
2024-03-02T09:39:24 Z |
penguin133 |
Maze (JOI23_ho_t3) |
C++17 |
|
2000 ms |
1217892 KB |
#include <bits/stdc++.h>
using namespace std;
//#define int long long
#define pi pair<int, int>
#define pii pair<int, pi>
#define fi first
#define se second
#ifdef _WIN32
#define getchar_unlocked _getchar_nolock
#endif
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
vector <pi> adj[10000005];
int cnt, n, q;
struct node{
int s, e, m;
int nd, nd2;
node *l, *r;
node(int _s, int _e){
s = _s, e = _e, m = (s + e) >> 1;
nd = cnt++;
nd2 = cnt++;
if(s == e){
adj[s].push_back({nd2, 0});
adj[nd].push_back({s, 0});
}
else{
l = new node(s, m);
r = new node(m+1, e);
adj[nd].push_back({l->nd, 0});
adj[nd].push_back({r->nd, 0});
adj[r->nd2].push_back({nd2, 0});
adj[l->nd2].push_back({nd2, 0});
}
}
void upd(int a, int b, int u, int v){
if(s == a && b == e){
adj[u].push_back({nd, v});
return;
}
if(b <= m)l->upd(a, b, u, v);
else if(a > m)r->upd(a, b, u, v);
else l->upd(a, m, u, v), r->upd(m+1, b, u, v);
}
void upd2(int a, int b, int u, int v){
if(s == a && b == e){
adj[nd2].push_back({u, v});
return;
}
if(b <= m)l->upd2(a, b, u, v);
else if(a > m)r->upd2(a, b, u, v);
else l->upd2(a, m, u, v), r->upd2(m+1, b, u, v);
}
}*root;
char A[6000005]; int r, c;
inline int conv(int x, int y){
return (x - 1) * c + y;
}
int ptr[10000005];
int dist[10000005];
void solve(){
cin >> r >> c >> n;
int a, b, cc, d; cin >> a >> b >> cc >> d;
cnt = r * c + 1;
root = new node(1, r * c);
if(r > c){
for(int i = 1; i <= r; i++){
for(int j = 1; j <= c; j++)cin >> A[conv(j, i)];
}
swap(r, c);
}
else for(int i = 1; i <= r; i++)for(int j = 1; j <= c; j++)cin >> A[conv(i, j)];
for(int i = 1; i <= r * c; i++){
if(i > c && A[i - c] == '.')adj[i].push_back({i - c, 0});
if(i <= c * (r - 1) && A[i + c] == '.')adj[i].push_back({i + c, 0});
if(i % c != 1 && A[i - 1] == '.')adj[i].push_back({i - 1, 0});
if(i % c && A[i + 1] == '.')adj[i].push_back({i + 1, 0});
int aaa = (i - 1) / c + 1, bbb = (i - 1) % c + 1;
for(int j = max(-n, -aaa + 1); j <= min(n, r - aaa); j++){
if((i - 1) / c + 1 + j <= 0 || (i - 1) / c + 1 + j > r)continue;
if(j == -n || j == n){
int lft = max(1, bbb - n + 1);
int rgt = min(c, bbb + n - 1);
root->upd(conv(aaa + j, lft), conv(aaa + j, rgt), i, 1);
}
else{
int lft = max(1, bbb - n);
int rgt = min(c, bbb + n);
root->upd(conv(aaa + j, lft), conv(aaa + j, rgt), i, 1);
}
}
}
for(int i = 1; i <= cnt; i++)dist[i] = 2e9;
dist[conv(a, b)] = 0;
//for(auto [i, j] : adj[conv(a, b)])cout << i << ' ' << j << '\n';
deque <int> dq;
const int os = (int)5e6;
ptr[os] = conv(a, b);
int cur = os - 1, cur2 = os;
//dq.push_back(conv(a, b));
while(1){
//int x = dq.front(); dq.pop_front();
int x = ptr[++cur];
if(cur > cur2)break;
for(auto [i, j] : adj[x]){
if(dist[i] > dist[x] + j){
dist[i] = dist[x] + j;
//if(j)dq.push_back(i);
//else dq.push_front(i);
if(j)ptr[++cur2] = i;
else ptr[cur--] = i;
}
}
}
//for(int i = 1; i <= cnt; i++)cout << dist[i] << ' ';
cout << dist[conv(cc, d)];
}
main(){
ios::sync_with_stdio(0);cin.tie(0);
int tc = 1;
//cin >> tc;
for(int tc1=1;tc1<=tc;tc1++){
// cout << "Case #" << tc1 << ": ";
solve();
}
}
Compilation message
Main.cpp:127:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
127 | main(){
| ^~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
97 ms |
241092 KB |
Output is correct |
2 |
Correct |
55 ms |
241272 KB |
Output is correct |
3 |
Correct |
57 ms |
241488 KB |
Output is correct |
4 |
Correct |
57 ms |
241492 KB |
Output is correct |
5 |
Correct |
58 ms |
241492 KB |
Output is correct |
6 |
Correct |
56 ms |
241608 KB |
Output is correct |
7 |
Correct |
57 ms |
241488 KB |
Output is correct |
8 |
Correct |
56 ms |
241492 KB |
Output is correct |
9 |
Correct |
54 ms |
241236 KB |
Output is correct |
10 |
Correct |
55 ms |
241232 KB |
Output is correct |
11 |
Correct |
54 ms |
241208 KB |
Output is correct |
12 |
Correct |
56 ms |
241148 KB |
Output is correct |
13 |
Correct |
56 ms |
241232 KB |
Output is correct |
14 |
Correct |
56 ms |
241328 KB |
Output is correct |
15 |
Correct |
56 ms |
241244 KB |
Output is correct |
16 |
Correct |
57 ms |
241444 KB |
Output is correct |
17 |
Correct |
57 ms |
241376 KB |
Output is correct |
18 |
Correct |
58 ms |
241472 KB |
Output is correct |
19 |
Correct |
111 ms |
262992 KB |
Output is correct |
20 |
Correct |
84 ms |
256592 KB |
Output is correct |
21 |
Correct |
112 ms |
266336 KB |
Output is correct |
22 |
Correct |
114 ms |
263252 KB |
Output is correct |
23 |
Correct |
115 ms |
262736 KB |
Output is correct |
24 |
Correct |
100 ms |
262804 KB |
Output is correct |
25 |
Correct |
93 ms |
260944 KB |
Output is correct |
26 |
Correct |
114 ms |
263248 KB |
Output is correct |
27 |
Correct |
119 ms |
263272 KB |
Output is correct |
28 |
Correct |
110 ms |
262980 KB |
Output is correct |
29 |
Correct |
200 ms |
294304 KB |
Output is correct |
30 |
Correct |
108 ms |
262996 KB |
Output is correct |
31 |
Correct |
206 ms |
302648 KB |
Output is correct |
32 |
Correct |
208 ms |
295092 KB |
Output is correct |
33 |
Correct |
198 ms |
294044 KB |
Output is correct |
34 |
Correct |
168 ms |
294100 KB |
Output is correct |
35 |
Correct |
174 ms |
289212 KB |
Output is correct |
36 |
Correct |
208 ms |
295504 KB |
Output is correct |
37 |
Correct |
218 ms |
295508 KB |
Output is correct |
38 |
Correct |
200 ms |
294224 KB |
Output is correct |
39 |
Correct |
1529 ms |
762564 KB |
Output is correct |
40 |
Correct |
221 ms |
304236 KB |
Output is correct |
41 |
Correct |
186 ms |
305704 KB |
Output is correct |
42 |
Correct |
271 ms |
317560 KB |
Output is correct |
43 |
Correct |
262 ms |
326460 KB |
Output is correct |
44 |
Correct |
796 ms |
511308 KB |
Output is correct |
45 |
Correct |
766 ms |
517460 KB |
Output is correct |
46 |
Correct |
1516 ms |
841720 KB |
Output is correct |
47 |
Correct |
1580 ms |
779820 KB |
Output is correct |
48 |
Correct |
1601 ms |
759652 KB |
Output is correct |
49 |
Correct |
1041 ms |
761276 KB |
Output is correct |
50 |
Correct |
1125 ms |
703944 KB |
Output is correct |
51 |
Correct |
1732 ms |
785928 KB |
Output is correct |
52 |
Correct |
1773 ms |
779648 KB |
Output is correct |
53 |
Correct |
1522 ms |
760088 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
57 ms |
241276 KB |
Output is correct |
2 |
Correct |
55 ms |
241236 KB |
Output is correct |
3 |
Correct |
55 ms |
241236 KB |
Output is correct |
4 |
Correct |
56 ms |
241236 KB |
Output is correct |
5 |
Correct |
55 ms |
241372 KB |
Output is correct |
6 |
Correct |
55 ms |
241200 KB |
Output is correct |
7 |
Correct |
57 ms |
241236 KB |
Output is correct |
8 |
Correct |
57 ms |
241236 KB |
Output is correct |
9 |
Correct |
55 ms |
241496 KB |
Output is correct |
10 |
Correct |
56 ms |
241492 KB |
Output is correct |
11 |
Correct |
56 ms |
241496 KB |
Output is correct |
12 |
Correct |
60 ms |
243548 KB |
Output is correct |
13 |
Correct |
62 ms |
243540 KB |
Output is correct |
14 |
Correct |
60 ms |
243536 KB |
Output is correct |
15 |
Correct |
56 ms |
241488 KB |
Output is correct |
16 |
Correct |
56 ms |
241488 KB |
Output is correct |
17 |
Correct |
57 ms |
241420 KB |
Output is correct |
18 |
Correct |
56 ms |
241236 KB |
Output is correct |
19 |
Correct |
55 ms |
241756 KB |
Output is correct |
20 |
Correct |
54 ms |
241232 KB |
Output is correct |
21 |
Correct |
55 ms |
241280 KB |
Output is correct |
22 |
Correct |
57 ms |
241500 KB |
Output is correct |
23 |
Correct |
55 ms |
241236 KB |
Output is correct |
24 |
Correct |
55 ms |
241240 KB |
Output is correct |
25 |
Correct |
57 ms |
241244 KB |
Output is correct |
26 |
Correct |
56 ms |
241236 KB |
Output is correct |
27 |
Correct |
55 ms |
241240 KB |
Output is correct |
28 |
Correct |
56 ms |
241540 KB |
Output is correct |
29 |
Correct |
55 ms |
241236 KB |
Output is correct |
30 |
Correct |
55 ms |
241672 KB |
Output is correct |
31 |
Correct |
56 ms |
241488 KB |
Output is correct |
32 |
Correct |
55 ms |
241616 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
56 ms |
241272 KB |
Output is correct |
2 |
Correct |
55 ms |
241156 KB |
Output is correct |
3 |
Correct |
56 ms |
241292 KB |
Output is correct |
4 |
Correct |
56 ms |
241232 KB |
Output is correct |
5 |
Correct |
57 ms |
241240 KB |
Output is correct |
6 |
Correct |
60 ms |
241236 KB |
Output is correct |
7 |
Correct |
56 ms |
241492 KB |
Output is correct |
8 |
Correct |
56 ms |
241496 KB |
Output is correct |
9 |
Correct |
99 ms |
243540 KB |
Output is correct |
10 |
Correct |
63 ms |
243540 KB |
Output is correct |
11 |
Correct |
63 ms |
243540 KB |
Output is correct |
12 |
Correct |
57 ms |
241488 KB |
Output is correct |
13 |
Correct |
56 ms |
241240 KB |
Output is correct |
14 |
Correct |
60 ms |
241708 KB |
Output is correct |
15 |
Correct |
59 ms |
241244 KB |
Output is correct |
16 |
Correct |
58 ms |
241448 KB |
Output is correct |
17 |
Correct |
86 ms |
241588 KB |
Output is correct |
18 |
Correct |
55 ms |
241236 KB |
Output is correct |
19 |
Correct |
55 ms |
241240 KB |
Output is correct |
20 |
Correct |
55 ms |
241316 KB |
Output is correct |
21 |
Correct |
56 ms |
241488 KB |
Output is correct |
22 |
Correct |
59 ms |
241404 KB |
Output is correct |
23 |
Correct |
58 ms |
241756 KB |
Output is correct |
24 |
Correct |
66 ms |
245332 KB |
Output is correct |
25 |
Correct |
119 ms |
262764 KB |
Output is correct |
26 |
Correct |
188 ms |
283216 KB |
Output is correct |
27 |
Correct |
122 ms |
266288 KB |
Output is correct |
28 |
Execution timed out |
2069 ms |
1217664 KB |
Time limit exceeded |
29 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
57 ms |
241276 KB |
Output is correct |
2 |
Correct |
55 ms |
241236 KB |
Output is correct |
3 |
Correct |
55 ms |
241236 KB |
Output is correct |
4 |
Correct |
56 ms |
241236 KB |
Output is correct |
5 |
Correct |
55 ms |
241372 KB |
Output is correct |
6 |
Correct |
55 ms |
241200 KB |
Output is correct |
7 |
Correct |
57 ms |
241236 KB |
Output is correct |
8 |
Correct |
57 ms |
241236 KB |
Output is correct |
9 |
Correct |
55 ms |
241496 KB |
Output is correct |
10 |
Correct |
56 ms |
241492 KB |
Output is correct |
11 |
Correct |
56 ms |
241496 KB |
Output is correct |
12 |
Correct |
60 ms |
243548 KB |
Output is correct |
13 |
Correct |
62 ms |
243540 KB |
Output is correct |
14 |
Correct |
60 ms |
243536 KB |
Output is correct |
15 |
Correct |
56 ms |
241488 KB |
Output is correct |
16 |
Correct |
56 ms |
241488 KB |
Output is correct |
17 |
Correct |
57 ms |
241420 KB |
Output is correct |
18 |
Correct |
56 ms |
241236 KB |
Output is correct |
19 |
Correct |
55 ms |
241756 KB |
Output is correct |
20 |
Correct |
54 ms |
241232 KB |
Output is correct |
21 |
Correct |
55 ms |
241280 KB |
Output is correct |
22 |
Correct |
57 ms |
241500 KB |
Output is correct |
23 |
Correct |
55 ms |
241236 KB |
Output is correct |
24 |
Correct |
55 ms |
241240 KB |
Output is correct |
25 |
Correct |
57 ms |
241244 KB |
Output is correct |
26 |
Correct |
56 ms |
241236 KB |
Output is correct |
27 |
Correct |
55 ms |
241240 KB |
Output is correct |
28 |
Correct |
56 ms |
241540 KB |
Output is correct |
29 |
Correct |
55 ms |
241236 KB |
Output is correct |
30 |
Correct |
55 ms |
241672 KB |
Output is correct |
31 |
Correct |
56 ms |
241488 KB |
Output is correct |
32 |
Correct |
55 ms |
241616 KB |
Output is correct |
33 |
Correct |
110 ms |
262888 KB |
Output is correct |
34 |
Correct |
70 ms |
245476 KB |
Output is correct |
35 |
Correct |
59 ms |
242720 KB |
Output is correct |
36 |
Correct |
117 ms |
262776 KB |
Output is correct |
37 |
Correct |
85 ms |
256668 KB |
Output is correct |
38 |
Correct |
214 ms |
283268 KB |
Output is correct |
39 |
Correct |
127 ms |
266360 KB |
Output is correct |
40 |
Correct |
116 ms |
263252 KB |
Output is correct |
41 |
Correct |
119 ms |
262960 KB |
Output is correct |
42 |
Execution timed out |
2088 ms |
1217892 KB |
Time limit exceeded |
43 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
57 ms |
241276 KB |
Output is correct |
2 |
Correct |
55 ms |
241236 KB |
Output is correct |
3 |
Correct |
55 ms |
241236 KB |
Output is correct |
4 |
Correct |
56 ms |
241236 KB |
Output is correct |
5 |
Correct |
55 ms |
241372 KB |
Output is correct |
6 |
Correct |
55 ms |
241200 KB |
Output is correct |
7 |
Correct |
57 ms |
241236 KB |
Output is correct |
8 |
Correct |
57 ms |
241236 KB |
Output is correct |
9 |
Correct |
55 ms |
241496 KB |
Output is correct |
10 |
Correct |
56 ms |
241492 KB |
Output is correct |
11 |
Correct |
56 ms |
241496 KB |
Output is correct |
12 |
Correct |
60 ms |
243548 KB |
Output is correct |
13 |
Correct |
62 ms |
243540 KB |
Output is correct |
14 |
Correct |
60 ms |
243536 KB |
Output is correct |
15 |
Correct |
56 ms |
241488 KB |
Output is correct |
16 |
Correct |
56 ms |
241488 KB |
Output is correct |
17 |
Correct |
57 ms |
241420 KB |
Output is correct |
18 |
Correct |
56 ms |
241236 KB |
Output is correct |
19 |
Correct |
55 ms |
241756 KB |
Output is correct |
20 |
Correct |
54 ms |
241232 KB |
Output is correct |
21 |
Correct |
55 ms |
241280 KB |
Output is correct |
22 |
Correct |
57 ms |
241500 KB |
Output is correct |
23 |
Correct |
55 ms |
241236 KB |
Output is correct |
24 |
Correct |
55 ms |
241240 KB |
Output is correct |
25 |
Correct |
57 ms |
241244 KB |
Output is correct |
26 |
Correct |
56 ms |
241236 KB |
Output is correct |
27 |
Correct |
55 ms |
241240 KB |
Output is correct |
28 |
Correct |
56 ms |
241540 KB |
Output is correct |
29 |
Correct |
55 ms |
241236 KB |
Output is correct |
30 |
Correct |
55 ms |
241672 KB |
Output is correct |
31 |
Correct |
56 ms |
241488 KB |
Output is correct |
32 |
Correct |
55 ms |
241616 KB |
Output is correct |
33 |
Correct |
110 ms |
262888 KB |
Output is correct |
34 |
Correct |
70 ms |
245476 KB |
Output is correct |
35 |
Correct |
59 ms |
242720 KB |
Output is correct |
36 |
Correct |
117 ms |
262776 KB |
Output is correct |
37 |
Correct |
85 ms |
256668 KB |
Output is correct |
38 |
Correct |
214 ms |
283268 KB |
Output is correct |
39 |
Correct |
127 ms |
266360 KB |
Output is correct |
40 |
Correct |
116 ms |
263252 KB |
Output is correct |
41 |
Correct |
119 ms |
262960 KB |
Output is correct |
42 |
Execution timed out |
2088 ms |
1217892 KB |
Time limit exceeded |
43 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
97 ms |
241092 KB |
Output is correct |
2 |
Correct |
55 ms |
241272 KB |
Output is correct |
3 |
Correct |
57 ms |
241488 KB |
Output is correct |
4 |
Correct |
57 ms |
241492 KB |
Output is correct |
5 |
Correct |
58 ms |
241492 KB |
Output is correct |
6 |
Correct |
56 ms |
241608 KB |
Output is correct |
7 |
Correct |
57 ms |
241488 KB |
Output is correct |
8 |
Correct |
56 ms |
241492 KB |
Output is correct |
9 |
Correct |
54 ms |
241236 KB |
Output is correct |
10 |
Correct |
55 ms |
241232 KB |
Output is correct |
11 |
Correct |
54 ms |
241208 KB |
Output is correct |
12 |
Correct |
56 ms |
241148 KB |
Output is correct |
13 |
Correct |
56 ms |
241232 KB |
Output is correct |
14 |
Correct |
56 ms |
241328 KB |
Output is correct |
15 |
Correct |
56 ms |
241244 KB |
Output is correct |
16 |
Correct |
57 ms |
241444 KB |
Output is correct |
17 |
Correct |
57 ms |
241376 KB |
Output is correct |
18 |
Correct |
58 ms |
241472 KB |
Output is correct |
19 |
Correct |
111 ms |
262992 KB |
Output is correct |
20 |
Correct |
84 ms |
256592 KB |
Output is correct |
21 |
Correct |
112 ms |
266336 KB |
Output is correct |
22 |
Correct |
114 ms |
263252 KB |
Output is correct |
23 |
Correct |
115 ms |
262736 KB |
Output is correct |
24 |
Correct |
100 ms |
262804 KB |
Output is correct |
25 |
Correct |
93 ms |
260944 KB |
Output is correct |
26 |
Correct |
114 ms |
263248 KB |
Output is correct |
27 |
Correct |
119 ms |
263272 KB |
Output is correct |
28 |
Correct |
110 ms |
262980 KB |
Output is correct |
29 |
Correct |
200 ms |
294304 KB |
Output is correct |
30 |
Correct |
108 ms |
262996 KB |
Output is correct |
31 |
Correct |
206 ms |
302648 KB |
Output is correct |
32 |
Correct |
208 ms |
295092 KB |
Output is correct |
33 |
Correct |
198 ms |
294044 KB |
Output is correct |
34 |
Correct |
168 ms |
294100 KB |
Output is correct |
35 |
Correct |
174 ms |
289212 KB |
Output is correct |
36 |
Correct |
208 ms |
295504 KB |
Output is correct |
37 |
Correct |
218 ms |
295508 KB |
Output is correct |
38 |
Correct |
200 ms |
294224 KB |
Output is correct |
39 |
Correct |
1529 ms |
762564 KB |
Output is correct |
40 |
Correct |
221 ms |
304236 KB |
Output is correct |
41 |
Correct |
186 ms |
305704 KB |
Output is correct |
42 |
Correct |
271 ms |
317560 KB |
Output is correct |
43 |
Correct |
262 ms |
326460 KB |
Output is correct |
44 |
Correct |
796 ms |
511308 KB |
Output is correct |
45 |
Correct |
766 ms |
517460 KB |
Output is correct |
46 |
Correct |
1516 ms |
841720 KB |
Output is correct |
47 |
Correct |
1580 ms |
779820 KB |
Output is correct |
48 |
Correct |
1601 ms |
759652 KB |
Output is correct |
49 |
Correct |
1041 ms |
761276 KB |
Output is correct |
50 |
Correct |
1125 ms |
703944 KB |
Output is correct |
51 |
Correct |
1732 ms |
785928 KB |
Output is correct |
52 |
Correct |
1773 ms |
779648 KB |
Output is correct |
53 |
Correct |
1522 ms |
760088 KB |
Output is correct |
54 |
Correct |
57 ms |
241276 KB |
Output is correct |
55 |
Correct |
55 ms |
241236 KB |
Output is correct |
56 |
Correct |
55 ms |
241236 KB |
Output is correct |
57 |
Correct |
56 ms |
241236 KB |
Output is correct |
58 |
Correct |
55 ms |
241372 KB |
Output is correct |
59 |
Correct |
55 ms |
241200 KB |
Output is correct |
60 |
Correct |
57 ms |
241236 KB |
Output is correct |
61 |
Correct |
57 ms |
241236 KB |
Output is correct |
62 |
Correct |
55 ms |
241496 KB |
Output is correct |
63 |
Correct |
56 ms |
241492 KB |
Output is correct |
64 |
Correct |
56 ms |
241496 KB |
Output is correct |
65 |
Correct |
60 ms |
243548 KB |
Output is correct |
66 |
Correct |
62 ms |
243540 KB |
Output is correct |
67 |
Correct |
60 ms |
243536 KB |
Output is correct |
68 |
Correct |
56 ms |
241488 KB |
Output is correct |
69 |
Correct |
56 ms |
241488 KB |
Output is correct |
70 |
Correct |
57 ms |
241420 KB |
Output is correct |
71 |
Correct |
56 ms |
241236 KB |
Output is correct |
72 |
Correct |
55 ms |
241756 KB |
Output is correct |
73 |
Correct |
54 ms |
241232 KB |
Output is correct |
74 |
Correct |
55 ms |
241280 KB |
Output is correct |
75 |
Correct |
57 ms |
241500 KB |
Output is correct |
76 |
Correct |
55 ms |
241236 KB |
Output is correct |
77 |
Correct |
55 ms |
241240 KB |
Output is correct |
78 |
Correct |
57 ms |
241244 KB |
Output is correct |
79 |
Correct |
56 ms |
241236 KB |
Output is correct |
80 |
Correct |
55 ms |
241240 KB |
Output is correct |
81 |
Correct |
56 ms |
241540 KB |
Output is correct |
82 |
Correct |
55 ms |
241236 KB |
Output is correct |
83 |
Correct |
55 ms |
241672 KB |
Output is correct |
84 |
Correct |
56 ms |
241488 KB |
Output is correct |
85 |
Correct |
55 ms |
241616 KB |
Output is correct |
86 |
Correct |
56 ms |
241272 KB |
Output is correct |
87 |
Correct |
55 ms |
241156 KB |
Output is correct |
88 |
Correct |
56 ms |
241292 KB |
Output is correct |
89 |
Correct |
56 ms |
241232 KB |
Output is correct |
90 |
Correct |
57 ms |
241240 KB |
Output is correct |
91 |
Correct |
60 ms |
241236 KB |
Output is correct |
92 |
Correct |
56 ms |
241492 KB |
Output is correct |
93 |
Correct |
56 ms |
241496 KB |
Output is correct |
94 |
Correct |
99 ms |
243540 KB |
Output is correct |
95 |
Correct |
63 ms |
243540 KB |
Output is correct |
96 |
Correct |
63 ms |
243540 KB |
Output is correct |
97 |
Correct |
57 ms |
241488 KB |
Output is correct |
98 |
Correct |
56 ms |
241240 KB |
Output is correct |
99 |
Correct |
60 ms |
241708 KB |
Output is correct |
100 |
Correct |
59 ms |
241244 KB |
Output is correct |
101 |
Correct |
58 ms |
241448 KB |
Output is correct |
102 |
Correct |
86 ms |
241588 KB |
Output is correct |
103 |
Correct |
55 ms |
241236 KB |
Output is correct |
104 |
Correct |
55 ms |
241240 KB |
Output is correct |
105 |
Correct |
55 ms |
241316 KB |
Output is correct |
106 |
Correct |
56 ms |
241488 KB |
Output is correct |
107 |
Correct |
59 ms |
241404 KB |
Output is correct |
108 |
Correct |
58 ms |
241756 KB |
Output is correct |
109 |
Correct |
66 ms |
245332 KB |
Output is correct |
110 |
Correct |
119 ms |
262764 KB |
Output is correct |
111 |
Correct |
188 ms |
283216 KB |
Output is correct |
112 |
Correct |
122 ms |
266288 KB |
Output is correct |
113 |
Execution timed out |
2069 ms |
1217664 KB |
Time limit exceeded |
114 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
97 ms |
241092 KB |
Output is correct |
2 |
Correct |
55 ms |
241272 KB |
Output is correct |
3 |
Correct |
57 ms |
241488 KB |
Output is correct |
4 |
Correct |
57 ms |
241492 KB |
Output is correct |
5 |
Correct |
58 ms |
241492 KB |
Output is correct |
6 |
Correct |
56 ms |
241608 KB |
Output is correct |
7 |
Correct |
57 ms |
241488 KB |
Output is correct |
8 |
Correct |
56 ms |
241492 KB |
Output is correct |
9 |
Correct |
54 ms |
241236 KB |
Output is correct |
10 |
Correct |
55 ms |
241232 KB |
Output is correct |
11 |
Correct |
54 ms |
241208 KB |
Output is correct |
12 |
Correct |
56 ms |
241148 KB |
Output is correct |
13 |
Correct |
56 ms |
241232 KB |
Output is correct |
14 |
Correct |
56 ms |
241328 KB |
Output is correct |
15 |
Correct |
56 ms |
241244 KB |
Output is correct |
16 |
Correct |
57 ms |
241444 KB |
Output is correct |
17 |
Correct |
57 ms |
241376 KB |
Output is correct |
18 |
Correct |
58 ms |
241472 KB |
Output is correct |
19 |
Correct |
111 ms |
262992 KB |
Output is correct |
20 |
Correct |
84 ms |
256592 KB |
Output is correct |
21 |
Correct |
112 ms |
266336 KB |
Output is correct |
22 |
Correct |
114 ms |
263252 KB |
Output is correct |
23 |
Correct |
115 ms |
262736 KB |
Output is correct |
24 |
Correct |
100 ms |
262804 KB |
Output is correct |
25 |
Correct |
93 ms |
260944 KB |
Output is correct |
26 |
Correct |
114 ms |
263248 KB |
Output is correct |
27 |
Correct |
119 ms |
263272 KB |
Output is correct |
28 |
Correct |
110 ms |
262980 KB |
Output is correct |
29 |
Correct |
200 ms |
294304 KB |
Output is correct |
30 |
Correct |
108 ms |
262996 KB |
Output is correct |
31 |
Correct |
206 ms |
302648 KB |
Output is correct |
32 |
Correct |
208 ms |
295092 KB |
Output is correct |
33 |
Correct |
198 ms |
294044 KB |
Output is correct |
34 |
Correct |
168 ms |
294100 KB |
Output is correct |
35 |
Correct |
174 ms |
289212 KB |
Output is correct |
36 |
Correct |
208 ms |
295504 KB |
Output is correct |
37 |
Correct |
218 ms |
295508 KB |
Output is correct |
38 |
Correct |
200 ms |
294224 KB |
Output is correct |
39 |
Correct |
1529 ms |
762564 KB |
Output is correct |
40 |
Correct |
221 ms |
304236 KB |
Output is correct |
41 |
Correct |
186 ms |
305704 KB |
Output is correct |
42 |
Correct |
271 ms |
317560 KB |
Output is correct |
43 |
Correct |
262 ms |
326460 KB |
Output is correct |
44 |
Correct |
796 ms |
511308 KB |
Output is correct |
45 |
Correct |
766 ms |
517460 KB |
Output is correct |
46 |
Correct |
1516 ms |
841720 KB |
Output is correct |
47 |
Correct |
1580 ms |
779820 KB |
Output is correct |
48 |
Correct |
1601 ms |
759652 KB |
Output is correct |
49 |
Correct |
1041 ms |
761276 KB |
Output is correct |
50 |
Correct |
1125 ms |
703944 KB |
Output is correct |
51 |
Correct |
1732 ms |
785928 KB |
Output is correct |
52 |
Correct |
1773 ms |
779648 KB |
Output is correct |
53 |
Correct |
1522 ms |
760088 KB |
Output is correct |
54 |
Correct |
57 ms |
241276 KB |
Output is correct |
55 |
Correct |
55 ms |
241236 KB |
Output is correct |
56 |
Correct |
55 ms |
241236 KB |
Output is correct |
57 |
Correct |
56 ms |
241236 KB |
Output is correct |
58 |
Correct |
55 ms |
241372 KB |
Output is correct |
59 |
Correct |
55 ms |
241200 KB |
Output is correct |
60 |
Correct |
57 ms |
241236 KB |
Output is correct |
61 |
Correct |
57 ms |
241236 KB |
Output is correct |
62 |
Correct |
55 ms |
241496 KB |
Output is correct |
63 |
Correct |
56 ms |
241492 KB |
Output is correct |
64 |
Correct |
56 ms |
241496 KB |
Output is correct |
65 |
Correct |
60 ms |
243548 KB |
Output is correct |
66 |
Correct |
62 ms |
243540 KB |
Output is correct |
67 |
Correct |
60 ms |
243536 KB |
Output is correct |
68 |
Correct |
56 ms |
241488 KB |
Output is correct |
69 |
Correct |
56 ms |
241488 KB |
Output is correct |
70 |
Correct |
57 ms |
241420 KB |
Output is correct |
71 |
Correct |
56 ms |
241236 KB |
Output is correct |
72 |
Correct |
55 ms |
241756 KB |
Output is correct |
73 |
Correct |
54 ms |
241232 KB |
Output is correct |
74 |
Correct |
55 ms |
241280 KB |
Output is correct |
75 |
Correct |
57 ms |
241500 KB |
Output is correct |
76 |
Correct |
55 ms |
241236 KB |
Output is correct |
77 |
Correct |
55 ms |
241240 KB |
Output is correct |
78 |
Correct |
57 ms |
241244 KB |
Output is correct |
79 |
Correct |
56 ms |
241236 KB |
Output is correct |
80 |
Correct |
55 ms |
241240 KB |
Output is correct |
81 |
Correct |
56 ms |
241540 KB |
Output is correct |
82 |
Correct |
55 ms |
241236 KB |
Output is correct |
83 |
Correct |
55 ms |
241672 KB |
Output is correct |
84 |
Correct |
56 ms |
241488 KB |
Output is correct |
85 |
Correct |
55 ms |
241616 KB |
Output is correct |
86 |
Correct |
56 ms |
241272 KB |
Output is correct |
87 |
Correct |
55 ms |
241156 KB |
Output is correct |
88 |
Correct |
56 ms |
241292 KB |
Output is correct |
89 |
Correct |
56 ms |
241232 KB |
Output is correct |
90 |
Correct |
57 ms |
241240 KB |
Output is correct |
91 |
Correct |
60 ms |
241236 KB |
Output is correct |
92 |
Correct |
56 ms |
241492 KB |
Output is correct |
93 |
Correct |
56 ms |
241496 KB |
Output is correct |
94 |
Correct |
99 ms |
243540 KB |
Output is correct |
95 |
Correct |
63 ms |
243540 KB |
Output is correct |
96 |
Correct |
63 ms |
243540 KB |
Output is correct |
97 |
Correct |
57 ms |
241488 KB |
Output is correct |
98 |
Correct |
56 ms |
241240 KB |
Output is correct |
99 |
Correct |
60 ms |
241708 KB |
Output is correct |
100 |
Correct |
59 ms |
241244 KB |
Output is correct |
101 |
Correct |
58 ms |
241448 KB |
Output is correct |
102 |
Correct |
86 ms |
241588 KB |
Output is correct |
103 |
Correct |
55 ms |
241236 KB |
Output is correct |
104 |
Correct |
55 ms |
241240 KB |
Output is correct |
105 |
Correct |
55 ms |
241316 KB |
Output is correct |
106 |
Correct |
56 ms |
241488 KB |
Output is correct |
107 |
Correct |
59 ms |
241404 KB |
Output is correct |
108 |
Correct |
58 ms |
241756 KB |
Output is correct |
109 |
Correct |
66 ms |
245332 KB |
Output is correct |
110 |
Correct |
119 ms |
262764 KB |
Output is correct |
111 |
Correct |
188 ms |
283216 KB |
Output is correct |
112 |
Correct |
122 ms |
266288 KB |
Output is correct |
113 |
Execution timed out |
2069 ms |
1217664 KB |
Time limit exceeded |
114 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
97 ms |
241092 KB |
Output is correct |
2 |
Correct |
55 ms |
241272 KB |
Output is correct |
3 |
Correct |
57 ms |
241488 KB |
Output is correct |
4 |
Correct |
57 ms |
241492 KB |
Output is correct |
5 |
Correct |
58 ms |
241492 KB |
Output is correct |
6 |
Correct |
56 ms |
241608 KB |
Output is correct |
7 |
Correct |
57 ms |
241488 KB |
Output is correct |
8 |
Correct |
56 ms |
241492 KB |
Output is correct |
9 |
Correct |
54 ms |
241236 KB |
Output is correct |
10 |
Correct |
55 ms |
241232 KB |
Output is correct |
11 |
Correct |
54 ms |
241208 KB |
Output is correct |
12 |
Correct |
56 ms |
241148 KB |
Output is correct |
13 |
Correct |
56 ms |
241232 KB |
Output is correct |
14 |
Correct |
56 ms |
241328 KB |
Output is correct |
15 |
Correct |
56 ms |
241244 KB |
Output is correct |
16 |
Correct |
57 ms |
241444 KB |
Output is correct |
17 |
Correct |
57 ms |
241376 KB |
Output is correct |
18 |
Correct |
58 ms |
241472 KB |
Output is correct |
19 |
Correct |
111 ms |
262992 KB |
Output is correct |
20 |
Correct |
84 ms |
256592 KB |
Output is correct |
21 |
Correct |
112 ms |
266336 KB |
Output is correct |
22 |
Correct |
114 ms |
263252 KB |
Output is correct |
23 |
Correct |
115 ms |
262736 KB |
Output is correct |
24 |
Correct |
100 ms |
262804 KB |
Output is correct |
25 |
Correct |
93 ms |
260944 KB |
Output is correct |
26 |
Correct |
114 ms |
263248 KB |
Output is correct |
27 |
Correct |
119 ms |
263272 KB |
Output is correct |
28 |
Correct |
110 ms |
262980 KB |
Output is correct |
29 |
Correct |
200 ms |
294304 KB |
Output is correct |
30 |
Correct |
108 ms |
262996 KB |
Output is correct |
31 |
Correct |
206 ms |
302648 KB |
Output is correct |
32 |
Correct |
208 ms |
295092 KB |
Output is correct |
33 |
Correct |
198 ms |
294044 KB |
Output is correct |
34 |
Correct |
168 ms |
294100 KB |
Output is correct |
35 |
Correct |
174 ms |
289212 KB |
Output is correct |
36 |
Correct |
208 ms |
295504 KB |
Output is correct |
37 |
Correct |
218 ms |
295508 KB |
Output is correct |
38 |
Correct |
200 ms |
294224 KB |
Output is correct |
39 |
Correct |
1529 ms |
762564 KB |
Output is correct |
40 |
Correct |
221 ms |
304236 KB |
Output is correct |
41 |
Correct |
186 ms |
305704 KB |
Output is correct |
42 |
Correct |
271 ms |
317560 KB |
Output is correct |
43 |
Correct |
262 ms |
326460 KB |
Output is correct |
44 |
Correct |
796 ms |
511308 KB |
Output is correct |
45 |
Correct |
766 ms |
517460 KB |
Output is correct |
46 |
Correct |
1516 ms |
841720 KB |
Output is correct |
47 |
Correct |
1580 ms |
779820 KB |
Output is correct |
48 |
Correct |
1601 ms |
759652 KB |
Output is correct |
49 |
Correct |
1041 ms |
761276 KB |
Output is correct |
50 |
Correct |
1125 ms |
703944 KB |
Output is correct |
51 |
Correct |
1732 ms |
785928 KB |
Output is correct |
52 |
Correct |
1773 ms |
779648 KB |
Output is correct |
53 |
Correct |
1522 ms |
760088 KB |
Output is correct |
54 |
Correct |
57 ms |
241276 KB |
Output is correct |
55 |
Correct |
55 ms |
241236 KB |
Output is correct |
56 |
Correct |
55 ms |
241236 KB |
Output is correct |
57 |
Correct |
56 ms |
241236 KB |
Output is correct |
58 |
Correct |
55 ms |
241372 KB |
Output is correct |
59 |
Correct |
55 ms |
241200 KB |
Output is correct |
60 |
Correct |
57 ms |
241236 KB |
Output is correct |
61 |
Correct |
57 ms |
241236 KB |
Output is correct |
62 |
Correct |
55 ms |
241496 KB |
Output is correct |
63 |
Correct |
56 ms |
241492 KB |
Output is correct |
64 |
Correct |
56 ms |
241496 KB |
Output is correct |
65 |
Correct |
60 ms |
243548 KB |
Output is correct |
66 |
Correct |
62 ms |
243540 KB |
Output is correct |
67 |
Correct |
60 ms |
243536 KB |
Output is correct |
68 |
Correct |
56 ms |
241488 KB |
Output is correct |
69 |
Correct |
56 ms |
241488 KB |
Output is correct |
70 |
Correct |
57 ms |
241420 KB |
Output is correct |
71 |
Correct |
56 ms |
241236 KB |
Output is correct |
72 |
Correct |
55 ms |
241756 KB |
Output is correct |
73 |
Correct |
54 ms |
241232 KB |
Output is correct |
74 |
Correct |
55 ms |
241280 KB |
Output is correct |
75 |
Correct |
57 ms |
241500 KB |
Output is correct |
76 |
Correct |
55 ms |
241236 KB |
Output is correct |
77 |
Correct |
55 ms |
241240 KB |
Output is correct |
78 |
Correct |
57 ms |
241244 KB |
Output is correct |
79 |
Correct |
56 ms |
241236 KB |
Output is correct |
80 |
Correct |
55 ms |
241240 KB |
Output is correct |
81 |
Correct |
56 ms |
241540 KB |
Output is correct |
82 |
Correct |
55 ms |
241236 KB |
Output is correct |
83 |
Correct |
55 ms |
241672 KB |
Output is correct |
84 |
Correct |
56 ms |
241488 KB |
Output is correct |
85 |
Correct |
55 ms |
241616 KB |
Output is correct |
86 |
Correct |
56 ms |
241272 KB |
Output is correct |
87 |
Correct |
55 ms |
241156 KB |
Output is correct |
88 |
Correct |
56 ms |
241292 KB |
Output is correct |
89 |
Correct |
56 ms |
241232 KB |
Output is correct |
90 |
Correct |
57 ms |
241240 KB |
Output is correct |
91 |
Correct |
60 ms |
241236 KB |
Output is correct |
92 |
Correct |
56 ms |
241492 KB |
Output is correct |
93 |
Correct |
56 ms |
241496 KB |
Output is correct |
94 |
Correct |
99 ms |
243540 KB |
Output is correct |
95 |
Correct |
63 ms |
243540 KB |
Output is correct |
96 |
Correct |
63 ms |
243540 KB |
Output is correct |
97 |
Correct |
57 ms |
241488 KB |
Output is correct |
98 |
Correct |
56 ms |
241240 KB |
Output is correct |
99 |
Correct |
60 ms |
241708 KB |
Output is correct |
100 |
Correct |
59 ms |
241244 KB |
Output is correct |
101 |
Correct |
58 ms |
241448 KB |
Output is correct |
102 |
Correct |
86 ms |
241588 KB |
Output is correct |
103 |
Correct |
55 ms |
241236 KB |
Output is correct |
104 |
Correct |
55 ms |
241240 KB |
Output is correct |
105 |
Correct |
55 ms |
241316 KB |
Output is correct |
106 |
Correct |
56 ms |
241488 KB |
Output is correct |
107 |
Correct |
59 ms |
241404 KB |
Output is correct |
108 |
Correct |
58 ms |
241756 KB |
Output is correct |
109 |
Correct |
66 ms |
245332 KB |
Output is correct |
110 |
Correct |
119 ms |
262764 KB |
Output is correct |
111 |
Correct |
188 ms |
283216 KB |
Output is correct |
112 |
Correct |
122 ms |
266288 KB |
Output is correct |
113 |
Execution timed out |
2069 ms |
1217664 KB |
Time limit exceeded |
114 |
Halted |
0 ms |
0 KB |
- |