Language: C++

#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;

template <typename T1, typename T2>
string print_iterable(T1 begin_iter, T2 end_iter, int counter) {
    bool done_something = false;
    stringstream res;
    res << "[";
    for (; begin_iter != end_iter and counter; ++begin_iter) {
        done_something = true;
        counter--;
        res << *begin_iter << ", ";
    }
    string str = res.str();
    if (done_something) {
        str.pop_back();
        str.pop_back();
    }
    str += "]";
    return str;
}

vector<int> SortIndex(int size, std::function<bool(int, int)> compare) {
    vector<int> ord(size);
    for (int i = 0; i < size; i++) ord[i] = i;
    sort(ord.begin(), ord.end(), compare);
    return ord;
}

template <typename T>
bool MinPlace(T& a, const T& b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}

template <typename T>
bool MaxPlace(T& a, const T& b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

template <typename Container>
int SZ(const Container& S) { return S.size(); }

template <typename S, typename T>
ostream& operator <<(ostream& out, const pair<S, T>& p) {
    out << "{" << p.first << ", " << p.second << "}";
    return out;
}

template <typename T>
ostream& operator <<(ostream& out, const vector<T>& v) {
    out << "[";
    for (int i = 0; i < (int)v.size(); i++) {
        out << v[i];
        if (i != (int)v.size()-1) out << ", ";
    }
    out << "]";
    return out;
}

#if DEBUG && !ONLINE_JUDGE
    ifstream input_from_file("input.txt");
    #define cin input_from_file

    #define dbg_var(x) clog << #x  << ": " << x << endl;
    #define dbg_array(x, len) clog << #x << ": " << print_iterable(x, x+len, -1) << endl;
#else
    #define dbg_var(x)
    #define dbg_array(x, len)
#endif

///////////////////////////////////////////////////////////////////////////
//////////////////// DO NOT TOUCH BEFORE THIS LINE ////////////////////////
///////////////////////////////////////////////////////////////////////////


struct pt {
    int id;
    LL x,y;
    pt(LL x, LL y) : x(x), y(y) {}
    pt() : x(0), y(0) {}
    pt operator +(const pt& other) const { return {x+other.x, y+other.y}; }
    pt operator -(const pt& other) const { return {x-other.x, y-other.y}; }
    LL operator *(const pt& other) const { return x*other.x + y*other.y; }
    LL operator ^(const pt& other) const { return x*other.y - y*other.x; }
    bool operator <(const pt& other) const {
        if (x == other.x) return y < other.y;
        return x < other.x;
    }
    bool operator ==(const pt& other) const { return x == other.x and y == other.y; }
};

short int GetSign(LL x) { return (x > 0) - (x < 0); }

short int RelPos(const pt& O, const pt& A, const pt& B) {
    return GetSign((A-O)^(B-O));
}

vector<int> ConvexHull(const vector<pt>& points) {
    int N = points.size();
    vector<int> ord(N);
    for (int i = 0; i < N; i++) ord[i] = i;
    sort(ord.begin(), ord.end(), [&points](int i, int j) { return points[i] < points[j]; });
    if (points[ord[0]] == points[ord.back()]) return {0};
    vector<int> aw, cw;
    aw.push_back(ord[0]);
    cw.push_back(ord[0]);
    for (int i = 1; i < N; i++) {
        int index = ord[i];
        pt V = points[index];
        while (aw.size() > 1 and RelPos(points[aw.rbegin()[1]], V, points[aw.back()]) != -1) {
            aw.pop_back();
        }
        aw.push_back(index);
        while(cw.size() > 1 and RelPos(points[cw.rbegin()[1]], V, points[cw.back()]) != 1) {
            cw.pop_back();
        }
        cw.push_back(index);
    }
    aw.pop_back();
    reverse(cw.begin(), cw.end());
    cw.pop_back();
    aw.insert(aw.end(), cw.begin(), cw.end());
    return aw;
}

long double angle(pt A, pt B) {
    long double prod = A*B;
    long double nA = A*A;
    long double nB = B*B;
    nA = sqrt(nA), nB = sqrt(nB);
    long double cc = prod / (nA*nB);
    return acos(cc);
}

const int MAXN = 1000;
long double ans[MAXN];

const long double PI = 4.0*atan(1);

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0); // Remove in problems with online queries!

    int N;
    cin >> N;
    vector<pt> points(N);
    for (int i = 0; i < N; i++) {
        cin >> points[i].x >> points[i].y;
        points[i].id = i;
    }
    auto ch = ConvexHull(points);
    int CN = ch.size();
    for (int i = 0; i < CN; i++) {
        pt A = points[ch[(i+CN-1)%CN]];
        pt B = points[ch[i]];
        pt C = points[ch[(i+1)%CN]];
        long double double aa = angle(A-B, C-B);
        ans[B.id] = 0.5 - aa/(2.0*PI);
    }
    cout.precision(10);
    for (int i = 0; i < N; i++) cout << fixed << ans[i] << "\n";
}



Compiler output:
a.cc: In function 'int main()':
a.cc:168:14: error: two or more data types in declaration of 'aa'
  168 |         long double double aa = angle(A-B, C-B);
      |              ^~~~~~
a.cc:169:27: error: 'aa' was not declared in this scope
  169 |         ans[B.id] = 0.5 - aa/(2.0*PI);
      |                           ^~