#include using namespace std; typedef long double ld; struct vec2{ ld x=0,y=0; ld length()const{ return hypotl(x,y); } vec2 operator-(vec2 const &a)const{ return {x-a.x,y-a.y}; } vec2 operator+(vec2 const &a)const{ return {x+a.x,y+a.y}; } vec2 operator*(ld const a)const{ return {x*a,y*a}; } vec2 operator/(ld const a)const{ return {x/a,y/a}; } }; vector v; vector where; ld dist; vec2 pat(ld t){ auto it=upper_bound(where.begin(),where.end(),t); if (it==where.begin()){ return v.front(); } if (it==where.end()){ return v.back(); } int i=(it-where.begin())-1; vec2 dirn=(v[i+1]-v[i]); dirn=dirn/dirn.length(); return v[i]+dirn*(t-where[i]); } ld dat(ld t){ vec2 a=pat(t); vec2 b=pat(t-dist); return (b-a).length(); } int main(){ cin>>dist; int n; cin>>n; v.resize(n); for (auto &i: v) cin>>i.x>>i.y; where.resize(n); vector key_times; { for (int i=0; i