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

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;

int main() {
    ll n, m, i, j, k;
    cin >> n;
    vector<pair<ll, ll>> v(n);
    for(i = 0; i < n; i++) {
        cin >> v[i].first >> v[i].second;
    }
    set<ll> s;
    vector<ll> g;
    s.insert(0);
    map<ll,ll> mpM,mpm;
    for(i=0;i<n;i++){
        for(auto itr = s.begin(); itr != s.end();++itr){
            s.insert((*itr) + v[i].first);
            auto it = mpM.find((*itr) + v[i].first);
            if(it!=mpM.end()){
                it->second = max(mpM[*itr] + v[i].second,it->second);
            }else {
                it->second = mpM[*itr] + v[i].second;
            }

            auto it = mpm.find((*itr) + v[i].first);
            if(it != mpm.end()) {
                it->second = min(mpm[*itr] + v[i].second, it->second);
            } else {
                it->second = mpm[*itr] + v[i].second;
            }
        }
    }
    double ret = 0.0;
    for(auto itr = s.begin(); itr != s.end(); ++itr) {
        auto it = mpM.find(*itr);
        ll x = *itr,y = it->second;
        ret = max((double)x * x + y * y,ret);

        auto it = mpm.find(*itr);
        ll x = *itr, y = it->second;
        ret = max((double)x * x + y * y, ret);
    }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:30:18: error: conflicting declaration 'auto it'
   30 |             auto it = mpm.find((*itr) + v[i].first);
      |                  ^~
a.cc:23:18: note: previous declaration as 'std::_Rb_tree_iterator<std::pair<const long long int, long long int> > it'
   23 |             auto it = mpM.find((*itr) + v[i].first);
      |                  ^~
a.cc:44:14: error: conflicting declaration 'auto it'
   44 |         auto it = mpm.find(*itr);
      |              ^~
a.cc:40:14: note: previous declaration as 'std::_Rb_tree_iterator<std::pair<const long long int, long long int> > it'
   40 |         auto it = mpM.find(*itr);
      |              ^~
a.cc:45:12: error: redeclaration of 'll x'
   45 |         ll x = *itr, y = it->second;
      |            ^
a.cc:41:12: note: 'll x' previously declared here
   41 |         ll x = *itr,y = it->second;
      |            ^
a.cc:45:22: error: redeclaration of 'll y'
   45 |         ll x = *itr, y = it->second;
      |                      ^
a.cc:41:21: note: 'll y' previously declared here
   41 |         ll x = *itr,y = it->second;
      |                     ^
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;

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

int main(){
	mp::cpp_int n;
	cin>>n;
	vector<mp::cpp_int>x(n);
	vector<mp::cpp_int>y(n);
	vector<pair<mp::cpp_int,mp::cpp_int> >z(n);
	for(int i=0;i<n;i++){
		cin>>x[i]>>y[i];
		z[i]=make_pair(x[i],y[i]);
	}
	
	vector<pair<mp::cpp_int,mp::cpp_int> >d1;
	vector<pair<mp::cpp_int,mp::cpp_int> >d2;
	vector<pair<mp::cpp_int,mp::cpp_int> >d3;
	vector<pair<mp::cpp_int,mp::cpp_int> >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]);
		}
	}
	mp::cpp_int ans=0;
	//cout<<zahyou(1,1);
	//1
	pair<mp::cpp_int, mp::cpp_int>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<mp::cpp_int,mp::cpp_int>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<mp::cpp_int,mp::cpp_int>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<mp::cpp_int,mp::cpp_int>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 <iostream>
using namespace std;
#define Nmax 100

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

int main()
{
	int n = 0;
	long x[Nmax] = { 0 }, y[Nmax] = { 0 };
	bool e[Nmax];
	double rmax = 0;

	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> x[i] >> y[i];
	}

	for (int i = 0; i < n; i++) {
		int cx = x[i], cy = y[i];
		for (int j = 0; j < n; j++) {
			if (i == j) {
				continue;
			}
			if (dist(cx, cy) < dist(cx + x[j], cy + y[j])) {
				cx += x[j];
				cy += y[j];
			}
		}
		if (rmax < dist(cx, cy)) {
			rmax = dist(cx, cy);
		}
	}
	
	cout << rmax << "\n";

	return 0;
}

Compiler output:
a.cc: In function 'double dist(long int, long int)':
a.cc:7:16: error: 'sqrt' was not declared in this scope
    7 |         return sqrt((long double)x * x + (long double)y * y);
      |                ^~~~
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;

int main(){
    int N;
    cin >> N;
    int x[N],y[N];
    int disx,disy;
    for(int i = 0; i < N; ++i){
        cin >> x[i] >> y[i];
    }
    int sumx=0,sumy=0;
    for (int i = 0; i < N; ++i){
        sumx += x[i];
        sumy += y[i];
    }
    for(int i = 0; i < N; ++i){
        if(x[i]*sumx > 0 && y[i]* sumy > 0){
            disx += x[i];
            disy += y[i];
        }

    }
    double dist;
    dist = sqrt(disx * disx + disy * disy);
    cout << dist << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:12: error: 'sqrt' was not declared in this scope
   26 |     dist = sqrt(disx * disx + disy * disy);
      |            ^~~~
Language: C++

#include <bits/stdc++.h>

#define   ll             long long int
#define   pb             push_back
#define   mp             make_pair
#define   fast           ios_base::sync_with_stdio(false);cin.tie(NULL);
#define   ff             first
#define   ss             second
#define   nil           -10e+9
#define   initial         0
#define   waiting         1
#define   visit           2
#define   inf            10e+9
#define   mx             200005
#define   mxx            1000005
#define   mod            1000000007
#define   pr             pair<ll,ll>
#define   pp_queue       priority_queue<pr,vector<pr>, greater<pr> >
#define   dp_queue       priority_queue<int,vector<int>, greater<int> >
#define   sp_queue       priority_queue<int>
#define   fr(i,p,q)      for(int i=p;i<q;++i)
#define   frr(i,p,q)     for(int i=p;i<=q;++i)
#define   mem(a,b)       memset(a,b,sizeof(a))
#define   len(a)         (int)a.size()
#define   input          freopen("input.txt", "r", stdin);
#define   output         freopen("output.txt", "w", stdout);
#define   debug(arr,j,n) fr(i,j,n) cout<<arr[i]<<" ";

ll power(ll a,ll b){ll aa=1;while(b){if(b&1){aa=aa*a;aa%=mod;}a=a*a;a%=mod;b/=2;}return aa;}

using namespace std;

int main()
{
  ll n;

  cin>>n;

  long double x[n],y[n];

  fr(i,0,n) cin>>x[i]>>y[i];

  long double sum=0;

  fr(i,0,n){
    long double maxm=sqrt(pow(x[i],2)+pow(y[i],2));
    int t1=x[i],t2=y[i];
    fr(j,i+1,n){
      if(sqrt(pow(t1+x[j],2)+pow(t2+y[j],2))>maxm){
        t1+=x[j];
        t2+=y[j];
        maxm=sqrt(pow(t1+x[j],2)+pow(t2+y[j],2));
      }
    }
  }
  cout<<setprecission(16)<<maxm<<endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:56:9: error: 'setprecission' was not declared in this scope
   56 |   cout<<setprecission(16)<<maxm<<endl;
      |         ^~~~~~~~~~~~~
a.cc:56:28: error: 'maxm' was not declared in this scope
   56 |   cout<<setprecission(16)<<maxm<<endl;
      |                            ^~~~
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;

int main(){
    int N;
    cin >> N;
    int x[N],y[N];
    int disx,disy;
    for(int i = 0; i < N; ++i){
        cin >> x[i] >> y[i];
    }
    int sumx=0,sumy=0;
    for (int i = 0; i < N; ++i){
        sumx += x[i];
        sumy += y[i];
    }
    for(int i = 0; i < N; ++i){
        if(x[i]*sumx[i] > 0 && y[i]* sumy[i] > 0){
            disx += x[i];
            disy += y[i];
        }

    }
    double dist;
    dist = sqrt(disx * disx + disy * disy);
    cout << dist << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:21: error: invalid types 'int[int]' for array subscript
   19 |         if(x[i]*sumx[i] > 0 && y[i]* sumy[i] > 0){
      |                     ^
a.cc:19:42: error: invalid types 'int[int]' for array subscript
   19 |         if(x[i]*sumx[i] > 0 && y[i]* sumy[i] > 0){
      |                                          ^
a.cc:26:12: error: 'sqrt' was not declared in this scope
   26 |     dist = sqrt(disx * disx + disy * disy);
      |            ^~~~
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;

int main(){
    int N;
    cin >> N;
    int x[N],y[N];
    int disx,disy;
    for(int i = 0; i < N; ++i){
        cin >> x[i] >> y[i];
    }
    int sumx=0,sumy=0;
    for (int i = 0; i < N; ++i){
        sumx += x[i];
        sumy += y[i];
    }
    for(int i = 0; i < N; ++i){
        if(x[i]*sumx[i] > 0 && y[i]* sumy[i] > 0){
            disx += x[i];
            disy += y[i];
        }

    }
    double dist;
    dist = sqrt(disx ** 2 + disy ** 2);
    cout << dist << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:21: error: invalid types 'int[int]' for array subscript
   19 |         if(x[i]*sumx[i] > 0 && y[i]* sumy[i] > 0){
      |                     ^
a.cc:19:42: error: invalid types 'int[int]' for array subscript
   19 |         if(x[i]*sumx[i] > 0 && y[i]* sumy[i] > 0){
      |                                          ^
a.cc:26:23: error: invalid type argument of unary '*' (have 'int')
   26 |     dist = sqrt(disx ** 2 + disy ** 2);
      |                       ^~~
a.cc:26:35: error: invalid type argument of unary '*' (have 'int')
   26 |     dist = sqrt(disx ** 2 + disy ** 2);
      |                                   ^~~
a.cc:26:12: error: 'sqrt' was not declared in this scope
   26 |     dist = sqrt(disx ** 2 + disy ** 2);
      |            ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 0x3f3f3f3f;
const int maxn = 1005;
struct point
{
	double x,y;
}a[105];
int main()
{
	ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	int n;
	cin>>n;
	for(int i=0;i<n;i++) cin>>a[i].x>>a[i].y;
	point ans1,ans2,ans3,ans4,ans5,ans6,ans7,ans8;
	ans1.x=ans2.x=ans3.x=ans4.x=ans5.x=ans6.x=ans7.x=ans8.x=0
	ans1.y=ans2.y=ans3.y=ans4.y=ans5.y=ans6.y=ans7.y=ans8.y=0;
	for(int i=0;i<n;i++)
	{
		if(a[i].x>=0&&a[i].y>=0)
		{
			ans1.x+=a[i].x;
			ans1.y+=a[i].y;
		}
		else if(a[i].x>=0&&a[i].y<=0)
		{
			ans2.x+=a[i].x;
			ans2.y+=a[i].y;
		}
		else if(a[i].x<=0&&a[i].y>=0)
		{
			ans3.x+=a[i].x;
			ans3.y+=a[i].y;
		}
		else if(a[i].x<=0&&a[i].y<=0)
		{
			ans4.x+=a[i].x;
			ans4.y+=a[i].y;
		}
		else if(a[i].x>=0)
		{
			ans5.x+=a[i].x;
			ans5.y+=a[i].y;
		}
		else if(a[i].x<=0)
		{
			ans6.x+=a[i].x;
			ans6.y+=a[i].y;
		}
		else if(a[i].y>=0)
		{
			ans7.x+=a[i].x;
			ans7.y+=a[i].y;
		}
		else if(a[i].y<=0)
		{
			ans8.x+=a[i].x;
			ans8.y+=a[i].y;
		}
	}
	double ans=0;
	ans=sqrt(pow(ans1.x,2)+pow(ans1.y,2));
	ans=max(ans,sqrt(pow(ans2.x,2)+pow(ans2.y,2)));
	ans=max(ans,sqrt(pow(ans3.x,2)+pow(ans3.y,2)));
	ans=max(ans,sqrt(pow(ans4.x,2)+pow(ans4.y,2)));
	ans=max(ans,sqrt(pow(ans5.x,2)+pow(ans5.y,2)));
	ans=max(ans,sqrt(pow(ans6.x,2)+pow(ans6.y,2)));
	ans=max(ans,sqrt(pow(ans7.x,2)+pow(ans7.y,2)));
	ans=max(ans,sqrt(pow(ans8.x,2)+pow(ans8.y,2)));
	cout<<fixed<<setprecision(10)<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:66: error: expected ';' before 'ans1'
   17 |         ans1.x=ans2.x=ans3.x=ans4.x=ans5.x=ans6.x=ans7.x=ans8.x=0
      |                                                                  ^
      |                                                                  ;
   18 |         ans1.y=ans2.y=ans3.y=ans4.y=ans5.y=ans6.y=ans7.y=ans8.y=0;
      |         ~~~~
Language: C++

#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cfloat>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <string.h>
#include <time.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,n) for(int i=1;i<=n;i++)
#define int long long
#define ll long long
#define double long double
#define eps DBL_EPSILON
#define mod (ll)1000000007
#define INF LLONG_MAX/10
#define P pair<int,int>
#define prique priority_queue
using namespace std;
int n, x[110], y[110];
vector<pair<double, int>> vec;
signed main() {
	cin >> n;
	rep(i, n) {
		cin >> x[i] >> y[i];
		if (y[i] == 0) {
			if (x[i] > 0) {
				vec.push_back(make_pair(0, i));
				vec.push_back(make_pair(acos(-1), i));
			}
			else {
				vec.push_back(make_pair(acos(-1), i));
				vec.push_back(make_pair(2 * acos(-1), i));
			}
		}
		else {
			vec.push_back(make_pair(atan(y[i] / (x[i] + eps)), i));
			vec.push_back(make_pair(atan(y[i] / (x[i] + eps)) + acos(-1), i));
		}
	}
	sort(vec.begin(), vec.end());
	double ans = 0;
	rep(i, vec.size()) {
		set<int> st;
		for (int j = i; j < vec.size(); j++) {
			if (st.find(vec[j].second) != st.end())continue;
			st.insert(vec[j].second);
			int cntx = 0, cnty = 0;
			for (int k = i; k <= j; k++) {
				cntx += x[vec[k].second];
				cnty += y[vec[k].second];
			}
			double memo = ans;
			ans = max(ans, (double)hypot(cntx, cnty));
		}
	}
	printf("%.12Lf\n", ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:16: error: expected primary-expression before 'long'
   28 | #define double long double
      |                ^~~~
<built-in>: note: in expansion of macro 'double'
a.cc:52:69: note: in expansion of macro 'eps'
   52 |                         vec.push_back(make_pair(atan(y[i] / (x[i] + eps)), i));
      |                                                                     ^~~
a.cc:52:68: error: expected ')' before 'long'
   52 |                         vec.push_back(make_pair(atan(y[i] / (x[i] + eps)), i));
      |                                                             ~      ^
      |                                                                    )
a.cc:28:16: error: expected primary-expression before 'long'
   28 | #define double long double
      |                ^~~~
<built-in>: note: in expansion of macro 'double'
a.cc:53:69: note: in expansion of macro 'eps'
   53 |                         vec.push_back(make_pair(atan(y[i] / (x[i] + eps)) + acos(-1), i));
      |                                                                     ^~~
a.cc:53:68: error: expected ')' before 'long'
   53 |                         vec.push_back(make_pair(atan(y[i] / (x[i] + eps)) + acos(-1), i));
      |                                                             ~      ^
      |                                                                    )
Language: C++

#include<iostream>
#include<list>

using namespace std;
int main(){
	int n;
	long x,y;
	long count = 0;
	long double a[4], b[4];
	long double line =0.0;
	long double line2 = 0.0;

	cin >> n;

	for(int i = 0; i < 4; i++) {
		a[i] = 0.0;
		b[i] = 0.0;
	}

	for (int i = 0; i < n; i++) {
		cin >> x>>y;
		
		if (x > 0 && y > 0) {
			a[0] += x;
			b[0] += y;
		}else if(x > 0 && y < 0) {
			a[1] += x;
			b[1] += y;
		}
		else if (x < 0 && y < 0) {
			a[2] += x;
			b[2] += y;
		}
		else if (x < 0 && y > 0) {
			a[3] += x;
			b[3] += y;
		}
		else if (x > 0 && y == 0) {
			a[0] += x;
			a[1] += x;
		}
		else if (x < 0 && y == 0) {
			a[2] += x;
			a[3] += x;
		}
		else if (x == 0 && y > 0) {
			b[0] += y;
			b[3] += y;
		}
		else if (x == 0 && y < 0) {
			b[1] += y;
			b[2] += y;
		}
	}

	for (int i = 0; i < 4; i++) {
		line2 = sqrtl(powl(a[i], 2.0) + powl(b[i], 2.0));
		if (line < line2) {
			line = line2;
		}
	}
	
	cout << line << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:57:31: error: 'powl' was not declared in this scope
   57 |                 line2 = sqrtl(powl(a[i], 2.0) + powl(b[i], 2.0));
      |                               ^~~~
a.cc:57:25: error: 'sqrtl' was not declared in this scope; did you mean 'strtol'?
   57 |                 line2 = sqrtl(powl(a[i], 2.0) + powl(b[i], 2.0));
      |                         ^~~~~
      |                         strtol
Language: C++

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

typedef long long ll;
#define REP(i,n) for(int i=0,_n=(int)(n);i<_n;++i)
#define ALL(v) (v).begin(),(v).end()
#define CLR(t,v) memset(t,(v),sizeof(t))
template<class T1,class T2>ostream& operator<<(ostream& os,const pair<T1,T2>&a){return os<<"("<<a.first<<","<<a.second<< ")";}
template<class T>void pv(T a,T b){for(T i=a;i!=b;++i)cout<<(*i)<<" ";cout<<endl;}
template<class T>void chmin(T&a,const T&b){if(a>b)a=b;}
template<class T>void chmax(T&a,const T&b){if(a<b)a=b;}

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

struct Vec {
  ll x, y;
  bool operator < (const Vec& o) const {
    if (y * o.y < 0) return y > o.y;
    return x * o.y < y * o.y;
  }
};

int main2() {
  int N; cin >> N;
  vector<Vec> v;
  REP(i, N) {
    ll x, y;
    cin >> x >> y;
    v.push_back((Vec){x, y});
  }
  sort(ALL(v));
  ll ans2 = 0;
  for (int i = 0; i < N; i++) {
    double x = 0, y = 0;
    for (int k = 0; k < N; k++) {
      x += v[(i + k)%N].x;
      y += v[(i + k)%N].y;
      chmax(ans2, x * x + y * y);
    }
  }
  printf("%.12f\n", sqrt(ans2));
  return 0;
}

int main() {

#ifdef LOCAL
  for (;!cin.eof();cin>>ws)
#endif
    main2();
  return 0;
}


Compiler output:
a.cc: In function 'int main2()':
a.cc:38:12: error: no matching function for call to 'chmax(ll&, double)'
   38 |       chmax(ans2, x * x + y * y);
      |       ~~~~~^~~~~~~~~~~~~~~~~~~~~
a.cc:11:23: note: candidate: 'template<class T> void chmax(T&, const T&)'
   11 | template<class T>void chmax(T&a,const T&b){if(a<b)a=b;}
      |                       ^~~~~
a.cc:11:23: note:   template argument deduction/substitution failed:
a.cc:38:12: note:   deduced conflicting types for parameter 'const T' ('long long int' and 'double')
   38 |       chmax(ans2, x * x + y * y);
      |       ~~~~~^~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <cmath>
#include <bits/stdc++.h>
#include <string>

#include <boost/multiprecision/cpp_dec_float.hpp>

namespace mp = boost::multiprecision;

using namespace std;

// stringをintに
// string a = "123";
// stoi(a)
//
// intをstringに
// int a = 123;
// to_string(a)
//
// charをintに
// char a = '1';
// (int)a - 48 // asciiコードを値にする

// stringのソート
// string str = "abccba";
// sort(str.begin(), str.end());
//
// ハッシュテーブル
// unordered_map<string, int> mp;
// mp["aabbcc"] = 0;

// 配列Aにcinする
//int main() {
//  int N;
//  cin >> N;
//  vector<int> A(N);
//  for (int i = 0; i < N; i++) {
//    cin >> A.at(i);
//  }
//  return 0;
//}

// 標準入出力
//int main() {
//	int a, b;
//	cin >> a >> b;
//  if (a * b % 2 == 0) {
//	  cout << "Even" << endl;
//  } else {
//	  cout << "Odd" << endl;
//  }
//  return 0;
//}

// 文字列を1文字ずつループ
//int main() {
//  string str;
//  cin >> str;
//  int sum = 0;
//  for(int i = 0; i < (int)str.size(); ++i){
//    char ch = str[i];
//
//    if (ch == '1') {
//      sum++;
//    }
//  }
//  cout << sum << endl;
//  return 0;
//}



//long double a[100][2];  // 最大10000個ですが、少しだけ多めにとります
mp::cpp_dec_float_100 a[100][2];  // 最大10000個ですが、少しだけ多めにとります

// DP テーブル
//long double dp[100][3];
mp::cpp_dec_float_100 dp[100][3];

int main() {
  int N;
  cin >> N;
  for (int i = 0; i < N; ++i) cin >> a[i][0] >> a[i][1];

  for (int i = 0; i < 100; i++) {
    for (int j = 0; j < 3; j++) {
      dp[i][j] = 0;
    }
  }

  for (int i = 0; i < N; ++i) {
      dp[i + 1][3] = mp::max(dp[i][3], pow((dp[i][0] + a[i][0]), 2) + pow((dp[i][1] + a[i][1]), 2));
      dp[i + 1][0] = dp[i][0] + a[i][0];
      dp[i + 1][1] = dp[i][1] + a[i][1];
  }

  //printf("%.50Lf\n", sqrt(dp[N][3]));
  //std::cout << std::setprecision(std::numeric_limits<decltype(dp[N][3])>::digits10 + 1)
  //          << sqrt(dp[N][3]);
  std::cout << std::setprecision(std::numeric_limits<mp::cpp_dec_float_100>::max_digits10)
     << sqrt(dp[N][3]) << std::endl;
}

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

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

using namespace std;

int N;

long long int x[105], y[105];

int used[105];

long long int  dis(long long int x, long long int y) {
	return x*x + y*y;
}

int main(void) {

	cin >> N;

	long long int ans = 0;

	for (int i = 1; i <= N; i++) {
		cin >> x[i] >> y[i];
	}


	long long int X, Y;

	for (int i = 1; i <= N; i++) {

		for (int j = 1; j <= N; j++) { used[i] = 0; }

		X = x[i]; Y = y[i]; used[i] = 1; 
		
		ans = max(ans, dis(X, Y)); 
		for (int j = 1; j <= N; j++) {
			if (used[j] == 1) { continue; }
			if (dis(X, Y) < dis(X + x[j], Y + y[j])) { used[j] = 1; X += x[j]; Y += y[j]; ans = max(ans,dis(X, Y)); }
		}
	}

	long double ANS;

	
	ANS = sqrt(1.0L*ans);

	cout << setprecision(15) << fixed << ANS << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:15: error: 'sqrt' was not declared in this scope
   48 |         ANS = sqrt(1.0L*ans);
      |               ^~~~
Language: C++

#include <iostream>
#include <cmath>
#include <bits/stdc++.h>
#include <string>

#include <boost/multiprecision/cpp_dec_float.hpp>

namespace mp = boost::multiprecision;

using namespace std;

// stringをintに
// string a = "123";
// stoi(a)
//
// intをstringに
// int a = 123;
// to_string(a)
//
// charをintに
// char a = '1';
// (int)a - 48 // asciiコードを値にする

// stringのソート
// string str = "abccba";
// sort(str.begin(), str.end());
//
// ハッシュテーブル
// unordered_map<string, int> mp;
// mp["aabbcc"] = 0;

// 配列Aにcinする
//int main() {
//  int N;
//  cin >> N;
//  vector<int> A(N);
//  for (int i = 0; i < N; i++) {
//    cin >> A.at(i);
//  }
//  return 0;
//}

// 標準入出力
//int main() {
//	int a, b;
//	cin >> a >> b;
//  if (a * b % 2 == 0) {
//	  cout << "Even" << endl;
//  } else {
//	  cout << "Odd" << endl;
//  }
//  return 0;
//}

// 文字列を1文字ずつループ
//int main() {
//  string str;
//  cin >> str;
//  int sum = 0;
//  for(int i = 0; i < (int)str.size(); ++i){
//    char ch = str[i];
//
//    if (ch == '1') {
//      sum++;
//    }
//  }
//  cout << sum << endl;
//  return 0;
//}



//long double a[100][2];  // 最大10000個ですが、少しだけ多めにとります
mp::cpp_dec_float_100 a[100][2];  // 最大10000個ですが、少しだけ多めにとります

// DP テーブル
//long double dp[100][3];
mp::cpp_dec_float_100 dp[100][3];

int main() {
  int N;
  cin >> N;
  for (int i = 0; i < N; ++i) cin >> a[i][0] >> a[i][1];

  for (int i = 0; i < 100; i++) {
    for (int j = 0; j < 3; j++) {
      dp[i][j] = 0;
    }
  }

  for (int i = 0; i < N; ++i) {
      dp[i + 1][3] = max(dp[i][3], pow((dp[i][0] + a[i][0]), 2) + pow((dp[i][1] + a[i][1]), 2));
      dp[i + 1][0] = dp[i][0] + a[i][0];
      dp[i + 1][1] = dp[i][1] + a[i][1];
  }

  //printf("%.50Lf\n", sqrt(dp[N][3]));
  //std::cout << std::setprecision(std::numeric_limits<decltype(dp[N][3])>::digits10 + 1)
  //          << sqrt(dp[N][3]);
  std::cout << std::setprecision(std::numeric_limits<mp::cpp_dec_float_100>::max_digits10)
     << sqrt(dp[N][3]) << std::endl;
}

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

#include<stdio.h>
#include<iostream>
#include<algorithm>
#include<iomanip>
using namespace std;
const int maxn=100+10;

int n;
int x[9]={0},y[9]={0};
int d[9];
double kq;
long long tmpkq=0;

int type(int x,int y){
  if (x==0 && y==0) return 0;
  if (x==0 && y<0) return 1;
  if (x==0 && y>0) return 2;
  if (x<0 && y==0) return 3;
  if (x>0 && y==0) return 4;
  if (x<0 && y<0) return 5;
  if (x<0 && y>0) return 6;
  if (x>0 && y<0) return 7;
  if (x>0 && y>0) return 8;
}

void process(){
  long long xx=0,yy=0;
  for(int i=0;i<9;i++){
    xx=xx+d[i]*x[i];
    yy=yy+d[i]*y[i];
  }
  tmpkq=max(tmpkq,xx*xx+yy*yy);
}

void back(int i){
  for(int j=0;j<=1;j++){
    d[i]=j;
    if (i==8) process();
    else back(i+1);
  }
}

int main(){
  //freopen("input.txt","r",stdin);
  scanf("%d",&n);
  for(int i=1;i<=n;i++){
    int xx,yy;
    scanf("%d%d",&xx,&yy);
    int id=type(xx,yy);
    x[id]+=xx;y[id]+=yy;
  }
  back(0);
  //for(int i=0;i<9;i++) cout<<"("<<x[i]<<" "<<y[i]<<")\n";
  //cout<<tmpkq<<endl;
  kq=sqrt(tmpkq);
  cout<<fixed<<setprecision(12)<<kq<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:55:6: error: 'sqrt' was not declared in this scope
   55 |   kq=sqrt(tmpkq);
      |      ^~~~
a.cc: In function 'int type(int, int)':
a.cc:24:1: warning: control reaches end of non-void function [-Wreturn-type]
   24 | }
      | ^
Language: C++

#include<iostream>
#include<list>

using namespace std;
int main(){
	int n;
	long x,y;
	long count = 0;
	long double a[4], b[4];
	long double line =0;
	long double line2 = 0;

	long ansx = 0, ansy=0;
	cin >> n;

	for(int i = 0; i < 4; i++) {
		a[i] = 0;
		b[i] = 0;
	}

	for (int i = 0; i < n; i++) {
		cin >> x>>y;
		
		if (x > 0 && y > 0) {
			a[0] += x;
			b[0] += y;
		}else if(x > 0 && y < 0) {
			a[1] += x;
			b[1] += y;
		}
		else if (x < 0 && y < 0) {
			a[2] += x;
			b[2] += y;
		}
		else if (x < 0 && y > 0) {
			a[3] += x;
			b[3] += y;
		}
		else if (x > 0 && y == 0) {
			a[0] += x;
			a[1] += x;
		}
		else if (x < 0 && y == 0) {
			a[2] += x;
			a[3] += x;
		}
		else if (x == 0 && y > 0) {
			b[0] += y;
			b[3] += y;
		}
		else if (x == 0 && y < 0) {
			b[1] += y;
			b[2] += y;
		}
		


	}

	for (int i = 0; i < 4; i++) {
		line2 = sqrtl(powl(a[i], 2) + powl(b[i], 2));
		if (line < line2) {
			line = line2;
		}
	}
	
	cout << line << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:61:31: error: 'powl' was not declared in this scope
   61 |                 line2 = sqrtl(powl(a[i], 2) + powl(b[i], 2));
      |                               ^~~~
a.cc:61:25: error: 'sqrtl' was not declared in this scope; did you mean 'strtol'?
   61 |                 line2 = sqrtl(powl(a[i], 2) + powl(b[i], 2));
      |                         ^~~~~
      |                         strtol
Language: C++

#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <algorithm>
#include <unordered_map>
#define rep(i, n) for (int i = 0; i < n; i++)

using namespace std;

struct Pos {
	double x = 0, y = 0;

};

int main() {
	
	int N; cin >> N;
	vector<Pos> pos(N);
	rep(i, N) cin >> pos[i].x >> pos[i].y;
	/*
	Pos pos[8];
	const int xy = 0, xy0 = 1, x_y = 2, x0y = 3, x0_y = 4, _xy = 5, _xy0 = 6, _x_y = 7;
	rep(i, N) {
	}
	*/

	vector<Pos> v(N);
	rep(i, N) v[i] = pos[i];

	rep(i, N) {
		//iをつけるか?
		rep(j, N) {
			if (i == j) continue;
			if (pow(v[j].x, 2) + pow(v[j].y, 2) < pow(v[j].x + pos[i].x, 2) + pow(v[j].y + pos[i].y, 2)) {
				v[j].x += pos[i].x;
				v[j].y += pos[i].y;
			}
		}
	}
	double ans = 0;
	rep(i, N) {
		if (sqrt(pow(v[i].x, 2) + pow(v[i].y, 2)) > ans) ans = sqrt(pow(v[i].x, 2) + pow(v[i].y, 2));
	}
	cout << setprecision(64) << fixed << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:29: error: 'pow' was not declared in this scope; did you mean 'pos'?
   35 |                         if (pow(v[j].x, 2) + pow(v[j].y, 2) < pow(v[j].x + pos[i].x, 2) + pow(v[j].y + pos[i].y, 2)) {
      |                             ^~~
      |                             pos
a.cc:43:26: error: 'pow' was not declared in this scope; did you mean 'pos'?
   43 |                 if (sqrt(pow(v[i].x, 2) + pow(v[i].y, 2)) > ans) ans = sqrt(pow(v[i].x, 2) + pow(v[i].y, 2));
      |                          ^~~
      |                          pos
a.cc:43:21: error: 'sqrt' was not declared in this scope
   43 |                 if (sqrt(pow(v[i].x, 2) + pow(v[i].y, 2)) > ans) ans = sqrt(pow(v[i].x, 2) + pow(v[i].y, 2));
      |                     ^~~~
Language: C++

#include<iostream>
#include<string>
#include<iomanip>
#include<cmath>
#include<vector>
#include<algorithm>
#include<map>
#include<cstdlib>

using namespace std;

#define int long long
#define endl "\n"

const long long INF = (long long)1e18;
const long long MOD = 1'000'000'007; 

string yn(bool f){return f?"Yes":"No";}
string YN(bool f){return f?"YES":"NO";}

#define x first
#define y second

signed main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	cout<<fixed<<setprecision(11);
	
	int N;
	int ax = 0, ay = 0, bx = 0, by = 0, cx = 0, cy = 0, dx = 0, dy = 0;
	int ex = 0, ey = 0, fx = 0, fy = 0, gx = 0, gy = 0, gx = 0, gy = 0;
	long double ans = 0;
	vector<pair<int,int>> in;
	map<pair<int,int>,int> mp;
	
	cin>>N;
	
	in.resize(N);
	
	for(int i = 0; i < N; i++){
		cin>>in[i].x>>in[i].y;
		// in[i].x = rand()%100000;
		// in[i].y = rand()%100000;
	}
	
	for(int i = 0; i < N; i++){
		if(in[i].x >= 0 && in[i].y >= 0){
			ax += in[i].x;
			ay += in[i].y;
		}
		if(in[i].x >= 0 && in[i].y <= 0){
			bx += in[i].x;
			by += in[i].y;
			
		}
		if(in[i].x <= 0 && in[i].y >= 0){
			cx += in[i].x;
			cy += in[i].y;
			
		}
		if(in[i].x <= 0 && in[i].y <= 0){
			dx += in[i].x;
			dy += in[i].y;
		}
		
	}
	mp[make_pair(0,0)] = true;
	
	for(int i = 0; i < N; i++){
		map<pair<int,int>,int> mp2;
		
		for(pair<pair<int,int>,int> y : mp){
			pair<int,int> p = y.first;
			int  d1 = p.x*p.x + p.y*p.y;
			int  d2 = (p.x+in[i].x)*(p.x+in[i].x)+ (p.y+in[i].y)*(p.y+in[i].y);
			if(d2 >= d1)mp2[make_pair((p.x+in[i].x),(p.y+in[i].y))] = true;
			
			ans = max(ans, (long double)sqrt(d2));
		}
		mp.clear();
		mp[make_pair(0,0)] = true;
		for(pair<pair<int,int>,int> y : mp2){
			pair<int,int> p = y.first;
			mp[p] = true;
		}
	}
	// cout<<ans<<endl;
	cout<<max((double)ans,max(max(sqrt(ax*ax+ay*ay),sqrt(bx*bx+by*by)),max(sqrt(cx*cx+cy*cy),sqrt(dx*dx+dy*dy))))<<endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:61: error: redeclaration of 'long long int gx'
   31 |         int ex = 0, ey = 0, fx = 0, fy = 0, gx = 0, gy = 0, gx = 0, gy = 0;
      |                                                             ^~
a.cc:31:45: note: 'long long int gx' previously declared here
   31 |         int ex = 0, ey = 0, fx = 0, fy = 0, gx = 0, gy = 0, gx = 0, gy = 0;
      |                                             ^~
a.cc:31:69: error: redeclaration of 'long long int gy'
   31 |         int ex = 0, ey = 0, fx = 0, fy = 0, gx = 0, gy = 0, gx = 0, gy = 0;
      |                                                                     ^~
a.cc:31:53: note: 'long long int gy' previously declared here
   31 |         int ex = 0, ey = 0, fx = 0, fy = 0, gx = 0, gy = 0, gx = 0, gy = 0;
      |                                                     ^~
Language: C++

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

long long zahyou(long long x,long long y){
	return 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) <<sqrt(ans)<<endl;
	
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:99:35: error: 'sqrt' was not declared in this scope
   99 |         cout<< setprecision(20) <<sqrt(ans)<<endl;
      |                                   ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;
set<pair<int,int> > S;
pair<long long,long long > D[105];
int main(){
    srand(time(0));
    int n;cin >> n;
    for(int i=1;i<=n;++i){
        cin >> D[i].first >> D[i].second;
        S.insert(make_pair(i,1));
    }
    long long x,y;x=0;y=0;
    int cnt=100000;
    int cnt2=0;
    double ans=0;
    while(1){
        bool flag=0;

        for(auto it=S.begin();it!=S.end();++it){
            long long X=x+D[(*it).first].first*(*it).second;
            long long Y=y+D[(*it).first].second*(*it).second;
            if(X*X+Y*Y>x*x+y*y){
                flag=1;
                auto is=make_pair((*it).first,(-1)*(*it).second);
                S.erase(it);
                x=X;y=Y;
                S.insert(is);
                break;
            }
        }
        if(!flag){
            if(cnt==0) break;
            if(x*x+y*y) - ans >1e-10){
                cnt2=0;
            }
            else
                ++cnt2;
            if(cnt2==10000) break;
            ans=max(ans,sqrt(x*x+y*y));
            
            --cnt;
            vector<pair<int,int> > V;
            for(auto it=S.begin();it!=S.end();++it){
                V.push_back((*it));
            }
            S.clear();
            x=0;y=0;
            for(auto v:V){
                int u=(rand()*rand())%2;
                if(u%2){
                    x+=D[v.first].first;
                    y+=D[v.first].second;
                    S.insert(make_pair(v.first,-1));
                }
                else{
                    S.insert(make_pair(v.first,1));
                }
            }
        }
    }
    printf("%.12f\n",ans);

    return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:37: error: expected ';' before ')' token
   34 |             if(x*x+y*y) - ans >1e-10){
      |                                     ^
      |                                     ;
Language: C++

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

int main() {
  int n;
  cin >> n;
  vector<int64_t> x(n), y(n);
  vector<int64_t> z(n);
  vector<tuple<int64_t, int64_t, int64_t>> t(n);
  for(int i = 0; i < n; i++){
    cin >> x.at(i) >> y.at(i);
    int64_t a = x.at(i), b = y.at(i);
    if(a < 0)
      a *= -1;
    if(b < 0)
      b *= -1;
    z.at(i) = a + b;
    t.at(i) = make_tuple(z.at(i), x.at(i), y.at(i));
  }
  sort(v.begin(), v.end());
  auto r = 0, p = 0, q = 0;
  for(int i = 0; i < n; i++){
    int64_t s = p + x.at(i), u = q + y.at(i);
    auto ri = pow(s*s+u*u, 0.5);
    if(ri > r){
      r = ri;
      p += x.at(i);
      q += y.at(i);
    }
  }
  cout << r << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:8: error: 'v' was not declared in this scope
   21 |   sort(v.begin(), v.end());
      |        ^
Language: C++

#include<iostream>
#include<stdio.h>
#include<vector>
#include<algorithm>
#include<set>
using namespace std ;

#define MAXN 107

int n ;
pair < long long , long long > a[ MAXN ] ;



long long calc ( ) {
    long long ret = 0 ;
    long long x , y ;
    x = y = 0 ;
    for ( int i = 1 ; i <= n ; ++ i ) {
        x += a[ i ].first ;
        y += a[ i ].second ;
        if ( ret < x * x + y * y ) {
            ret = x * x + y * y ;
        }
    }
    x = y = 0 ;
    for ( int i = n ; i >= 0 ; -- i ) {
        x += a[ i ].first ;
        y += a[ i ].second ;
        if ( ret < x * x + y * y ) {
            ret = x * x + y * y ;
        }
    }
    return ret ;
}

void input ( ) {
    scanf ( "%d" , &n ) ;
    for ( int i = 1 ; i <= n ; ++ i ) {
        scanf ( "%lld%lld" , &a[ i ].first , &a[ i ].second ) ;
    }
}

void solve ( ) {
    sort ( a + 1 , a + n + 1 ) ;
    long long ans = calc ( ) ;
    for ( int i = 1 ; i <= n ; ++ i ) {
        swap ( a[ i ].first , a[ i ].second ) ;
    }
    sort ( a + 1 , a + n + 1 ) ;
    long long aux = calc ( ) ;
    ans = max ( ans , aux ) ;
    printf ( "%.15lf\n" , sqrt ( ans ) ) ;
}

int main ( ) {
    ///freopen ( "in.txt" , "r" , stdin ) ;
    ios_base :: sync_with_stdio ( false ) ;
    cin.tie ( NULL ) ;
    input ( ) ;
    solve ( ) ;
    return 0 ;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:53:27: error: 'sqrt' was not declared in this scope
   53 |     printf ( "%.15lf\n" , sqrt ( ans ) ) ;
      |                           ^~~~
Language: C++

#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <cmath>
#define pi acos(-1.0)
using namespace std;
typedef long long ll;
const int maxn=200010;
int n;
ll ans;
struct node
{
    int x,y;
    double a;
}p[maxn<<1];
ll sx[maxn<<1],sy[maxn<<1];
bool cmp(const node &a,const node &b)
{
    return a.a<b.a;
}
inline void check(int l,int r)
{
    if(l<=r) ans=max(ans,(sx[r]-sx[l-1])*(sx[r]-sx[l-1])+(sy[r]-sy[l-1])*(sy[r]-sy[l-1]));
}
int main()
{
    scanf("%d", &n);
    int i,j;
    for(i=1;i<=n;i++)    scanf("%d%d", &p[i], x, &p[i].y), p[i].a=atan2(p[i].x,p[i].y),p[i+n]=p[i],p[i+n].a+=2*pi;
    sort(p+1,p+2*n+1,cmp);
    for(i=1;i<=2*n;i++)  sx[i]=sx[i-1]+p[i].x,sy[i]=sy[i-1]+p[i].y;
    for(i=j=1;i<=2*n;i++)
    {
        for(;j<i&&p[j].a<=p[i].a-pi;j++,check(j,i-1));
        check(j,i);
    }
    for(;j<=2*n;check(j,2*n),j++);
    printf("%.11lf\n",sqrt((double)ans));
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:47: error: 'x' was not declared in this scope
   30 |     for(i=1;i<=n;i++)    scanf("%d%d", &p[i], x, &p[i].y), p[i].a=atan2(p[i].x,p[i].y),p[i+n]=p[i],p[i+n].a+=2*pi;
      |                                               ^
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <cstdio>
#include <string.h>
#define rep(i,n) for (int i = 0; i < (int)n; i++)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pi;
typedef pair<pi, pi> pp;
typedef pair<ll, ll> pl;
double PI = 3.1415926535897932;
const double EPS = 1e-9;
const ll MOD = 1000000007;
const int inf = 1 << 30;
const ll linf = 1LL << 60;

vector<pi> toppo (vector<pi>& p, int si) {
    sort(p.begin(), p.end());
    vector<pi> ret;
    ret.push_back(p[0]);
    for (int i = 1; i < si; i++) {
        while (ret.size() > 1) {
            int tmp = ret.size()-1;
            if ((p[i].second-ret[tmp-1].second)*(ret[tmp].first-ret[tmp-1].first) >= 
                (ret[tmp].second-ret[tmp-1].second)*(p[i].first-ret[tmp-1].first)) {
                ret.pop_back();
            } else {
                break;
            }
        }
        ret.push_back(p[i]);
    }
    vector<pi> ret2;
    ret2.push_back(p[si-1]);
    for (int i = si-2; i >= 0; i--) {
        while (ret2.size() > 1) {
            int tmp = ret2.size()-1;
            if ((p[i].second-ret2[tmp-1].second)*(ret2[tmp].first-ret2[tmp-1].first) >= 
                (ret2[tmp].second-ret2[tmp-1].second)*(p[i].first-ret2[tmp-1].first)) {
                ret2.pop_back();
            } else {
                break;
            }
        }
        ret2.push_back(p[i]);
    }
    ret2.pop_back();
    for (int i = 1; i < ret2.size(); i++) ret.push_back(ret2[i]);
    return ret;
}

int n;
vector<pi> now;

int main() {
    cin >> n;
    now.push_back(pi(0,0));
    rep(i,n) {
        int x, y; cin >> x >> y;
        int si = now.size();
        rep(j,si) now.push_back(pi(now[j].first+x, now[j].second+y));
        now = toppo(now, (int)now.size());
    }
    double ans = 0.0;
    rep(i,now.size()) {
        ans = max(ans, sqrt(now[i].first*(double)now[i].first+now[i].second*(double)now[i].second));
    }
    printf("%.15f\n", ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:71:24: error: 'sqrt' was not declared in this scope
   71 |         ans = max(ans, sqrt(now[i].first*(double)now[i].first+now[i].second*(double)now[i].second));
      |                        ^~~~
Language: C++

#include <bits/stdc++.h>

#define rep(i, a, b) for(int i = a; i <= b; ++i)
#define ll long long
#define MOD 1000000007
#define N 106

using namespace std;

ll n, ans;

struct Node {

    ll x, y, z;

} node[N];

double res;

void search(ll, ll, ll);
bool cmp(Node, Node);

int main() {

    scanf ("%d", &n);

    rep (i, 1, n) scanf("%lld%lld", &node[i].x, &node[i].y);

    rep (i, 1, 1000) {
        srand(time(0));
        rep (k, 1, n) node[k].z = rand();
        sort(node + 1, node + n + 1, cmp);
        search(1, 0, 0);
    }

    res = sqrt(ans);

    printf("%.13lf\n", res);

    return 0;
}

void search(ll j, ll u, ll v) {
    if (j > n) {
        ans = max(ans, u * u + v * v);
        return 0;
    }
    if (j <= 10 || u * u + v * v <=
            (u + node[j].x) * (u + node[j].x) + (v + node[j].y) * (v + node[j].y))
        search(j + 1, u + node[j].x, v + node[j].y);
    if (j <= 10 ||
            u * u + v * v > (u + node[j].x) * (u + node[j].x) + (v + node[j].y) * (v + node[j].y))
        search(j + 1, u, v);
}

bool cmp(Node u, Node v) { return u.z < v.z; }


Compiler output:
a.cc: In function 'int main()':
a.cc:33:15: warning: ignoring return value of '_ForwardIterator std::search(_ForwardIterator, _ForwardIterator, const _Searcher&) [with _ForwardIterator = int; _Searcher = int]', declared with attribute 'nodiscard' [-Wunused-result]
   33 |         search(1, 0, 0);
      |         ~~~~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:4184:5: note: declared here
 4184 |     search(_ForwardIterator __first, _ForwardIterator __last,
      |     ^~~~~~
a.cc: In function 'void search(long long int, long long int, long long int)':
a.cc:46:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
   46 |         return 0;
      |                ^
/usr/include/c++/14/bits/stl_algo.h: In instantiation of '_ForwardIterator std::search(_ForwardIterator, _ForwardIterator, const _Searcher&) [with _ForwardIterator = int; _Searcher = int]':
a.cc:33:15:   required from here
   33 |         search(1, 0, 0);
      |         ~~~~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4186:24: error: expression cannot be used as a function
 4186 |     { return __searcher(__first, __last).first; }
      |              ~~~~~~~~~~^~~~~~~~~~~~~~~~~
Language: C++

// C++11
#include "bits/stdc++.h"
#include <sys/time.h>
#include <emmintrin.h>
#include <string>
#include <sstream>
#include <fstream>
#include <random>
#include <bitset>
#include <chrono>
#include <map>

using namespace std;

std::chrono::system_clock::time_point start = std::chrono::system_clock::now();

inline double GetSeconds() {
   std::chrono::system_clock::time_point end = std::chrono::system_clock::now();
  return std::chrono::duration_cast<std::chrono::milliseconds>(end-start).count();
}

struct XorShift {
  uint64_t x = 88172645463325252ULL;

  XorShift() {}

  void setSeed(uint64_t seed) {
    x = seed;
  }

  uint64_t next() {
    x ^= x << 13;
    x ^= x >> 7;
    x ^= x << 17;
    return x;
  }

  int nextInt(int n) {
    uint64_t upper = 0xFFFFFFFFFFFFFFFFULL / n * n;
    uint64_t v = next();
    while (v >= upper) {
      v = next();
    }
    return v % n;
  }

  double nextDouble() {
    uint64_t v = next() >> 11; // 53bit
    return (double)v / (1ULL << 53);
  }
};

XorShift xs;

const int M = 1e5+5;
const int mod = 1000000000+7;
int A[M];
int R[201][M][201] = {};
int fa[201];

int main() {
  int n,x;
  cin >> n >> x;
  for(int i=0; i<n; i++){
    cin >> A[i];
  }
  sort(&A[0], &A[n]);
  fa[0] = 1;
  for(int i=1; i<=n; i++) fa[i] = fa[i-1] * i % mod;
  R[0][x] = 1;
  for(int i=0; i<n; i++){
    int c = A[n-i-1];
    a
  }
  cout << 0 << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:70:11: error: incompatible types in assignment of 'int' to 'int [201]'
   70 |   R[0][x] = 1;
      |   ~~~~~~~~^~~
a.cc:73:5: error: 'a' was not declared in this scope
   73 |     a
      |     ^