题解:因为题目是给出来顺时针,任意取两个坐标h[i],h[j]时如果所有的点在他的右侧就可以有跳i->j的有向边并且路径长度为1,如果所有的点在他的左侧的时候就可以有一条j->i的边并且路径长度为1。
如果所有的点都在边上就可以建一条双向边
然后跑一边Floyd算法就可以求出以i为起点i为终点的最短路径
然后去其中的最小值ans,如果ans>m就包不了,否则m-ans就是答案
#include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
using namespace std;
const int inf = 0x3f3f3f3f;
const int mx = 505;
typedef long long int ll;
struct point{
int x,y;
point operator-(const point &a){
point c;
c.