# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
924156 |
2024-02-08T15:04:48 Z |
Edu175 |
Maze (JOI23_ho_t3) |
C++17 |
|
2000 ms |
94012 KB |
#include <bits/stdc++.h>
#define pb push_back
#define fst first
#define snd second
#define fore(i,a,b) for(ll i=a,ggdem=b;i<ggdem;++i)
#define SZ(x) ((int)x.size())
#define ALL(x) x.begin(),x.end()
#define mset(a,v) memset((a),(v),sizeof(a))
#define FIN ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define imp(v) for(auto edu:v)cout<<edu<<" "; cout<<"\n"
using namespace std;
typedef long long ll;
typedef pair<ll,ll> ii;
const ll MAXN=6e6+5;
ll a[MAXN];
ll n,m,k;
ll cv(ii x){return m*x.fst+x.snd;}
ii cv(ll x){return {x/m,x%m};}
vector<ii>dir={{0,1},{-1,0},{0,-1},{1,0}};
ii operator+(ii a, ii b){return {a.fst+b.fst,a.snd+b.snd};}
void operator+=(ii &a, ii b){a=a+b;}
bool allowed(ii p){
auto [i,j]=p;
if(i<0||i>=n||j<0||j>=m)return 0;
return 1;
}
ll d[MAXN],vis[MAXN];
deque<ii>q;
void go(ii x, ii y, ll g=0){
if(!allowed(y)||(!g&&a[cv(y)]))return;
ll nd=d[cv(x)]+g;
if(d[cv(y)]!=-1&&d[cv(y)]<=nd)return;
d[cv(y)]=nd;
if(!g)q.push_front(y);
else q.pb(y);
}
ll reach(ii x, ii e){
return (max(abs(x.fst-e.fst),abs(x.snd-e.snd))<=k&&
abs(x.fst-e.fst)+abs(x.snd-e.snd)<2*k);
}
ll bfs(ii s, ii e){
mset(d,-1);
d[cv(s)]=0;
q.push_front(s);
while(SZ(q)){
auto x=q.front(); q.pop_front();
if(vis[cv(x)])continue;
vis[cv(x)]=1;
for(auto add:dir){
auto y=x+add;
go(x,y);
}
// continue; // sb1
auto [i,j]=x;
if(reach(x,e))go(x,e,1);
for(ii y={i-k,j-k+1};y.snd<j+k;y+=dir[0])go(x,y,1);
for(ii y={i+k,j-k+1};y.snd<j+k;y+=dir[0])go(x,y,1);
for(ii y={i-k+1,j-k};y.fst<i+k;y+=dir[3])go(x,y,1);
for(ii y={i-k+1,j+k};y.fst<i+k;y+=dir[3])go(x,y,1);
}
return d[cv(e)];
}
int main(){FIN;
cin>>n>>m>>k;
ii s,e; cin>>s.fst>>s.snd>>e.fst>>e.snd; s.fst--,s.snd--,e.fst--,e.snd--;
fore(i,0,n*m){
char c; cin>>c;
a[i]=(c=='#');
}
cout<<bfs(s,e)<<"\n";
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
49500 KB |
Output is correct |
2 |
Correct |
8 ms |
49500 KB |
Output is correct |
3 |
Correct |
7 ms |
49500 KB |
Output is correct |
4 |
Correct |
7 ms |
49496 KB |
Output is correct |
5 |
Correct |
7 ms |
49500 KB |
Output is correct |
6 |
Correct |
7 ms |
49500 KB |
Output is correct |
7 |
Correct |
7 ms |
49496 KB |
Output is correct |
8 |
Correct |
7 ms |
49496 KB |
Output is correct |
9 |
Correct |
6 ms |
49500 KB |
Output is correct |
10 |
Correct |
6 ms |
49500 KB |
Output is correct |
11 |
Correct |
6 ms |
49500 KB |
Output is correct |
12 |
Correct |
7 ms |
49500 KB |
Output is correct |
13 |
Correct |
7 ms |
49500 KB |
Output is correct |
14 |
Correct |
6 ms |
49500 KB |
Output is correct |
15 |
Correct |
7 ms |
49692 KB |
Output is correct |
16 |
Correct |
7 ms |
49500 KB |
Output is correct |
17 |
Correct |
7 ms |
49500 KB |
Output is correct |
18 |
Correct |
7 ms |
49496 KB |
Output is correct |
19 |
Correct |
10 ms |
50008 KB |
Output is correct |
20 |
Correct |
9 ms |
49900 KB |
Output is correct |
21 |
Correct |
10 ms |
50524 KB |
Output is correct |
22 |
Correct |
11 ms |
50008 KB |
Output is correct |
23 |
Correct |
10 ms |
50012 KB |
Output is correct |
24 |
Correct |
9 ms |
50136 KB |
Output is correct |
25 |
Correct |
9 ms |
50012 KB |
Output is correct |
26 |
Correct |
11 ms |
50264 KB |
Output is correct |
27 |
Correct |
11 ms |
50012 KB |
Output is correct |
28 |
Correct |
11 ms |
50008 KB |
Output is correct |
29 |
Correct |
15 ms |
52828 KB |
Output is correct |
30 |
Correct |
11 ms |
50008 KB |
Output is correct |
31 |
Correct |
15 ms |
53996 KB |
Output is correct |
32 |
Correct |
18 ms |
52948 KB |
Output is correct |
33 |
Correct |
14 ms |
52828 KB |
Output is correct |
34 |
Correct |
13 ms |
52932 KB |
Output is correct |
35 |
Correct |
13 ms |
53104 KB |
Output is correct |
36 |
Correct |
19 ms |
52828 KB |
Output is correct |
37 |
Correct |
19 ms |
52828 KB |
Output is correct |
38 |
Correct |
15 ms |
52824 KB |
Output is correct |
39 |
Correct |
102 ms |
73712 KB |
Output is correct |
40 |
Correct |
19 ms |
53084 KB |
Output is correct |
41 |
Correct |
15 ms |
53080 KB |
Output is correct |
42 |
Correct |
20 ms |
53340 KB |
Output is correct |
43 |
Correct |
20 ms |
53592 KB |
Output is correct |
44 |
Correct |
57 ms |
61520 KB |
Output is correct |
45 |
Correct |
54 ms |
62036 KB |
Output is correct |
46 |
Correct |
139 ms |
86196 KB |
Output is correct |
47 |
Correct |
128 ms |
73812 KB |
Output is correct |
48 |
Correct |
105 ms |
73624 KB |
Output is correct |
49 |
Correct |
69 ms |
73540 KB |
Output is correct |
50 |
Correct |
72 ms |
73724 KB |
Output is correct |
51 |
Correct |
129 ms |
74104 KB |
Output is correct |
52 |
Correct |
122 ms |
73724 KB |
Output is correct |
53 |
Correct |
103 ms |
73732 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
6 ms |
49628 KB |
Output is correct |
2 |
Correct |
7 ms |
49500 KB |
Output is correct |
3 |
Correct |
6 ms |
49500 KB |
Output is correct |
4 |
Correct |
6 ms |
49496 KB |
Output is correct |
5 |
Correct |
6 ms |
49500 KB |
Output is correct |
6 |
Correct |
7 ms |
49624 KB |
Output is correct |
7 |
Correct |
7 ms |
49916 KB |
Output is correct |
8 |
Correct |
6 ms |
49500 KB |
Output is correct |
9 |
Correct |
7 ms |
49496 KB |
Output is correct |
10 |
Correct |
6 ms |
49496 KB |
Output is correct |
11 |
Correct |
6 ms |
49500 KB |
Output is correct |
12 |
Correct |
8 ms |
49500 KB |
Output is correct |
13 |
Correct |
7 ms |
49500 KB |
Output is correct |
14 |
Correct |
7 ms |
49500 KB |
Output is correct |
15 |
Correct |
7 ms |
49500 KB |
Output is correct |
16 |
Correct |
7 ms |
49680 KB |
Output is correct |
17 |
Correct |
7 ms |
49500 KB |
Output is correct |
18 |
Correct |
6 ms |
49500 KB |
Output is correct |
19 |
Correct |
7 ms |
49500 KB |
Output is correct |
20 |
Correct |
6 ms |
49500 KB |
Output is correct |
21 |
Correct |
7 ms |
49500 KB |
Output is correct |
22 |
Correct |
7 ms |
49500 KB |
Output is correct |
23 |
Correct |
6 ms |
49500 KB |
Output is correct |
24 |
Correct |
6 ms |
49500 KB |
Output is correct |
25 |
Correct |
7 ms |
49692 KB |
Output is correct |
26 |
Correct |
7 ms |
49500 KB |
Output is correct |
27 |
Correct |
6 ms |
49500 KB |
Output is correct |
28 |
Correct |
6 ms |
49700 KB |
Output is correct |
29 |
Correct |
6 ms |
49680 KB |
Output is correct |
30 |
Correct |
7 ms |
49500 KB |
Output is correct |
31 |
Correct |
7 ms |
49496 KB |
Output is correct |
32 |
Correct |
8 ms |
49500 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
7 ms |
49500 KB |
Output is correct |
2 |
Correct |
7 ms |
49624 KB |
Output is correct |
3 |
Correct |
7 ms |
49500 KB |
Output is correct |
4 |
Correct |
6 ms |
49500 KB |
Output is correct |
5 |
Correct |
7 ms |
49500 KB |
Output is correct |
6 |
Correct |
7 ms |
49500 KB |
Output is correct |
7 |
Correct |
8 ms |
49496 KB |
Output is correct |
8 |
Correct |
7 ms |
49500 KB |
Output is correct |
9 |
Correct |
7 ms |
49500 KB |
Output is correct |
10 |
Correct |
7 ms |
49500 KB |
Output is correct |
11 |
Correct |
7 ms |
49496 KB |
Output is correct |
12 |
Correct |
7 ms |
49704 KB |
Output is correct |
13 |
Correct |
6 ms |
49644 KB |
Output is correct |
14 |
Correct |
7 ms |
49496 KB |
Output is correct |
15 |
Correct |
6 ms |
49496 KB |
Output is correct |
16 |
Correct |
7 ms |
49500 KB |
Output is correct |
17 |
Correct |
7 ms |
49496 KB |
Output is correct |
18 |
Correct |
7 ms |
49500 KB |
Output is correct |
19 |
Correct |
7 ms |
49500 KB |
Output is correct |
20 |
Correct |
6 ms |
49500 KB |
Output is correct |
21 |
Correct |
7 ms |
49496 KB |
Output is correct |
22 |
Correct |
7 ms |
49500 KB |
Output is correct |
23 |
Correct |
6 ms |
49500 KB |
Output is correct |
24 |
Correct |
8 ms |
49752 KB |
Output is correct |
25 |
Correct |
12 ms |
50036 KB |
Output is correct |
26 |
Correct |
19 ms |
51032 KB |
Output is correct |
27 |
Correct |
10 ms |
50524 KB |
Output is correct |
28 |
Correct |
310 ms |
50668 KB |
Output is correct |
29 |
Correct |
7 ms |
49500 KB |
Output is correct |
30 |
Correct |
7 ms |
49496 KB |
Output is correct |
31 |
Correct |
105 ms |
50176 KB |
Output is correct |
32 |
Correct |
12 ms |
50268 KB |
Output is correct |
33 |
Correct |
12 ms |
50012 KB |
Output is correct |
34 |
Correct |
207 ms |
55020 KB |
Output is correct |
35 |
Correct |
16 ms |
54104 KB |
Output is correct |
36 |
Correct |
1210 ms |
54512 KB |
Output is correct |
37 |
Correct |
9 ms |
51548 KB |
Output is correct |
38 |
Correct |
10 ms |
51544 KB |
Output is correct |
39 |
Correct |
382 ms |
65216 KB |
Output is correct |
40 |
Execution timed out |
2047 ms |
94012 KB |
Time limit exceeded |
41 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
6 ms |
49628 KB |
Output is correct |
2 |
Correct |
7 ms |
49500 KB |
Output is correct |
3 |
Correct |
6 ms |
49500 KB |
Output is correct |
4 |
Correct |
6 ms |
49496 KB |
Output is correct |
5 |
Correct |
6 ms |
49500 KB |
Output is correct |
6 |
Correct |
7 ms |
49624 KB |
Output is correct |
7 |
Correct |
7 ms |
49916 KB |
Output is correct |
8 |
Correct |
6 ms |
49500 KB |
Output is correct |
9 |
Correct |
7 ms |
49496 KB |
Output is correct |
10 |
Correct |
6 ms |
49496 KB |
Output is correct |
11 |
Correct |
6 ms |
49500 KB |
Output is correct |
12 |
Correct |
8 ms |
49500 KB |
Output is correct |
13 |
Correct |
7 ms |
49500 KB |
Output is correct |
14 |
Correct |
7 ms |
49500 KB |
Output is correct |
15 |
Correct |
7 ms |
49500 KB |
Output is correct |
16 |
Correct |
7 ms |
49680 KB |
Output is correct |
17 |
Correct |
7 ms |
49500 KB |
Output is correct |
18 |
Correct |
6 ms |
49500 KB |
Output is correct |
19 |
Correct |
7 ms |
49500 KB |
Output is correct |
20 |
Correct |
6 ms |
49500 KB |
Output is correct |
21 |
Correct |
7 ms |
49500 KB |
Output is correct |
22 |
Correct |
7 ms |
49500 KB |
Output is correct |
23 |
Correct |
6 ms |
49500 KB |
Output is correct |
24 |
Correct |
6 ms |
49500 KB |
Output is correct |
25 |
Correct |
7 ms |
49692 KB |
Output is correct |
26 |
Correct |
7 ms |
49500 KB |
Output is correct |
27 |
Correct |
6 ms |
49500 KB |
Output is correct |
28 |
Correct |
6 ms |
49700 KB |
Output is correct |
29 |
Correct |
6 ms |
49680 KB |
Output is correct |
30 |
Correct |
7 ms |
49500 KB |
Output is correct |
31 |
Correct |
7 ms |
49496 KB |
Output is correct |
32 |
Correct |
8 ms |
49500 KB |
Output is correct |
33 |
Correct |
10 ms |
50012 KB |
Output is correct |
34 |
Correct |
8 ms |
49756 KB |
Output is correct |
35 |
Correct |
7 ms |
49500 KB |
Output is correct |
36 |
Correct |
12 ms |
50008 KB |
Output is correct |
37 |
Correct |
8 ms |
50012 KB |
Output is correct |
38 |
Correct |
19 ms |
51036 KB |
Output is correct |
39 |
Correct |
10 ms |
50776 KB |
Output is correct |
40 |
Correct |
11 ms |
50008 KB |
Output is correct |
41 |
Correct |
10 ms |
50008 KB |
Output is correct |
42 |
Correct |
320 ms |
50732 KB |
Output is correct |
43 |
Correct |
7 ms |
49500 KB |
Output is correct |
44 |
Correct |
7 ms |
49500 KB |
Output is correct |
45 |
Correct |
9 ms |
50012 KB |
Output is correct |
46 |
Correct |
9 ms |
50008 KB |
Output is correct |
47 |
Correct |
12 ms |
50264 KB |
Output is correct |
48 |
Correct |
35 ms |
50112 KB |
Output is correct |
49 |
Correct |
50 ms |
49988 KB |
Output is correct |
50 |
Correct |
69 ms |
50016 KB |
Output is correct |
51 |
Correct |
101 ms |
50260 KB |
Output is correct |
52 |
Correct |
11 ms |
50268 KB |
Output is correct |
53 |
Correct |
12 ms |
50012 KB |
Output is correct |
54 |
Correct |
10 ms |
50008 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
6 ms |
49628 KB |
Output is correct |
2 |
Correct |
7 ms |
49500 KB |
Output is correct |
3 |
Correct |
6 ms |
49500 KB |
Output is correct |
4 |
Correct |
6 ms |
49496 KB |
Output is correct |
5 |
Correct |
6 ms |
49500 KB |
Output is correct |
6 |
Correct |
7 ms |
49624 KB |
Output is correct |
7 |
Correct |
7 ms |
49916 KB |
Output is correct |
8 |
Correct |
6 ms |
49500 KB |
Output is correct |
9 |
Correct |
7 ms |
49496 KB |
Output is correct |
10 |
Correct |
6 ms |
49496 KB |
Output is correct |
11 |
Correct |
6 ms |
49500 KB |
Output is correct |
12 |
Correct |
8 ms |
49500 KB |
Output is correct |
13 |
Correct |
7 ms |
49500 KB |
Output is correct |
14 |
Correct |
7 ms |
49500 KB |
Output is correct |
15 |
Correct |
7 ms |
49500 KB |
Output is correct |
16 |
Correct |
7 ms |
49680 KB |
Output is correct |
17 |
Correct |
7 ms |
49500 KB |
Output is correct |
18 |
Correct |
6 ms |
49500 KB |
Output is correct |
19 |
Correct |
7 ms |
49500 KB |
Output is correct |
20 |
Correct |
6 ms |
49500 KB |
Output is correct |
21 |
Correct |
7 ms |
49500 KB |
Output is correct |
22 |
Correct |
7 ms |
49500 KB |
Output is correct |
23 |
Correct |
6 ms |
49500 KB |
Output is correct |
24 |
Correct |
6 ms |
49500 KB |
Output is correct |
25 |
Correct |
7 ms |
49692 KB |
Output is correct |
26 |
Correct |
7 ms |
49500 KB |
Output is correct |
27 |
Correct |
6 ms |
49500 KB |
Output is correct |
28 |
Correct |
6 ms |
49700 KB |
Output is correct |
29 |
Correct |
6 ms |
49680 KB |
Output is correct |
30 |
Correct |
7 ms |
49500 KB |
Output is correct |
31 |
Correct |
7 ms |
49496 KB |
Output is correct |
32 |
Correct |
8 ms |
49500 KB |
Output is correct |
33 |
Correct |
10 ms |
50012 KB |
Output is correct |
34 |
Correct |
8 ms |
49756 KB |
Output is correct |
35 |
Correct |
7 ms |
49500 KB |
Output is correct |
36 |
Correct |
12 ms |
50008 KB |
Output is correct |
37 |
Correct |
8 ms |
50012 KB |
Output is correct |
38 |
Correct |
19 ms |
51036 KB |
Output is correct |
39 |
Correct |
10 ms |
50776 KB |
Output is correct |
40 |
Correct |
11 ms |
50008 KB |
Output is correct |
41 |
Correct |
10 ms |
50008 KB |
Output is correct |
42 |
Correct |
320 ms |
50732 KB |
Output is correct |
43 |
Correct |
7 ms |
49500 KB |
Output is correct |
44 |
Correct |
7 ms |
49500 KB |
Output is correct |
45 |
Correct |
9 ms |
50012 KB |
Output is correct |
46 |
Correct |
9 ms |
50008 KB |
Output is correct |
47 |
Correct |
12 ms |
50264 KB |
Output is correct |
48 |
Correct |
35 ms |
50112 KB |
Output is correct |
49 |
Correct |
50 ms |
49988 KB |
Output is correct |
50 |
Correct |
69 ms |
50016 KB |
Output is correct |
51 |
Correct |
101 ms |
50260 KB |
Output is correct |
52 |
Correct |
11 ms |
50268 KB |
Output is correct |
53 |
Correct |
12 ms |
50012 KB |
Output is correct |
54 |
Correct |
10 ms |
50008 KB |
Output is correct |
55 |
Correct |
16 ms |
52828 KB |
Output is correct |
56 |
Correct |
12 ms |
50268 KB |
Output is correct |
57 |
Correct |
210 ms |
54976 KB |
Output is correct |
58 |
Correct |
27 ms |
52816 KB |
Output is correct |
59 |
Correct |
18 ms |
54008 KB |
Output is correct |
60 |
Correct |
18 ms |
52824 KB |
Output is correct |
61 |
Correct |
15 ms |
52828 KB |
Output is correct |
62 |
Correct |
1218 ms |
53992 KB |
Output is correct |
63 |
Correct |
8 ms |
51544 KB |
Output is correct |
64 |
Correct |
8 ms |
51548 KB |
Output is correct |
65 |
Correct |
13 ms |
52732 KB |
Output is correct |
66 |
Correct |
13 ms |
52828 KB |
Output is correct |
67 |
Correct |
19 ms |
52824 KB |
Output is correct |
68 |
Correct |
104 ms |
52860 KB |
Output is correct |
69 |
Correct |
144 ms |
52816 KB |
Output is correct |
70 |
Correct |
225 ms |
52820 KB |
Output is correct |
71 |
Correct |
320 ms |
53076 KB |
Output is correct |
72 |
Correct |
19 ms |
52824 KB |
Output is correct |
73 |
Correct |
20 ms |
53144 KB |
Output is correct |
74 |
Correct |
15 ms |
52828 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
49500 KB |
Output is correct |
2 |
Correct |
8 ms |
49500 KB |
Output is correct |
3 |
Correct |
7 ms |
49500 KB |
Output is correct |
4 |
Correct |
7 ms |
49496 KB |
Output is correct |
5 |
Correct |
7 ms |
49500 KB |
Output is correct |
6 |
Correct |
7 ms |
49500 KB |
Output is correct |
7 |
Correct |
7 ms |
49496 KB |
Output is correct |
8 |
Correct |
7 ms |
49496 KB |
Output is correct |
9 |
Correct |
6 ms |
49500 KB |
Output is correct |
10 |
Correct |
6 ms |
49500 KB |
Output is correct |
11 |
Correct |
6 ms |
49500 KB |
Output is correct |
12 |
Correct |
7 ms |
49500 KB |
Output is correct |
13 |
Correct |
7 ms |
49500 KB |
Output is correct |
14 |
Correct |
6 ms |
49500 KB |
Output is correct |
15 |
Correct |
7 ms |
49692 KB |
Output is correct |
16 |
Correct |
7 ms |
49500 KB |
Output is correct |
17 |
Correct |
7 ms |
49500 KB |
Output is correct |
18 |
Correct |
7 ms |
49496 KB |
Output is correct |
19 |
Correct |
10 ms |
50008 KB |
Output is correct |
20 |
Correct |
9 ms |
49900 KB |
Output is correct |
21 |
Correct |
10 ms |
50524 KB |
Output is correct |
22 |
Correct |
11 ms |
50008 KB |
Output is correct |
23 |
Correct |
10 ms |
50012 KB |
Output is correct |
24 |
Correct |
9 ms |
50136 KB |
Output is correct |
25 |
Correct |
9 ms |
50012 KB |
Output is correct |
26 |
Correct |
11 ms |
50264 KB |
Output is correct |
27 |
Correct |
11 ms |
50012 KB |
Output is correct |
28 |
Correct |
11 ms |
50008 KB |
Output is correct |
29 |
Correct |
15 ms |
52828 KB |
Output is correct |
30 |
Correct |
11 ms |
50008 KB |
Output is correct |
31 |
Correct |
15 ms |
53996 KB |
Output is correct |
32 |
Correct |
18 ms |
52948 KB |
Output is correct |
33 |
Correct |
14 ms |
52828 KB |
Output is correct |
34 |
Correct |
13 ms |
52932 KB |
Output is correct |
35 |
Correct |
13 ms |
53104 KB |
Output is correct |
36 |
Correct |
19 ms |
52828 KB |
Output is correct |
37 |
Correct |
19 ms |
52828 KB |
Output is correct |
38 |
Correct |
15 ms |
52824 KB |
Output is correct |
39 |
Correct |
102 ms |
73712 KB |
Output is correct |
40 |
Correct |
19 ms |
53084 KB |
Output is correct |
41 |
Correct |
15 ms |
53080 KB |
Output is correct |
42 |
Correct |
20 ms |
53340 KB |
Output is correct |
43 |
Correct |
20 ms |
53592 KB |
Output is correct |
44 |
Correct |
57 ms |
61520 KB |
Output is correct |
45 |
Correct |
54 ms |
62036 KB |
Output is correct |
46 |
Correct |
139 ms |
86196 KB |
Output is correct |
47 |
Correct |
128 ms |
73812 KB |
Output is correct |
48 |
Correct |
105 ms |
73624 KB |
Output is correct |
49 |
Correct |
69 ms |
73540 KB |
Output is correct |
50 |
Correct |
72 ms |
73724 KB |
Output is correct |
51 |
Correct |
129 ms |
74104 KB |
Output is correct |
52 |
Correct |
122 ms |
73724 KB |
Output is correct |
53 |
Correct |
103 ms |
73732 KB |
Output is correct |
54 |
Correct |
6 ms |
49628 KB |
Output is correct |
55 |
Correct |
7 ms |
49500 KB |
Output is correct |
56 |
Correct |
6 ms |
49500 KB |
Output is correct |
57 |
Correct |
6 ms |
49496 KB |
Output is correct |
58 |
Correct |
6 ms |
49500 KB |
Output is correct |
59 |
Correct |
7 ms |
49624 KB |
Output is correct |
60 |
Correct |
7 ms |
49916 KB |
Output is correct |
61 |
Correct |
6 ms |
49500 KB |
Output is correct |
62 |
Correct |
7 ms |
49496 KB |
Output is correct |
63 |
Correct |
6 ms |
49496 KB |
Output is correct |
64 |
Correct |
6 ms |
49500 KB |
Output is correct |
65 |
Correct |
8 ms |
49500 KB |
Output is correct |
66 |
Correct |
7 ms |
49500 KB |
Output is correct |
67 |
Correct |
7 ms |
49500 KB |
Output is correct |
68 |
Correct |
7 ms |
49500 KB |
Output is correct |
69 |
Correct |
7 ms |
49680 KB |
Output is correct |
70 |
Correct |
7 ms |
49500 KB |
Output is correct |
71 |
Correct |
6 ms |
49500 KB |
Output is correct |
72 |
Correct |
7 ms |
49500 KB |
Output is correct |
73 |
Correct |
6 ms |
49500 KB |
Output is correct |
74 |
Correct |
7 ms |
49500 KB |
Output is correct |
75 |
Correct |
7 ms |
49500 KB |
Output is correct |
76 |
Correct |
6 ms |
49500 KB |
Output is correct |
77 |
Correct |
6 ms |
49500 KB |
Output is correct |
78 |
Correct |
7 ms |
49692 KB |
Output is correct |
79 |
Correct |
7 ms |
49500 KB |
Output is correct |
80 |
Correct |
6 ms |
49500 KB |
Output is correct |
81 |
Correct |
6 ms |
49700 KB |
Output is correct |
82 |
Correct |
6 ms |
49680 KB |
Output is correct |
83 |
Correct |
7 ms |
49500 KB |
Output is correct |
84 |
Correct |
7 ms |
49496 KB |
Output is correct |
85 |
Correct |
8 ms |
49500 KB |
Output is correct |
86 |
Correct |
7 ms |
49500 KB |
Output is correct |
87 |
Correct |
7 ms |
49624 KB |
Output is correct |
88 |
Correct |
7 ms |
49500 KB |
Output is correct |
89 |
Correct |
6 ms |
49500 KB |
Output is correct |
90 |
Correct |
7 ms |
49500 KB |
Output is correct |
91 |
Correct |
7 ms |
49500 KB |
Output is correct |
92 |
Correct |
8 ms |
49496 KB |
Output is correct |
93 |
Correct |
7 ms |
49500 KB |
Output is correct |
94 |
Correct |
7 ms |
49500 KB |
Output is correct |
95 |
Correct |
7 ms |
49500 KB |
Output is correct |
96 |
Correct |
7 ms |
49496 KB |
Output is correct |
97 |
Correct |
7 ms |
49704 KB |
Output is correct |
98 |
Correct |
6 ms |
49644 KB |
Output is correct |
99 |
Correct |
7 ms |
49496 KB |
Output is correct |
100 |
Correct |
6 ms |
49496 KB |
Output is correct |
101 |
Correct |
7 ms |
49500 KB |
Output is correct |
102 |
Correct |
7 ms |
49496 KB |
Output is correct |
103 |
Correct |
7 ms |
49500 KB |
Output is correct |
104 |
Correct |
7 ms |
49500 KB |
Output is correct |
105 |
Correct |
6 ms |
49500 KB |
Output is correct |
106 |
Correct |
7 ms |
49496 KB |
Output is correct |
107 |
Correct |
7 ms |
49500 KB |
Output is correct |
108 |
Correct |
6 ms |
49500 KB |
Output is correct |
109 |
Correct |
8 ms |
49752 KB |
Output is correct |
110 |
Correct |
12 ms |
50036 KB |
Output is correct |
111 |
Correct |
19 ms |
51032 KB |
Output is correct |
112 |
Correct |
10 ms |
50524 KB |
Output is correct |
113 |
Correct |
310 ms |
50668 KB |
Output is correct |
114 |
Correct |
7 ms |
49500 KB |
Output is correct |
115 |
Correct |
7 ms |
49496 KB |
Output is correct |
116 |
Correct |
105 ms |
50176 KB |
Output is correct |
117 |
Correct |
12 ms |
50268 KB |
Output is correct |
118 |
Correct |
12 ms |
50012 KB |
Output is correct |
119 |
Correct |
207 ms |
55020 KB |
Output is correct |
120 |
Correct |
16 ms |
54104 KB |
Output is correct |
121 |
Correct |
1210 ms |
54512 KB |
Output is correct |
122 |
Correct |
9 ms |
51548 KB |
Output is correct |
123 |
Correct |
10 ms |
51544 KB |
Output is correct |
124 |
Correct |
382 ms |
65216 KB |
Output is correct |
125 |
Execution timed out |
2047 ms |
94012 KB |
Time limit exceeded |
126 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
49500 KB |
Output is correct |
2 |
Correct |
8 ms |
49500 KB |
Output is correct |
3 |
Correct |
7 ms |
49500 KB |
Output is correct |
4 |
Correct |
7 ms |
49496 KB |
Output is correct |
5 |
Correct |
7 ms |
49500 KB |
Output is correct |
6 |
Correct |
7 ms |
49500 KB |
Output is correct |
7 |
Correct |
7 ms |
49496 KB |
Output is correct |
8 |
Correct |
7 ms |
49496 KB |
Output is correct |
9 |
Correct |
6 ms |
49500 KB |
Output is correct |
10 |
Correct |
6 ms |
49500 KB |
Output is correct |
11 |
Correct |
6 ms |
49500 KB |
Output is correct |
12 |
Correct |
7 ms |
49500 KB |
Output is correct |
13 |
Correct |
7 ms |
49500 KB |
Output is correct |
14 |
Correct |
6 ms |
49500 KB |
Output is correct |
15 |
Correct |
7 ms |
49692 KB |
Output is correct |
16 |
Correct |
7 ms |
49500 KB |
Output is correct |
17 |
Correct |
7 ms |
49500 KB |
Output is correct |
18 |
Correct |
7 ms |
49496 KB |
Output is correct |
19 |
Correct |
10 ms |
50008 KB |
Output is correct |
20 |
Correct |
9 ms |
49900 KB |
Output is correct |
21 |
Correct |
10 ms |
50524 KB |
Output is correct |
22 |
Correct |
11 ms |
50008 KB |
Output is correct |
23 |
Correct |
10 ms |
50012 KB |
Output is correct |
24 |
Correct |
9 ms |
50136 KB |
Output is correct |
25 |
Correct |
9 ms |
50012 KB |
Output is correct |
26 |
Correct |
11 ms |
50264 KB |
Output is correct |
27 |
Correct |
11 ms |
50012 KB |
Output is correct |
28 |
Correct |
11 ms |
50008 KB |
Output is correct |
29 |
Correct |
15 ms |
52828 KB |
Output is correct |
30 |
Correct |
11 ms |
50008 KB |
Output is correct |
31 |
Correct |
15 ms |
53996 KB |
Output is correct |
32 |
Correct |
18 ms |
52948 KB |
Output is correct |
33 |
Correct |
14 ms |
52828 KB |
Output is correct |
34 |
Correct |
13 ms |
52932 KB |
Output is correct |
35 |
Correct |
13 ms |
53104 KB |
Output is correct |
36 |
Correct |
19 ms |
52828 KB |
Output is correct |
37 |
Correct |
19 ms |
52828 KB |
Output is correct |
38 |
Correct |
15 ms |
52824 KB |
Output is correct |
39 |
Correct |
102 ms |
73712 KB |
Output is correct |
40 |
Correct |
19 ms |
53084 KB |
Output is correct |
41 |
Correct |
15 ms |
53080 KB |
Output is correct |
42 |
Correct |
20 ms |
53340 KB |
Output is correct |
43 |
Correct |
20 ms |
53592 KB |
Output is correct |
44 |
Correct |
57 ms |
61520 KB |
Output is correct |
45 |
Correct |
54 ms |
62036 KB |
Output is correct |
46 |
Correct |
139 ms |
86196 KB |
Output is correct |
47 |
Correct |
128 ms |
73812 KB |
Output is correct |
48 |
Correct |
105 ms |
73624 KB |
Output is correct |
49 |
Correct |
69 ms |
73540 KB |
Output is correct |
50 |
Correct |
72 ms |
73724 KB |
Output is correct |
51 |
Correct |
129 ms |
74104 KB |
Output is correct |
52 |
Correct |
122 ms |
73724 KB |
Output is correct |
53 |
Correct |
103 ms |
73732 KB |
Output is correct |
54 |
Correct |
6 ms |
49628 KB |
Output is correct |
55 |
Correct |
7 ms |
49500 KB |
Output is correct |
56 |
Correct |
6 ms |
49500 KB |
Output is correct |
57 |
Correct |
6 ms |
49496 KB |
Output is correct |
58 |
Correct |
6 ms |
49500 KB |
Output is correct |
59 |
Correct |
7 ms |
49624 KB |
Output is correct |
60 |
Correct |
7 ms |
49916 KB |
Output is correct |
61 |
Correct |
6 ms |
49500 KB |
Output is correct |
62 |
Correct |
7 ms |
49496 KB |
Output is correct |
63 |
Correct |
6 ms |
49496 KB |
Output is correct |
64 |
Correct |
6 ms |
49500 KB |
Output is correct |
65 |
Correct |
8 ms |
49500 KB |
Output is correct |
66 |
Correct |
7 ms |
49500 KB |
Output is correct |
67 |
Correct |
7 ms |
49500 KB |
Output is correct |
68 |
Correct |
7 ms |
49500 KB |
Output is correct |
69 |
Correct |
7 ms |
49680 KB |
Output is correct |
70 |
Correct |
7 ms |
49500 KB |
Output is correct |
71 |
Correct |
6 ms |
49500 KB |
Output is correct |
72 |
Correct |
7 ms |
49500 KB |
Output is correct |
73 |
Correct |
6 ms |
49500 KB |
Output is correct |
74 |
Correct |
7 ms |
49500 KB |
Output is correct |
75 |
Correct |
7 ms |
49500 KB |
Output is correct |
76 |
Correct |
6 ms |
49500 KB |
Output is correct |
77 |
Correct |
6 ms |
49500 KB |
Output is correct |
78 |
Correct |
7 ms |
49692 KB |
Output is correct |
79 |
Correct |
7 ms |
49500 KB |
Output is correct |
80 |
Correct |
6 ms |
49500 KB |
Output is correct |
81 |
Correct |
6 ms |
49700 KB |
Output is correct |
82 |
Correct |
6 ms |
49680 KB |
Output is correct |
83 |
Correct |
7 ms |
49500 KB |
Output is correct |
84 |
Correct |
7 ms |
49496 KB |
Output is correct |
85 |
Correct |
8 ms |
49500 KB |
Output is correct |
86 |
Correct |
7 ms |
49500 KB |
Output is correct |
87 |
Correct |
7 ms |
49624 KB |
Output is correct |
88 |
Correct |
7 ms |
49500 KB |
Output is correct |
89 |
Correct |
6 ms |
49500 KB |
Output is correct |
90 |
Correct |
7 ms |
49500 KB |
Output is correct |
91 |
Correct |
7 ms |
49500 KB |
Output is correct |
92 |
Correct |
8 ms |
49496 KB |
Output is correct |
93 |
Correct |
7 ms |
49500 KB |
Output is correct |
94 |
Correct |
7 ms |
49500 KB |
Output is correct |
95 |
Correct |
7 ms |
49500 KB |
Output is correct |
96 |
Correct |
7 ms |
49496 KB |
Output is correct |
97 |
Correct |
7 ms |
49704 KB |
Output is correct |
98 |
Correct |
6 ms |
49644 KB |
Output is correct |
99 |
Correct |
7 ms |
49496 KB |
Output is correct |
100 |
Correct |
6 ms |
49496 KB |
Output is correct |
101 |
Correct |
7 ms |
49500 KB |
Output is correct |
102 |
Correct |
7 ms |
49496 KB |
Output is correct |
103 |
Correct |
7 ms |
49500 KB |
Output is correct |
104 |
Correct |
7 ms |
49500 KB |
Output is correct |
105 |
Correct |
6 ms |
49500 KB |
Output is correct |
106 |
Correct |
7 ms |
49496 KB |
Output is correct |
107 |
Correct |
7 ms |
49500 KB |
Output is correct |
108 |
Correct |
6 ms |
49500 KB |
Output is correct |
109 |
Correct |
8 ms |
49752 KB |
Output is correct |
110 |
Correct |
12 ms |
50036 KB |
Output is correct |
111 |
Correct |
19 ms |
51032 KB |
Output is correct |
112 |
Correct |
10 ms |
50524 KB |
Output is correct |
113 |
Correct |
310 ms |
50668 KB |
Output is correct |
114 |
Correct |
7 ms |
49500 KB |
Output is correct |
115 |
Correct |
7 ms |
49496 KB |
Output is correct |
116 |
Correct |
105 ms |
50176 KB |
Output is correct |
117 |
Correct |
12 ms |
50268 KB |
Output is correct |
118 |
Correct |
12 ms |
50012 KB |
Output is correct |
119 |
Correct |
207 ms |
55020 KB |
Output is correct |
120 |
Correct |
16 ms |
54104 KB |
Output is correct |
121 |
Correct |
1210 ms |
54512 KB |
Output is correct |
122 |
Correct |
9 ms |
51548 KB |
Output is correct |
123 |
Correct |
10 ms |
51544 KB |
Output is correct |
124 |
Correct |
382 ms |
65216 KB |
Output is correct |
125 |
Execution timed out |
2047 ms |
94012 KB |
Time limit exceeded |
126 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
12 ms |
49500 KB |
Output is correct |
2 |
Correct |
8 ms |
49500 KB |
Output is correct |
3 |
Correct |
7 ms |
49500 KB |
Output is correct |
4 |
Correct |
7 ms |
49496 KB |
Output is correct |
5 |
Correct |
7 ms |
49500 KB |
Output is correct |
6 |
Correct |
7 ms |
49500 KB |
Output is correct |
7 |
Correct |
7 ms |
49496 KB |
Output is correct |
8 |
Correct |
7 ms |
49496 KB |
Output is correct |
9 |
Correct |
6 ms |
49500 KB |
Output is correct |
10 |
Correct |
6 ms |
49500 KB |
Output is correct |
11 |
Correct |
6 ms |
49500 KB |
Output is correct |
12 |
Correct |
7 ms |
49500 KB |
Output is correct |
13 |
Correct |
7 ms |
49500 KB |
Output is correct |
14 |
Correct |
6 ms |
49500 KB |
Output is correct |
15 |
Correct |
7 ms |
49692 KB |
Output is correct |
16 |
Correct |
7 ms |
49500 KB |
Output is correct |
17 |
Correct |
7 ms |
49500 KB |
Output is correct |
18 |
Correct |
7 ms |
49496 KB |
Output is correct |
19 |
Correct |
10 ms |
50008 KB |
Output is correct |
20 |
Correct |
9 ms |
49900 KB |
Output is correct |
21 |
Correct |
10 ms |
50524 KB |
Output is correct |
22 |
Correct |
11 ms |
50008 KB |
Output is correct |
23 |
Correct |
10 ms |
50012 KB |
Output is correct |
24 |
Correct |
9 ms |
50136 KB |
Output is correct |
25 |
Correct |
9 ms |
50012 KB |
Output is correct |
26 |
Correct |
11 ms |
50264 KB |
Output is correct |
27 |
Correct |
11 ms |
50012 KB |
Output is correct |
28 |
Correct |
11 ms |
50008 KB |
Output is correct |
29 |
Correct |
15 ms |
52828 KB |
Output is correct |
30 |
Correct |
11 ms |
50008 KB |
Output is correct |
31 |
Correct |
15 ms |
53996 KB |
Output is correct |
32 |
Correct |
18 ms |
52948 KB |
Output is correct |
33 |
Correct |
14 ms |
52828 KB |
Output is correct |
34 |
Correct |
13 ms |
52932 KB |
Output is correct |
35 |
Correct |
13 ms |
53104 KB |
Output is correct |
36 |
Correct |
19 ms |
52828 KB |
Output is correct |
37 |
Correct |
19 ms |
52828 KB |
Output is correct |
38 |
Correct |
15 ms |
52824 KB |
Output is correct |
39 |
Correct |
102 ms |
73712 KB |
Output is correct |
40 |
Correct |
19 ms |
53084 KB |
Output is correct |
41 |
Correct |
15 ms |
53080 KB |
Output is correct |
42 |
Correct |
20 ms |
53340 KB |
Output is correct |
43 |
Correct |
20 ms |
53592 KB |
Output is correct |
44 |
Correct |
57 ms |
61520 KB |
Output is correct |
45 |
Correct |
54 ms |
62036 KB |
Output is correct |
46 |
Correct |
139 ms |
86196 KB |
Output is correct |
47 |
Correct |
128 ms |
73812 KB |
Output is correct |
48 |
Correct |
105 ms |
73624 KB |
Output is correct |
49 |
Correct |
69 ms |
73540 KB |
Output is correct |
50 |
Correct |
72 ms |
73724 KB |
Output is correct |
51 |
Correct |
129 ms |
74104 KB |
Output is correct |
52 |
Correct |
122 ms |
73724 KB |
Output is correct |
53 |
Correct |
103 ms |
73732 KB |
Output is correct |
54 |
Correct |
6 ms |
49628 KB |
Output is correct |
55 |
Correct |
7 ms |
49500 KB |
Output is correct |
56 |
Correct |
6 ms |
49500 KB |
Output is correct |
57 |
Correct |
6 ms |
49496 KB |
Output is correct |
58 |
Correct |
6 ms |
49500 KB |
Output is correct |
59 |
Correct |
7 ms |
49624 KB |
Output is correct |
60 |
Correct |
7 ms |
49916 KB |
Output is correct |
61 |
Correct |
6 ms |
49500 KB |
Output is correct |
62 |
Correct |
7 ms |
49496 KB |
Output is correct |
63 |
Correct |
6 ms |
49496 KB |
Output is correct |
64 |
Correct |
6 ms |
49500 KB |
Output is correct |
65 |
Correct |
8 ms |
49500 KB |
Output is correct |
66 |
Correct |
7 ms |
49500 KB |
Output is correct |
67 |
Correct |
7 ms |
49500 KB |
Output is correct |
68 |
Correct |
7 ms |
49500 KB |
Output is correct |
69 |
Correct |
7 ms |
49680 KB |
Output is correct |
70 |
Correct |
7 ms |
49500 KB |
Output is correct |
71 |
Correct |
6 ms |
49500 KB |
Output is correct |
72 |
Correct |
7 ms |
49500 KB |
Output is correct |
73 |
Correct |
6 ms |
49500 KB |
Output is correct |
74 |
Correct |
7 ms |
49500 KB |
Output is correct |
75 |
Correct |
7 ms |
49500 KB |
Output is correct |
76 |
Correct |
6 ms |
49500 KB |
Output is correct |
77 |
Correct |
6 ms |
49500 KB |
Output is correct |
78 |
Correct |
7 ms |
49692 KB |
Output is correct |
79 |
Correct |
7 ms |
49500 KB |
Output is correct |
80 |
Correct |
6 ms |
49500 KB |
Output is correct |
81 |
Correct |
6 ms |
49700 KB |
Output is correct |
82 |
Correct |
6 ms |
49680 KB |
Output is correct |
83 |
Correct |
7 ms |
49500 KB |
Output is correct |
84 |
Correct |
7 ms |
49496 KB |
Output is correct |
85 |
Correct |
8 ms |
49500 KB |
Output is correct |
86 |
Correct |
7 ms |
49500 KB |
Output is correct |
87 |
Correct |
7 ms |
49624 KB |
Output is correct |
88 |
Correct |
7 ms |
49500 KB |
Output is correct |
89 |
Correct |
6 ms |
49500 KB |
Output is correct |
90 |
Correct |
7 ms |
49500 KB |
Output is correct |
91 |
Correct |
7 ms |
49500 KB |
Output is correct |
92 |
Correct |
8 ms |
49496 KB |
Output is correct |
93 |
Correct |
7 ms |
49500 KB |
Output is correct |
94 |
Correct |
7 ms |
49500 KB |
Output is correct |
95 |
Correct |
7 ms |
49500 KB |
Output is correct |
96 |
Correct |
7 ms |
49496 KB |
Output is correct |
97 |
Correct |
7 ms |
49704 KB |
Output is correct |
98 |
Correct |
6 ms |
49644 KB |
Output is correct |
99 |
Correct |
7 ms |
49496 KB |
Output is correct |
100 |
Correct |
6 ms |
49496 KB |
Output is correct |
101 |
Correct |
7 ms |
49500 KB |
Output is correct |
102 |
Correct |
7 ms |
49496 KB |
Output is correct |
103 |
Correct |
7 ms |
49500 KB |
Output is correct |
104 |
Correct |
7 ms |
49500 KB |
Output is correct |
105 |
Correct |
6 ms |
49500 KB |
Output is correct |
106 |
Correct |
7 ms |
49496 KB |
Output is correct |
107 |
Correct |
7 ms |
49500 KB |
Output is correct |
108 |
Correct |
6 ms |
49500 KB |
Output is correct |
109 |
Correct |
8 ms |
49752 KB |
Output is correct |
110 |
Correct |
12 ms |
50036 KB |
Output is correct |
111 |
Correct |
19 ms |
51032 KB |
Output is correct |
112 |
Correct |
10 ms |
50524 KB |
Output is correct |
113 |
Correct |
310 ms |
50668 KB |
Output is correct |
114 |
Correct |
7 ms |
49500 KB |
Output is correct |
115 |
Correct |
7 ms |
49496 KB |
Output is correct |
116 |
Correct |
105 ms |
50176 KB |
Output is correct |
117 |
Correct |
12 ms |
50268 KB |
Output is correct |
118 |
Correct |
12 ms |
50012 KB |
Output is correct |
119 |
Correct |
207 ms |
55020 KB |
Output is correct |
120 |
Correct |
16 ms |
54104 KB |
Output is correct |
121 |
Correct |
1210 ms |
54512 KB |
Output is correct |
122 |
Correct |
9 ms |
51548 KB |
Output is correct |
123 |
Correct |
10 ms |
51544 KB |
Output is correct |
124 |
Correct |
382 ms |
65216 KB |
Output is correct |
125 |
Execution timed out |
2047 ms |
94012 KB |
Time limit exceeded |
126 |
Halted |
0 ms |
0 KB |
- |