criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define rep(i , l , r) for(int i = (l) , ___ = (r) ; i <= ___ ; ++i)
#define per(i , r , l) for(int i = (r) , ___ = (l) ; i >= ___ ; --i)

#define DEBUG(...) fprintf(stderr , __VA_ARGS__)

template<typename T>inline int chkmin(T &x , const T &y){ return x > y ? x = y , 1 : 0; }
template<typename T>inline int chkmax(T &x , const T &y){ return x < y ? x = y , 1 : 0; }

template<typename T>inline T read(T &f)
{
	f = 0 ; int x = 1 ; char c = getchar();
	while(!isdigit(c)) x = c == '-' ? -1 : 1 , c = getchar();
	while(isdigit(c)) (f *= 10) += c & 15 , c = getchar();
	return f *= x;
}

using int64 = long long;
using uint64 = unsigned long long;

const int N = 400 + 5;

struct Node
{
	int64 x , y; double theta;
	int operator < (const Node &rhx) const
	{
		return x * rhx.y - y * rhx.x < 0;
	}
	int64 operator *(const Node &rhx) const
	{
		return theta < thx.theta;
	}
} A[N];

int n ;

int64 sX[N] , sY[N];

int main()
{
	freopen("in" , "r" , stdin);
	read(n);
	rep(i , 1 , n)
	{
		read(A[i].x);
		read(A[i].y);
		A[i].theta = atan2(A[i].x , A[i].y);
	}
	sort(A + 1 , A + 1 + n);
	rep(i , 1 , n) A[i + n] = A[i];
	int64 Ans = 0;
	rep(i , 1 , n * 2)
	{
		sX[i] = sX[i - 1] + A[i].x;
		sY[i] = sY[i - 1] + A[i].y;
	}
	rep(i , 1 , n)
	rep(j , i , i + n - 1)
	{
		int64 X = sX[j] - sX[i - 1];
		int64 Y = sY[j] - sY[i - 1];
		chkmax(Ans , X * X + Y * Y);
	}
	printf("%.15lf\n" , sqrt(Ans)); // ret); // sqrt(Ans));
	// printf("%.12f\n" , fabs(static_cast<long double>(Ans) - ret * ret));	
	return 0;
}


Compiler output:
a.cc: In member function 'int64 Node::operator*(const Node&) const':
a.cc:35:32: error: 'thx' was not declared in this scope; did you mean 'rhx'?
   35 |                 return theta < thx.theta;
      |                                ^~~
      |                                rhx
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;
  vector<double> x(N), y(N);
  for(int i=0; i<N; ++i) cin >> x[i] >> y[i];
  
  using P = pair<double, int>;
  vector<P> r(N);
  for(int i=0; i<N; ++i) {
    if(x[i] == 0 && y[i] == 0) r[i] = P(0,i);
    else r[i] = P(atan2(y[i], x[i]), i);
  }
  sort(begin(r), end(r));
  
  double res = 0.0
  for(int l=0; l<N; ++l) {
    for(int m=1; m<=N; ++m) {
      double X = 0, Y = 0;
      for(int i=l; i<m; ++i) {
        int c = r[i].second;
        X += x[c];
        Y += y[c];
      }
      res = max(res, sqrt(X * X + Y * Y));
    }
  }
  cout << fixed << setprecision(10) << res <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:3: error: expected ',' or ';' before 'for'
   19 |   for(int l=0; l<N; ++l) {
      |   ^~~
a.cc:19:16: error: 'l' was not declared in this scope
   19 |   for(int l=0; l<N; ++l) {
      |                ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;
  vector<double> x(N), y(N);
  for(int i=0; i<N; ++i) cin >> x[i] >> y[i];
  
  using P = pair<double, int>;
  for(int i=0; i<N; ++i) {
    if(x[i] == 0 && y[i] == 0) r[i] = 0;
    else r[i] = atan2(y[i], x[i]);
  }
  sort(begin(r), end(r));
  
  double res = 0.0
  for(int l=0; l<N; ++l) {
    for(int m=1; m<=N; ++m) {
      double X = 0, Y = 0;
      for(int i=l; i<m; ++i) {
        int c = r[i].second;
        X += x[c];
        Y += y[c];
      }
      res = max(res, sqrt(X * X + Y * Y));
    }
  }
  cout << fixed << setprecision(10) << res <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:32: error: 'r' was not declared in this scope
   12 |     if(x[i] == 0 && y[i] == 0) r[i] = 0;
      |                                ^
a.cc:13:10: error: 'r' was not declared in this scope
   13 |     else r[i] = atan2(y[i], x[i]);
      |          ^
a.cc:15:14: error: 'r' was not declared in this scope
   15 |   sort(begin(r), end(r));
      |              ^
a.cc:18:3: error: expected ',' or ';' before 'for'
   18 |   for(int l=0; l<N; ++l) {
      |   ^~~
a.cc:18:16: error: 'l' was not declared in this scope
   18 |   for(int l=0; l<N; ++l) {
      |                ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;
  vector<double> x(N), y(N);
  for(int i=0; i<N; ++i) cin >> x[i] >> y[i];
  
  using P = pair<double, int>;
  for(int i=0; i<N; ++i) {
    if(x[i] == 0 && y[i] == 0) r[i] = 0;
    else r[i] = atan2(y[i], x[i]);
  }
  sort(begin(r), end(r));
  
  double res = 0.0
  for(int l=0; l<N; ++l) {
    for(int r=1; r<=N; ++r) {
      double X = 0, Y = 0;
      for(int i=l; i<r; ++i) {
        int c = r[i].second;
        X += x[c];
        Y += y[c];
      }
      res = max(res, sqrt(X * X + Y * Y));
    }
  }
  cout << fixed << setprecision(10) << res <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:32: error: 'r' was not declared in this scope
   12 |     if(x[i] == 0 && y[i] == 0) r[i] = 0;
      |                                ^
a.cc:13:10: error: 'r' was not declared in this scope
   13 |     else r[i] = atan2(y[i], x[i]);
      |          ^
a.cc:15:14: error: 'r' was not declared in this scope
   15 |   sort(begin(r), end(r));
      |              ^
a.cc:18:3: error: expected ',' or ';' before 'for'
   18 |   for(int l=0; l<N; ++l) {
      |   ^~~
a.cc:18:16: error: 'l' was not declared in this scope
   18 |   for(int l=0; l<N; ++l) {
      |                ^
Language: C++

#include <iostream>
#include <iomanip>
#include <cmath>
#include <vector>
using namespace std;

struct P{
    int x, y;
    P(int x, int y) : x(x), y(y){

    }

    bool operator<(const P &p)const{
        return x * p.y - y * p.x > 0;
    }
};

int main(void){
    int n;
    long long ans = 0;
    vector<P> p;
    cin >> n;
    for(int i=0;i<n;i++){
        int x, y;
        cin >> x >> y;
        p.push_back(P(x, y));
    }
    sort(p.begin(), p.end());

    for(int i=0;i<n;i++){
        long long x = 0, y = 0;
        for(int j=0;j<n;j++){
            x += p[(i+j)%n].x;
            y += p[(i+j)%n].y;
            ans = max(ans, x*x + y*y);
        }
    }
    cout << fixed << setprecision(16) << (double) sqrt((double)ans) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   28 |     sort(p.begin(), p.end());
      |     ^~~~
      |     sqrt
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
int N; cin >> N;
vector<ll> x(N); vector<ll> y(N);
for(int i = 0; i < N; i++){ cin >> x[i] >> y[i];}

double ans = 0.0;

for(int i = 0; i < N; i++){
//ベクトル(x[i],y[i])ぐらいの方向に最大化することを考える
ll X = x[i]; Y = y[i];
 for(int j = 0; j < N; j++){
   if( j == i){ continue;}
   if( x[i]*x[j] + y[i]*y[j] >= 0){ //２つのベクトル同士のなす角が90度以下
   X += x[j]; Y += y[j];}
   
   ans = max(ans, sqrt((double)( X*X + Y*Y)));}
   
   cout << setprecision(15) << ans << endl; return 0;}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: 'Y' was not declared in this scope
   13 | ll X = x[i]; Y = y[i];
      |              ^
a.cc:21:55: error: expected '}' at end of input
   21 |    cout << setprecision(15) << ans << endl; return 0;}
      |                                                       ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#pragma GCC optimize("O3")
#pragma GCC target ("sse4")

#include "bits/stdc++.h"
#include "ext/pb_ds/tree_policy.hpp"
#include "ext/pb_ds/assoc_container.hpp"
#include "ext/rope"

using namespace std;
using namespace __gnu_pbds;
using namespace __gnu_cxx;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define F0R(i, a) for(int i = 0; i < (a); ++i)
#define pb push_back
#define mp make_pair
#define sz(x) (int)x.size()
#define f first
#define s second

template <class T> using Tree = tree<T, null_type, less<T>, rb_tree_tag,tree_order_statistics_node_update>;

struct custom_hash 
{
    static uint64_t splitmix64(uint64_t x) 
    {
        x += 0x9e3779b97f4a7c15;
        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
        return x ^ (x >> 31);
    }

    size_t operator()(uint64_t x) const 
    {
        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(x + FIXED_RANDOM);
    }
};
struct cmp 
{
    bool operator()(const pair<ll, ll>& l, const pair<ll, ll>& r) const {
        return (l.f * r.s - l.s * r.f > 0);
    }
};
int n;
vector<pair<ll, ll>> c;
ld dist(pair<ll, ll> xy)
{
    return sqrt(xy.f * xy.f + xy.s * xy.s);
}
pair<ll, ll> sum(int a, int b)
{
    pair<ll, ll> ans = {0, 0};
    if(b >= n) 
    {
        pair<ll, ll> p1 = sum(a, n - 1);
        pair<ll, ll> p2 = sum(0, b - n);
        ans.f = p1.f + p2.f;
        ans.s = p1.s + p2.s;
    }
    else
    {
        int l = 0, r = 0;
        if(a > 0) l = c[a - 1].f, r = c[a - 1].s;
        ans.f += c[b].f - l;
        ans.s += c[b].s - r;
    }
    return ans;
}
int main()
{
    // freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cin >> n;
    F0R(i, n)
    {
        ll x, y; cin >> x >> y;
        c.pb({x, y});
    }
    sort(c.begin(), c.end(), cmp);
    FOR(i, 1, n)
    {
        c[i].f += c[i - 1].f;
        c[i].s += c[i - 1].s;
    }
    ld best = 0;
    F0R(i, n)
    {
        F0R(j, n)
        {
            best = max(best, dist(sum(j, j + i)));
        }
    }
    cout << setprecision(25) << fixed << best;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:85:33: error: expected primary-expression before ')' token
   85 |     sort(c.begin(), c.end(), cmp);
      |                                 ^
Language: C++

#include<bits/stdc++.h>
#define ll long long double
#define endl "\n"
#define FAST ios_base::sync_with_stdio(false); cin.tie(NULL);
using namespace std;  
int main() 
{
	FAST
    int n;
	long double a,b,x=0,y=0,w=0,z=0;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>a>>b;
		if(a>=0 && b>=0)
			x+=a,y+=b;
     	else
          w+=a,z+=b
	}
	printf("%.20Lf",max(sqrt((x*x)+(y*y)),sqrt((w*w)+(z*z))));
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:20: error: expected ';' before '}' token
   18 |           w+=a,z+=b
      |                    ^
      |                    ;
   19 |         }
      |         ~
Language: C++

#include "bits/stdc++.h"
using namespace std;
#define rep(i,m,n) for(int (i)=(int)(m);i<(int)(n);i++)
#define REP(i,n) rep(i,0,n)
#define ll long long
#define all(hoge) (hoge).begin(),(hoge).end()
typedef pair<ll, ll> P;
typedef vector<ll> Array;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);

	ll n;
	cin >> n;
	vector<P> xy(n);
	REP(i, n)cin >> xy[i].first >> xy[i].second;

	sort(all(xy), [&](P a, P b) {
		return atan2(a.second, a.first) > atan2(b.second, b.first);
	});
	double ans = 0;
	REP(i, n) {
		ll X = 0, Y = 0;
		REP(j, n) {
			X += xy[(i+j)%n].first;
			Y += xy[(i+j)%n].second;
			chmax(ans, sqrt(X * X + Y * Y));
		}
	}
	cout <<fixed<<setprecision(20)<< ans << endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:25: error: 'chmax' was not declared in this scope
   28 |                         chmax(ans, sqrt(X * X + Y * Y));
      |                         ^~~~~
Language: C++

#include "bits/stdc++.h"
using namespace std;
#define REP(i,n) rep(i,0,n)
#define ll long long
#define all(hoge) (hoge).begin(),(hoge).end()
typedef pair<ll, ll> P;
typedef vector<ll> Array;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);

	ll n;
	cin >> n;
	vector<P> xy(n);
	REP(i, n)cin >> xy[i].first >> xy[i].second;

	sort(all(xy), [&](P a, P b) {
		return atan2(a.second, a.first) > atan2(b.second, b.first);
	});
	double ans = 0;
	REP(i, n) {
		ll X = 0, Y = 0;
		REP(j, n) {
			X += xy[(i+j)%n].first;
			Y += xy[(i+j)%n].second;
			chmax(ans, sqrt(X * X + Y * Y));
		}
	}
	cout <<fixed<<setprecision(20)<< ans << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: 'i' was not declared in this scope
   16 |         REP(i, n)cin >> xy[i].first >> xy[i].second;
      |             ^
a.cc:3:22: note: in definition of macro 'REP'
    3 | #define REP(i,n) rep(i,0,n)
      |                      ^
a.cc:3:18: error: 'rep' was not declared in this scope
    3 | #define REP(i,n) rep(i,0,n)
      |                  ^~~
a.cc:16:9: note: in expansion of macro 'REP'
   16 |         REP(i, n)cin >> xy[i].first >> xy[i].second;
      |         ^~~
Language: Java

import java.util.*;
class Engine implements Comparable<Engine>
{
  int X,Y;
  double atan2;
  Engine(int X,int Y)
  {
    this.X =X;
    this.Y=Y;
    atan2 = Math.atan2(Y,X);
  }
  public int compareTo(Engine x)
  {
    return Double.compareTo(this.atan2,x.atan2);
  }
}
class Main
{
  public static void main(String Args[])
  {
    Scanner in = new Scanner(System.in);
    int n = in.nextInt();
    List <Engine> engines = new ArrayList<>(n);
    for(int i = 0;i< n;i++)
    {
      int x = in.nextInt();
      int y = in.nextInt();
      if(x==0&&y==0)
        continue;
      engines.add(new Engine(x,y));
    }
    Collections.sort(engines);
    int m = engines.size();
    double max = 0.0;
    for(int i = 0;i< m;i++)
    {
      double y = 0.0;
      double x = 0.0;
      for(int j = 0;j<m;j++)
      {
        int index = (i+j)%m;
        Engine engine  = engines.get(index);
        y += engine.y;
        x += engine.x;
        max = Math.max(max , Math.hypot(x,y));
      }
    }
    System.out.printf("%.20f/n",max);
  }
}


Compiler output:
Main.java:14: error: method compareTo in class Double cannot be applied to given types;
    return Double.compareTo(this.atan2,x.atan2);
                 ^
  required: Double
  found:    double,double
  reason: actual and formal argument lists differ in length
Main.java:43: error: cannot find symbol
        y += engine.y;
                   ^
  symbol:   variable y
  location: variable engine of type Engine
Main.java:44: error: cannot find symbol
        x += engine.x;
                   ^
  symbol:   variable x
  location: variable engine of type Engine
3 errors
Language: C++

#include <iostream>
#include <string.h>
#include <math.h>
#include <iomanip>
using namespace std;

double len(double x,double y){
	return sqrt(x*x+y*y);
}

main(){
    int xx,yy;
	double n,px,py;
	double x[110],y[110];
	double ans;
	bool suc;
	
	cin>>n;
	for(int i=1;i<=n;i++)
		cin>>x[i]>>y[i];
	
	ans = 0;
	for(int i=1;i<=n;i++){
		px = x[i];
		py = y[i];
        if (px < 0) xx = -1;
        else xx = 1;
        if (yx < 0) yy = -1;
        else yy = 1;
		//cout<<len(px,py)<<endl;
		for(int j=1;j<=n;j++){
			if(j != i && 
               xx * (px+x[j]) >= xx * px && 
               yy * (py+y[j]) >= yy * py){
				px += x[j];
				py += y[j];
 			}
		}
		ans = max(ans,len(px,py));
	}
	cout<<fixed<<setprecision(10)<<ans<<endl;
}


Compiler output:
a.cc:11:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   11 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:28:13: error: 'yx' was not declared in this scope; did you mean 'y'?
   28 |         if (yx < 0) yy = -1;
      |             ^~
      |             y
Language: Java

import java.util.*;
import java.io.*;

public class Engines {
    public static void main(String[] args) {
        FastScanner scanner = new FastScanner();
        PrintWriter out = new PrintWriter(System.out);
        int n = scanner.nextInt();
        ArrayList<P> pts = new ArrayList<>();
        ArrayList<Integer> x = new ArrayList<>();
        ArrayList<Integer> y = new ArrayList<>();
        for(int i = 0; i < n; i++) {
            int xx = scanner.nextInt(), yy = scanner.nextInt();
            if (xx == 0 && yy == 0) continue;
            x.add(xx); y.add(yy);
            pts.add(new P(xx, yy));
        }
        n = pts.size();
        Collections.sort(pts, (a,b)-> Double.compare(a.getAngle(), b.getAngle()));
        for(int i = 0; i <n ; i++) {
            pts.add(pts.get(i));
            x.add(x.get(i));
            y.add(y.get(i));
        }
        double ans = 0;
        for(int i = 0; i < n; i++) {
            long curx = 0; long cury = 0;
            for(int j = i; j < Math.min(pts.size(), i + n); j++) {
                curx += x.get(j); cury += y.get(j);
                ans = Math.max(ans,  Math.hypot(curx, cury));
            }
        }
        out.println(ans);
        out.flush();
    }
    static class P{
        int x, y;
        public P (int xx, int yy) {
            x = xx; y = yy;
        }
        double getAngle() {
            return Math.atan2(y,x);
        }
    }
    
    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;
        
        public FastScanner(Reader in) {
            br = new BufferedReader(in);
        }
        
        public FastScanner() {
            this(new InputStreamReader(System.in));
        }
        
        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
        
        int nextInt() {
            return Integer.parseInt(next());
        }
        
        long nextLong() {
            return Long.parseLong(next());
        }
        
        double nextDouble() {
            return Double.parseDouble(next());
        }
        
        String readNextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}


Compiler output:
Main.java:4: error: class Engines is public, should be declared in a file named Engines.java
public class Engines {
       ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;

#define rep(i, N) for (int i = 0; i < N; i++)

using ll = long long int;
using pii = pair<int, int>;
using pll = pair<ll, ll>;

#include "Modulo.h"

double dist(double x, double y)
{
    return sqrt(x * x + y * y);
}

int main()
{
    int N;
    cin >> N;
    vector<int> x(N), y(N);
    rep(i, N) cin >> x[i] >> y[i];

    vector<int> xf(N), yf(N);
    rep(i, N)
    {
        int g = gcd(x[i], y[i]);
        if (g == 0)
            continue;
        xf[i] = x[i] / g;
        yf[i] = y[i] / g;
    }
    rep(i, N) rep(j, i) if (xf[j] == xf[i] and yf[j] == yf[i])
    {
        x[j] += x[i];
        y[j] += y[i];
        x[i] = y[i] = 0;
    }
    vector<int> xt, yt;
    rep(i, N) if (x[i] != 0 or y[i] != 0)
    {
        xt.push_back(x[i]);
        yt.push_back(y[i]);
    }

    vector<int> px(N), py(N);
    rep(i, N)
    {
        px[i] = -yt[i];
        py[i] = xt[i];
    }

    double max_dist = 0;
    rep(i, N)
    {
        ll xa, ya, xb, yb;
        xa = ya = xb = yb = 0;
        rep(j, N)
        {
            if (j == i)
                continue;

            if ((ll)px[i] * xt[j] + (ll)py[i] * yt[j] >= 0)
            {
                xa += xt[j];
                ya += yt[j];
            }
            else
            {

                xb += xt[j];
                yb += yt[j];
            }
        }
        vector<double> comp;
        comp.push_back(max_dist);
        comp.push_back(dist(xa, ya));
        comp.push_back(dist(xa + xt[i], ya + yt[i]));
        comp.push_back(dist(xb, yb));
        comp.push_back(dist(xb + xt[i], yb + yt[i]));
        max_dist = *max_element(comp.begin(), comp.end());
    }

    cout << fixed << setprecision(11);
    cout << max_dist << endl;
}

Compiler output:
a.cc:10:10: fatal error: Modulo.h: No such file or directory
   10 | #include "Modulo.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <string>
#include <cmath>
#include <iomanip>

using ll = long long;

using namespace std;

using P = pair<double, double>;

int main() {
    int n;
    cin >> n;
    P en[n];
    for (auto &ei:en) cin >> ei.first >> ei.second;
    double best = 0;
    for (int i=0; i<1000; i++) {
        double theta = 2 * M_PI * i / 1000000;
        double x = cos(theta), y = sin(theta),
        P sum = {0, 0};
        for (auto &ei:en)
            if (x * ei.first + y * ei.second > 0) {
                sum.first += ei.first;
                sum.second += ei.second;
            }
        best = max(best, hypot(sum.first, sum.second));
    }
    cout << setprecision(15) << best << '\n';
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:11: error: expected initializer before 'sum'
   24 |         P sum = {0, 0};
      |           ^~~
a.cc:27:17: error: 'sum' was not declared in this scope
   27 |                 sum.first += ei.first;
      |                 ^~~
a.cc:30:32: error: 'sum' was not declared in this scope
   30 |         best = max(best, hypot(sum.first, sum.second));
      |                                ^~~
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <string>
#include <cmath>
#include <iomanip>

using ll = long long;

using namespace std;

using P = pair<double, double>;

int main() {
    int n;
    cin >> n;
    P en[n];
    for (auto &ei:en) cin >> ei.first >> ei.second;
    double best = 0;
    for (int i=0; i<1000; i++) {
        double theta = 2 * M_PI * i / 1000000;
        double x = cos(theta), y = sin(theta),
        P sum = 0;
        for (auto &ei:en)
            if (x * ei.first + y * ei.second > 0) {
                sum.first += ei.first;
                sum.second += ei.second;
            }
        best = max(best, hypot(sum.first, sum.second));
    }
    cout << setprecision(15) << best << '\n';
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:11: error: expected initializer before 'sum'
   24 |         P sum = 0;
      |           ^~~
a.cc:27:17: error: 'sum' was not declared in this scope
   27 |                 sum.first += ei.first;
      |                 ^~~
a.cc:30:32: error: 'sum' was not declared in this scope
   30 |         best = max(best, hypot(sum.first, sum.second));
      |                                ^~~
Language: C++

#include <iostream>
#include <algorithm>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <queue>

// output
#define SPBR(w, n) std::cout<<(w + 1 == n ? '\n' : ' ');
#define YES cout << "YES" << endl
#define Yes cout << "Yes" << endl
#define NO cout << "NO" << endl
#define No cout << "No" << endl
// utility
#define ALL(i) (i).begin(), (i).end()
#define FOR(i, a, n) for(int i=(a);i<(n);++i)
#define RFOR(i, a, n) for(int i=(n)-1;i>=(a);--i)
#define REP(i, n) for(int i=0;i<int(n);++i)
#define RREP(i, n) for(int i=int(n)-1;i>=0;--i)
#define IN(a, x, b) (a<=x && x<b)
#define OUT(a, x, b) (x<a || b<=x)
template<class T> inline T chmax(T & a, const T b) { return a = (a < b) ? b : a; }
template<class T> inline T chmin(T& a, const T b) { return a = (a > b) ? b : a; }

// type/const
#define int ll
using ll = long long;
using ull = unsigned long long;
using ld = long double;
constexpr int MOD = 1000000007;
constexpr int INF = 1e18;

using namespace std;


signed main() {
  int N;
  cin >> N;

  vector<int> x(N);
  vector<int> y(N);
  REP(i, N) cin >> x[i] >> y[i];

  double ans = 0.0;
  REP(i, N){
    double X = x[i], Y = y[i];
    REP(j, N){
      if(i == j) continue;
      if(x[i]*x[j]+y[i]*y[j] >= 0){
        X += x[j];
        Y += y[j];
      }
    }
    ans = max(ans, sqrt(X*X+Y*Y));
  }

  printf("%.9lf\n", ans);

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:57:20: error: 'sqrt' was not declared in this scope
   57 |     ans = max(ans, sqrt(X*X+Y*Y));
      |                    ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<utility>
#include<deque>
#include<algorithm>
#include <iomanip>

using namespace std;
using ll = long long int;

int n;
ll x[4];
ll y[4];

double dfs(ll px = 0, ll py = 0, int cnt = 0) {
	if (cnt == 3)
		return sqrt(px * px + py * py);
	double ret1 = dfs(px, py, cnt + 1);
	double ret2 = dfs(px + x[cnt], py + y[cnt], cnt + 1);
	return max(ret1, ret2);
}


int main(void) {
	cin >> n;
	for (int i = 0; i < n; i++) {
		ll xi, yi;
		cin >> xi >> yi;
		if (xi >= 0 && yi >= 0) {
			x[0] += xi;
			y[0] += yi;
		}
		else if (xi < 0 && yi > 0) {
			x[1] += xi;
			y[1] += yi;
		}
		else if (xi < 0 && yi < 0) {
			x[2] += xi;
			y[2] += yi;
		}
		else {
			x[3] += xi;
			y[3] += yi;
		}
	}
	cout << fixed;
	cout << setprecision(15) << dfs() << endl;
	return 0;
}

Compiler output:
a.cc: In function 'double dfs(ll, ll, int)':
a.cc:17:24: error: 'sqrt' was not declared in this scope
   17 |                 return sqrt(px * px + py * py);
      |                        ^~~~
Language: C++

#include <bits/stdc++.h>
#include <boost/multiprecision/cpp_dec_float.hpp>
#define double f100
using namespace std;
using namespace boost::multiprecision;
using ll = long long;
using f100 = cpp_dec_float_100;
const double PI = 3.141592653589793238;


int main(){
  ll n;
  cin >> n;
  vector<pair<double, pair<ll, ll>>> a(n);
  for(auto& i : a){
    cin >> i.second.first >> i.second.second;
    i.first = atan2(double(i.second.first), double(i.second.second));
  }
  sort(a.begin(), a.end());
  for(ll i = 0; i < n; i++) a.emplace_back(a[i].first + 2 * PI, a[i].second);
  double ans = 0;
  for(ll i = 0; i < n; i++){
    ll x = 0, y = 0;
    for(ll j = i; a[j].first - a[i].first < PI; j++){
      x += a[j].second.first;
      y += a[j].second.second;
    }
    if(ans < sqrt(double(x*x+y*y))) ans = sqrt(double(x*x+y*y));
  }
  cout << fixed << setpresicion(100) << ans << endl;
}

Compiler output:
a.cc:2:10: fatal error: boost/multiprecision/cpp_dec_float.hpp: No such file or directory
    2 | #include <boost/multiprecision/cpp_dec_float.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<stdio.h>
int main(){
  int i=0;
  int n,;
  int x,y,sumx,sumy;
  scanf("%d\n",&n);
  
  for(i=0; i<n; i++){
    scanf("%d %d",&x,&y);
    sumx=x+sumx;
    sumy=y+sumy; 
  }
  printf("%d",√sumx^2+√sumy^2)
  return 0;
}
  

Compiler output:
a.cc:13:15: error: extended character √ is not valid in an identifier
   13 |   printf("%d",√sumx^2+√sumy^2)
      |               ^
a.cc:13:23: error: extended character √ is not valid in an identifier
   13 |   printf("%d",√sumx^2+√sumy^2)
      |                       ^
a.cc: In function 'int main()':
a.cc:4:9: error: expected unqualified-id before ';' token
    4 |   int n,;
      |         ^
a.cc:13:15: error: '\U0000221asumx' was not declared in this scope; did you mean 'sumx'?
   13 |   printf("%d",√sumx^2+√sumy^2)
      |               ^~~~~
      |               sumx
a.cc:13:23: error: '\U0000221asumy' was not declared in this scope; did you mean 'sumy'?
   13 |   printf("%d",√sumx^2+√sumy^2)
      |                       ^~~~~
      |                       sumy
Language: C++

#include <iostream>
#include <vector>
#include <set>
#include <string>
#include <utility>
#include <functional>
#include <queue>
#include <cmath>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <iomanip>      // std::setprecision
#include <boost/optional.hpp>
#include <boost/range/irange.hpp>
#include <boost/range/algorithm.hpp>
#include <boost/range/numeric.hpp>
#include <boost/multi_array.hpp>
#include <boost/math/common_factor_ct.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/pending/disjoint_sets.hpp>
#include <boost/icl/interval_map.hpp>
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/strong_components.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/dijkstra_shortest_paths.hpp>
#include <boost/graph/kruskal_min_spanning_tree.hpp>
#include <boost/graph/graph_utility.hpp>

#define REP(i, N) for(int i=0; i<(N); i++)
#define REC(f, ...) const auto f = [&](const auto f, __VA_ARGS__)
using namespace std;
using namespace boost::math;

int main() {
  int N;

  cin >> N;
  
  vector<pair<double,double>> xy(N);
  for (auto& i : xy) cin>>i.first>>i.second;
  
  vector<pair<double,double>> dp, dp2;
  
  dp.emplace_back(0, 0);
  for (auto i : xy) {
    for (auto j : dp) {
      dp2.emplace_back(j.first + i.first, j.second + i.second);
    }
    dp.copy(dp2.begin(),dp2.end());
    dp2.clear();
  }
  
  double rm = 0;
  
  for (auto&& i : dp) {
    rm = max(rm, (i.first*i.first+i.second*i.second));
  }

  cout << setprecision(11) << sqrt(rm) << endl;

  return 0;
}


Compiler output:
a.cc:13:10: fatal error: boost/optional.hpp: No such file or directory
   13 | #include <boost/optional.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <vector>
#include <set>
#include <string>
#include <utility>
#include <functional>
#include <queue>
#include <cmath>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <iomanip>      // std::setprecision
#include <boost/optional.hpp>
#include <boost/range/irange.hpp>
#include <boost/range/algorithm.hpp>
#include <boost/range/numeric.hpp>
#include <boost/multi_array.hpp>
#include <boost/math/common_factor_ct.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/pending/disjoint_sets.hpp>
#include <boost/icl/interval_map.hpp>
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/strong_components.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/dijkstra_shortest_paths.hpp>
#include <boost/graph/kruskal_min_spanning_tree.hpp>
#include <boost/graph/graph_utility.hpp>

#define REP(i, N) for(int i=0; i<(N); i++)
#define REC(f, ...) const auto f = [&](const auto f, __VA_ARGS__)
using namespace std;
using namespace boost::math;

int main() {
  int N;

  cin >> N;
  
  vector<pair<double,double>> xy(N);
  for (auto& i : xy) cin>>i.first>>i.second;
  
  vector<pair<double,double>> dp, dp2;
  
  dp.emplace_back(0, 0);
  for (auto i : xy) {
    for (auto j : dp) {
      dp2.emplace_back(j.first + i.first, j.second + i.second);
    }
    dp.push_back(dp2.begin(),dp2.end());
    dp2.clear();
  }
  
  double rm = 0;
  
  for (auto&& i : dp) {
    rm = max(rm, (i.first*i.first+i.second*i.second));
  }

  cout << setprecision(11) << sqrt(rm) << endl;

  return 0;
}


Compiler output:
a.cc:13:10: fatal error: boost/optional.hpp: No such file or directory
   13 | #include <boost/optional.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#pragma gcc optimize("ofast")
using namespace std;

#define ll long long //data types used often, but you don't want to type them time by time
#define ull unsigned long long
#define ui unsigned int
#define mod 1000000007
#define us unsigned short
#define IOS ios_base::sync_with_stdio(0); //to synchronize the input of cin and scanf
#define INF LONG_MAX
#define PI 3.1415926535897932384626
#define mp make_pair
#define fi first
#define se second
#define pb push_back
#define rep(x,j,n)for(int x=j;x<n;x++)
typedef vector<pair<ll,ll>> vpi;
typedef vector<ll> vi;
typedef vector<vi> vvi;

ll modexp(ll a,ll b,ll m)
{
	ll r=1;
	a=a%m;
	while(b>0)
	{
		if(b&1)
		r=(r*a)%m;
		b=b/2;
		a=(a*a)%m;
	}
	return r%m;
}
//vi arr;
ll n;
vpi pos,neg,med;
int main(){
    cin>>n;
    ll posx = 0, posy = 0, negx = 0,negy = 0,medx = 0,medy = 0;
    rep(i,0,n)
    {
        ll x,y; cin>>x>>y;
        if(x>=0&&y>=0)
        {
            posx+=x;
            posy+=y;
            pos.push_back(make_pair(x,y));
        }
        else if(x<0&&y<0)
        {
            negx+=x;
            negy+=y;
            neg.push_back(make_pair(x,y));
        }
        else
        {
            med.push_back(make_pair(x,y));
        }
    }
    ll sze = med.size();
    for(ll i=0;i<sze;i++)
    {
        if(med.first+med.second>0)
        {
            posx+=med.first;
            posy+=med.second;
        }
        else
        {
           negx+=med.first;
           negy+=med.second;
        }
    }
    if(fabs(posx)+fabs(posy)>fabs(negx)+fabs(negy))
    {
        cout<<fixed<<setprecision(12)<<sqrt(fabs(posx)*fabs(posx)+fabs(posy)*fabs(posy));
    }
    else
    {
        cout<<fixed<<setprecision(12)<<sqrt(fabs(negx)*fabs(negx)+fabs(negy)*fabs(negy));
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:64:16: error: 'vpi' {aka 'class std::vector<std::pair<long long int, long long int> >'} has no member named 'first'
   64 |         if(med.first+med.second>0)
      |                ^~~~~
a.cc:64:26: error: 'vpi' {aka 'class std::vector<std::pair<long long int, long long int> >'} has no member named 'second'
   64 |         if(med.first+med.second>0)
      |                          ^~~~~~
a.cc:66:23: error: 'vpi' {aka 'class std::vector<std::pair<long long int, long long int> >'} has no member named 'first'
   66 |             posx+=med.first;
      |                       ^~~~~
a.cc:67:23: error: 'vpi' {aka 'class std::vector<std::pair<long long int, long long int> >'} has no member named 'second'
   67 |             posy+=med.second;
      |                       ^~~~~~
a.cc:71:22: error: 'vpi' {aka 'class std::vector<std::pair<long long int, long long int> >'} has no member named 'first'
   71 |            negx+=med.first;
      |                      ^~~~~
a.cc:72:22: error: 'vpi' {aka 'class std::vector<std::pair<long long int, long long int> >'} has no member named 'second'
   72 |            negy+=med.second;
      |                      ^~~~~~
Language: C++

//嘘解法
#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#define int long long
#define rep(i, n) for(i = 0; i < n; i++)
using namespace std;
typedef pair<int, int> P;

int n;
P p[100];
int sx[100];
int sy[100];

signed main() {
	int i, j, k, l;
	
	cin >> n;
	rep(i, n) {
		int x, y;
		cin >> x >> y;
		p[i] = P(x, y);
	}
	rep(i, n) sx[i] = p[i].first;
	rep(i, n) sy[i] = p[i].second;
	sort(sx, sx + n);
	sort(sy, sy + n);
	sort(p, p + n);
	
	int ans = 0;
	rep(i, n) {
		for (j = i; j < n; j++) {
			rep(k, n) {
				int m = 0;
				int sumX = 0;
				int sumY = 0;
				for (m, n) {
					if (sx[k] <= x[m] && sy[i] <= y[m] && y[m] <= sy[j]) {
						sumX += x[m];
						sumY += y[m];
					}
					int hoge = sumX * sumX + sumY * sumY;
					ans = max(ans, hoge);
				}
			}
		}
	}
	
	double Ans = sqrt((double)ans);
	printf("%.14f\n", Ans);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:42: error: expected ';' before ')' token
   38 |                                 for (m, n) {
      |                                          ^
      |                                          ;
a.cc:46:25: error: expected primary-expression before '}' token
   46 |                         }
      |                         ^
a.cc:45:34: error: expected ';' before '}' token
   45 |                                 }
      |                                  ^
      |                                  ;
   46 |                         }
      |                         ~         
a.cc:46:25: error: expected primary-expression before '}' token
   46 |                         }
      |                         ^
a.cc:45:34: error: expected ')' before '}' token
   45 |                                 }
      |                                  ^
      |                                  )
   46 |                         }
      |                         ~         
a.cc:38:37: note: to match this '('
   38 |                                 for (m, n) {
      |                                     ^
a.cc:46:25: error: expected primary-expression before '}' token
   46 |                         }
      |                         ^
Language: C++

#include <iostream>
#include <vector>
#include <set>
#include <string>
#include <utility>
#include <functional>
#include <queue>
#include <cmath>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <iomanip>      // std::setprecision
#include <boost/optional.hpp>
#include <boost/range/irange.hpp>
#include <boost/range/algorithm.hpp>
#include <boost/range/numeric.hpp>
#include <boost/multi_array.hpp>
#include <boost/math/common_factor_ct.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/pending/disjoint_sets.hpp>
#include <boost/icl/interval_map.hpp>
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/strong_components.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/dijkstra_shortest_paths.hpp>
#include <boost/graph/kruskal_min_spanning_tree.hpp>
#include <boost/graph/graph_utility.hpp>

#define REP(i, N) for(int i=0; i<(N); i++)
#define REC(f, ...) const auto f = [&](const auto f, __VA_ARGS__)
using namespace std;
using namespace boost::math;

int main() {
  int N;

  cin >> N;
  
  vector<pair<double,double>> xy(N);
  for (auto& i : xy) cin>>i.first>>i.second;
  
  vector<pair<double,double>> dp, dp2;
  
  dp.emplace_back(0, 0);
  for (auto i : xy) {
    for (auto j : dp) {
      dp2.emplace_back(j.first + i.first, j.second + i.second);
    }
    dp.insert(dp2.begin(),dp2.end());
    dp2.clear();
  }
  
  double rm = 0;
  
  for (auto&& i : dp) {
    rm = max(rm, (i.first*i.first+i.second*i.second));
  }

  cout << setprecision(11) << sqrt(rm) << endl;

  return 0;
}


Compiler output:
a.cc:13:10: fatal error: boost/optional.hpp: No such file or directory
   13 | #include <boost/optional.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include <cmath>
#include <limits>
#include <iomanip>
#include <boost/multiprecision/cpp_int.hpp>

namespace mp = boost::multiprecision;
using namespace std;

long long zahyou(long long x,long long y){
	mp::cpp_int d=x*x+y*y;
	return sqrt(d);
}

int main(){
	long long n;
	cin>>n;
	vector<long long>x(n);
	vector<long long>y(n);
	vector<pair<long long,long long> >z(n);
	for(int i=0;i<n;i++){
		cin>>x[i]>>y[i];
		z[i]=make_pair(x[i],y[i]);
	}
	
	vector<pair<long long,long long> >d1;
	vector<pair<long long,long long> >d2;
	vector<pair<long long,long long> >d3;
	vector<pair<long long,long long> >d4;
	
	for(int i=0;i<n;i++){
		//1
		if(z[i].first>=0&&z[i].second>=0){
			d1.push_back(z[i]);
			if(z[i].first!=0)d2.push_back(z[i]);
			if(z[i].second!=0)d4.push_back(z[i]);
		}
		//2
		if(z[i].first<=0&&z[i].second>=0){
			if(z[i].first!=0)d1.push_back(z[i]);
			d2.push_back(z[i]);
			if(z[i].second!=0)d3.push_back(z[i]);
		}
		//3
		if(z[i].first<=0&&z[i].second<=0){
			if(z[i].second!=0)d2.push_back(z[i]);
			d3.push_back(z[i]);
			if(z[i].first!=0)d4.push_back(z[i]);
		}
		//4
		if(z[i].first>=0&&z[i].second<=0){
			if(z[i].second!=0)d1.push_back(z[i]);
			if(z[i].first!=0)d3.push_back(z[i]);
			d4.push_back(z[i]);
		}
	}
	long long ans=0;
	//cout<<zahyou(1,1);
	//1
	pair<long long, long long>z1=make_pair(0,0);
	for(int i=0;i<d1.size();i++){
		/*cout<<d1[i].first<<d1[i].second<<" "<<zahyou(z1.first,z1.second)<<endl;*/
		if( zahyou(z1.first,z1.second) <zahyou(z1.first+d1[i].first, z1.second+d1[i].second)){
		z1.first+=d1[i].first;
		z1.second+=d1[i].second;
		}
	}
	
	ans=max(ans,zahyou(z1.first,z1.second));
	//cout<<"d1"<<ans<<endl;
	
	pair<long long,long long>z2=make_pair(0,0);
	for(int i=0;i<d2.size();i++){
		
		//cout<<d2[i].first<<d2[i].second<<endl;
		if(zahyou(z2.first,z2.second)<zahyou(z2.first+d2[i].first, z2.second+d2[i].second)){
		z2.first+=d2[i].first;
		z2.second+=d2[i].second;
		}
	}
	ans=max(ans,zahyou(z2.first,z2.second));
	
	//cout<<"d1"<<ans<<endl;
	
	pair<long long,long long>z3=make_pair(0,0);
	for(int i=0;i<d3.size();i++){
		if(zahyou(z3.first,z3.second)<zahyou(z3.first+d3[i].first, z3.second+d3[i].second)){
		z3.first+=d3[i].first;
		z3.second+=d3[i].second;
			}
	}
	ans=max(ans,zahyou(z3.first,z3.second));
	
	pair<long long,long long>z4=make_pair(0,0);
	for(int i=0;i<d4.size();i++){
		if(zahyou(z4.first,z4.second)<zahyou(z4.first+d4[i].first, z4.second+d4[i].second)){
		z4.first+=d4[i].first;
		z4.second+=d4[i].second;
			}
	}
	ans=max(ans,zahyou(z4.first,z4.second));
	
	cout<< setprecision(20) <<ans<<endl;
	
	
}


Compiler output:
a.cc:7:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
    7 | #include <boost/multiprecision/cpp_int.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <cstdio>
#include <iostream>
#include <queue>
#include <string>
#include <algorithm>
#include <vector>
#include <math.h>
#include <utility>
typedef long long ll;
#define N_MAX 100
using namespace std;
ll x[N_MAX];
ll y[N_MAX];
ll n;
ll pow_n;

ll func(ll i){
    ll sum=0;
    for(ll j=0;j<n;j++){
        if((i/pow(2,j))%2>0)sum+=x[j]*x[j]+y[j]*y[j];
    }
    return sum;
}

int main(){
    cin >> n;
    ll sq_max=0;
    for(ll i=0;i<n;i++){
        cin>>x[i];
        cin>>y[i];
    }
    pow_n=pow(2,n);
    for(ll i=0;i<pow_n;i++){
        sq_max=max(sq_max,func(i));
    }

    cout<<sqrt(sq_max)<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'll func(ll)':
a.cc:20:24: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'int' to binary 'operator%'
   20 |         if((i/pow(2,j))%2>0)sum+=x[j]*x[j]+y[j]*y[j];
      |            ~~~~~~~~~~~~^~
      |              |          |
      |              |          int
      |              __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

#include<queue>
#include<algorithm>
#include<cstdio>
#include<vector>
#include<cstring>
#include<iostream>
using namespace std;

typedef long long ll;
typedef pair<ll,ll> P;
vector<P>v;
vector<P>ve,ve2;

int main()
{
    ll n;
    cin>>n;
    for(int i=1;i<=n;i++)
    {
         P m;
         cin>>m.first;
         cin>>m.second;
         v.push_back(m);
    }
    ve.push_back(P(0,0));
    for(int i=0;i<n;i++)
    {
         P mm=v[i];
         P now=mm;
         for(int j=0;j<ve.size();j++)
         {
             now.first=mm.first+ve[j].first;
            now.second=mm.second+ve[j].second;
             ve2.push_back(now);
         }
         for(int j=0;j<ve2.size();j++)
         {
             ve.push_back(ve2[j]);
         }
         ve2.clear();
    }
    ll maxN=0;
    for(int i=0;i<ve.size();i++)
    {
        if(maxN<ve[i].first*ve[i].first+ve[i].second*ve[i].second)
            maxN=ve[i].first*ve[i].first+ve[i].second*ve[i].second;
    }
    printf("%.11f",sqrt(maxN));
    return 0;
}
///*
//
//4 6 0
//0 1 2
//1 2 2
//1 3 1
//0 2 5
//1 3 3
//0 3 4
//
//
//
//*/


Compiler output:
a.cc: In function 'int main()':
a.cc:48:20: error: 'sqrt' was not declared in this scope
   48 |     printf("%.11f",sqrt(maxN));
      |                    ^~~~
Language: C++

#include<bits/stdc++.h>
#define ff first
#define ss second
#define INF (int)2e9
#define pb push_back
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,pii> pt;
const int SZ=105;
pii arr[SZ];
int n;
ll dist(ll x, ll y){
	return x*x+y*y;
}
ll mytrav(pii x, int p, int k){
	if(p==n+1) return dist(x.ff,x.ss);
	if(dist(x.ff,x.ss)<=dist(x.ff+arr[(p+k)%n].ff,x.ss+arr[(p+k)%n].ss)){
		return mytrav({x.ff+arr[(p+k)%n].ff,x.ss+arr[(p+k)%n].ss},p+1,k);
	}
	return mytrav(x,p+1,k);
}
ll max(ll x, ll y){
	return x>y?x:y;
}
int main(void){
	ios::sync_with_stdio(false); cin.tie(NULL);
	cin>>n;
	for(int i=0;i<n;i++){
		int x,y; cin>>x>>y;
		arr[i]={x,y};
	}
	long long ans=0;
	for(int i=0;i<n;i++){
		ans=max(ans,mytrav({0,0},0,i));
	}
	cout.precision(15);
	cout<<sqrtl((long double)max(ans));
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:37: error: no matching function for call to 'max(long long int&)'
   38 |         cout<<sqrtl((long double)max(ans));
      |                                  ~~~^~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   template argument deduction/substitution failed:
a.cc:38:37: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   38 |         cout<<sqrtl((long double)max(ans));
      |                                  ~~~^~~~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 1 provided
a.cc:23:4: note: candidate: 'll max(ll, ll)'
   23 | ll max(ll x, ll y){
      |    ^~~
a.cc:23:4: note:   candidate expects 2 arguments, 1 provided
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include <cmath>
#include <limits>
#include <iomanip>
#include <boost/multiprecision/cpp_int.hpp>

namespace mp = boost::multiprecision;
using namespace std;

long long zahyou(long long x,long long y){
	return sqrt((mp::cpp_int)x*x+y*y);
}

int main(){
	long long n;
	cin>>n;
	vector<long long>x(n);
	vector<long long>y(n);
	vector<pair<long long,long long> >z(n);
	for(int i=0;i<n;i++){
		cin>>x[i]>>y[i];
		z[i]=make_pair(x[i],y[i]);
	}
	
	vector<pair<long long,long long> >d1;
	vector<pair<long long,long long> >d2;
	vector<pair<long long,long long> >d3;
	vector<pair<long long,long long> >d4;
	
	for(int i=0;i<n;i++){
		//1
		if(z[i].first>=0&&z[i].second>=0){
			d1.push_back(z[i]);
			if(z[i].first!=0)d2.push_back(z[i]);
			if(z[i].second!=0)d4.push_back(z[i]);
		}
		//2
		if(z[i].first<=0&&z[i].second>=0){
			if(z[i].first!=0)d1.push_back(z[i]);
			d2.push_back(z[i]);
			if(z[i].second!=0)d3.push_back(z[i]);
		}
		//3
		if(z[i].first<=0&&z[i].second<=0){
			if(z[i].second!=0)d2.push_back(z[i]);
			d3.push_back(z[i]);
			if(z[i].first!=0)d4.push_back(z[i]);
		}
		//4
		if(z[i].first>=0&&z[i].second<=0){
			if(z[i].second!=0)d1.push_back(z[i]);
			if(z[i].first!=0)d3.push_back(z[i]);
			d4.push_back(z[i]);
		}
	}
	long long ans=0;
	//cout<<zahyou(1,1);
	//1
	pair<long long, long long>z1=make_pair(0,0);
	for(int i=0;i<d1.size();i++){
		/*cout<<d1[i].first<<d1[i].second<<" "<<zahyou(z1.first,z1.second)<<endl;*/
		if( zahyou(z1.first,z1.second) <zahyou(z1.first+d1[i].first, z1.second+d1[i].second)){
		z1.first+=d1[i].first;
		z1.second+=d1[i].second;
		}
	}
	
	ans=max(ans,zahyou(z1.first,z1.second));
	//cout<<"d1"<<ans<<endl;
	
	pair<long long,long long>z2=make_pair(0,0);
	for(int i=0;i<d2.size();i++){
		
		//cout<<d2[i].first<<d2[i].second<<endl;
		if(zahyou(z2.first,z2.second)<zahyou(z2.first+d2[i].first, z2.second+d2[i].second)){
		z2.first+=d2[i].first;
		z2.second+=d2[i].second;
		}
	}
	ans=max(ans,zahyou(z2.first,z2.second));
	
	//cout<<"d1"<<ans<<endl;
	
	pair<long long,long long>z3=make_pair(0,0);
	for(int i=0;i<d3.size();i++){
		if(zahyou(z3.first,z3.second)<zahyou(z3.first+d3[i].first, z3.second+d3[i].second)){
		z3.first+=d3[i].first;
		z3.second+=d3[i].second;
			}
	}
	ans=max(ans,zahyou(z3.first,z3.second));
	
	pair<long long,long long>z4=make_pair(0,0);
	for(int i=0;i<d4.size();i++){
		if(zahyou(z4.first,z4.second)<zahyou(z4.first+d4[i].first, z4.second+d4[i].second)){
		z4.first+=d4[i].first;
		z4.second+=d4[i].second;
			}
	}
	ans=max(ans,zahyou(z4.first,z4.second));
	
	cout<< setprecision(20) <<ans<<endl;
	
	
}


Compiler output:
a.cc:7:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
    7 | #include <boost/multiprecision/cpp_int.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.