Language: C++

#pragma GCC optimize ("O3")
#pragma GCC target ("avx")
#include "bits/stdc++.h" // define macro "/D__MAI"

using namespace std;
typedef long long int ll;

#define debug(v) {printf("L%d %s > ",__LINE__,#v);cout<<(v)<<endl;}
#define debugv(v) {printf("L%d %s > ",__LINE__,#v);for(auto e:(v)){cout<<e<<" ";}cout<<endl;}
#define debuga(m,w) {printf("L%d %s > ",__LINE__,#m);for(int x=0;x<(w);x++){cout<<(m)[x]<<" ";}cout<<endl;}
#define debugaa(m,h,w) {printf("L%d %s >\n",__LINE__,#m);for(int y=0;y<(h);y++){for(int x=0;x<(w);x++){cout<<(m)[y][x]<<" ";}cout<<endl;}}
#define ALL(v) (v).begin(),(v).end()
#define repeat(cnt,l) for(auto cnt=0ll;(cnt)<(l);++(cnt))
#define rrepeat(cnt,l) for(auto cnt=(l)-1;0<=(cnt);--(cnt))
#define iterate(cnt,b,e) for(auto cnt=(b);(cnt)!=(e);++(cnt))
#define diterate(cnt,b,e) for(auto cnt=(b);(cnt)!=(e);--(cnt))
#define MD 1000000007ll
#define PI 3.1415926535897932384626433832795
template<typename T1, typename T2> ostream& operator <<(ostream &o, const pair<T1, T2> p) { o << "(" << p.first << ":" << p.second << ")"; return o; }
template<typename T> T& maxset(T& to, const T& val) { return to = max(to, val); }
template<typename T> T& minset(T& to, const T& val) { return to = min(to, val); }
void bye(string s, int code = 0) { cout << s << endl; exit(code); }
mt19937_64 randdev(8901016);
inline ll rand_range(ll l, ll h) {
    return uniform_int_distribution<ll>(l, h)(randdev);
}

#if defined(_WIN32) || defined(_WIN64)
#define getchar_unlocked _getchar_nolock
#define putchar_unlocked _putchar_nolock
#elif defined(__GNUC__)
#else
#define getchar_unlocked getchar
#define putchar_unlocked putchar
#endif
namespace {
#define isvisiblechar(c) (0x21<=(c)&&(c)<=0x7E)
    class MaiScanner {
    public:
        template<typename T> void input_integer(T& var) {
            var = 0; T sign = 1;
            int cc = getchar_unlocked();
            for (; cc<'0' || '9'<cc; cc = getchar_unlocked())
                if (cc == '-') sign = -1;
            for (; '0' <= cc && cc <= '9'; cc = getchar_unlocked())
                var = (var << 3) + (var << 1) + cc - '0';
            var = var * sign;
        }
        inline int c() { return getchar_unlocked(); }
        inline MaiScanner& operator>>(int& var) { input_integer<int>(var); return *this; }
        inline MaiScanner& operator>>(long long& var) { input_integer<long long>(var); return *this; }
        inline MaiScanner& operator>>(string& var) {
            int cc = getchar_unlocked();
            for (; !isvisiblechar(cc); cc = getchar_unlocked());
            for (; isvisiblechar(cc); cc = getchar_unlocked())
                var.push_back(cc);
            return *this;
        }
        template<typename IT> void in(IT begin, IT end) { for (auto it = begin; it != end; ++it) *this >> *it; }
    };
    class MaiPrinter {
    public:
        template<typename T>
        void output_integer(T var) {
            if (var == 0) { putchar_unlocked('0'); return; }
            if (var < 0)
                putchar_unlocked('-'),
                var = -var;
            char stack[32]; int stack_p = 0;
            while (var)
                stack[stack_p++] = '0' + (var % 10),
                var /= 10;
            while (stack_p)
                putchar_unlocked(stack[--stack_p]);
        }
        inline MaiPrinter& operator<<(char c) { putchar_unlocked(c); return *this; }
        inline MaiPrinter& operator<<(int var) { output_integer<int>(var); return *this; }
        inline MaiPrinter& operator<<(long long var) { output_integer<long long>(var); return *this; }
        inline MaiPrinter& operator<<(char* str_p) { while (*str_p) putchar_unlocked(*(str_p++)); return *this; }
        inline MaiPrinter& operator<<(const string& str) {
            const char* p = str.c_str();
            const char* l = p + str.size();
            while (p < l) putchar_unlocked(*p++);
            return *this;
        }
        template<typename IT> void join(IT begin, IT end, char sep = '\n') { for (auto it = begin; it != end; ++it) *this << *it << sep; }
    };
}
MaiScanner scanner;
MaiPrinter printer;


struct P : public pair<double,double> {

    P(double x = 0, double y = 0) :pair(x,y) {  }

    double& x() { return first; }
    double& y() { return second; }
    double x() const { return first; }
    double y() const { return second; }

    inline double hypot() const { return std::hypot(first, second); }
    inline double hypot(P p) const { return std::hypot(first - p.x(), second - p.y()); }

    inline double dot(P p) const { return first*p.x() + second*p.y(); }

    inline P operator-(P p) const { return P(first - p.x(), second - p.y()); }
};

// http://www.prefield.com/algorithm/geometry/convex_hull.html
int ccw(P a, P b, P c) {
    b.x() -= a.x();
    b.y() -= a.y();
    c.x() -= a.x();
    c.y() -= a.y();
    if (b.x()*c.y() - b.y()*c.x() > 0)   return +1;       // counter clockwise
    if (b.x()*c.y() - b.y()*c.x() < 0)   return -1;       // clockwise
    if (b.x()*c.x() + b.y()*c.y() < 0)   return +2;       // c--a--b on line
    if (b.hypot() < c.hypot()) return -2;       // a--b--c on line
    return 0;
}

ll m, n, kei;

pair<P, int> points_uq[111];

double len[111], lensum;

int main() {
    cin >> n;
    if (n == 2) bye("0.5\n0.5");

    repeat(i, n) {
        double x, y;
        cin >> x >> y;
        points_uq[i] = make_pair(P(x, y), i);
        //points[i] = P(hypot(x, y), atan2(x, y));
    }

    sort(points_uq, points_uq + n);

    // http://www.prefield.com/algorithm/geometry/convex_hull.html
    vector<pair<P, int>> ch(2 * n);
    int k = 0;
    for (int i = 0; i < n; ch[k] = points_uq[i], ++k, ++i) // lower-hull
        while (k >= 2 && ccw(ch[k - 2].first, ch[k - 1].first, points_uq[i].first) <= 0) --k;
    for (int i = n - 2, t = k + 1; i >= 0; ch[k] = points_uq[i],++k, --i) // upper-hull
        while (k >= t && ccw(ch[k - 2].first, ch[k - 1].first, points_uq[i].first) <= 0) --k;
    ch.resize(k - 1);

    //debugv(ch);

    m = ch.size();

    repeat(i, m) {
        int j = (i + 1) % m;
        int h = (i - 1 + m) % m;
        P a = ch[h].first - ch[i].first;
        P b = ch[i].first - ch[j].first;

        // double l = ch[i].first.hypot(ch[j].first);
        // len[ch[i].second] += l / 2;
        // len[ch[j].second] += l / 2;
        // lensum += l;

        len[ch[i].second] = acos(a.dot(b) / (a.hypot()*b.hypot()));
        if (isnan(len[ch[i].second])) len[ch[i].second] = PI;
        lensum = PI*2;
    }

    repeat(i, n) {
        printf("%.10f\n", len[i] / lensum);
    }

    return 0;
}

Compiler output:
In file included from /usr/include/c++/14/string:43,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:3:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::__cxx11::basic_string<char>::_Alloc_hider::~_Alloc_hider()':
/usr/include/c++/14/bits/allocator.h:182:7: error: inlining failed in call to 'always_inline' 'std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = char]': target specific option mismatch
  182 |       ~allocator() _GLIBCXX_NOTHROW { }
      |       ^
In file included from /usr/include/c++/14/string:54:
/usr/include/c++/14/bits/basic_string.h:186:14: note: called from here
  186 |       struct _Alloc_hider : allocator_type // TODO check __is_final
      |              ^~~~~~~~~~~~