#include <bits/stdc++.h>
using std::vector;
using std::max;
using std::map;
using std::tuple;
using std::cout;
using std::cin;
using std::pair;
using std::priority_queue;
using std::make_pair;
using std::lower_bound;
using std::upper_bound;
#define x first
#define y second
#define int long long
enum dire{
down,
right,
up,
left,
};
enum lines{
downR,
downL,
downC,
leftR,
leftL,
leftC,
rightR,
rightL,
rightC,
upL,
upR,
upC,
base,
};
int process(vector<pair<int,int>> points){
int n = points.size();
vector<dire> direction(n);
direction[0] = up;
for(int i=1;i<n;i++){
if(points[i].y>0 and points[i].y>abs(points[i].x))direction[i]=down;
else if(points[i].y<0 and points[i].y<=-abs(points[i].x))direction[i]=up;
else if(points[i].x>=0 and points[i].x>=abs(points[i].y))direction[i]=left;
else direction[i]=right;
}
vector<map<int,vector<pair<int,int>>>> lists(12);
for(int i=0;i<n;i++){
if(direction[i]==down){
lists[downL][points[i].x+points[i].y].emplace_back(-points[i].x,i);
lists[downR][points[i].x-points[i].y].emplace_back(points[i].x,i);
lists[downC][points[i].x].emplace_back(points[i].y,i);
} else if(direction[i]==right){
lists[rightL][points[i].x+points[i].y].emplace_back(-points[i].x,i);
lists[rightR][points[i].x-points[i].y].emplace_back(-points[i].x,i);
lists[rightC][points[i].y].emplace_back(-points[i].x,i);
} else if(direction[i]==up){
lists[upL][points[i].x+points[i].y].emplace_back(points[i].x,i);
lists[upR][points[i].x-points[i].y].emplace_back(-points[i].x,i);
lists[upC][points[i].x].emplace_back(-points[i].y,i);
} else if(direction[i]==left){
lists[leftL][points[i].x+points[i].y].emplace_back(points[i].x,i);
lists[leftR][points[i].x-points[i].y].emplace_back(points[i].x,i);
lists[leftC][points[i].y].emplace_back(points[i].x,i);
}
}
for(auto&a:lists){
auto iter = a.begin();
while(iter!=a.end()){
sort(iter->second.begin(),iter->second.end());
iter++;
}
}
priority_queue<tuple<int,int,int>> q;
int ans = 0;
vector<vector<bool>> visited(n,vector<bool>(13));
q.emplace(0,0,base);
while(!q.empty()){
auto [dist,idx,type] = q.top();q.pop();dist=-dist;
if(visited[idx][type])continue;
visited[idx][type]=true;
if(type==base){
ans++;
if(direction[idx]==down){
{
// upC calculation
auto iter = lower_bound(lists[upC][points[idx].x].begin(),lists[upC][points[idx].x].end(),make_pair(2ll*dist-points[idx].y,0ll));
if(iter!=lists[upC][points[idx].x].end() and !visited[iter->second][upC])q.emplace(-abs(points[idx].y-points[iter->second].y)/2ll,iter->second,upC);
}
{
// rightR calculation
auto iter = lower_bound(lists[rightR][points[idx].x-points[idx].y].begin(),lists[rightR][points[idx].x-points[idx].y].end(),make_pair(dist-points[idx].x,0ll));
if(iter!=lists[rightR][points[idx].x-points[idx].y].end() and !visited[iter->second][rightR])q.emplace(-abs(points[idx].x-points[iter->second].x),iter->second,rightR);
}
{
// leftL calculation
auto iter = lower_bound(lists[leftL][points[idx].x+points[idx].y].begin(),lists[leftL][points[idx].x+points[idx].y].end(),make_pair(dist+points[idx].x,0ll));
if(iter!=lists[leftL][points[idx].x+points[idx].y].end() and !visited[iter->second][leftL])q.emplace(-abs(points[idx].x-points[iter->second].x),iter->second,leftL);
}
} else if(direction[idx]==right){
{
// leftC calculation
auto iter = lower_bound(lists[leftC][points[idx].y].begin(),lists[leftC][points[idx].y].end(),make_pair(2ll*dist+points[idx].x,0ll));
if(iter!=lists[leftC][points[idx].y].end() and !visited[iter->second][leftC])q.emplace(-abs(points[idx].x-points[iter->second].x)/2ll,iter->second,leftC);
}
{
// downR calculation
auto iter = lower_bound(lists[downR][points[idx].x-points[idx].y].begin(),lists[downR][points[idx].x-points[idx].y].end(),make_pair(dist+points[idx].x,0ll));
if(iter!=lists[downR][points[idx].x-points[idx].y].end() and !visited[iter->second][downR])q.emplace(-abs(points[idx].x-points[iter->second].x),iter->second,downR);
}
{
// upL calculation
auto iter = lower_bound(lists[upL][points[idx].x+points[idx].y].begin(),lists[upL][points[idx].x+points[idx].y].end(),make_pair(dist+points[idx].x,0ll));
if(iter!=lists[upL][points[idx].x+points[idx].y].end() and !visited[iter->second][upL])q.emplace(-abs(points[idx].x-points[iter->second].x),iter->second,upL);
}
} else if(direction[idx]==up){
{
// downC calculation
auto iter = lower_bound(lists[downC][points[idx].x].begin(),lists[downC][points[idx].x].end(),make_pair(2ll*dist+points[idx].y,0ll));
if(iter!=lists[downC][points[idx].x].end() and !visited[iter->second][downC])q.emplace(-abs(points[idx].y-points[iter->second].y)/2ll,iter->second,downC);
}
{
// leftR calculation
auto iter = lower_bound(lists[leftR][points[idx].x-points[idx].y].begin(),lists[leftR][points[idx].x-points[idx].y].end(),make_pair(dist+points[idx].x,0ll));
if(iter!=lists[leftR][points[idx].x-points[idx].y].end() and !visited[iter->second][leftR])q.emplace(-abs(points[idx].x-points[iter->second].x),iter->second,leftR);
}
{
// rightL calculation
auto iter = lower_bound(lists[rightL][points[idx].x+points[idx].y].begin(),lists[rightL][points[idx].x+points[idx].y].end(),make_pair(dist-points[idx].x,0ll));
if(iter!=lists[rightL][points[idx].x+points[idx].y].end() and !visited[iter->second][rightL])q.emplace(-abs(points[idx].x-points[iter->second].x),iter->second,rightL);
}
} else if(direction[idx]==left){
{
// rightC calculation
auto iter = lower_bound(lists[rightC][points[idx].y].begin(),lists[rightC][points[idx].y].end(),make_pair(2ll*dist-points[idx].x,0ll));
if(iter!=lists[rightC][points[idx].y].end() and !visited[iter->second][rightC])q.emplace(-abs(points[idx].x-points[iter->second].x)/2ll,iter->second,rightC);
}
{
// upR calculation
auto iter = lower_bound(lists[upR][points[idx].x-points[idx].y].begin(),lists[upR][points[idx].x-points[idx].y].end(),make_pair(dist-points[idx].x,0ll));
if(iter!=lists[upR][points[idx].x-points[idx].y].end() and !visited[iter->second][upR])q.emplace(-abs(points[idx].x-points[iter->second].x),iter->second,upR);
}
{
// downL calculation
auto iter = lower_bound(lists[downL][points[idx].x+points[idx].y].begin(),lists[downL][points[idx].x+points[idx].y].end(),make_pair(dist-points[idx].x,0ll));
if(iter!=lists[downL][points[idx].x+points[idx].y].end() and !visited[iter->second][downL])q.emplace(-abs(points[idx].x-points[iter->second].x),iter->second,downL);
}
}
}
if(!visited[idx][base])q.emplace(-dist,idx,base);
auto helper = [&](int sum,int val,bool flag=false){
auto iter = upper_bound(lists[type][sum].begin(),lists[type][sum].end(),make_pair(val,idx));
if(flag){
if(iter!=lists[type][sum].end() and !visited[iter->second][type])q.emplace(-((iter->first-val)/2ll+dist),iter->second,type);
}
else if(iter!=lists[type][sum].end() and !visited[iter->second][type])q.emplace(-(iter->first-val+dist),iter->second,type);
};
switch(type){
case downL:
helper(points[idx].x+points[idx].y,-points[idx].x);
break;
case downR:
helper(points[idx].x-points[idx].y,points[idx].x);
break;
case downC:
helper(points[idx].x,points[idx].y,true);
break;
case rightL:
helper(points[idx].x+points[idx].y,-points[idx].x);
break;
case rightR:
helper(points[idx].x-points[idx].y,-points[idx].x);
break;
case rightC:
helper(points[idx].y,-points[idx].x,true);
break;
case upL:
helper(points[idx].x+points[idx].y,points[idx].x);
break;
case upR:
helper(points[idx].x-points[idx].y,-points[idx].x);
break;
case upC:
helper(points[idx].x,-points[idx].y,true);
break;
case leftL:
helper(points[idx].x+points[idx].y,points[idx].x);
break;
case leftR:
helper(points[idx].x-points[idx].y,points[idx].x);
break;
case leftC:
helper(points[idx].y,points[idx].x,true);
break;
}
}
return ans;
}
vector<pair<int,int>> rotate(vector<pair<int,int>> points){
vector<pair<int,int>> ans;
for(auto&[a,b]:points)ans.emplace_back(-b,a);
return ans;
}
int32_t main(){
std::ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
vector<pair<int,int>> points(n);
for(auto&[a,b]:points){cin>>a>>b;a*=2;b*=2;}
int offset_x = -points[0].x;
int offset_y = -points[0].y;
for(auto&[a,b]:points){a+=offset_x;b+=offset_y;}
int ans = process(points);
points = rotate(points);
ans = max(ans,process(points));
points = rotate(points);
ans = max(ans,process(points));
points = rotate(points);
ans = max(ans,process(points));
cout << ans << '\n';
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
1 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
456 KB |
Output is correct |
16 |
Correct |
0 ms |
456 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
460 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
456 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
460 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
1 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
456 KB |
Output is correct |
16 |
Correct |
0 ms |
456 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
460 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
456 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
460 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
344 KB |
Output is correct |
42 |
Correct |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
1 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
456 KB |
Output is correct |
16 |
Correct |
0 ms |
456 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
460 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
456 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
460 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
344 KB |
Output is correct |
42 |
Correct |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
0 ms |
348 KB |
Output is correct |
46 |
Correct |
0 ms |
348 KB |
Output is correct |
47 |
Correct |
0 ms |
348 KB |
Output is correct |
48 |
Correct |
1 ms |
348 KB |
Output is correct |
49 |
Correct |
0 ms |
348 KB |
Output is correct |
50 |
Correct |
0 ms |
348 KB |
Output is correct |
51 |
Correct |
0 ms |
348 KB |
Output is correct |
52 |
Correct |
1 ms |
348 KB |
Output is correct |
53 |
Correct |
1 ms |
348 KB |
Output is correct |
54 |
Correct |
1 ms |
452 KB |
Output is correct |
55 |
Correct |
0 ms |
348 KB |
Output is correct |
56 |
Correct |
1 ms |
348 KB |
Output is correct |
57 |
Correct |
0 ms |
348 KB |
Output is correct |
58 |
Correct |
1 ms |
348 KB |
Output is correct |
59 |
Correct |
1 ms |
348 KB |
Output is correct |
60 |
Correct |
0 ms |
348 KB |
Output is correct |
61 |
Correct |
0 ms |
348 KB |
Output is correct |
62 |
Correct |
0 ms |
348 KB |
Output is correct |
63 |
Correct |
1 ms |
348 KB |
Output is correct |
64 |
Correct |
1 ms |
348 KB |
Output is correct |
65 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
1 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
456 KB |
Output is correct |
16 |
Correct |
0 ms |
456 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
460 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
456 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
460 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
344 KB |
Output is correct |
42 |
Correct |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
0 ms |
348 KB |
Output is correct |
46 |
Correct |
0 ms |
348 KB |
Output is correct |
47 |
Correct |
0 ms |
348 KB |
Output is correct |
48 |
Correct |
1 ms |
348 KB |
Output is correct |
49 |
Correct |
0 ms |
348 KB |
Output is correct |
50 |
Correct |
0 ms |
348 KB |
Output is correct |
51 |
Correct |
0 ms |
348 KB |
Output is correct |
52 |
Correct |
1 ms |
348 KB |
Output is correct |
53 |
Correct |
1 ms |
348 KB |
Output is correct |
54 |
Correct |
1 ms |
452 KB |
Output is correct |
55 |
Correct |
0 ms |
348 KB |
Output is correct |
56 |
Correct |
1 ms |
348 KB |
Output is correct |
57 |
Correct |
0 ms |
348 KB |
Output is correct |
58 |
Correct |
1 ms |
348 KB |
Output is correct |
59 |
Correct |
1 ms |
348 KB |
Output is correct |
60 |
Correct |
0 ms |
348 KB |
Output is correct |
61 |
Correct |
0 ms |
348 KB |
Output is correct |
62 |
Correct |
0 ms |
348 KB |
Output is correct |
63 |
Correct |
1 ms |
348 KB |
Output is correct |
64 |
Correct |
1 ms |
348 KB |
Output is correct |
65 |
Correct |
1 ms |
348 KB |
Output is correct |
66 |
Correct |
8 ms |
1624 KB |
Output is correct |
67 |
Correct |
10 ms |
1624 KB |
Output is correct |
68 |
Correct |
13 ms |
1820 KB |
Output is correct |
69 |
Correct |
16 ms |
1116 KB |
Output is correct |
70 |
Correct |
10 ms |
1116 KB |
Output is correct |
71 |
Correct |
8 ms |
1288 KB |
Output is correct |
72 |
Correct |
9 ms |
1628 KB |
Output is correct |
73 |
Correct |
10 ms |
1796 KB |
Output is correct |
74 |
Correct |
8 ms |
1984 KB |
Output is correct |
75 |
Correct |
11 ms |
1884 KB |
Output is correct |
76 |
Correct |
9 ms |
1628 KB |
Output is correct |
77 |
Correct |
9 ms |
1628 KB |
Output is correct |
78 |
Correct |
9 ms |
1884 KB |
Output is correct |
79 |
Correct |
9 ms |
1928 KB |
Output is correct |
80 |
Correct |
10 ms |
1880 KB |
Output is correct |
81 |
Correct |
13 ms |
1880 KB |
Output is correct |
82 |
Correct |
9 ms |
1884 KB |
Output is correct |
83 |
Correct |
9 ms |
2008 KB |
Output is correct |
84 |
Correct |
4 ms |
1372 KB |
Output is correct |
85 |
Correct |
3 ms |
1116 KB |
Output is correct |
86 |
Correct |
4 ms |
860 KB |
Output is correct |
87 |
Correct |
6 ms |
1116 KB |
Output is correct |
88 |
Correct |
8 ms |
1832 KB |
Output is correct |
89 |
Correct |
12 ms |
1880 KB |
Output is correct |
90 |
Correct |
14 ms |
2100 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
1 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
456 KB |
Output is correct |
16 |
Correct |
0 ms |
456 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
460 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
456 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
460 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
344 KB |
Output is correct |
42 |
Correct |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
0 ms |
348 KB |
Output is correct |
46 |
Correct |
0 ms |
348 KB |
Output is correct |
47 |
Correct |
0 ms |
348 KB |
Output is correct |
48 |
Correct |
1 ms |
348 KB |
Output is correct |
49 |
Correct |
0 ms |
348 KB |
Output is correct |
50 |
Correct |
0 ms |
348 KB |
Output is correct |
51 |
Correct |
0 ms |
348 KB |
Output is correct |
52 |
Correct |
1 ms |
348 KB |
Output is correct |
53 |
Correct |
1 ms |
348 KB |
Output is correct |
54 |
Correct |
1 ms |
452 KB |
Output is correct |
55 |
Correct |
0 ms |
348 KB |
Output is correct |
56 |
Correct |
1 ms |
348 KB |
Output is correct |
57 |
Correct |
0 ms |
348 KB |
Output is correct |
58 |
Correct |
1 ms |
348 KB |
Output is correct |
59 |
Correct |
1 ms |
348 KB |
Output is correct |
60 |
Correct |
0 ms |
348 KB |
Output is correct |
61 |
Correct |
0 ms |
348 KB |
Output is correct |
62 |
Correct |
0 ms |
348 KB |
Output is correct |
63 |
Correct |
1 ms |
348 KB |
Output is correct |
64 |
Correct |
1 ms |
348 KB |
Output is correct |
65 |
Correct |
1 ms |
348 KB |
Output is correct |
66 |
Correct |
492 ms |
35068 KB |
Output is correct |
67 |
Correct |
674 ms |
41888 KB |
Output is correct |
68 |
Correct |
811 ms |
47040 KB |
Output is correct |
69 |
Correct |
629 ms |
52100 KB |
Output is correct |
70 |
Correct |
689 ms |
53064 KB |
Output is correct |
71 |
Correct |
832 ms |
46388 KB |
Output is correct |
72 |
Correct |
814 ms |
45876 KB |
Output is correct |
73 |
Correct |
489 ms |
38716 KB |
Output is correct |
74 |
Correct |
752 ms |
46872 KB |
Output is correct |
75 |
Correct |
770 ms |
46160 KB |
Output is correct |
76 |
Correct |
562 ms |
53188 KB |
Output is correct |
77 |
Correct |
820 ms |
46124 KB |
Output is correct |
78 |
Correct |
849 ms |
53588 KB |
Output is correct |
79 |
Correct |
891 ms |
53588 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
1 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
456 KB |
Output is correct |
16 |
Correct |
0 ms |
456 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
460 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
456 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
460 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
1 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
0 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
344 KB |
Output is correct |
42 |
Correct |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
0 ms |
348 KB |
Output is correct |
46 |
Correct |
0 ms |
348 KB |
Output is correct |
47 |
Correct |
0 ms |
348 KB |
Output is correct |
48 |
Correct |
1 ms |
348 KB |
Output is correct |
49 |
Correct |
0 ms |
348 KB |
Output is correct |
50 |
Correct |
0 ms |
348 KB |
Output is correct |
51 |
Correct |
0 ms |
348 KB |
Output is correct |
52 |
Correct |
1 ms |
348 KB |
Output is correct |
53 |
Correct |
1 ms |
348 KB |
Output is correct |
54 |
Correct |
1 ms |
452 KB |
Output is correct |
55 |
Correct |
0 ms |
348 KB |
Output is correct |
56 |
Correct |
1 ms |
348 KB |
Output is correct |
57 |
Correct |
0 ms |
348 KB |
Output is correct |
58 |
Correct |
1 ms |
348 KB |
Output is correct |
59 |
Correct |
1 ms |
348 KB |
Output is correct |
60 |
Correct |
0 ms |
348 KB |
Output is correct |
61 |
Correct |
0 ms |
348 KB |
Output is correct |
62 |
Correct |
0 ms |
348 KB |
Output is correct |
63 |
Correct |
1 ms |
348 KB |
Output is correct |
64 |
Correct |
1 ms |
348 KB |
Output is correct |
65 |
Correct |
1 ms |
348 KB |
Output is correct |
66 |
Correct |
8 ms |
1624 KB |
Output is correct |
67 |
Correct |
10 ms |
1624 KB |
Output is correct |
68 |
Correct |
13 ms |
1820 KB |
Output is correct |
69 |
Correct |
16 ms |
1116 KB |
Output is correct |
70 |
Correct |
10 ms |
1116 KB |
Output is correct |
71 |
Correct |
8 ms |
1288 KB |
Output is correct |
72 |
Correct |
9 ms |
1628 KB |
Output is correct |
73 |
Correct |
10 ms |
1796 KB |
Output is correct |
74 |
Correct |
8 ms |
1984 KB |
Output is correct |
75 |
Correct |
11 ms |
1884 KB |
Output is correct |
76 |
Correct |
9 ms |
1628 KB |
Output is correct |
77 |
Correct |
9 ms |
1628 KB |
Output is correct |
78 |
Correct |
9 ms |
1884 KB |
Output is correct |
79 |
Correct |
9 ms |
1928 KB |
Output is correct |
80 |
Correct |
10 ms |
1880 KB |
Output is correct |
81 |
Correct |
13 ms |
1880 KB |
Output is correct |
82 |
Correct |
9 ms |
1884 KB |
Output is correct |
83 |
Correct |
9 ms |
2008 KB |
Output is correct |
84 |
Correct |
4 ms |
1372 KB |
Output is correct |
85 |
Correct |
3 ms |
1116 KB |
Output is correct |
86 |
Correct |
4 ms |
860 KB |
Output is correct |
87 |
Correct |
6 ms |
1116 KB |
Output is correct |
88 |
Correct |
8 ms |
1832 KB |
Output is correct |
89 |
Correct |
12 ms |
1880 KB |
Output is correct |
90 |
Correct |
14 ms |
2100 KB |
Output is correct |
91 |
Correct |
492 ms |
35068 KB |
Output is correct |
92 |
Correct |
674 ms |
41888 KB |
Output is correct |
93 |
Correct |
811 ms |
47040 KB |
Output is correct |
94 |
Correct |
629 ms |
52100 KB |
Output is correct |
95 |
Correct |
689 ms |
53064 KB |
Output is correct |
96 |
Correct |
832 ms |
46388 KB |
Output is correct |
97 |
Correct |
814 ms |
45876 KB |
Output is correct |
98 |
Correct |
489 ms |
38716 KB |
Output is correct |
99 |
Correct |
752 ms |
46872 KB |
Output is correct |
100 |
Correct |
770 ms |
46160 KB |
Output is correct |
101 |
Correct |
562 ms |
53188 KB |
Output is correct |
102 |
Correct |
820 ms |
46124 KB |
Output is correct |
103 |
Correct |
849 ms |
53588 KB |
Output is correct |
104 |
Correct |
891 ms |
53588 KB |
Output is correct |
105 |
Correct |
432 ms |
15908 KB |
Output is correct |
106 |
Correct |
584 ms |
19276 KB |
Output is correct |
107 |
Correct |
964 ms |
20176 KB |
Output is correct |
108 |
Correct |
739 ms |
22264 KB |
Output is correct |
109 |
Correct |
351 ms |
25440 KB |
Output is correct |
110 |
Correct |
766 ms |
39520 KB |
Output is correct |
111 |
Correct |
874 ms |
47056 KB |
Output is correct |
112 |
Correct |
770 ms |
44668 KB |
Output is correct |
113 |
Correct |
740 ms |
44848 KB |
Output is correct |
114 |
Correct |
853 ms |
35600 KB |
Output is correct |
115 |
Correct |
500 ms |
39488 KB |
Output is correct |
116 |
Correct |
801 ms |
45412 KB |
Output is correct |
117 |
Correct |
757 ms |
45104 KB |
Output is correct |
118 |
Correct |
758 ms |
45008 KB |
Output is correct |
119 |
Correct |
700 ms |
52048 KB |
Output is correct |
120 |
Correct |
740 ms |
45400 KB |
Output is correct |
121 |
Correct |
825 ms |
46676 KB |
Output is correct |
122 |
Correct |
891 ms |
47612 KB |
Output is correct |
123 |
Correct |
580 ms |
52548 KB |
Output is correct |
124 |
Correct |
582 ms |
53292 KB |
Output is correct |
125 |
Correct |
187 ms |
34968 KB |
Output is correct |
126 |
Correct |
96 ms |
21884 KB |
Output is correct |
127 |
Correct |
118 ms |
20744 KB |
Output is correct |
128 |
Correct |
97 ms |
21300 KB |
Output is correct |
129 |
Correct |
135 ms |
25708 KB |
Output is correct |