Language: C++

/*
 _____ ____ _____   ___   ___  __  ___  
|_   _/ __ \_   _| |__ \ / _ \/_ |/ _ \ 
  | || |  | || |      ) | | | || | (_) |
  | || |  | || |     / /| | | || |\__, |
 _| || |__| || |_   / /_| |_| || |  / / 
|_____\____/_____| |____|\___/ |_| /_/   
*/
#include <bits/stdc++.h>
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define per(i, a, b) for (long long i = (a); i > (b); i--)
#define a(x) (x.begin(), x.end())
#define ar(x) (x.rbegin(), x.rend())
#define pb push_back
#define Pb() pop_back()
#define ll long long int
#define ull unsigned long long int
#define pii pair<int, int>
#define pll pair<ll, ll>
#define sc scanf
#define scin(x) sc("%d", &(x))
#define scln(x) sc("%lld", &(x))
#define pf prllf
#define ms(a, b) memset(a, b, sizeof(a))
#define mp make_pair
#define db double
#define EPS 10E-10
#define ff first
#define ss second
#define sqr(x) (x) * (x)
#define vi vector<int>
#define vl vector<ll>
#define vii vector<vector<int>>
#define vll vector<vector<ll>>
#define DBG pf("HI\n")
#define MOD 1000000007
#define CIN                       \
    ios_base::sync_with_stdio(0); \
    cin.tie(0);                   \
    cout.tie(0)
#define RUN_CASE(t, T) for (__typeof(t) t = 1; t <= T; t++)
#define CASE(t) prllf("Case %d: ", t)
#define CASEL(t) prllf("Case %d:\n", t)
#define intlimit 2147483647
#define longlimit 9223372036854775807
#define infinity (1 << 28)
#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) ((a) * (b) / gcd(a, b))
#define PI 2 * acos(0.0)
using namespace std;
int main()
{
    CIN;
    cout << setprecision(32) << fixed;
    int n;
    cin >> n;
    vector<pair<int,int>>v(n);
    rep(i,0,n){
        cin >> v[i].first >> v[i].second;
    }
    vector<pair<int,int>>zwaya(4,{0,0});
    rep(i,0,n){
        rep(j,0,4){
            int x=zwaya[j].first+v[i].first,y=zwaya[j].second+v[i].second;
            double a = pow(x,2)+pow(y,2);
            double b = pow(zwaya[j].first,2)+pow(zwaya[j].second,2);
            if(a>b){
                if(j==0){
                    if(v[i].first>=0&&v[i].second>=0){
                        zwaya[j]={x,y};
                    }
                }
                if(j==1){
                    if(v[i].first<=0&&v[i].second>=0){
                        zwaya[j]={x,y};
                    }
                }
                if(j==2){
                    if(v[i].first>=0&&v[i].second<=0){
                        zwaya[j]={x,y};
                    }
                }
                if(j==3){
                    if(v[i].first<=0&&v[i].second<=0){
                        zwaya[j]={x,y};
                    }
                }
            }
        }
    }
    int maxi = 0;
    rep(i,0,4){
        maxi = max(maxi,(long long)pow(zwaya[i].first,2)+(long long)pow(zwaya[i].second,2));
    }
    cout << sqrt(maxi);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:93:19: error: no matching function for call to 'max(int&, long long int)'
   93 |         maxi = max(maxi,(long long)pow(zwaya[i].first,2)+(long long)pow(zwaya[i].second,2));
      |                ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:9:
/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:   template argument deduction/substitution failed:
a.cc:93:19: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   93 |         maxi = max(maxi,(long long)pow(zwaya[i].first,2)+(long long)pow(zwaya[i].second,2));
      |                ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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, 2 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:   candidate expects 1 argument, 2 provided
/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:   template argument deduction/substitution failed:
a.cc:93:19: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   93 |         maxi = max(maxi,(long long)pow(zwaya[i].first,2)+(long long)pow(zwaya[i].second,2));
      |                ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~