(When 3 [____] When scanning the line, the parabolic equation is in the form of Y = A * x * X,
Obtain the value range of theta-delta ~ of the central axis of the parabolic curve for each vertex ~ Theta + delta,
Theta = atan2 (Y, x), Delta uses the equations to solve x * x + y * Y = z * z + (A * z) ^ 2, Tan (theta) = z/(A * z), so theta = atan2 (1, A * z)
Scan from-pi to Pi, and use the minimum heap for maintenance.
I have been calling this question for a long time, writing> into <, and writing double into int... = Catch chicken
#include<cstdio>#include<cmath>#include<cstring>#include<vector>#include<utility>#include<iostream>#include<algorithm>using namespace std;const int N=30010;const double TPI = 2*acos(-1);double x[N],y[N];vector<pair<double,double> > ang;int cnt;double heap[N];void heap_add(double a){ heap[++cnt]=a; int u,ch=cnt; double t=heap[cnt]; u = cnt>>1; while(u&&heap[u]>t) { heap[ch]=heap[u]; ch>>=1; u=ch>>1; } heap[ch]=t;}void heap_pop(){ heap[1]=heap[cnt]; --cnt; int u=1,chl,chr,ch; double t=heap[1]; while(cnt) { chl=u<<1; chr=chl|1; if(chr<=cnt&&heap[chl]