Language: C++

 
 #include<bits/stdc++.h>

using namespace std;
#define INFS (1LL<<28)
#define INF (1LL<<60)
#define DEKAI 1000000007
#define lp(i,n) for(int i=0;i<n;i++)
#define int long long
#define double long double
#define all(n) n.begin(),n.end()
typedef complex<double> P;

vector<pair<double,pair<double,double>>> ans;

double max(double a,double b){
	if(a>b)return a;
	else return b;
}

double rot(double x,double y){
	double angle=acos(x/(sqrt(x*x+y*y)));
	angle=angle*180.0/acos(-1);
	if(y<0)angle=360.0-angle;
	return angle;
}

signed main(){
	cout << fixed << setprecision(15);
	int n;
	cin>>n;

	lp(i,n){
		int x,y;
		cin>>x>>y;
		ans.push_back(arg(P(x,y)),{x,y}});
	}
	sort(ans.begin(),ans.end());
	lp(i,n){
		ans.push_back(ans[i]);
	}
	double r=0;
	lp(i,n){
		double sum[2]={0,0};
		for(int j=i;j<n+i;j++){
			sum[0]+=ans[j].second.first;
			sum[1]+=ans[j].second.second;
			r=max(r,(double)sqrt(sum[0]*sum[0]+sum[1]*sum[1]));
		}
	}
	cout<<r<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:48: error: expected ')' before '}' token
   36 |                 ans.push_back(arg(P(x,y)),{x,y}});
      |                              ~                 ^
      |                                                )
a.cc:36:49: error: expected primary-expression before ')' token
   36 |                 ans.push_back(arg(P(x,y)),{x,y}});
      |                                                 ^
a.cc: At global scope:
a.cc:38:13: error: expected constructor, destructor, or type conversion before '(' token
   38 |         sort(ans.begin(),ans.end());
      |             ^
a.cc:8:17: error: expected unqualified-id before 'for'
    8 | #define lp(i,n) for(int i=0;i<n;i++)
      |                 ^~~
a.cc:39:9: note: in expansion of macro 'lp'
   39 |         lp(i,n){
      |         ^~
a.cc:39:12: error: 'i' does not name a type
   39 |         lp(i,n){
      |            ^
a.cc:8:29: note: in definition of macro 'lp'
    8 | #define lp(i,n) for(int i=0;i<n;i++)
      |                             ^
a.cc:39:12: error: 'i' does not name a type
   39 |         lp(i,n){
      |            ^
a.cc:8:33: note: in definition of macro 'lp'
    8 | #define lp(i,n) for(int i=0;i<n;i++)
      |                                 ^
a.cc:8:17: error: expected unqualified-id before 'for'
    8 | #define lp(i,n) for(int i=0;i<n;i++)
      |                 ^~~
a.cc:43:9: note: in expansion of macro 'lp'
   43 |         lp(i,n){
      |         ^~
a.cc:43:12: error: 'i' does not name a type
   43 |         lp(i,n){
      |            ^
a.cc:8:29: note: in definition of macro 'lp'
    8 | #define lp(i,n) for(int i=0;i<n;i++)
      |                             ^
a.cc:43:12: error: 'i' does not name a type
   43 |         lp(i,n){
      |            ^
a.cc:8:33: note: in definition of macro 'lp'
    8 | #define lp(i,n) for(int i=0;i<n;i++)
      |                                 ^
a.cc:51:9: error: 'cout' does not name a type
   51 |         cout<<r<<endl;
      |         ^~~~
a.cc:52:9: error: expected unqualified-id before 'return'
   52 |         return 0;
      |         ^~~~~~
a.cc:53:1: error: expected declaration before '}' token
   53 | }
      | ^