Language: C++

#include <iostream>
#include <math.h>
#include <iomanip>
#include <stdio.h>
#include <set>
#include <queue>
#include <vector>
#include <map>
#include <cmath>
#include <algorithm>
#include <memory.h>
#include <string>
#include <sstream>
#include <cstdlib>
#include <ctime>
#include <cassert>

using namespace std;

typedef long long LL;
typedef pair<int,int> PII;
typedef pair<LL,LL> PLL;

#define MP make_pair
#define PB push_back
#define FF first
#define SS second

#define FORN(i, n) for (int i = 0; i <  (int)(n); i++)
#define FOR1(i, n) for (int i = 1; i <= (int)(n); i++)
#define FORD(i, n) for (int i = (int)(n) - 1; i >= 0; i--)

#define DEBUG(X) { cout << #X << " = " << (X) << endl; }
#define PR0(A,n) { cout << #A << " = "; FORN(_,n) cout << A[_] << ' '; cout << endl; }

// #define FL fflush(stdout)

#define MOD 1000000007
#define INF 2000000000
#define MAXN 100010

int GLL(LL& x) {
  return scanf("%lld", &x);
}

int GI(int& x) {
  return scanf("%d", &x);
}

void GI_fast(int& x) {
#if defined(_WIN32) || defined(_WIN64)
  char t = _getchar_nolock();
  while (t < '0' || '9' < t) {
    t = _getchar_nolock();
  }
  x = t - '0';
  t = _getchar_nolock();
  while ('0' <= t && t <= '9') {
    x *= 10; x += t - '0';
    t = _getchar_nolock();
  }
#else
  char t = getchar_unlocked();
  while (t < '0' || '9' < t) {
    t = getchar_unlocked();
  }
  x = t - '0';
  t = getchar_unlocked();
  while ('0' <= t && t <= '9') {
    x *= 10; x += t - '0';
    t = getchar_unlocked();
  }
#endif
}

void GS_fast(char* x) {
#if defined(_WIN32) || defined(_WIN64)
  char t = _getchar_nolock();
  while (t == ' ') {
    t = _getchar_nolock();
  }
  while (t != ' ') {
    *x = t;
    x++;
    t = _getchar_nolock();
  }
#else
  char t = getchar_unlocked();
  while (t == ' ') {
    t = getchar_unlocked();
  }
  while (t != ' ') {
    *x = t;
    x++;
    t = getchar_unlocked();
  }
#endif
}

void print_buf_fast(char* buf, int len) {
  FORN(i, len) {
#if defined(_WIN32) || defined(_WIN64)
    _putchar_nolock(buf[i]);
#else
    putchar_unlocked(buf[i]);
#endif
  }
}

void print_int_fast(int d) {
  int sz = 1;
  for (; sz <= d && sz < 1e9; sz*=10);
  sz /= 10;
  for (; sz > 0; sz /= 10) {
    char c = '0' + d/sz;
    d %= sz;
#if defined(_WIN32) || defined(_WIN64)
    _putchar_nolock(c);
#else
    putchar_unlocked(c);
#endif
  }
#if defined(_WIN32) || defined(_WIN64)
  _putchar_nolock('\n');
#else
  putchar_unlocked('\n');
#endif
}


LL N;
vector<LL> x;
vector<LL> y;

map<LL, set<LL>> idx;
vector<LL> toErase;

struct Vector {
  LL x, y;
};

void p() {
  printf("------------\n");
  for (auto& kv : idx) {
    printf("%d: ", kv.FF);
    for (auto v : kv.SS) {
      printf("%d ", v);
    }
    printf("\n");
  }
  printf("------------\n");
}

LL determinant(LL i, LL j, LL k) {
  // -           -
  // | x[i] - x[j], x[k] - x[j] |
  // | y[i] - y[j], y[k] - y[j] |
  // -           -
  LL det = (x[i] - x[j]) * (y[k] - y[j]) - (x[k]- x[j]) * (y[i] - y[j]);
  if (det > 0) return 1;
  if (det == 0) return 0;
  else return -1;
}

void removeColinear(LL i) {
  LL minX = x[i];
  LL maxX = x[i];
  LL minY = y[i];
  LL maxY = y[i];

  for (auto j : idx[i]) {
    minX = min(minX, x[j]);
    maxX = max(maxX, x[j]);
    minY = min(minY, y[j]);
    maxY = max(maxY, y[j]);
  }

  idx[i].insert(i);
  for (auto j : idx[i]) {
    if ((x[j] != minX && x[j] != maxX) || (y[j] != minY && y[j] != maxY)) {
      toErase.PB(j);
    }
  }
  idx[i].erase(i);
}

void convexHull() {
  // brute force convex hull
  FORN(i, N) {
    for (LL j = i+1; j < N; j++) {
      LL signs = 0;
      bool same = true;
      FORN(k, N) {
        if (k == i || k == j) continue;
        LL det = determinant(i, j, k);
        same &= (signs * det >= 0);
        signs = det;
      }
      if (same) {
          idx[i].insert(j);
      }
    }
  }

  for (auto& kv : idx) {
    if (kv.SS.size() > 2) {
      removeColinear(kv.FF);
    }
  }

  for (auto e : toErase) {
    if (idx.find(e) != idx.end()) {
      idx.erase(e);
    }
    for (auto& kv : idx) {
      kv.SS.erase(e);
    }
  }
}

double angle(Vector v1, Vector v2) {
//  printf("<%d, %d>, <%d, %d>\n", v1.x, v1.y, v2.x, v2.y);
  double dot = v1.x * v2.x + v1.y * v2.y;
  double len1 = v1.x * v1.x + v1.y * v1.y;
  double len2 = v2.x * v2.x + v2.y * v2.y;
  double param = dot / sqrt(len1 * len2);
//  cout << "dot: " << dot << endl;
//  cout << "len1: " << len1 << endl;
//  cout << "len2: " << len2 << endl;
//  cout << "param: " << param << endl;
  return acos(param);
}

int main() {
  srand(time(NULL));
  GI(N);

  FORN(i, N) {
    LL t;
    GI(t);
    x.PB(t);
    GI(t);
    y.PB(t);
  }

  if (N == 2) {
    printf("0.5\n");
    printf("0.5\n");
    return 0;
  }

  convexHull();

  // fill in the line segments
  // at this point expect each point to be paired with two other points
  for (auto& kv : idx) {
    for (auto v : kv.SS) {
      idx[v].insert(kv.FF);
    }
  }
//  printf("=========================\n");
//  p();

  map<LL, double> solution;
  // get angles formed by vectors
  for (auto& kv : idx) {
    LL c = kv.FF;

    if (kv.SS.size() == 1) {
      solution[c] = 0.5;
      continue;
    }
    auto it = kv.SS.begin();
    LL l = *it;
    LL r = *(++it);
//    printf("c: %d, l: %d, r: %d\n", c, l, r);
    Vector v1;
    Vector v2;
    v1.x = x[l] - x[c];
    v1.y = y[l] - y[c];
    v2.x = x[r] - x[c];
    v2.y = y[r] - y[c];

    double a = angle(v1, v2);
    if (a > M_PI) a -= M_PI;
    a = M_PI - a;

    double total = 2 * M_PI;
    solution[c] = a/total;
  }

  FORN(i, N) {
    printf("%.20f\n", solution[i]);
  }


  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:236:6: error: cannot bind non-const lvalue reference of type 'int&' to a value of type 'LL' {aka 'long long int'}
  236 |   GI(N);
      |      ^
a.cc:46:13: note:   initializing argument 1 of 'int GI(int&)'
   46 | int GI(int& x) {
      |        ~~~~~^
a.cc:240:8: error: cannot bind non-const lvalue reference of type 'int&' to a value of type 'LL' {aka 'long long int'}
  240 |     GI(t);
      |        ^
a.cc:46:13: note:   initializing argument 1 of 'int GI(int&)'
   46 | int GI(int& x) {
      |        ~~~~~^
a.cc:242:8: error: cannot bind non-const lvalue reference of type 'int&' to a value of type 'LL' {aka 'long long int'}
  242 |     GI(t);
      |        ^
a.cc:46:13: note:   initializing argument 1 of 'int GI(int&)'
   46 | int GI(int& x) {
      |        ~~~~~^