Language: C++

#include<bits/stdc++.h>
using namespace std;
const double eps=1e-12;
const double INF=1e100;
const int MAX=1e2+3;
double x[MAX];
double y[MAX];
double ans[MAX];
const double PI=3.14159265359;

struct PT
{
	double x,y;
	PT()	{}
	PT(double x, double y,int ind) : x(x), y(y), ind(ind){}
	PT(const PT &p) : x(p.x), y(p.y) {}
	PT operator + (const PT &p)	const { return PT(x+p.x, y+p.y); }
	PT operator - (const PT &p)	const { return PT(x-p.x, y-p.y); }
	PT operator * (double c)	const { return PT(x*c, y*c); }
	PT operator / (double c)	const { return PT(x/c, y/c); }
};
double dot(PT p, PT q)		{ return p.x*q.x + p.y*q.y; }
double dist2(PT p, PT q)	{ return dot(p-q, p-q); }
double cross(PT p, PT q)	{ return p.x*q.y - p.y*q.x; }

typedef long long LL; 
typedef long double LD;
int n;

vector<PT> A,hull;
PT lower_left;

bool sorter(const PT &p, const PT &q)
{
	double cpq = cross(p-lower_left, q-lower_left);
	if(abs(cpq) < eps)
		return dist2(p, lower_left) < dist2(q, lower_left);
	return (cpq > 0);
}


void convex_hull(vector<PT>& A,vector<PT> & hull)
{
	for(int i=1;i<n;i++)
	{
		if(A[i].y<A[0].y||(A[i].y==A[0].y&&A[i].x<A[0].x))
		{
			swap(A[i],A[0]);
		}
	}//bottom-most point and among those points the one which is leftest
	lower_left=A[0];
	sort(A.begin(),A.end(),sorter);//arranged in clockwise order
	
	hull.push_back(A[0]);
	hull.push_back(A[1]);
	
	int hull_sz=2;
	
	for(int i=2;i<A.size();i++)
	{
		while(hull_sz>1&&cross(hull[hull_sz-1]-hull[hull_sz-2],A[i]-hull[hull_sz-1])<=0)
		{
			hull.pop_back();
			hull_sz--;
		}
		hull.push_back(A[i]);
		hull_sz++;
	}
}

int main()
{
	int n;
	scanf("%d",&n);

	for(int i=1;i<=n;i++)
	{
		scanf("%lf %lf",&x[i],&y[i]);
		A.push_back(PT(x[i],y[i],i));
	}

	convex_hull(A,hull);
	
	for(int i=0;i<hull.size();i++)
	{
		int pre=(i-1+hull.size())%(hull.size());
		int nxt=(i+1)%((int)hull.size());
		ans[i]=dot(hull[pre]-hull[i],hull[nxt]-hull[i])/sqrt(dist2(hull[i],hull[nxt]));
		ans[i]/=sqrt(dist2(hull[i],hull[pre]));
		ans[i]=(PI-acos(ans[i]))/2;
		ans[i]/=PI;
	}	

	for(int i=1;i<=n;i++)
	{
		int fnd=0;
		for(int j=0;j<hull.size();j++)
		{
			if(fabs(x[i]-hull[j].x)<=eps&&fabs(y[i]-hull[j].y)<=eps)
			{
				printf("%.10lf\n",ans[j]);
				fnd=1;
				break;
			}
		}
		if(!fnd)
		{
			printf("0.00000\n");
		}
	}

}

Compiler output:
a.cc: In constructor 'PT::PT(double, double, int)':
a.cc:15:54: error: class 'PT' does not have any field named 'ind'
   15 |         PT(double x, double y,int ind) : x(x), y(y), ind(ind){}
      |                                                      ^~~
a.cc: In member function 'PT PT::operator+(const PT&) const':
a.cc:17:71: error: no matching function for call to 'PT::PT(double, double)'
   17 |         PT operator + (const PT &p)     const { return PT(x+p.x, y+p.y); }
      |                                                                       ^
a.cc:16:9: note: candidate: 'PT::PT(const PT&)'
   16 |         PT(const PT &p) : x(p.x), y(p.y) {}
      |         ^~
a.cc:16:9: note:   candidate expects 1 argument, 2 provided
a.cc:15:9: note: candidate: 'PT::PT(double, double, int)'
   15 |         PT(double x, double y,int ind) : x(x), y(y), ind(ind){}
      |         ^~
a.cc:15:9: note:   candidate expects 3 arguments, 2 provided
a.cc:14:9: note: candidate: 'PT::PT()'
   14 |         PT()    {}
      |         ^~
a.cc:14:9: note:   candidate expects 0 arguments, 2 provided
a.cc: In member function 'PT PT::operator-(const PT&) const':
a.cc:18:71: error: no matching function for call to 'PT::PT(double, double)'
   18 |         PT operator - (const PT &p)     const { return PT(x-p.x, y-p.y); }
      |                                                                       ^
a.cc:16:9: note: candidate: 'PT::PT(const PT&)'
   16 |         PT(const PT &p) : x(p.x), y(p.y) {}
      |         ^~
a.cc:16:9: note:   candidate expects 1 argument, 2 provided
a.cc:15:9: note: candidate: 'PT::PT(double, double, int)'
   15 |         PT(double x, double y,int ind) : x(x), y(y), ind(ind){}
      |         ^~
a.cc:15:9: note:   candidate expects 3 arguments, 2 provided
a.cc:14:9: note: candidate: 'PT::PT()'
   14 |         PT()    {}
      |         ^~
a.cc:14:9: note:   candidate expects 0 arguments, 2 provided
a.cc: In member function 'PT PT::operator*(double) const':
a.cc:19:67: error: no matching function for call to 'PT::PT(double, double)'
   19 |         PT operator * (double c)        const { return PT(x*c, y*c); }
      |                                                                   ^
a.cc:16:9: note: candidate: 'PT::PT(const PT&)'
   16 |         PT(const PT &p) : x(p.x), y(p.y) {}
      |         ^~
a.cc:16:9: note:   candidate expects 1 argument, 2 provided
a.cc:15:9: note: candidate: 'PT::PT(double, double, int)'
   15 |         PT(double x, double y,int ind) : x(x), y(y), ind(ind){}
      |         ^~
a.cc:15:9: note:   candidate expects 3 arguments, 2 provided
a.cc:14:9: note: candidate: 'PT::PT()'
   14 |         PT()    {}
      |         ^~
a.cc:14:9: note:   candidate expects 0 arguments, 2 provided
a.cc: In member function 'PT PT::operator/(double) const':
a.cc:20:67: error: no matching function for call to 'PT::PT(double, double)'
   20 |         PT operator / (double c)        const { return PT(x/c, y/c); }
      |                                                                   ^
a.cc:16:9: note: candidate: 'PT::PT(const PT&)'
   16 |         PT(const PT &p) : x(p.x), y(p.y) {}
      |         ^~
a.cc:16:9: note:   candidate expects 1 argument, 2 provided
a.cc:15:9: note: candidate: 'PT::PT(double, double, int)'
   15 |         PT(double x, double y,int ind) : x(x), y(y), ind(ind){}
      |         ^~
a.cc:15:9: note:   candidate expects 3 arguments, 2 provided
a.cc:14:9: note: candidate: 'PT::PT()'
   14 |         PT()    {}
      |         ^~
a.cc:14:9: note:   candidate expects 0 arguments, 2 provided