# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
885536 |
2023-12-10T02:42:24 Z |
huutuan |
Maze (JOI23_ho_t3) |
C++14 |
|
2000 ms |
945680 KB |
#include<bits/stdc++.h>
using namespace std;
// #define int long long
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define isz(x) ((int)(x).size())
#define sumof(x) accumulate(all(x), 0ll)
struct DisjointSetUnion{
vector<int> lab, val;
void init(int n){
lab.assign(n+1, -1);
val.assign(n+1, -1);
}
int find_set(int v){
return lab[v]<0?v:lab[v]=find_set(lab[v]);
}
bool union_sets(int a, int b){
a=find_set(a); b=find_set(b);
if (a!=b){
int new_val=val[a];
if (lab[a]>lab[b]) swap(a, b);
lab[a]+=lab[b];
lab[b]=a;
val[a]=new_val;
val[b]=-1;
return 1;
}
return 0;
}
int get_val(int x){
return val[find_set(x)];
}
};
struct LinkedList{
int n;
DisjointSetUnion prv, nxt;
void init(int _n){
n=_n;
prv.init(n+1);
nxt.init(n+1);
for (int i=0; i<=n+1; ++i) prv.val[i]=i-1, nxt.val[i]=i+1;
}
void erase(int x){
int t1=prv.get_val(x), t2=nxt.get_val(x);
nxt.union_sets(x, t1);
prv.union_sets(x, t2);
}
int get(int x){
x=max(x, 0);
return nxt.get_val(max(0, prv.get_val(x)));
}
};
template<class T>
struct Vec{
int sz;
T data[6000001];
void clear(){
sz=0;
}
int size() const {
return sz;
}
void push_back(const T &x){
data[sz++]=x;
}
auto & operator[](int x){
return data[x];
}
const auto & operator[](int x) const {
return data[x];
}
};
template<class T>
struct Queue{
int bq, eq;
T data[6000001];
int size() const {
return eq-bq+1;
}
void clear(){
bq=1; eq=0;
}
T & front(){
return data[bq];
}
void push(const T &x){
data[++eq]=x;
}
void pop(){
++bq;
}
};
const int dx[]={1, -1, 0, 0, 1, 1, -1, -1}, dy[]={0, 0, 1, -1, 0, 1, -1, 1, -1};
int n, r, c;
int sr, sc, gr, gc;
void solve(){
cin >> r >> c >> n;
cin >> sr >> sc >> gr >> gc;
vector<vector<char>> a(r+1, vector<char>(c+1));
vector<vector<int>> dist(r+1, vector<int>(c+1, 1e9));
vector<vector<int>> vis(r+1, vector<int>(c+1));
vector<LinkedList> lr(r+1), lc(c+1);
for (int i=1; i<=r; ++i) lr[i].init(c);
for (int i=1; i<=c; ++i) lc[i].init(r);
for (int i=1; i<=r; ++i) for (int j=1; j<=c; ++j) cin >> a[i][j];
Vec<pair<int, int>> roots;
roots.push_back({sr, sc});
Queue<pair<int, int>> q;
auto bfs_white=[&](int distance){
q.clear();
for (int i=0; i<roots.size(); ++i) q.push({roots[i].first, roots[i].second}), dist[roots[i].first][roots[i].second]=distance, lr[roots[i].first].erase(roots[i].second), lc[roots[i].second].erase(roots[i].first);
roots.clear();
while (q.size()){
int u=q.front().first, v=q.front().second;
q.pop();
for (int i=0; i<4; ++i){
int x=u+dx[i], y=v+dy[i];
if (x<1 || y<1 || x>r || y>c || dist[x][y]<1e9) continue;
if (a[x][y]=='.'){
dist[x][y]=distance;
lr[x].erase(y);
lc[y].erase(x);
q.push({x, y});
}else if (!vis[x][y]){
vis[x][y]=1;
roots.push_back({x, y});
}
}
}
};
Queue<pair<pair<int, int>, int>> qq;
auto bfs_black=[&](int distance){
qq.clear();
for (int i=0; i<roots.size(); ++i) qq.push({roots[i], 0});
roots.clear();
while (qq.size()){
int u=qq.front().first.first, v=qq.front().first.second, d=qq.front().second;
qq.pop();
if (d==3) continue;
if ((d&1)==0){
for (int y=lr[u].get(v-n+1); y!=c+1; y=lr[u].nxt.get_val(y)){
int x=u;
if (y-v>=n) break;
qq.push({{x, y}, d|1});
dist[x][y]=distance;
roots.push_back({x, y});
lc[y].erase(x);
lr[x].erase(y);
}
}
if ((d&2)==0){
for (int x=lc[v].get(u-n+1); x!=r+1; x=lc[v].nxt.get_val(x)){
int y=v;
if (x-u>=n) break;
qq.push({{x, y}, d|2});
dist[x][y]=distance;
roots.push_back({x, y});
lc[y].erase(x);
lr[x].erase(y);
}
}
}
};
int cur=0;
while (dist[gr][gc]>=1e9){
bfs_white(cur);
bfs_black(++cur);
}
cout << dist[gr][gc];
}
int32_t main(){
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int ntests=1;
// cin >> ntests;
for (int i=1; i<=ntests; ++i) solve();
return 0;
}
Compilation message
Main.cpp: In function 'void solve()':
Main.cpp:73:11: warning: 'roots.Vec<std::pair<int, int> >::sz' may be used uninitialized in this function [-Wmaybe-uninitialized]
73 | data[sz++]=x;
| ~~~~^
Main.cpp:118:24: note: 'roots.Vec<std::pair<int, int> >::sz' was declared here
118 | Vec<pair<int, int>> roots;
| ^~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
94 ms |
164692 KB |
Output is correct |
2 |
Correct |
92 ms |
164688 KB |
Output is correct |
3 |
Correct |
92 ms |
164700 KB |
Output is correct |
4 |
Correct |
92 ms |
164856 KB |
Output is correct |
5 |
Correct |
92 ms |
164812 KB |
Output is correct |
6 |
Correct |
92 ms |
164804 KB |
Output is correct |
7 |
Correct |
92 ms |
165204 KB |
Output is correct |
8 |
Correct |
92 ms |
164916 KB |
Output is correct |
9 |
Correct |
91 ms |
164692 KB |
Output is correct |
10 |
Correct |
93 ms |
164708 KB |
Output is correct |
11 |
Correct |
91 ms |
164812 KB |
Output is correct |
12 |
Correct |
93 ms |
164944 KB |
Output is correct |
13 |
Correct |
92 ms |
164692 KB |
Output is correct |
14 |
Correct |
94 ms |
164688 KB |
Output is correct |
15 |
Correct |
91 ms |
164784 KB |
Output is correct |
16 |
Correct |
91 ms |
164968 KB |
Output is correct |
17 |
Correct |
100 ms |
164816 KB |
Output is correct |
18 |
Correct |
91 ms |
164864 KB |
Output is correct |
19 |
Correct |
101 ms |
167156 KB |
Output is correct |
20 |
Correct |
106 ms |
176696 KB |
Output is correct |
21 |
Correct |
97 ms |
167260 KB |
Output is correct |
22 |
Correct |
102 ms |
167252 KB |
Output is correct |
23 |
Correct |
103 ms |
167156 KB |
Output is correct |
24 |
Correct |
109 ms |
180328 KB |
Output is correct |
25 |
Correct |
109 ms |
180448 KB |
Output is correct |
26 |
Correct |
104 ms |
167324 KB |
Output is correct |
27 |
Correct |
94 ms |
167248 KB |
Output is correct |
28 |
Correct |
96 ms |
167248 KB |
Output is correct |
29 |
Correct |
121 ms |
170836 KB |
Output is correct |
30 |
Correct |
110 ms |
173396 KB |
Output is correct |
31 |
Correct |
108 ms |
170916 KB |
Output is correct |
32 |
Correct |
119 ms |
170832 KB |
Output is correct |
33 |
Correct |
120 ms |
170832 KB |
Output is correct |
34 |
Correct |
136 ms |
203972 KB |
Output is correct |
35 |
Correct |
138 ms |
203636 KB |
Output is correct |
36 |
Correct |
110 ms |
170836 KB |
Output is correct |
37 |
Correct |
118 ms |
170836 KB |
Output is correct |
38 |
Correct |
96 ms |
170836 KB |
Output is correct |
39 |
Correct |
636 ms |
225360 KB |
Output is correct |
40 |
Correct |
107 ms |
173380 KB |
Output is correct |
41 |
Correct |
138 ms |
212676 KB |
Output is correct |
42 |
Correct |
135 ms |
173648 KB |
Output is correct |
43 |
Correct |
140 ms |
199324 KB |
Output is correct |
44 |
Correct |
167 ms |
219836 KB |
Output is correct |
45 |
Correct |
186 ms |
232240 KB |
Output is correct |
46 |
Correct |
357 ms |
225356 KB |
Output is correct |
47 |
Correct |
492 ms |
225360 KB |
Output is correct |
48 |
Correct |
546 ms |
225576 KB |
Output is correct |
49 |
Correct |
488 ms |
555184 KB |
Output is correct |
50 |
Correct |
487 ms |
555188 KB |
Output is correct |
51 |
Correct |
427 ms |
225776 KB |
Output is correct |
52 |
Correct |
340 ms |
225360 KB |
Output is correct |
53 |
Correct |
526 ms |
225776 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
99 ms |
164756 KB |
Output is correct |
2 |
Correct |
92 ms |
164712 KB |
Output is correct |
3 |
Correct |
93 ms |
164692 KB |
Output is correct |
4 |
Correct |
93 ms |
164688 KB |
Output is correct |
5 |
Correct |
92 ms |
164868 KB |
Output is correct |
6 |
Correct |
94 ms |
164688 KB |
Output is correct |
7 |
Correct |
91 ms |
164680 KB |
Output is correct |
8 |
Correct |
91 ms |
164812 KB |
Output is correct |
9 |
Correct |
92 ms |
164772 KB |
Output is correct |
10 |
Correct |
91 ms |
164696 KB |
Output is correct |
11 |
Correct |
90 ms |
164868 KB |
Output is correct |
12 |
Correct |
91 ms |
164692 KB |
Output is correct |
13 |
Correct |
92 ms |
164688 KB |
Output is correct |
14 |
Correct |
93 ms |
164688 KB |
Output is correct |
15 |
Correct |
94 ms |
165044 KB |
Output is correct |
16 |
Correct |
96 ms |
164836 KB |
Output is correct |
17 |
Correct |
93 ms |
164948 KB |
Output is correct |
18 |
Correct |
100 ms |
164804 KB |
Output is correct |
19 |
Correct |
91 ms |
164692 KB |
Output is correct |
20 |
Correct |
93 ms |
164692 KB |
Output is correct |
21 |
Correct |
93 ms |
164688 KB |
Output is correct |
22 |
Correct |
91 ms |
164688 KB |
Output is correct |
23 |
Correct |
92 ms |
164688 KB |
Output is correct |
24 |
Correct |
92 ms |
164708 KB |
Output is correct |
25 |
Correct |
94 ms |
164692 KB |
Output is correct |
26 |
Correct |
92 ms |
164620 KB |
Output is correct |
27 |
Correct |
93 ms |
164696 KB |
Output is correct |
28 |
Correct |
91 ms |
164692 KB |
Output is correct |
29 |
Correct |
96 ms |
164640 KB |
Output is correct |
30 |
Correct |
93 ms |
164692 KB |
Output is correct |
31 |
Correct |
92 ms |
164728 KB |
Output is correct |
32 |
Correct |
94 ms |
164768 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
92 ms |
164688 KB |
Output is correct |
2 |
Correct |
92 ms |
164596 KB |
Output is correct |
3 |
Correct |
92 ms |
164816 KB |
Output is correct |
4 |
Correct |
92 ms |
164688 KB |
Output is correct |
5 |
Correct |
91 ms |
164692 KB |
Output is correct |
6 |
Correct |
94 ms |
164968 KB |
Output is correct |
7 |
Correct |
93 ms |
164688 KB |
Output is correct |
8 |
Correct |
92 ms |
164688 KB |
Output is correct |
9 |
Correct |
92 ms |
164688 KB |
Output is correct |
10 |
Correct |
94 ms |
165060 KB |
Output is correct |
11 |
Correct |
92 ms |
164692 KB |
Output is correct |
12 |
Correct |
93 ms |
164948 KB |
Output is correct |
13 |
Correct |
92 ms |
164692 KB |
Output is correct |
14 |
Correct |
91 ms |
164816 KB |
Output is correct |
15 |
Correct |
93 ms |
164596 KB |
Output is correct |
16 |
Correct |
93 ms |
164688 KB |
Output is correct |
17 |
Correct |
92 ms |
164612 KB |
Output is correct |
18 |
Correct |
93 ms |
164768 KB |
Output is correct |
19 |
Correct |
96 ms |
164912 KB |
Output is correct |
20 |
Correct |
90 ms |
164620 KB |
Output is correct |
21 |
Correct |
93 ms |
164692 KB |
Output is correct |
22 |
Correct |
90 ms |
164692 KB |
Output is correct |
23 |
Correct |
99 ms |
164688 KB |
Output is correct |
24 |
Correct |
96 ms |
164684 KB |
Output is correct |
25 |
Correct |
96 ms |
166324 KB |
Output is correct |
26 |
Correct |
99 ms |
166996 KB |
Output is correct |
27 |
Correct |
97 ms |
167248 KB |
Output is correct |
28 |
Correct |
98 ms |
167564 KB |
Output is correct |
29 |
Correct |
97 ms |
167180 KB |
Output is correct |
30 |
Correct |
96 ms |
167252 KB |
Output is correct |
31 |
Correct |
98 ms |
167384 KB |
Output is correct |
32 |
Correct |
94 ms |
167248 KB |
Output is correct |
33 |
Correct |
100 ms |
167328 KB |
Output is correct |
34 |
Correct |
107 ms |
169808 KB |
Output is correct |
35 |
Correct |
106 ms |
170836 KB |
Output is correct |
36 |
Correct |
108 ms |
170836 KB |
Output is correct |
37 |
Correct |
105 ms |
171088 KB |
Output is correct |
38 |
Correct |
102 ms |
170800 KB |
Output is correct |
39 |
Correct |
164 ms |
182352 KB |
Output is correct |
40 |
Correct |
284 ms |
218084 KB |
Output is correct |
41 |
Correct |
351 ms |
225540 KB |
Output is correct |
42 |
Correct |
338 ms |
225360 KB |
Output is correct |
43 |
Correct |
297 ms |
225592 KB |
Output is correct |
44 |
Correct |
269 ms |
225364 KB |
Output is correct |
45 |
Correct |
286 ms |
228692 KB |
Output is correct |
46 |
Correct |
292 ms |
227728 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
99 ms |
164756 KB |
Output is correct |
2 |
Correct |
92 ms |
164712 KB |
Output is correct |
3 |
Correct |
93 ms |
164692 KB |
Output is correct |
4 |
Correct |
93 ms |
164688 KB |
Output is correct |
5 |
Correct |
92 ms |
164868 KB |
Output is correct |
6 |
Correct |
94 ms |
164688 KB |
Output is correct |
7 |
Correct |
91 ms |
164680 KB |
Output is correct |
8 |
Correct |
91 ms |
164812 KB |
Output is correct |
9 |
Correct |
92 ms |
164772 KB |
Output is correct |
10 |
Correct |
91 ms |
164696 KB |
Output is correct |
11 |
Correct |
90 ms |
164868 KB |
Output is correct |
12 |
Correct |
91 ms |
164692 KB |
Output is correct |
13 |
Correct |
92 ms |
164688 KB |
Output is correct |
14 |
Correct |
93 ms |
164688 KB |
Output is correct |
15 |
Correct |
94 ms |
165044 KB |
Output is correct |
16 |
Correct |
96 ms |
164836 KB |
Output is correct |
17 |
Correct |
93 ms |
164948 KB |
Output is correct |
18 |
Correct |
100 ms |
164804 KB |
Output is correct |
19 |
Correct |
91 ms |
164692 KB |
Output is correct |
20 |
Correct |
93 ms |
164692 KB |
Output is correct |
21 |
Correct |
93 ms |
164688 KB |
Output is correct |
22 |
Correct |
91 ms |
164688 KB |
Output is correct |
23 |
Correct |
92 ms |
164688 KB |
Output is correct |
24 |
Correct |
92 ms |
164708 KB |
Output is correct |
25 |
Correct |
94 ms |
164692 KB |
Output is correct |
26 |
Correct |
92 ms |
164620 KB |
Output is correct |
27 |
Correct |
93 ms |
164696 KB |
Output is correct |
28 |
Correct |
91 ms |
164692 KB |
Output is correct |
29 |
Correct |
96 ms |
164640 KB |
Output is correct |
30 |
Correct |
93 ms |
164692 KB |
Output is correct |
31 |
Correct |
92 ms |
164728 KB |
Output is correct |
32 |
Correct |
94 ms |
164768 KB |
Output is correct |
33 |
Correct |
101 ms |
167280 KB |
Output is correct |
34 |
Correct |
94 ms |
164988 KB |
Output is correct |
35 |
Correct |
93 ms |
165456 KB |
Output is correct |
36 |
Correct |
93 ms |
166452 KB |
Output is correct |
37 |
Correct |
106 ms |
176792 KB |
Output is correct |
38 |
Correct |
98 ms |
167200 KB |
Output is correct |
39 |
Correct |
99 ms |
167252 KB |
Output is correct |
40 |
Correct |
106 ms |
167236 KB |
Output is correct |
41 |
Correct |
101 ms |
167132 KB |
Output is correct |
42 |
Correct |
97 ms |
167184 KB |
Output is correct |
43 |
Correct |
100 ms |
167520 KB |
Output is correct |
44 |
Correct |
96 ms |
167212 KB |
Output is correct |
45 |
Correct |
122 ms |
180524 KB |
Output is correct |
46 |
Correct |
109 ms |
180288 KB |
Output is correct |
47 |
Correct |
108 ms |
173344 KB |
Output is correct |
48 |
Correct |
98 ms |
167760 KB |
Output is correct |
49 |
Correct |
96 ms |
167504 KB |
Output is correct |
50 |
Correct |
97 ms |
167448 KB |
Output is correct |
51 |
Correct |
97 ms |
167364 KB |
Output is correct |
52 |
Correct |
94 ms |
167252 KB |
Output is correct |
53 |
Correct |
93 ms |
167248 KB |
Output is correct |
54 |
Correct |
97 ms |
167096 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
99 ms |
164756 KB |
Output is correct |
2 |
Correct |
92 ms |
164712 KB |
Output is correct |
3 |
Correct |
93 ms |
164692 KB |
Output is correct |
4 |
Correct |
93 ms |
164688 KB |
Output is correct |
5 |
Correct |
92 ms |
164868 KB |
Output is correct |
6 |
Correct |
94 ms |
164688 KB |
Output is correct |
7 |
Correct |
91 ms |
164680 KB |
Output is correct |
8 |
Correct |
91 ms |
164812 KB |
Output is correct |
9 |
Correct |
92 ms |
164772 KB |
Output is correct |
10 |
Correct |
91 ms |
164696 KB |
Output is correct |
11 |
Correct |
90 ms |
164868 KB |
Output is correct |
12 |
Correct |
91 ms |
164692 KB |
Output is correct |
13 |
Correct |
92 ms |
164688 KB |
Output is correct |
14 |
Correct |
93 ms |
164688 KB |
Output is correct |
15 |
Correct |
94 ms |
165044 KB |
Output is correct |
16 |
Correct |
96 ms |
164836 KB |
Output is correct |
17 |
Correct |
93 ms |
164948 KB |
Output is correct |
18 |
Correct |
100 ms |
164804 KB |
Output is correct |
19 |
Correct |
91 ms |
164692 KB |
Output is correct |
20 |
Correct |
93 ms |
164692 KB |
Output is correct |
21 |
Correct |
93 ms |
164688 KB |
Output is correct |
22 |
Correct |
91 ms |
164688 KB |
Output is correct |
23 |
Correct |
92 ms |
164688 KB |
Output is correct |
24 |
Correct |
92 ms |
164708 KB |
Output is correct |
25 |
Correct |
94 ms |
164692 KB |
Output is correct |
26 |
Correct |
92 ms |
164620 KB |
Output is correct |
27 |
Correct |
93 ms |
164696 KB |
Output is correct |
28 |
Correct |
91 ms |
164692 KB |
Output is correct |
29 |
Correct |
96 ms |
164640 KB |
Output is correct |
30 |
Correct |
93 ms |
164692 KB |
Output is correct |
31 |
Correct |
92 ms |
164728 KB |
Output is correct |
32 |
Correct |
94 ms |
164768 KB |
Output is correct |
33 |
Correct |
101 ms |
167280 KB |
Output is correct |
34 |
Correct |
94 ms |
164988 KB |
Output is correct |
35 |
Correct |
93 ms |
165456 KB |
Output is correct |
36 |
Correct |
93 ms |
166452 KB |
Output is correct |
37 |
Correct |
106 ms |
176792 KB |
Output is correct |
38 |
Correct |
98 ms |
167200 KB |
Output is correct |
39 |
Correct |
99 ms |
167252 KB |
Output is correct |
40 |
Correct |
106 ms |
167236 KB |
Output is correct |
41 |
Correct |
101 ms |
167132 KB |
Output is correct |
42 |
Correct |
97 ms |
167184 KB |
Output is correct |
43 |
Correct |
100 ms |
167520 KB |
Output is correct |
44 |
Correct |
96 ms |
167212 KB |
Output is correct |
45 |
Correct |
122 ms |
180524 KB |
Output is correct |
46 |
Correct |
109 ms |
180288 KB |
Output is correct |
47 |
Correct |
108 ms |
173344 KB |
Output is correct |
48 |
Correct |
98 ms |
167760 KB |
Output is correct |
49 |
Correct |
96 ms |
167504 KB |
Output is correct |
50 |
Correct |
97 ms |
167448 KB |
Output is correct |
51 |
Correct |
97 ms |
167364 KB |
Output is correct |
52 |
Correct |
94 ms |
167252 KB |
Output is correct |
53 |
Correct |
93 ms |
167248 KB |
Output is correct |
54 |
Correct |
97 ms |
167096 KB |
Output is correct |
55 |
Correct |
123 ms |
170828 KB |
Output is correct |
56 |
Correct |
104 ms |
173392 KB |
Output is correct |
57 |
Correct |
108 ms |
169652 KB |
Output is correct |
58 |
Correct |
113 ms |
172404 KB |
Output is correct |
59 |
Correct |
115 ms |
171008 KB |
Output is correct |
60 |
Correct |
118 ms |
170772 KB |
Output is correct |
61 |
Correct |
121 ms |
170924 KB |
Output is correct |
62 |
Correct |
108 ms |
170816 KB |
Output is correct |
63 |
Correct |
108 ms |
170896 KB |
Output is correct |
64 |
Correct |
102 ms |
170892 KB |
Output is correct |
65 |
Correct |
130 ms |
203764 KB |
Output is correct |
66 |
Correct |
136 ms |
203636 KB |
Output is correct |
67 |
Correct |
122 ms |
186196 KB |
Output is correct |
68 |
Correct |
108 ms |
172368 KB |
Output is correct |
69 |
Correct |
108 ms |
171600 KB |
Output is correct |
70 |
Correct |
109 ms |
171272 KB |
Output is correct |
71 |
Correct |
110 ms |
171096 KB |
Output is correct |
72 |
Correct |
109 ms |
170836 KB |
Output is correct |
73 |
Correct |
115 ms |
170816 KB |
Output is correct |
74 |
Correct |
101 ms |
170968 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
94 ms |
164692 KB |
Output is correct |
2 |
Correct |
92 ms |
164688 KB |
Output is correct |
3 |
Correct |
92 ms |
164700 KB |
Output is correct |
4 |
Correct |
92 ms |
164856 KB |
Output is correct |
5 |
Correct |
92 ms |
164812 KB |
Output is correct |
6 |
Correct |
92 ms |
164804 KB |
Output is correct |
7 |
Correct |
92 ms |
165204 KB |
Output is correct |
8 |
Correct |
92 ms |
164916 KB |
Output is correct |
9 |
Correct |
91 ms |
164692 KB |
Output is correct |
10 |
Correct |
93 ms |
164708 KB |
Output is correct |
11 |
Correct |
91 ms |
164812 KB |
Output is correct |
12 |
Correct |
93 ms |
164944 KB |
Output is correct |
13 |
Correct |
92 ms |
164692 KB |
Output is correct |
14 |
Correct |
94 ms |
164688 KB |
Output is correct |
15 |
Correct |
91 ms |
164784 KB |
Output is correct |
16 |
Correct |
91 ms |
164968 KB |
Output is correct |
17 |
Correct |
100 ms |
164816 KB |
Output is correct |
18 |
Correct |
91 ms |
164864 KB |
Output is correct |
19 |
Correct |
101 ms |
167156 KB |
Output is correct |
20 |
Correct |
106 ms |
176696 KB |
Output is correct |
21 |
Correct |
97 ms |
167260 KB |
Output is correct |
22 |
Correct |
102 ms |
167252 KB |
Output is correct |
23 |
Correct |
103 ms |
167156 KB |
Output is correct |
24 |
Correct |
109 ms |
180328 KB |
Output is correct |
25 |
Correct |
109 ms |
180448 KB |
Output is correct |
26 |
Correct |
104 ms |
167324 KB |
Output is correct |
27 |
Correct |
94 ms |
167248 KB |
Output is correct |
28 |
Correct |
96 ms |
167248 KB |
Output is correct |
29 |
Correct |
121 ms |
170836 KB |
Output is correct |
30 |
Correct |
110 ms |
173396 KB |
Output is correct |
31 |
Correct |
108 ms |
170916 KB |
Output is correct |
32 |
Correct |
119 ms |
170832 KB |
Output is correct |
33 |
Correct |
120 ms |
170832 KB |
Output is correct |
34 |
Correct |
136 ms |
203972 KB |
Output is correct |
35 |
Correct |
138 ms |
203636 KB |
Output is correct |
36 |
Correct |
110 ms |
170836 KB |
Output is correct |
37 |
Correct |
118 ms |
170836 KB |
Output is correct |
38 |
Correct |
96 ms |
170836 KB |
Output is correct |
39 |
Correct |
636 ms |
225360 KB |
Output is correct |
40 |
Correct |
107 ms |
173380 KB |
Output is correct |
41 |
Correct |
138 ms |
212676 KB |
Output is correct |
42 |
Correct |
135 ms |
173648 KB |
Output is correct |
43 |
Correct |
140 ms |
199324 KB |
Output is correct |
44 |
Correct |
167 ms |
219836 KB |
Output is correct |
45 |
Correct |
186 ms |
232240 KB |
Output is correct |
46 |
Correct |
357 ms |
225356 KB |
Output is correct |
47 |
Correct |
492 ms |
225360 KB |
Output is correct |
48 |
Correct |
546 ms |
225576 KB |
Output is correct |
49 |
Correct |
488 ms |
555184 KB |
Output is correct |
50 |
Correct |
487 ms |
555188 KB |
Output is correct |
51 |
Correct |
427 ms |
225776 KB |
Output is correct |
52 |
Correct |
340 ms |
225360 KB |
Output is correct |
53 |
Correct |
526 ms |
225776 KB |
Output is correct |
54 |
Correct |
99 ms |
164756 KB |
Output is correct |
55 |
Correct |
92 ms |
164712 KB |
Output is correct |
56 |
Correct |
93 ms |
164692 KB |
Output is correct |
57 |
Correct |
93 ms |
164688 KB |
Output is correct |
58 |
Correct |
92 ms |
164868 KB |
Output is correct |
59 |
Correct |
94 ms |
164688 KB |
Output is correct |
60 |
Correct |
91 ms |
164680 KB |
Output is correct |
61 |
Correct |
91 ms |
164812 KB |
Output is correct |
62 |
Correct |
92 ms |
164772 KB |
Output is correct |
63 |
Correct |
91 ms |
164696 KB |
Output is correct |
64 |
Correct |
90 ms |
164868 KB |
Output is correct |
65 |
Correct |
91 ms |
164692 KB |
Output is correct |
66 |
Correct |
92 ms |
164688 KB |
Output is correct |
67 |
Correct |
93 ms |
164688 KB |
Output is correct |
68 |
Correct |
94 ms |
165044 KB |
Output is correct |
69 |
Correct |
96 ms |
164836 KB |
Output is correct |
70 |
Correct |
93 ms |
164948 KB |
Output is correct |
71 |
Correct |
100 ms |
164804 KB |
Output is correct |
72 |
Correct |
91 ms |
164692 KB |
Output is correct |
73 |
Correct |
93 ms |
164692 KB |
Output is correct |
74 |
Correct |
93 ms |
164688 KB |
Output is correct |
75 |
Correct |
91 ms |
164688 KB |
Output is correct |
76 |
Correct |
92 ms |
164688 KB |
Output is correct |
77 |
Correct |
92 ms |
164708 KB |
Output is correct |
78 |
Correct |
94 ms |
164692 KB |
Output is correct |
79 |
Correct |
92 ms |
164620 KB |
Output is correct |
80 |
Correct |
93 ms |
164696 KB |
Output is correct |
81 |
Correct |
91 ms |
164692 KB |
Output is correct |
82 |
Correct |
96 ms |
164640 KB |
Output is correct |
83 |
Correct |
93 ms |
164692 KB |
Output is correct |
84 |
Correct |
92 ms |
164728 KB |
Output is correct |
85 |
Correct |
94 ms |
164768 KB |
Output is correct |
86 |
Correct |
92 ms |
164688 KB |
Output is correct |
87 |
Correct |
92 ms |
164596 KB |
Output is correct |
88 |
Correct |
92 ms |
164816 KB |
Output is correct |
89 |
Correct |
92 ms |
164688 KB |
Output is correct |
90 |
Correct |
91 ms |
164692 KB |
Output is correct |
91 |
Correct |
94 ms |
164968 KB |
Output is correct |
92 |
Correct |
93 ms |
164688 KB |
Output is correct |
93 |
Correct |
92 ms |
164688 KB |
Output is correct |
94 |
Correct |
92 ms |
164688 KB |
Output is correct |
95 |
Correct |
94 ms |
165060 KB |
Output is correct |
96 |
Correct |
92 ms |
164692 KB |
Output is correct |
97 |
Correct |
93 ms |
164948 KB |
Output is correct |
98 |
Correct |
92 ms |
164692 KB |
Output is correct |
99 |
Correct |
91 ms |
164816 KB |
Output is correct |
100 |
Correct |
93 ms |
164596 KB |
Output is correct |
101 |
Correct |
93 ms |
164688 KB |
Output is correct |
102 |
Correct |
92 ms |
164612 KB |
Output is correct |
103 |
Correct |
93 ms |
164768 KB |
Output is correct |
104 |
Correct |
96 ms |
164912 KB |
Output is correct |
105 |
Correct |
90 ms |
164620 KB |
Output is correct |
106 |
Correct |
93 ms |
164692 KB |
Output is correct |
107 |
Correct |
90 ms |
164692 KB |
Output is correct |
108 |
Correct |
99 ms |
164688 KB |
Output is correct |
109 |
Correct |
96 ms |
164684 KB |
Output is correct |
110 |
Correct |
96 ms |
166324 KB |
Output is correct |
111 |
Correct |
99 ms |
166996 KB |
Output is correct |
112 |
Correct |
97 ms |
167248 KB |
Output is correct |
113 |
Correct |
98 ms |
167564 KB |
Output is correct |
114 |
Correct |
97 ms |
167180 KB |
Output is correct |
115 |
Correct |
96 ms |
167252 KB |
Output is correct |
116 |
Correct |
98 ms |
167384 KB |
Output is correct |
117 |
Correct |
94 ms |
167248 KB |
Output is correct |
118 |
Correct |
100 ms |
167328 KB |
Output is correct |
119 |
Correct |
107 ms |
169808 KB |
Output is correct |
120 |
Correct |
106 ms |
170836 KB |
Output is correct |
121 |
Correct |
108 ms |
170836 KB |
Output is correct |
122 |
Correct |
105 ms |
171088 KB |
Output is correct |
123 |
Correct |
102 ms |
170800 KB |
Output is correct |
124 |
Correct |
164 ms |
182352 KB |
Output is correct |
125 |
Correct |
284 ms |
218084 KB |
Output is correct |
126 |
Correct |
351 ms |
225540 KB |
Output is correct |
127 |
Correct |
338 ms |
225360 KB |
Output is correct |
128 |
Correct |
297 ms |
225592 KB |
Output is correct |
129 |
Correct |
269 ms |
225364 KB |
Output is correct |
130 |
Correct |
286 ms |
228692 KB |
Output is correct |
131 |
Correct |
292 ms |
227728 KB |
Output is correct |
132 |
Correct |
101 ms |
167280 KB |
Output is correct |
133 |
Correct |
94 ms |
164988 KB |
Output is correct |
134 |
Correct |
93 ms |
165456 KB |
Output is correct |
135 |
Correct |
93 ms |
166452 KB |
Output is correct |
136 |
Correct |
106 ms |
176792 KB |
Output is correct |
137 |
Correct |
98 ms |
167200 KB |
Output is correct |
138 |
Correct |
99 ms |
167252 KB |
Output is correct |
139 |
Correct |
106 ms |
167236 KB |
Output is correct |
140 |
Correct |
101 ms |
167132 KB |
Output is correct |
141 |
Correct |
97 ms |
167184 KB |
Output is correct |
142 |
Correct |
100 ms |
167520 KB |
Output is correct |
143 |
Correct |
96 ms |
167212 KB |
Output is correct |
144 |
Correct |
122 ms |
180524 KB |
Output is correct |
145 |
Correct |
109 ms |
180288 KB |
Output is correct |
146 |
Correct |
108 ms |
173344 KB |
Output is correct |
147 |
Correct |
98 ms |
167760 KB |
Output is correct |
148 |
Correct |
96 ms |
167504 KB |
Output is correct |
149 |
Correct |
97 ms |
167448 KB |
Output is correct |
150 |
Correct |
97 ms |
167364 KB |
Output is correct |
151 |
Correct |
94 ms |
167252 KB |
Output is correct |
152 |
Correct |
93 ms |
167248 KB |
Output is correct |
153 |
Correct |
97 ms |
167096 KB |
Output is correct |
154 |
Correct |
123 ms |
170828 KB |
Output is correct |
155 |
Correct |
104 ms |
173392 KB |
Output is correct |
156 |
Correct |
108 ms |
169652 KB |
Output is correct |
157 |
Correct |
113 ms |
172404 KB |
Output is correct |
158 |
Correct |
115 ms |
171008 KB |
Output is correct |
159 |
Correct |
118 ms |
170772 KB |
Output is correct |
160 |
Correct |
121 ms |
170924 KB |
Output is correct |
161 |
Correct |
108 ms |
170816 KB |
Output is correct |
162 |
Correct |
108 ms |
170896 KB |
Output is correct |
163 |
Correct |
102 ms |
170892 KB |
Output is correct |
164 |
Correct |
130 ms |
203764 KB |
Output is correct |
165 |
Correct |
136 ms |
203636 KB |
Output is correct |
166 |
Correct |
122 ms |
186196 KB |
Output is correct |
167 |
Correct |
108 ms |
172368 KB |
Output is correct |
168 |
Correct |
108 ms |
171600 KB |
Output is correct |
169 |
Correct |
109 ms |
171272 KB |
Output is correct |
170 |
Correct |
110 ms |
171096 KB |
Output is correct |
171 |
Correct |
109 ms |
170836 KB |
Output is correct |
172 |
Correct |
115 ms |
170816 KB |
Output is correct |
173 |
Correct |
101 ms |
170968 KB |
Output is correct |
174 |
Correct |
119 ms |
175976 KB |
Output is correct |
175 |
Correct |
129 ms |
179680 KB |
Output is correct |
176 |
Correct |
186 ms |
243308 KB |
Output is correct |
177 |
Correct |
197 ms |
214440 KB |
Output is correct |
178 |
Correct |
140 ms |
224964 KB |
Output is correct |
179 |
Correct |
209 ms |
232224 KB |
Output is correct |
180 |
Correct |
256 ms |
228408 KB |
Output is correct |
181 |
Correct |
268 ms |
227732 KB |
Output is correct |
182 |
Correct |
261 ms |
226804 KB |
Output is correct |
183 |
Correct |
290 ms |
232652 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
94 ms |
164692 KB |
Output is correct |
2 |
Correct |
92 ms |
164688 KB |
Output is correct |
3 |
Correct |
92 ms |
164700 KB |
Output is correct |
4 |
Correct |
92 ms |
164856 KB |
Output is correct |
5 |
Correct |
92 ms |
164812 KB |
Output is correct |
6 |
Correct |
92 ms |
164804 KB |
Output is correct |
7 |
Correct |
92 ms |
165204 KB |
Output is correct |
8 |
Correct |
92 ms |
164916 KB |
Output is correct |
9 |
Correct |
91 ms |
164692 KB |
Output is correct |
10 |
Correct |
93 ms |
164708 KB |
Output is correct |
11 |
Correct |
91 ms |
164812 KB |
Output is correct |
12 |
Correct |
93 ms |
164944 KB |
Output is correct |
13 |
Correct |
92 ms |
164692 KB |
Output is correct |
14 |
Correct |
94 ms |
164688 KB |
Output is correct |
15 |
Correct |
91 ms |
164784 KB |
Output is correct |
16 |
Correct |
91 ms |
164968 KB |
Output is correct |
17 |
Correct |
100 ms |
164816 KB |
Output is correct |
18 |
Correct |
91 ms |
164864 KB |
Output is correct |
19 |
Correct |
101 ms |
167156 KB |
Output is correct |
20 |
Correct |
106 ms |
176696 KB |
Output is correct |
21 |
Correct |
97 ms |
167260 KB |
Output is correct |
22 |
Correct |
102 ms |
167252 KB |
Output is correct |
23 |
Correct |
103 ms |
167156 KB |
Output is correct |
24 |
Correct |
109 ms |
180328 KB |
Output is correct |
25 |
Correct |
109 ms |
180448 KB |
Output is correct |
26 |
Correct |
104 ms |
167324 KB |
Output is correct |
27 |
Correct |
94 ms |
167248 KB |
Output is correct |
28 |
Correct |
96 ms |
167248 KB |
Output is correct |
29 |
Correct |
121 ms |
170836 KB |
Output is correct |
30 |
Correct |
110 ms |
173396 KB |
Output is correct |
31 |
Correct |
108 ms |
170916 KB |
Output is correct |
32 |
Correct |
119 ms |
170832 KB |
Output is correct |
33 |
Correct |
120 ms |
170832 KB |
Output is correct |
34 |
Correct |
136 ms |
203972 KB |
Output is correct |
35 |
Correct |
138 ms |
203636 KB |
Output is correct |
36 |
Correct |
110 ms |
170836 KB |
Output is correct |
37 |
Correct |
118 ms |
170836 KB |
Output is correct |
38 |
Correct |
96 ms |
170836 KB |
Output is correct |
39 |
Correct |
636 ms |
225360 KB |
Output is correct |
40 |
Correct |
107 ms |
173380 KB |
Output is correct |
41 |
Correct |
138 ms |
212676 KB |
Output is correct |
42 |
Correct |
135 ms |
173648 KB |
Output is correct |
43 |
Correct |
140 ms |
199324 KB |
Output is correct |
44 |
Correct |
167 ms |
219836 KB |
Output is correct |
45 |
Correct |
186 ms |
232240 KB |
Output is correct |
46 |
Correct |
357 ms |
225356 KB |
Output is correct |
47 |
Correct |
492 ms |
225360 KB |
Output is correct |
48 |
Correct |
546 ms |
225576 KB |
Output is correct |
49 |
Correct |
488 ms |
555184 KB |
Output is correct |
50 |
Correct |
487 ms |
555188 KB |
Output is correct |
51 |
Correct |
427 ms |
225776 KB |
Output is correct |
52 |
Correct |
340 ms |
225360 KB |
Output is correct |
53 |
Correct |
526 ms |
225776 KB |
Output is correct |
54 |
Correct |
99 ms |
164756 KB |
Output is correct |
55 |
Correct |
92 ms |
164712 KB |
Output is correct |
56 |
Correct |
93 ms |
164692 KB |
Output is correct |
57 |
Correct |
93 ms |
164688 KB |
Output is correct |
58 |
Correct |
92 ms |
164868 KB |
Output is correct |
59 |
Correct |
94 ms |
164688 KB |
Output is correct |
60 |
Correct |
91 ms |
164680 KB |
Output is correct |
61 |
Correct |
91 ms |
164812 KB |
Output is correct |
62 |
Correct |
92 ms |
164772 KB |
Output is correct |
63 |
Correct |
91 ms |
164696 KB |
Output is correct |
64 |
Correct |
90 ms |
164868 KB |
Output is correct |
65 |
Correct |
91 ms |
164692 KB |
Output is correct |
66 |
Correct |
92 ms |
164688 KB |
Output is correct |
67 |
Correct |
93 ms |
164688 KB |
Output is correct |
68 |
Correct |
94 ms |
165044 KB |
Output is correct |
69 |
Correct |
96 ms |
164836 KB |
Output is correct |
70 |
Correct |
93 ms |
164948 KB |
Output is correct |
71 |
Correct |
100 ms |
164804 KB |
Output is correct |
72 |
Correct |
91 ms |
164692 KB |
Output is correct |
73 |
Correct |
93 ms |
164692 KB |
Output is correct |
74 |
Correct |
93 ms |
164688 KB |
Output is correct |
75 |
Correct |
91 ms |
164688 KB |
Output is correct |
76 |
Correct |
92 ms |
164688 KB |
Output is correct |
77 |
Correct |
92 ms |
164708 KB |
Output is correct |
78 |
Correct |
94 ms |
164692 KB |
Output is correct |
79 |
Correct |
92 ms |
164620 KB |
Output is correct |
80 |
Correct |
93 ms |
164696 KB |
Output is correct |
81 |
Correct |
91 ms |
164692 KB |
Output is correct |
82 |
Correct |
96 ms |
164640 KB |
Output is correct |
83 |
Correct |
93 ms |
164692 KB |
Output is correct |
84 |
Correct |
92 ms |
164728 KB |
Output is correct |
85 |
Correct |
94 ms |
164768 KB |
Output is correct |
86 |
Correct |
92 ms |
164688 KB |
Output is correct |
87 |
Correct |
92 ms |
164596 KB |
Output is correct |
88 |
Correct |
92 ms |
164816 KB |
Output is correct |
89 |
Correct |
92 ms |
164688 KB |
Output is correct |
90 |
Correct |
91 ms |
164692 KB |
Output is correct |
91 |
Correct |
94 ms |
164968 KB |
Output is correct |
92 |
Correct |
93 ms |
164688 KB |
Output is correct |
93 |
Correct |
92 ms |
164688 KB |
Output is correct |
94 |
Correct |
92 ms |
164688 KB |
Output is correct |
95 |
Correct |
94 ms |
165060 KB |
Output is correct |
96 |
Correct |
92 ms |
164692 KB |
Output is correct |
97 |
Correct |
93 ms |
164948 KB |
Output is correct |
98 |
Correct |
92 ms |
164692 KB |
Output is correct |
99 |
Correct |
91 ms |
164816 KB |
Output is correct |
100 |
Correct |
93 ms |
164596 KB |
Output is correct |
101 |
Correct |
93 ms |
164688 KB |
Output is correct |
102 |
Correct |
92 ms |
164612 KB |
Output is correct |
103 |
Correct |
93 ms |
164768 KB |
Output is correct |
104 |
Correct |
96 ms |
164912 KB |
Output is correct |
105 |
Correct |
90 ms |
164620 KB |
Output is correct |
106 |
Correct |
93 ms |
164692 KB |
Output is correct |
107 |
Correct |
90 ms |
164692 KB |
Output is correct |
108 |
Correct |
99 ms |
164688 KB |
Output is correct |
109 |
Correct |
96 ms |
164684 KB |
Output is correct |
110 |
Correct |
96 ms |
166324 KB |
Output is correct |
111 |
Correct |
99 ms |
166996 KB |
Output is correct |
112 |
Correct |
97 ms |
167248 KB |
Output is correct |
113 |
Correct |
98 ms |
167564 KB |
Output is correct |
114 |
Correct |
97 ms |
167180 KB |
Output is correct |
115 |
Correct |
96 ms |
167252 KB |
Output is correct |
116 |
Correct |
98 ms |
167384 KB |
Output is correct |
117 |
Correct |
94 ms |
167248 KB |
Output is correct |
118 |
Correct |
100 ms |
167328 KB |
Output is correct |
119 |
Correct |
107 ms |
169808 KB |
Output is correct |
120 |
Correct |
106 ms |
170836 KB |
Output is correct |
121 |
Correct |
108 ms |
170836 KB |
Output is correct |
122 |
Correct |
105 ms |
171088 KB |
Output is correct |
123 |
Correct |
102 ms |
170800 KB |
Output is correct |
124 |
Correct |
164 ms |
182352 KB |
Output is correct |
125 |
Correct |
284 ms |
218084 KB |
Output is correct |
126 |
Correct |
351 ms |
225540 KB |
Output is correct |
127 |
Correct |
338 ms |
225360 KB |
Output is correct |
128 |
Correct |
297 ms |
225592 KB |
Output is correct |
129 |
Correct |
269 ms |
225364 KB |
Output is correct |
130 |
Correct |
286 ms |
228692 KB |
Output is correct |
131 |
Correct |
292 ms |
227728 KB |
Output is correct |
132 |
Correct |
101 ms |
167280 KB |
Output is correct |
133 |
Correct |
94 ms |
164988 KB |
Output is correct |
134 |
Correct |
93 ms |
165456 KB |
Output is correct |
135 |
Correct |
93 ms |
166452 KB |
Output is correct |
136 |
Correct |
106 ms |
176792 KB |
Output is correct |
137 |
Correct |
98 ms |
167200 KB |
Output is correct |
138 |
Correct |
99 ms |
167252 KB |
Output is correct |
139 |
Correct |
106 ms |
167236 KB |
Output is correct |
140 |
Correct |
101 ms |
167132 KB |
Output is correct |
141 |
Correct |
97 ms |
167184 KB |
Output is correct |
142 |
Correct |
100 ms |
167520 KB |
Output is correct |
143 |
Correct |
96 ms |
167212 KB |
Output is correct |
144 |
Correct |
122 ms |
180524 KB |
Output is correct |
145 |
Correct |
109 ms |
180288 KB |
Output is correct |
146 |
Correct |
108 ms |
173344 KB |
Output is correct |
147 |
Correct |
98 ms |
167760 KB |
Output is correct |
148 |
Correct |
96 ms |
167504 KB |
Output is correct |
149 |
Correct |
97 ms |
167448 KB |
Output is correct |
150 |
Correct |
97 ms |
167364 KB |
Output is correct |
151 |
Correct |
94 ms |
167252 KB |
Output is correct |
152 |
Correct |
93 ms |
167248 KB |
Output is correct |
153 |
Correct |
97 ms |
167096 KB |
Output is correct |
154 |
Correct |
123 ms |
170828 KB |
Output is correct |
155 |
Correct |
104 ms |
173392 KB |
Output is correct |
156 |
Correct |
108 ms |
169652 KB |
Output is correct |
157 |
Correct |
113 ms |
172404 KB |
Output is correct |
158 |
Correct |
115 ms |
171008 KB |
Output is correct |
159 |
Correct |
118 ms |
170772 KB |
Output is correct |
160 |
Correct |
121 ms |
170924 KB |
Output is correct |
161 |
Correct |
108 ms |
170816 KB |
Output is correct |
162 |
Correct |
108 ms |
170896 KB |
Output is correct |
163 |
Correct |
102 ms |
170892 KB |
Output is correct |
164 |
Correct |
130 ms |
203764 KB |
Output is correct |
165 |
Correct |
136 ms |
203636 KB |
Output is correct |
166 |
Correct |
122 ms |
186196 KB |
Output is correct |
167 |
Correct |
108 ms |
172368 KB |
Output is correct |
168 |
Correct |
108 ms |
171600 KB |
Output is correct |
169 |
Correct |
109 ms |
171272 KB |
Output is correct |
170 |
Correct |
110 ms |
171096 KB |
Output is correct |
171 |
Correct |
109 ms |
170836 KB |
Output is correct |
172 |
Correct |
115 ms |
170816 KB |
Output is correct |
173 |
Correct |
101 ms |
170968 KB |
Output is correct |
174 |
Correct |
119 ms |
175976 KB |
Output is correct |
175 |
Correct |
129 ms |
179680 KB |
Output is correct |
176 |
Correct |
186 ms |
243308 KB |
Output is correct |
177 |
Correct |
197 ms |
214440 KB |
Output is correct |
178 |
Correct |
140 ms |
224964 KB |
Output is correct |
179 |
Correct |
209 ms |
232224 KB |
Output is correct |
180 |
Correct |
256 ms |
228408 KB |
Output is correct |
181 |
Correct |
268 ms |
227732 KB |
Output is correct |
182 |
Correct |
261 ms |
226804 KB |
Output is correct |
183 |
Correct |
290 ms |
232652 KB |
Output is correct |
184 |
Correct |
1386 ms |
285960 KB |
Output is correct |
185 |
Correct |
184 ms |
240720 KB |
Output is correct |
186 |
Correct |
388 ms |
235604 KB |
Output is correct |
187 |
Correct |
176 ms |
251204 KB |
Output is correct |
188 |
Correct |
631 ms |
285920 KB |
Output is correct |
189 |
Correct |
864 ms |
286036 KB |
Output is correct |
190 |
Correct |
561 ms |
285964 KB |
Output is correct |
191 |
Correct |
637 ms |
286036 KB |
Output is correct |
192 |
Correct |
467 ms |
285776 KB |
Output is correct |
193 |
Correct |
482 ms |
285776 KB |
Output is correct |
194 |
Correct |
999 ms |
945680 KB |
Output is correct |
195 |
Correct |
905 ms |
945508 KB |
Output is correct |
196 |
Correct |
447 ms |
296912 KB |
Output is correct |
197 |
Correct |
306 ms |
292048 KB |
Output is correct |
198 |
Correct |
297 ms |
289104 KB |
Output is correct |
199 |
Correct |
435 ms |
287316 KB |
Output is correct |
200 |
Correct |
582 ms |
286036 KB |
Output is correct |
201 |
Correct |
884 ms |
285956 KB |
Output is correct |
202 |
Correct |
1302 ms |
286036 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
94 ms |
164692 KB |
Output is correct |
2 |
Correct |
92 ms |
164688 KB |
Output is correct |
3 |
Correct |
92 ms |
164700 KB |
Output is correct |
4 |
Correct |
92 ms |
164856 KB |
Output is correct |
5 |
Correct |
92 ms |
164812 KB |
Output is correct |
6 |
Correct |
92 ms |
164804 KB |
Output is correct |
7 |
Correct |
92 ms |
165204 KB |
Output is correct |
8 |
Correct |
92 ms |
164916 KB |
Output is correct |
9 |
Correct |
91 ms |
164692 KB |
Output is correct |
10 |
Correct |
93 ms |
164708 KB |
Output is correct |
11 |
Correct |
91 ms |
164812 KB |
Output is correct |
12 |
Correct |
93 ms |
164944 KB |
Output is correct |
13 |
Correct |
92 ms |
164692 KB |
Output is correct |
14 |
Correct |
94 ms |
164688 KB |
Output is correct |
15 |
Correct |
91 ms |
164784 KB |
Output is correct |
16 |
Correct |
91 ms |
164968 KB |
Output is correct |
17 |
Correct |
100 ms |
164816 KB |
Output is correct |
18 |
Correct |
91 ms |
164864 KB |
Output is correct |
19 |
Correct |
101 ms |
167156 KB |
Output is correct |
20 |
Correct |
106 ms |
176696 KB |
Output is correct |
21 |
Correct |
97 ms |
167260 KB |
Output is correct |
22 |
Correct |
102 ms |
167252 KB |
Output is correct |
23 |
Correct |
103 ms |
167156 KB |
Output is correct |
24 |
Correct |
109 ms |
180328 KB |
Output is correct |
25 |
Correct |
109 ms |
180448 KB |
Output is correct |
26 |
Correct |
104 ms |
167324 KB |
Output is correct |
27 |
Correct |
94 ms |
167248 KB |
Output is correct |
28 |
Correct |
96 ms |
167248 KB |
Output is correct |
29 |
Correct |
121 ms |
170836 KB |
Output is correct |
30 |
Correct |
110 ms |
173396 KB |
Output is correct |
31 |
Correct |
108 ms |
170916 KB |
Output is correct |
32 |
Correct |
119 ms |
170832 KB |
Output is correct |
33 |
Correct |
120 ms |
170832 KB |
Output is correct |
34 |
Correct |
136 ms |
203972 KB |
Output is correct |
35 |
Correct |
138 ms |
203636 KB |
Output is correct |
36 |
Correct |
110 ms |
170836 KB |
Output is correct |
37 |
Correct |
118 ms |
170836 KB |
Output is correct |
38 |
Correct |
96 ms |
170836 KB |
Output is correct |
39 |
Correct |
636 ms |
225360 KB |
Output is correct |
40 |
Correct |
107 ms |
173380 KB |
Output is correct |
41 |
Correct |
138 ms |
212676 KB |
Output is correct |
42 |
Correct |
135 ms |
173648 KB |
Output is correct |
43 |
Correct |
140 ms |
199324 KB |
Output is correct |
44 |
Correct |
167 ms |
219836 KB |
Output is correct |
45 |
Correct |
186 ms |
232240 KB |
Output is correct |
46 |
Correct |
357 ms |
225356 KB |
Output is correct |
47 |
Correct |
492 ms |
225360 KB |
Output is correct |
48 |
Correct |
546 ms |
225576 KB |
Output is correct |
49 |
Correct |
488 ms |
555184 KB |
Output is correct |
50 |
Correct |
487 ms |
555188 KB |
Output is correct |
51 |
Correct |
427 ms |
225776 KB |
Output is correct |
52 |
Correct |
340 ms |
225360 KB |
Output is correct |
53 |
Correct |
526 ms |
225776 KB |
Output is correct |
54 |
Correct |
99 ms |
164756 KB |
Output is correct |
55 |
Correct |
92 ms |
164712 KB |
Output is correct |
56 |
Correct |
93 ms |
164692 KB |
Output is correct |
57 |
Correct |
93 ms |
164688 KB |
Output is correct |
58 |
Correct |
92 ms |
164868 KB |
Output is correct |
59 |
Correct |
94 ms |
164688 KB |
Output is correct |
60 |
Correct |
91 ms |
164680 KB |
Output is correct |
61 |
Correct |
91 ms |
164812 KB |
Output is correct |
62 |
Correct |
92 ms |
164772 KB |
Output is correct |
63 |
Correct |
91 ms |
164696 KB |
Output is correct |
64 |
Correct |
90 ms |
164868 KB |
Output is correct |
65 |
Correct |
91 ms |
164692 KB |
Output is correct |
66 |
Correct |
92 ms |
164688 KB |
Output is correct |
67 |
Correct |
93 ms |
164688 KB |
Output is correct |
68 |
Correct |
94 ms |
165044 KB |
Output is correct |
69 |
Correct |
96 ms |
164836 KB |
Output is correct |
70 |
Correct |
93 ms |
164948 KB |
Output is correct |
71 |
Correct |
100 ms |
164804 KB |
Output is correct |
72 |
Correct |
91 ms |
164692 KB |
Output is correct |
73 |
Correct |
93 ms |
164692 KB |
Output is correct |
74 |
Correct |
93 ms |
164688 KB |
Output is correct |
75 |
Correct |
91 ms |
164688 KB |
Output is correct |
76 |
Correct |
92 ms |
164688 KB |
Output is correct |
77 |
Correct |
92 ms |
164708 KB |
Output is correct |
78 |
Correct |
94 ms |
164692 KB |
Output is correct |
79 |
Correct |
92 ms |
164620 KB |
Output is correct |
80 |
Correct |
93 ms |
164696 KB |
Output is correct |
81 |
Correct |
91 ms |
164692 KB |
Output is correct |
82 |
Correct |
96 ms |
164640 KB |
Output is correct |
83 |
Correct |
93 ms |
164692 KB |
Output is correct |
84 |
Correct |
92 ms |
164728 KB |
Output is correct |
85 |
Correct |
94 ms |
164768 KB |
Output is correct |
86 |
Correct |
92 ms |
164688 KB |
Output is correct |
87 |
Correct |
92 ms |
164596 KB |
Output is correct |
88 |
Correct |
92 ms |
164816 KB |
Output is correct |
89 |
Correct |
92 ms |
164688 KB |
Output is correct |
90 |
Correct |
91 ms |
164692 KB |
Output is correct |
91 |
Correct |
94 ms |
164968 KB |
Output is correct |
92 |
Correct |
93 ms |
164688 KB |
Output is correct |
93 |
Correct |
92 ms |
164688 KB |
Output is correct |
94 |
Correct |
92 ms |
164688 KB |
Output is correct |
95 |
Correct |
94 ms |
165060 KB |
Output is correct |
96 |
Correct |
92 ms |
164692 KB |
Output is correct |
97 |
Correct |
93 ms |
164948 KB |
Output is correct |
98 |
Correct |
92 ms |
164692 KB |
Output is correct |
99 |
Correct |
91 ms |
164816 KB |
Output is correct |
100 |
Correct |
93 ms |
164596 KB |
Output is correct |
101 |
Correct |
93 ms |
164688 KB |
Output is correct |
102 |
Correct |
92 ms |
164612 KB |
Output is correct |
103 |
Correct |
93 ms |
164768 KB |
Output is correct |
104 |
Correct |
96 ms |
164912 KB |
Output is correct |
105 |
Correct |
90 ms |
164620 KB |
Output is correct |
106 |
Correct |
93 ms |
164692 KB |
Output is correct |
107 |
Correct |
90 ms |
164692 KB |
Output is correct |
108 |
Correct |
99 ms |
164688 KB |
Output is correct |
109 |
Correct |
96 ms |
164684 KB |
Output is correct |
110 |
Correct |
96 ms |
166324 KB |
Output is correct |
111 |
Correct |
99 ms |
166996 KB |
Output is correct |
112 |
Correct |
97 ms |
167248 KB |
Output is correct |
113 |
Correct |
98 ms |
167564 KB |
Output is correct |
114 |
Correct |
97 ms |
167180 KB |
Output is correct |
115 |
Correct |
96 ms |
167252 KB |
Output is correct |
116 |
Correct |
98 ms |
167384 KB |
Output is correct |
117 |
Correct |
94 ms |
167248 KB |
Output is correct |
118 |
Correct |
100 ms |
167328 KB |
Output is correct |
119 |
Correct |
107 ms |
169808 KB |
Output is correct |
120 |
Correct |
106 ms |
170836 KB |
Output is correct |
121 |
Correct |
108 ms |
170836 KB |
Output is correct |
122 |
Correct |
105 ms |
171088 KB |
Output is correct |
123 |
Correct |
102 ms |
170800 KB |
Output is correct |
124 |
Correct |
164 ms |
182352 KB |
Output is correct |
125 |
Correct |
284 ms |
218084 KB |
Output is correct |
126 |
Correct |
351 ms |
225540 KB |
Output is correct |
127 |
Correct |
338 ms |
225360 KB |
Output is correct |
128 |
Correct |
297 ms |
225592 KB |
Output is correct |
129 |
Correct |
269 ms |
225364 KB |
Output is correct |
130 |
Correct |
286 ms |
228692 KB |
Output is correct |
131 |
Correct |
292 ms |
227728 KB |
Output is correct |
132 |
Correct |
101 ms |
167280 KB |
Output is correct |
133 |
Correct |
94 ms |
164988 KB |
Output is correct |
134 |
Correct |
93 ms |
165456 KB |
Output is correct |
135 |
Correct |
93 ms |
166452 KB |
Output is correct |
136 |
Correct |
106 ms |
176792 KB |
Output is correct |
137 |
Correct |
98 ms |
167200 KB |
Output is correct |
138 |
Correct |
99 ms |
167252 KB |
Output is correct |
139 |
Correct |
106 ms |
167236 KB |
Output is correct |
140 |
Correct |
101 ms |
167132 KB |
Output is correct |
141 |
Correct |
97 ms |
167184 KB |
Output is correct |
142 |
Correct |
100 ms |
167520 KB |
Output is correct |
143 |
Correct |
96 ms |
167212 KB |
Output is correct |
144 |
Correct |
122 ms |
180524 KB |
Output is correct |
145 |
Correct |
109 ms |
180288 KB |
Output is correct |
146 |
Correct |
108 ms |
173344 KB |
Output is correct |
147 |
Correct |
98 ms |
167760 KB |
Output is correct |
148 |
Correct |
96 ms |
167504 KB |
Output is correct |
149 |
Correct |
97 ms |
167448 KB |
Output is correct |
150 |
Correct |
97 ms |
167364 KB |
Output is correct |
151 |
Correct |
94 ms |
167252 KB |
Output is correct |
152 |
Correct |
93 ms |
167248 KB |
Output is correct |
153 |
Correct |
97 ms |
167096 KB |
Output is correct |
154 |
Correct |
123 ms |
170828 KB |
Output is correct |
155 |
Correct |
104 ms |
173392 KB |
Output is correct |
156 |
Correct |
108 ms |
169652 KB |
Output is correct |
157 |
Correct |
113 ms |
172404 KB |
Output is correct |
158 |
Correct |
115 ms |
171008 KB |
Output is correct |
159 |
Correct |
118 ms |
170772 KB |
Output is correct |
160 |
Correct |
121 ms |
170924 KB |
Output is correct |
161 |
Correct |
108 ms |
170816 KB |
Output is correct |
162 |
Correct |
108 ms |
170896 KB |
Output is correct |
163 |
Correct |
102 ms |
170892 KB |
Output is correct |
164 |
Correct |
130 ms |
203764 KB |
Output is correct |
165 |
Correct |
136 ms |
203636 KB |
Output is correct |
166 |
Correct |
122 ms |
186196 KB |
Output is correct |
167 |
Correct |
108 ms |
172368 KB |
Output is correct |
168 |
Correct |
108 ms |
171600 KB |
Output is correct |
169 |
Correct |
109 ms |
171272 KB |
Output is correct |
170 |
Correct |
110 ms |
171096 KB |
Output is correct |
171 |
Correct |
109 ms |
170836 KB |
Output is correct |
172 |
Correct |
115 ms |
170816 KB |
Output is correct |
173 |
Correct |
101 ms |
170968 KB |
Output is correct |
174 |
Correct |
119 ms |
175976 KB |
Output is correct |
175 |
Correct |
129 ms |
179680 KB |
Output is correct |
176 |
Correct |
186 ms |
243308 KB |
Output is correct |
177 |
Correct |
197 ms |
214440 KB |
Output is correct |
178 |
Correct |
140 ms |
224964 KB |
Output is correct |
179 |
Correct |
209 ms |
232224 KB |
Output is correct |
180 |
Correct |
256 ms |
228408 KB |
Output is correct |
181 |
Correct |
268 ms |
227732 KB |
Output is correct |
182 |
Correct |
261 ms |
226804 KB |
Output is correct |
183 |
Correct |
290 ms |
232652 KB |
Output is correct |
184 |
Correct |
1386 ms |
285960 KB |
Output is correct |
185 |
Correct |
184 ms |
240720 KB |
Output is correct |
186 |
Correct |
388 ms |
235604 KB |
Output is correct |
187 |
Correct |
176 ms |
251204 KB |
Output is correct |
188 |
Correct |
631 ms |
285920 KB |
Output is correct |
189 |
Correct |
864 ms |
286036 KB |
Output is correct |
190 |
Correct |
561 ms |
285964 KB |
Output is correct |
191 |
Correct |
637 ms |
286036 KB |
Output is correct |
192 |
Correct |
467 ms |
285776 KB |
Output is correct |
193 |
Correct |
482 ms |
285776 KB |
Output is correct |
194 |
Correct |
999 ms |
945680 KB |
Output is correct |
195 |
Correct |
905 ms |
945508 KB |
Output is correct |
196 |
Correct |
447 ms |
296912 KB |
Output is correct |
197 |
Correct |
306 ms |
292048 KB |
Output is correct |
198 |
Correct |
297 ms |
289104 KB |
Output is correct |
199 |
Correct |
435 ms |
287316 KB |
Output is correct |
200 |
Correct |
582 ms |
286036 KB |
Output is correct |
201 |
Correct |
884 ms |
285956 KB |
Output is correct |
202 |
Correct |
1302 ms |
286036 KB |
Output is correct |
203 |
Execution timed out |
2049 ms |
406744 KB |
Time limit exceeded |
204 |
Halted |
0 ms |
0 KB |
- |