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

#include <bits/stdc++.h>

using namespace std;
#define ll long long 

ll n , a , b ,mminx = 1e18, mminy = 1e18;
vector<pair<ll,ll> > v;
int main(){
 	 cin >> n;
     for(int i = 0;i < n;i++){
      	cin >> a >> b;
       v.push_back({a,b});
       mminx = min(mminx , a);
       mminy = min(mminy, b);
     }
 	ll res = 0;
    for(int i = 0;i < n;i++){
      res = max(res , v[i].first + v[i].second + abs(mmin) + abs(mmax));
    }
    cout << res;
}	

Compiler output:
a.cc: In function 'int main()':
a.cc:18:54: error: 'mmin' was not declared in this scope; did you mean 'mminy'?
   18 |       res = max(res , v[i].first + v[i].second + abs(mmin) + abs(mmax));
      |                                                      ^~~~
      |                                                      mminy
a.cc:18:66: error: 'mmax' was not declared in this scope; did you mean 'fmax'?
   18 |       res = max(res , v[i].first + v[i].second + abs(mmin) + abs(mmax));
      |                                                                  ^~~~
      |                                                                  fmax
Language: C++

#include<bits/stdc++.h>
using namespace std;
#include <numeric> 
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);
#define endl "\n"
#define int long long int
#define mod 1000000007
#define INT_BITS 16
#define INF 10000000
#define pi 3.141592
#define watch(x) cout<<(#x)<<"="<<(x)<<"\n" 
#define pb push_back
//__builtin_popcount

#ifndef ONLINE_JUDGE
    #include "debug.cpp"
#endif

void maxSubArraySum(int a[], int size) 
{ 
    int max_so_far = INT_MIN, max_ending_here = 0, 
        
  
    for (int i=0; i< size; i++ ) 
    { 
        max_ending_here += a[i]; 
  
        if (max_so_far < max_ending_here) 
        { 
            max_so_far = max_ending_here; 
 
        } 
  
        if (max_ending_here < 0) 
        { 
            max_ending_here = 0; 

        } 
    } 
    cout<<max_so_far << endl; 
    
} 

int32_t main()
{
    #ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    #endif
    // fast;

   int n;
   cin>>n;

   vector<pair<int,int>>vp;
   for(int i=0;i<n;i++)
   {
        int x,y;
        cin>>x>>y;
        vp.pb({x,y});
   }

   sort(vp.begin(),vp.end());

   int a[n-1];

   for(int i=1;i<n;i++)
   {
        a[i-1]=(vp[i].first-vp[i-1].first)+(vp[i].second-vp[i-1].second);
   }


   maxSubArraySum(a,n-1);
    
 return 0;

}


Compiler output:
a.cc:16:14: fatal error: debug.cpp: No such file or directory
   16 |     #include "debug.cpp"
      |              ^~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define lli long long int
const int mod = (int)1e9+7;
#define pb push_back
 
int main(){
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	
	int n;
	cin >> n;
	set<pair<int,int>> st;
	vector<lli> dist1, dist2;
	for(int i=0; i<n; i++){
		int a, b;
		cin >> a >> b;
		if(st.find(make_pair(a, b))!= st.end()) continue;
		st.insert(make_pair(a,b));
		dist1.push_back(((lli)a+(lli)b));
		dist2.push_back(((lli)a-(lli)b));
	}
	sort(dist1.begin(), dist1.end());
	sort(dist2.begin(), dist2.end());
	cout << max(dist1.back()-dist1[0],abs (-dist2.back()+dist2[0]) ;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:71: error: expected ')' before ';' token
   26 |         cout << max(dist1.back()-dist1[0],abs (-dist2.back()+dist2[0]) ;
      |                    ~                                                  ^~
      |                                                                       )
Language: C++

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

#define lli long long int
#define ld long double
#define mod 1000000007
#define pb push_back
#define mp make_pair
#define pf push_front
#define ff first
#define ss second
#define max(a,b) (a>b?a:b)
#define min(a,b) (a<b?a:b)

////////////////////////////////////////////////////////    By: Umang Srivastava

/*
lli extgcd(lli a, lli b, lli *x , lli *y)
{
	if(a==0)
	{
		*x=0;
		*y=1;
		return b;
	}
	lli x1 , y1;
	lli gcd = extgcd(b%a , a , &x1 , &y1);
	*x=y-(b/a)*x1;
	*y=x1;
	return gcd;
}

lli modinv(lli a, lli m)
{
	lli x,y;
	lli g = extgcd(a,m,&x,&y);
	if(g!=1)
		return -1;
	return (x%m+m)%m;
}

lli moddiv(lli a, lli b, lli m)
{
	a=a%m;
	lli inv = modinv(b,m);
	if(inv!=-1)
		return ((a*inv + m)%m);
	else
		return -1;
}
*/
// lli binpow(lli a, lli b, lli m)
// {
// 	lli res=1;
// 	a=a%m;
// 	while(b>0)
// 	{
// 		if(b & 1)
// 		{
// 			res = (res * a)%m;
// 		}
// 		b=b>>1;
// 		a=(a*a)%m;
// 	}
// 	return res;
// }
/*
lli gcd(lli a, lli b)
{
    // if(b<a)
    // {
    //     lli t=a;
    //     a=b;
    //     b=t;
    // }
    if(a==0)
        return b;
    return gcd(b%a,a);
}
*/
/////////////////////////////////////////////////////////

int main()
{
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    lli n,ans,i,j;
    cin>>n;
    lli xi[n];
    lli yi[n];
    for(i=0;i<n;i++)
    {
        cin>>xi[i]>>yi[i];
    }
    ans=abs(x[0]-x[1]) + abs(y[0]-y[1])
    for(i=0;i<n;i++)
    {
        for(j=i+1;j<n;j++)
        {
            ans = max(ans,abs(x[i]-x[j]) + abs(y[i]-y[j]));
        }
    }
    cout<<ans<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:96:13: error: 'x' was not declared in this scope; did you mean 'xi'?
   96 |     ans=abs(x[0]-x[1]) + abs(y[0]-y[1])
      |             ^
      |             xi
a.cc:96:30: error: 'y' was not declared in this scope; did you mean 'yi'?
   96 |     ans=abs(x[0]-x[1]) + abs(y[0]-y[1])
      |                              ^
      |                              yi
a.cc:97:20: error: expected ';' before ')' token
   97 |     for(i=0;i<n;i++)
      |                    ^
      |                    ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define LI list<int>
#define vct vector
#define D(a) (double)(a)
#define vi vct<int>
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vvi vct<vi>
#define vll vct<ll>
#define vvll vct<vll>
#define vpii vct<pii>
#define vpll vct<pll>
#define vb vct<bool>
#define vs vector<string>
#define all(a) a.begin(),a.end()
#define allr(a) a.rbegin(),a.rend()
#define mp(a,b) make_pair(a,b)
#define pb push_back
#define ff first
#define ss second
#define bg begin()
#define UNIQUE(X) (X).erase(unique(all(X)),(X).end())
#define ft cout<<"for test"<<endl;
#define read(v,a,n) for(int i=a; i<n; i++)cin>>v[i];
#define print(v) for(auto it:v)cout<<it<<' '; cout<<endl;
#define PI acos(-1.0)
#define yes cout<<"YES"<<endl
#define no cout<<"NO"<<endl
#define FIO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define t_c int test,cs=1;cin>>test;while(test--)
#define rt return true
#define rf return false
///................function.....................///
#define siz(s) (int)(s.size())
#define mod 1000000007
#define dbg(a) cout << #a << " = " << a << " ";
int main()
{
    ///freopen("input.txt","r",stdin);
    ///freopen("input15.txt","w",stdout);
    int n,x,y;
    cin>>n;
    int mxx=-2*n-1,mnx=2*n+1,mxy=-2*n-1,mny=2*n+1;
    for(i=0; i<n; i++)
    {
        cin>>x>>y;
        mxx = max(mxx,x+y);
        mnx = min(mnx,x+y);
        
        mxy = max(mxy,x-y);
        mny = min(mny,x-y);
    }
    cout<<max(mxx-mnx,mxy-mny)<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:46:9: error: 'i' was not declared in this scope
   46 |     for(i=0; i<n; i++)
      |         ^
Language: C++

#include<iostream>
//#include<atcoder/all>

using namespace std;
//using namespace atcoder;

int main(){
    int N;
    cin>>N;
    int cmax=INT_MIN;
    int dmax=INT_MIN;
    int cmin=INT_MAX;
    int dmin=INT_MAX;
    for(int i=0;i<N;i++){
        int x,y;
        cin>>x>>y;
        int c=x+y;
        int d=x-y;
        cmax=max(cmax,c);
        cmin=min(cmin,c);
        dmax=max(dmax,d);
        dmin=min(dmin,d);
    }

    cout<<max(cmax-cmin,dmax-dmin)<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: 'INT_MIN' was not declared in this scope
   10 |     int cmax=INT_MIN;
      |              ^~~~~~~
a.cc:2:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include<iostream>
  +++ |+#include <climits>
    2 | //#include<atcoder/all>
a.cc:12:14: error: 'INT_MAX' was not declared in this scope
   12 |     int cmin=INT_MAX;
      |              ^~~~~~~
a.cc:12:14: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define EFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i, n) FOR(i,0,n)
#define INF 100000000

int main(void){
    ll N,ans = -INF;
    cin >> N;
    ll z1=-INF,z2=INF,w1=-INF,w2=INF;
    REP(i,N){
        ll x,y;
        cin >> x >> y;
        z1 = max(z1,x+y);
        z2 = min(z2,x+y);
        w1 = max(w1,x-y);
        w2 = min(w2,x-y);
        ans = max(ans,z1-z2,w1-w2);
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
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: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = long long int; _Compare = long long int]':
a.cc:20:18:   required from here
   20 |         ans = max(ans,z1-z2,w1-w2);
      |               ~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:306:17: error: '__comp' cannot be used as a function
  306 |       if (__comp(__a, __b))
      |           ~~~~~~^~~~~~~~~~
Language: C++

#include<iostream>
#include<algorithm>

int main()
{
  int i,j,k,n,d1[200000],d2[200000],x,y;
  cin >> n;
  for(int i=0,x,y; i<n; i++)
  {
    cin>>x>>y;
	d1[i]=(x+y);
    d2[i]=(x-y);
  }
  sort(d1,d1+n);
  sort(d2,d2+n);
  cout<<max(d1[n-1]-d1[0],d2[n-1]-d2[0])<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> n;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:14:3: error: 'sort' was not declared in this scope; did you mean 'std::sort'?
   14 |   sort(d1,d1+n);
      |   ^~~~
      |   std::sort
In file included from /usr/include/c++/14/algorithm:86,
                 from a.cc:2:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: 'std::sort' declared here
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
a.cc:16:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |   cout<<max(d1[n-1]-d1[0],d2[n-1]-d2[0])<<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:9: error: 'max' was not declared in this scope; did you mean 'std::max'?
   16 |   cout<<max(d1[n-1]-d1[0],d2[n-1]-d2[0])<<endl;
      |         ^~~
      |         std::max
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:16:43: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |   cout<<max(d1[n-1]-d1[0],d2[n-1]-d2[0])<<endl;
      |                                           ^~~~
      |                                           std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C

#include<stdio.h>
#include<stdlib.h>
int main() {
	int N;
	scanf("%d", &N);
	int x[N]:
	int y[N];
	for (int i = 0; i < N; i++) {
		scanf("%d %d", &x[i], &y[i]);
	}
	int m = abs((x[0] - x[1]) + (y[0] - y[1]));
	for (int i = 0; i < N; i++) {
		for (int j = 0; j < N; j++) {
			if (m < abs((x[i] - x[j]) + (y[i] - y[j]))) {
				m = abs((x[i] - x[j]) + (y[i] - y[j]));
			}
		}
	}
	printf("%d", m);
}

Compiler output:
main.c: In function 'main':
main.c:6:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
    6 |         int x[N]:
      |                 ^
main.c:6:17: error: expected expression before ':' token
main.c:9:33: error: 'x' undeclared (first use in this function)
    9 |                 scanf("%d %d", &x[i], &y[i]);
      |                                 ^
main.c:9:33: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:40: error: 'y' undeclared (first use in this function)
    9 |                 scanf("%d %d", &x[i], &y[i]);
      |                                        ^
Language: C

#include<stdio.h>
int main(){
  int n,i;
  scanf("%d",&n);
  long int x,y;
  scanf("%li%li",&x,&y);
  long int sum=x+y, dif=x-y, maxsum=sum,minsum=sum,maxdif=dif,mindif=dif;
  for (i=1;i<n;i++){
    scanf("%li%li",&x,&y);
    sum=x+y;
    dif=x-y;
    if (sum>maxsum) maxsum=sum;
    else if(sum<minsum) minsum = sum;
    if (dif>maxdif) maxdif=dif;
    else if(dif<miindif) mindif=dif;
  }
  sum=maxsum-minsum;
  dif=maxdif-mindif;
  if(sum>dif) printf("%li\n", sum);
  else printf("%li\n", dif);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:17: error: 'miindif' undeclared (first use in this function); did you mean 'mindif'?
   15 |     else if(dif<miindif) mindif=dif;
      |                 ^~~~~~~
      |                 mindif
main.c:15:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<bits/stdc++.h>
#define ll long long int
using namespace std;
#define mod  1000000007
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)

int main(){
ll t;
t=1;
fast;
//  cin>>t;

wzhile(t--){
ll n;
cin>>n;
pair<ll,ll> arr[n];
ll ma=0;
ll k=-1;
for(ll i=0; i<n;i++){
cin>>arr[i].first>> arr[i].second;
    if(ma<abs(arr[i].first) + abs(arr[i].second)){
        ma = abs(arr[i].first) + abs(arr[i].second);
        k = i;
    }
}
ll ans=0;
for(ll i=0; i<n;i++){
    if(ans<abs(arr[i].first - arr[k].first) + abs(arr[i].second - arr[k].second) ){
        ans = abs(arr[i].first - arr[k].first) + abs(arr[i].second - arr[k].second);
        k = i;
    }
}

cout<<ans<<endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:1: error: 'wzhile' was not declared in this scope
   13 | wzhile(t--){
      | ^~~~~~
Language: C++

    #include<bits/stdc++.h>
    #define int ll
    #define M 1000000007
    #define hell 998244353
    #define inf 1e18
    #define pb push_back
    #define pi 3.1415926536
    #define mp make_pair
    #define ub upper_bound
    #define lb lower_bound
    #define all(a) a.begin(),a.end()
    #define ll long long
    #define vec vector <int>
    #define pii pair<int,int>
    #define endl "\n"
    #define gcd __gcd
    using namespace std;
    // int dp[2001][668];
    // int comb(int n,int x)
    // {
    //     if(n<=0)
    //         return 0;
    //     if(x<=0)
    //         return 0;
    //     int ans=0;
    //     for (int i = 0; i <=n; ++i)
    //     {
    //         if(dp[n-i][x-1]==0 && (n-i)!=0 && (x-1)!=0)
    //             dp[n-i][x-1]=comb(n-i,x-1)%M;
    //         ans+=dp[n-i][x-1]%M;
    //         // ans%=M;
    //     }
    //     return ans%M;
    // }
    int power(int x, unsigned int y, unsigned int m) 
    { 
        if (y == 0) 
            return 1; 
        int p = power(x, y/2, m) % m; 
        p = (p * p) % m; 
  
        return (y%2 == 0)? p : (x * p) % m; 
    } 
    int modInverse(int a, int m) 
    {   
        return power(a, m-2, m);
    }
    int nCrModPFermat(int n, int r, int p) 
    { 
        // if(n==0)
        //     return 0;
           if (r==0) 
              return 1; 
  
        int fac[n+1]; 
        fac[0] = 1; 
        for (int i=1 ; i<=n; i++) 
            fac[i] = fac[i-1]*i%p; 
  
        return (fac[n]* modInverse(fac[r], p) % p * 
            modInverse(fac[n-r], p) % p) % p; 
    } 
    signed main()
    {
        ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
        ll t=1;
        // cin >> t;
        /*SAARE INPUTS LENA*/
        /*VARIABLES KI RANGE DEKHLENA*/
        /*EXPONENT RANGE OF OUTPUT KA DHYAN RAKHNA*/
        while(t-->0)
        {
            ll n=0;
            cin>>n;
            ll a=0,b=0;
            vecctor <pii> v(n);
            vector <int> v1(n),v2(n);
            for (int i = 0; i < n; ++i)
            {
                cin>>a>>b;
                v1[i]=a+b;
                v2[i]=a-b;
            }
            sort(all(v1));
            sort(all(v2));
            ll ans=max(v1[n-1]-v1[0],v2[n-1]-v2[0]);
            cout<<ans;
        }
        return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:76:13: error: 'vecctor' was not declared in this scope
   76 |             vecctor <pii> v(n);
      |             ^~~~~~~
a.cc:76:25: error: expected primary-expression before '>' token
   76 |             vecctor <pii> v(n);
      |                         ^
a.cc:76:27: error: 'v' was not declared in this scope
   76 |             vecctor <pii> v(n);
      |                           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define PI 3.1415926536
struct Point
{
    int x;
    int y;
};
inline double dist(Point a, Point b)
{
    return sqrt( pow(a.x - b.x , 2) + pow(a.y - b.y, 2) );
}
Point point[200005];
Point st[200005];
void getExtremePoint(int n)///at index 0
{
    int pos = 0;
    for(int i=1; i<n; i++){
        if(point[i].y < point[pos].y || (point[i].y == point[pos].y && point[i].x < point[pos].x))
            pos = i;
    }
    swap(point[0], point[pos]);
}
inline int triArea(Point p1, Point p2, Point p3)
{
    ll area = 1LL*p1.x*(p2.y - p3.y) + 1LL*p2.x*(p3.y - p1.y) + 1LL*p3.x*(p1.y - p2.y);
    if(area==0) return area;
    else return area/llabs(area);
}
inline bool comp(Point p1, Point p2)
{
    int tri = triArea(point[0],p1,p2);
    if(tri<0) return false;
    if(tri==0 && dist(point[0], p1) > dist(point[0], p2)) return false;
    return true;
}
bool comp(Point p1, Point p2)
{
	if(p1.x==p2.x) 
		return p1.y<p2.y;
	return p1.x<p2.x;
}
int id;
void genConvexPoints(int n)
{
    getExtremePoint(n);
    sort(point+1, point+n, comp);
    id = 0;
    for(int i=0; i<3 && i<n; i++)
        st[id++] = point[i];
    for(int i = 3; i<n; i++){
        while(triArea(st[id-2], st[id-1], point[i]) < 0)
            id--;
        st[id++] = point[i];
    }
}

int main()
{
    int tc,cs=1,n,d;
    tc = 1;
    while(tc--){
        scanf("%d",&n);
        for(int i=0; i<n; i++)
            scanf("%d%d",&point[i].x,&point[i].y);
        sort(point, point+n,comp2);
        genConvexPoints(n);
        int ans = 0;
        for(int i=0; i<id; i++){
        	for(int j=i+1; j<id; j++){
        		ans = max(ans, abs(st[i].x-st[j].x) + abs(st[i].y - st[j].y  ));
        	}
        }
        printf("%d\n",ans);
    }
}

Compiler output:
a.cc:38:6: error: redefinition of 'bool comp(Point, Point)'
   38 | bool comp(Point p1, Point p2)
      |      ^~~~
a.cc:31:13: note: 'bool comp(Point, Point)' previously defined here
   31 | inline bool comp(Point p1, Point p2)
      |             ^~~~
a.cc: In function 'int main()':
a.cc:67:29: error: 'comp2' was not declared in this scope; did you mean 'comp'?
   67 |         sort(point, point+n,comp2);
      |                             ^~~~~
      |                             comp
Language: C++

#include <bits/stdc++.h>
using namespace std;
const long long INF=2e9;
int main() {
    int n;
    cin >> n;
    long long ans=0;
    vector<array<long long,2>> d{{0,INF},{0,INF}};
    for ( int i=0; i<n; i++ ) {
        long long x,y;
        cin >> x >> y;
        for ( int j=0; j<2; j++ ) {
            long long v=x+y;
            d[j][0]=max(d[j][0],v);
            d[j][1]=min(d[j][1],v);
            y*=-1;
        }
    }
    cout << max(d[0][0]-d[0][1], dp[1][0]-dp[1][1]);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:34: error: 'dp' was not declared in this scope; did you mean 'd'?
   19 |     cout << max(d[0][0]-d[0][1], dp[1][0]-dp[1][1]);
      |                                  ^~
      |                                  d
Language: C++

#include <bits/stdc++.h>

#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()

using namespace std;
using ll = long long;

int main()
{
  fastio ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);

  ll n, x, y;
  cin >> n;
  vector<ll> d1(n);
  vector<ll> d2(n);
  for(int i = 0; i < n; ++i)
  {
    cin >> x >> y;
    d1[i] = x + y;
    d2[i] = x - y;
  }
  sort(ALL(d1));
  sort(ALL(d2));
  cout << max(d1.back() - d1[0], d2.back() - d2[0]);

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'fastio' was not declared in this scope
   11 |   fastio ios_base::sync_with_stdio(false);
      |   ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
 
int main() {
  int n;
  scanf("%d",&n);
  int x,y;
  scanf("%d %d",&x,&y);
  int a,b,c,d;
  a=b=x+y;
  c=d=x-y;
  for(int i=2;i<=n;i++) {
    scanf("%d %d",&x,&y);
    a=min(a,x+y);
    b=max(b,x+y);
    c=min(c,x-y);
    d=max(d,x-y);
  }
  printf("%d",max(abs(a-b),abs(c-d));
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:37: error: expected ')' before ';' token
   20 |   printf("%d",max(abs(a-b),abs(c-d));
      |         ~                           ^
      |                                     )
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
 
int main() {
  int n;
  scanf("%d",&n);
  int x,y;
  scanf("%d %d",&x,&y);
  int a,b,c,d;
  a=b=x+y;
  c=d=x-y;
  for(int i=2;i<=n;i++) {
    scanf("%d %d",&x,&y);
    a=min(a,x+y);
    b=max(b,x+y);
    c=min(c,x-y);
    d=max(d,x-y);
  }
  printf("%d",max(abs(a-b),abs(c-d));
  return 0;
}
Source Code 

Copy
Copy
#include <bits/stdc++.h>
using namespace std;
 
 
int main() {
  int n;
  scanf("%d",&n);
  int x,y;
  scanf("%d %d",&x,&y);
  int a,b,c,d;
  a=b=x+y;
  c=d=x-y;
  for(int i=2;i<=n;i++) {
    scanf("%d %d",&x,&y);
    a=min(a,x+y);
    b=max(b,x+y);
    c=min(c,x-y);
    d=max(d,x-y);
  }
  printf("%d",max(abs(a-b),abs(c-d));
  return 0;
}
Submission Info

Compiler output:
a.cc: In function 'int main()':
a.cc:20:37: error: expected ')' before ';' token
   20 |   printf("%d",max(abs(a-b),abs(c-d));
      |         ~                           ^
      |                                     )
a.cc: At global scope:
a.cc:23:1: error: 'Source' does not name a type
   23 | Source Code
      | ^~~~~~
a.cc:31:5: error: redefinition of 'int main()'
   31 | int main() {
      |     ^~~~
a.cc:5:5: note: 'int main()' previously defined here
    5 | int main() {
      |     ^~~~
a.cc: In function 'int main()':
a.cc:46:37: error: expected ')' before ';' token
   46 |   printf("%d",max(abs(a-b),abs(c-d));
      |         ~                           ^
      |                                     )
a.cc: At global scope:
a.cc:49:1: error: 'Submission' does not name a type
   49 | Submission Info
      | ^~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long int mini=INT_MAX,maxi=0,mini1=INT_MAX,maxi1=INT_MIN;
  for(int i=0;i<n;i++)
  {
    cin>>x>>y;
    mini=min(mini,c+d);
    maxi=max(maxi,c+d);
    mini1=min(mini1,c-d);
    maxi1=max(maxi1,c-d);
  }
  cout<<max(maxi-mini,maxi1-mini1);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: 'n' was not declared in this scope
    6 |   for(int i=0;i<n;i++)
      |                 ^
a.cc:8:10: error: 'x' was not declared in this scope
    8 |     cin>>x>>y;
      |          ^
a.cc:8:13: error: 'y' was not declared in this scope
    8 |     cin>>x>>y;
      |             ^
a.cc:9:19: error: 'c' was not declared in this scope
    9 |     mini=min(mini,c+d);
      |                   ^
a.cc:9:21: error: 'd' was not declared in this scope
    9 |     mini=min(mini,c+d);
      |                     ^
Language: C++


#include <iostream>
#include <vector>
#include <algorithm>

namespace
{

}

namespace ABC178
{

  class E
  {
  public:
    E() = default;
    ~E() = default;


    void Run()
    {
      int N = {};
      std::cin >> N;

      long long max_z = LONG_MIN;
      long long min_z = LONG_MAX;
      long long max_w = LONG_MIN;
      long long min_w = LONG_MAX;
      for (int i = 0; i < N; ++i)
      {
        long long x, y;
        std::cin >> x;
        std::cin >> y;

        if (x + y > max_z) max_z = x + y;
        if (x + y < min_z) min_z = x + y;
        if (x - y > max_w) max_w = x - y;
        if (x - y < min_w) min_w = x - y;
      }

       std::cout << std::max(std::abs(max_z - min_z), std::abs(max_w - min_w)) << std::endl;
    }
  };
}



Compiler output:
a.cc: In member function 'void ABC178::E::Run()':
a.cc:26:25: error: 'LONG_MIN' was not declared in this scope
   26 |       long long max_z = LONG_MIN;
      |                         ^~~~~~~~
a.cc:5:1: note: 'LONG_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    4 | #include <algorithm>
  +++ |+#include <climits>
    5 | 
a.cc:27:25: error: 'LONG_MAX' was not declared in this scope
   27 |       long long min_z = LONG_MAX;
      |                         ^~~~~~~~
a.cc:27:25: note: 'LONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
Language: C++

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <limits.h>
#include <queue>
#include <stack>
#include <cmath>
#include <map>
#include <set>
#include <vector>
using namespace std;
typedef long long ll;
const int M = 2e5+7;
 
int x[M],y[M];
int p[4][M];
int main()
{
//	ios::sync_with_stdio(false);
//  	cin.tie(0);
  	int n;
  	cin>>n;
  	for(int i=1;i<=n;i++)
  	{
  		cin>>x[i]>>y[i];
  		p[0][i]=x[i]+y[i];
  		p[1][i]=-x[i]+y[i];
  		p[2][i]=x[i]-y[i];
  		p[3][i]=-x[i]-y[i];
	}
	for(int i=0;i<4;i++)sort(p[i]+1,p[i]+1+n);
	ll mx=0;
	for(int i=0;i<4;i++)
	{
		mx=max(mx,p[i][n]-p[i][1]);
		//cout<<i<<"  "<<p[i][n]<<"  "<<p[i][1]<<endl;
	}
	cout<<mx<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:23: error: no matching function for call to 'max(ll&, int)'
   36 |                 mx=max(mx,p[i][n]-p[i][1]);
      |                    ~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 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:   template argument deduction/substitution failed:
a.cc:36:23: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   36 |                 mx=max(mx,p[i][n]-p[i][1]);
      |                    ~~~^~~~~~~~~~~~~~~~~~~~
/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,
                 from a.cc:2:
/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:36:23: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   36 |                 mx=max(mx,p[i][n]-p[i][1]);
      |                    ~~~^~~~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int M = 2e5+7;
 
int x[M],y[M];
int p[4][M];
int main()
{
	ios::sync_with_stdio(false);
  	cin.tie(0);
  	int n;
  	cin>>n;
  	for(int i=1;i<=n;i++)
  	{
  		cin>>x[i]>>y[i];
  		p[0][i]=x[i]+y[i];
  		p[1][i]=-x[i]+y[i];
  		p[2][i]=x[i]-y[i];
  		p[3][i]=-x[i]-y[i];
	}
	for(int i=0;i<4;i++)sort(p[i]+1,p[i]+1+n);
	ll mx=0;
	for(int i=0;i<4;i++)
	{
		mx=max(mx,p[i][n]-p[i][1]);
		//cout<<i<<"  "<<p[i][n]<<"  "<<p[i][1]<<endl;
	}
	cout<<mx<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:23: error: no matching function for call to 'max(ll&, int)'
   26 |                 mx=max(mx,p[i][n]-p[i][1]);
      |                    ~~~^~~~~~~~~~~~~~~~~~~~
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:   template argument deduction/substitution failed:
a.cc:26:23: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   26 |                 mx=max(mx,p[i][n]-p[i][1]);
      |                    ~~~^~~~~~~~~~~~~~~~~~~~
/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:26:23: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   26 |                 mx=max(mx,p[i][n]-p[i][1]);
      |                    ~~~^~~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
#define fi first
#define se second
#define mp make_pair
using namespace std;
typedef long long ll;
typedef pair<int,int>P;
const double eps = 1e-8;
const int NINF = 0xc0c0c0c0;
const int INF  = 0x3f3f3f3f;
const ll  mod  = 1e9 + 7;
const ll  N = 1e6 + 5;

ll mx1=-1e18,mx2=-1e18,mx3=-1e18,mx4=-1e18,mi1=1e18,mi2=1e18,mi3=1e18,mi4=1e18;
int n;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cin>>n;
    for(int i=1;i<=n;i++){
        ll x,y;cin>>x>>y;
        ll u=x+y,v=x-y,p=-x+y;
        mx1=max(mx1,u);
        mi1=min(mi1,u);
        mx2=max(mx2,v);
        mi2=min(mi2,v);
        mx3=max(mx3,p);
        mi3=min(mi3,p);
        mx4=max(mx4,q);
        mi4=min(mi4,q);
    }
    cout<<max({mx1-mi1,mx2-mi2,mx3-mi3})<<'\n';
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:21: error: 'q' was not declared in this scope
   30 |         mx4=max(mx4,q);
      |                     ^
Language: C++

#include<bits/stdc++.h>
#define fi first
#define se second
#define mp make_pair
using namespace std;
typedef long long ll;
typedef pair<int,int>P;
const double eps = 1e-8;
const int NINF = 0xc0c0c0c0;
const int INF  = 0x3f3f3f3f;
const ll  mod  = 1e9 + 7;
const ll  N = 1e6 + 5;

ll mx1=-1e18,mx2=-1e18,mx3=-1e18,mx4=-1e18,mi1=1e18,mi2=1e18,mi3=1e18,mi4=1e18;
int n;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cin>>n;
    for(int i=1;i<=n;i++){
        ll x,y;cin>>x>>y;
        ll u=x+y,v=x-y,p=-x+y
        mx1=max(mx1,u);
        mi1=min(mi1,u);
        mx2=max(mx2,v);
        mi2=min(mi2,v);
        mx3=max(mx3,p);
        mi3=min(mi3,p);
        mx4=max(mx4,q);
        mi4=min(mi4,q);
    }
    cout<<max({mx1-mi1,mx2-mi2,mx3-mi3})<<'\n';
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:9: error: expected ',' or ';' before 'mx1'
   24 |         mx1=max(mx1,u);
      |         ^~~
a.cc:30:21: error: 'q' was not declared in this scope
   30 |         mx4=max(mx4,q);
      |                     ^
Language: C++

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

int main()
{
	int n;
	cin>>n;
	vector<vector<int>> a(n, vector<int>(2));
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<2;j++)
		{
			cin>>a[i][j];
		}
	}
	sort(a.begin(), a.end(),comp);
	int dis,max_dis=-1;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j!=i && j<n;j++)
        {
          dis=abs(a[i][0]-a[j][0])+abs(a[i][1]-a[j][1]);
          max_dis=max(max_dis,dis);
        }
	}
	cout<<max_dis<<endl;
	
	
	
	
	

}


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

/**
 *    author:  morato
 *    created: 13.09.2020 10:01:15
**/
#include <bits/stdc++.h>

using namespace std;
/*
int mhn(pair<int, int> a, pair<int, int> b) {
  return abs(a.first - b.first) + abs(a.second - b.second);
}
*/
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<pair<int, int>> v(n);
  for (auto& x : v)
    cin >> x.first >> x.second;
  vector<int> mark(n);
  int id1 = 0, id2 = 0;
  int maior = -2e9;
  for (int i = 0; i < n; i++) {
    if (v[i].first + v[i].second > maior) {
      maior = v[i].first + v[i].second;
      id1 = i;
    }
  }
  int menor = 2e9;
  for (int i = 0; i < n; i++) {
    if (v[i].first + v[i].second < menor) {
      menor = v[i].first + v[i].second;
      id2 = i;
    }
  }
  int id3 = 0, id4 = 0;
  maior = -2e9;
  for (int i = 0; i < n; i++) {
    if (v[i].first - v[i].second > maior) {
      maior = v[i].first - v[i].second;
      id3 = i;
    }
  }
  menor = 2e9;
  for (int i = 0; i < n; i++) {
    if (v[i].first - v[i].second < menor) {
      menor = v[i].first - v[i].second;
      id4 = i;
    }
  }
  cout << max(mhn(v[id1], v[id2]), mhn(v[id3], v[id4])) << '\n';
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:15: error: 'mhn' was not declared in this scope
   52 |   cout << max(mhn(v[id1], v[id2]), mhn(v[id3], v[id4])) << '\n';
      |               ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
bool comp(vector<int> &a, vector<int> &b)
  return (a[0]<=b[0]);

int main()
{
	int n;
	cin>>n;
	vector<vector<int>> a(n, vector<int>(2));
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<2;j++)
		{
			cin>>a[i][j];
		}
	}
	sort(a.begin(), a.end(),comp);
	int curr=0,dis,max_dis=-1;
	for(int i=1;i<n;i++)
	{
		dis=abs(a[i][0]-a[curr][0])+abs(a[i][1]-a[curr][1]);
		max_dis=max(dis,max_dis);
		curr++;
	}
	cout<<max_dis<<endl;
	
	
	
	
	

}


Compiler output:
a.cc: In function 'bool comp(std::vector<int>&, std::vector<int>&)':
a.cc:4:10: error: expected identifier before '(' token
    4 |   return (a[0]<=b[0]);
      |          ^
a.cc:4:3: error: named return values are no longer supported
    4 |   return (a[0]<=b[0]);
      |   ^~~~~~
a.cc:10:29: error: declaration of 'std::vector<std::vector<int> > a' shadows a parameter
   10 |         vector<vector<int>> a(n, vector<int>(2));
      |                             ^
a.cc:3:24: note: 'std::vector<int>& a' previously declared here
    3 | bool comp(vector<int> &a, vector<int> &b)
      |           ~~~~~~~~~~~~~^
a.cc:33:1: warning: no return statement in function returning non-void [-Wreturn-type]
   33 | }
      | ^
Language: C++

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

#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long int
#define w(t) int t;cin>>t;while(t--)
#define mod 1000000007



int main(){
	
		fast
		ll n;
		cin>>n;
		pair<ll,ll> a[n];
		ll max=0;
		ll diff=0;

		for(ll i=0;i<n;i++)
		{
			cin>>a[i].first>>a[i].second;

		}
		ll previousx=a[0].first;
		ll previousy=a[0].second;
		for(ll i=1;i<n;i++)
		{
			diff=abs(a[i].first-previousx);
			diff+=(abs(a[i].second-previousy));
			if(diff>max)
				max=diff;
			previousx=a[i].first;
			previousy=a[i].second
		}
		cout<<max;


	return 0;
}





Compiler output:
a.cc: In function 'int main()':
a.cc:34:46: error: expected ';' before '}' token
   34 |                         previousy=a[i].second
      |                                              ^
      |                                              ;
   35 |                 }
      |                 ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
//#include <ext/pb_ds/assoc_container.hpp>
//using namespace __gnu_pbds;
//typedef tree <int,null_type,less <int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;
// #include <ext/rope>
// using namespace __gnu_cxx;
typedef long long int ll;
typedef long double ld;
#define FAST                 \
    ios::sync_with_stdio(0); \
    cin.tie(0);              \
    cout.tie(0);
#define rep(g, i, n) for (ll g = i; g < n; g++)
#define rev(g, n, i) for (ll g = n - 1; g >= i; g--)
#define all(v) v.begin(), v.end()
#define pb push_back
#define mxe(v) *max_element(v.begin(), v.end())
#define mne(v) *min_element(v.begin(), v.end())
#define ve vector
#define lb lower_bound
#define ub upper_bound
#define bb break
#define cc continue
#define rem 1000000007
#define PI 3.141592653589793238462643383279502
ll power(ll x, ll y, ll p)
{
    ll res = 1; // Initialize result
    x = x % p;  // Update x if it is more than or
    while (y > 0)
    {
        if (y & 1)
            res = (res * x) % p;
        y = y >> 1; // y = y/2
        x = (x * x) % p;
    }
    return res;
}
ll modInverse(ll n, ll p)
{
    return power(n, p - 2, p);
}
struct point
{
    ll x, y;
};
int main()
{
    FAST
    // freopen("input1.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);
    /*ll tests;
    cin>>tests;
    rep (gg,0,tests)
    {}*/
    ll n;
        cin>>n;
        ll ans=0;
        ll mx1=0;
        ll mn1=1e12;
        ll mx2=0;
        ll mn2=1e12;
        ll mx3=0;
        ll mn3=1e12;
        ll mx4=0;
        ll mn4=1e12;
        ll ans=0;
        rep(i,0,n)
        {
            ll x,y;
            cin>>x>>y;

            mx1=max(mx1,x+y);
            mn1=min(mn1 , x+y);

            mx2=max(mx2,x-y);
            mn2=min(mn2,x-y);

            mx3=max(mx2,y-x);
            mn3=min(mn2,y-x);
            ans=max({mx1-mx2,abs(mx2+mx3),abs(mn2+mn3)});
        }
        
        cout<<ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:68:12: error: redeclaration of 'll ans'
   68 |         ll ans=0;
      |            ^~~
a.cc:59:12: note: 'll ans' previously declared here
   59 |         ll ans=0;
      |            ^~~
Language: C++

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

#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long int
#define w(t) int t;cin>>t;while(t--)
#define mod 1000000007



int main(){
	
		fast
		ll n;
		cin>>n;
		pair<ll,ll> a[n];
		ll max=0;
		ll diff=0;

		for(ll i=0;i<n;i++)
		{
			cin>>a[i].first>>a[i].second;

		}
		ll previousx=a[0].first;
		ll previousy=a[0].second;
		for(ll i=1;i<n;i++)
		{
			diff=abs(a[i].first-previousx);
			dif+=(abs(a[i].second-previousy));
			if(diff>max)
				max=diff;
			previousx=a[i].first;
			previousy=a[i].second
		}
		cout<<max;


	return 0;
}





Compiler output:
a.cc: In function 'int main()':
a.cc:30:25: error: 'dif' was not declared in this scope; did you mean 'diff'?
   30 |                         dif+=(abs(a[i].second-previousy));
      |                         ^~~
      |                         diff
a.cc:34:46: error: expected ';' before '}' token
   34 |                         previousy=a[i].second
      |                                              ^
      |                                              ;
   35 |                 }
      |                 ~
Language: C++

#include <bits/stdc++.h>
#include <string>
#include <cmath>
#include <sstream>
//#include <unordered_map>
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define FORD(i, a, b) for(int i = (a-1); i >= (b); i--)
#define pb(a) push_back(a)
#define mp(a,b) make_pair(a,b)
#define ff first
#define ss second
typedef long long int ll;
using namespace std;
ll mod=1000000007;
//ll mod=67280421310721;
//ll mod=998244353;
int a[26];
ll INF=1e18;
ll po(ll a,ll b)
{
	ll re=1;
	while(b)
	{
		if(b%2==1)
		{
			re=(re*a);
			re%=mod;
		}
		a=(a*a);
		a%=mod;
		b>>=1;
	}
	return re;
}
int main()
{
    
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	vector<ll> x;
	vector<ll> y;
	ll n,a=0,b=0;
	cin>>n;
	for(ll i=0; i<n; i++){
		ll ip0=0;
		cin>>ip0;
		ll ip1=0;
		cin>>ip1;
		x.push_back(ip0+ip1);
	}
	ll a=*max_element(x.begin(), x.end());
	ll b=*min_element(x.begin(), x.end());
	cout<<a-b; 
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:12: error: redeclaration of 'll a'
   52 |         ll a=*max_element(x.begin(), x.end());
      |            ^
a.cc:43:14: note: 'll a' previously declared here
   43 |         ll n,a=0,b=0;
      |              ^
a.cc:53:12: error: redeclaration of 'll b'
   53 |         ll b=*min_element(x.begin(), x.end());
      |            ^
a.cc:43:18: note: 'll b' previously declared here
   43 |         ll n,a=0,b=0;
      |                  ^
Language: C++

#include<bits/stdc++.h>
#include<atcoder/all>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(),A.end()
#define RALL(A) A.rbegin(),A.rend()
typedef long long ll;
typedef pair<ll,ll> P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<typename T> T gcd(T a,T b){return b?gcd(b,a%b):a;}
const ll MOD=1000000007;
const ll LINF=1ll<<60;
const int INF=1<<30;
int dx[]={1,0,-1,0,1,-1,1,-1};
int dy[]={0,1,0,-1,1,-1,-1,1};


int main(){
    int n;cin >> n;
    vector<ll> x(n), y(n);
    for (int i = 0; i < n; i++) {
        ll a,b;cin >> a >> b;
        x[i] = a + b;
        y[i] = a - b;
    }
    sort(ALL(x));
    sort(ALL(y));
    cout << max(abs(x.front() - x.back()), abs(y.front() - y.back())) << endl;
    return 0;
}


Compiler output:
a.cc:2:9: fatal error: atcoder/all: No such file or directory
    2 | #include<atcoder/all>
      |         ^~~~~~~~~~~~~
compilation terminated.
Language: C++

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

#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ll long long int
#define w(t) int t;cin>>t;while(t--)
#define mod 1000000007



int main(){
	
		fast
		ll n;
		cin>>n;
		pair<ll,ll> a[n];
		ll max=0;
		ll diff=0;

		for(ll i=0;i<n;i++)
		{
			cin>>a.first>>a.second;

		}
		ll previousx=a[0].first;
		ll previousy=a[0].second;
		for(ll i=1;i<n;i++)
		{
			diff=abs(a[i].first-previousx);
			dif+=abs(a[i].second-previousy);
			if(diff>max)
				max=diff;
			previousx=a[i].first;
			previousy=a[i].second
		}
		cout<<max;


	return 0;
}





Compiler output:
a.cc: In function 'int main()':
a.cc:22:32: error: request for member 'first' in 'a', which is of non-class type 'std::pair<long long int, long long int> [n]'
   22 |                         cin>>a.first>>a.second;
      |                                ^~~~~
a.cc:22:41: error: request for member 'second' in 'a', which is of non-class type 'std::pair<long long int, long long int> [n]'
   22 |                         cin>>a.first>>a.second;
      |                                         ^~~~~~
a.cc:30:25: error: 'dif' was not declared in this scope; did you mean 'diff'?
   30 |                         dif+=abs(a[i].second-previousy);
      |                         ^~~
      |                         diff
a.cc:34:46: error: expected ';' before '}' token
   34 |                         previousy=a[i].second
      |                                              ^
      |                                              ;
   35 |                 }
      |                 ~
Language: C++

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define rep(i,N) for(int i=0;i<(int)N;i++)
static inline void PUT(char c)
{
  static char buf[1<<15],*ptr=buf;
  if(ptr==buf+strlen(buf)||c==0){fwrite(buf,1,ptr-buf,stdout),ptr=buf;}*ptr++=c;
}
static inline int IN(void)
{
  int x=0,f=0,c=getchar();while(c<48||c>57){f^=c==45,c=getchar();}
  while(c>47&&c<58){x=x*10+c-48,c=getchar();}return f?-x:x;
}
static inline void OUT(long a)
{
  if(a<0)PUT('-'),a=-a;
  int d[40],i=0;do{d[i++]=a%10;}while(a/=10);
  while(i--){PUT(d[i]+48);}PUT('\n');
}
static inline Max(int x,int y){return x>y?x:y;}
static inline Min(int x,int y){return x<y?x:y;}
int main(void)
{
  int N=IN(),mn[3]={1e9},mx[3];
  while(N--)
  {
    int x=IN(),y=IN();mn[0]=Min(x+y,mn[0]);if(mn[0]==x+y){mn[1]=x,mn[2]=y;}
    mx[0]=Max(x+y,mx[0]);if(mx[0]==x+y){mx[1]=x,mx[2]=y;}
  }
  return printf("%d\n",mx[1]-mn[1]+mx[2]-mn[2]),0;
}

Compiler output:
a.cc:21:15: error: ISO C++ forbids declaration of 'Max' with no type [-fpermissive]
   21 | static inline Max(int x,int y){return x>y?x:y;}
      |               ^~~
a.cc:22:15: error: ISO C++ forbids declaration of 'Min' with no type [-fpermissive]
   22 | static inline Min(int x,int y){return x<y?x:y;}
      |               ^~~
a.cc: In function 'int main()':
a.cc:25:21: error: narrowing conversion of '1.0e+9' from 'double' to 'int' [-Wnarrowing]
   25 |   int N=IN(),mn[3]={1e9},mx[3];
      |                     ^~~
Language: C++

#include <bits/stdc++.h>
#include <string>
#include <cmath>
#include <sstream>
//#include <unordered_map>
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define FORD(i, a, b) for(int i = (a-1); i >= (b); i--)
#define pb(a) push_back(a)
#define mp(a,b) make_pair(a,b)
#define ff first
#define ss second
typedef long long int ll;
using namespace std;
ll mod=1000000007;
//ll mod=67280421310721;
//ll mod=998244353;
int a[26];
ll INF=1e18;
ll po(ll a,ll b)
{
	ll re=1;
	while(b)
	{
		if(b%2==1)
		{
			re=(re*a);
			re%=mod;
		}
		a=(a*a);
		a%=mod;
		b>>=1;
	}
	return re;
}
int main()
{
    
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	vector<ll> x;
	vector<ll> y;
	ll n,a=0b=0;
	cin>>n;
	for(ll i=0; i<n; i++){
		ll ip0=0;
		cin>>ip0;
		ll ip1=0;
		cin>>ip1;
		x.push_back(ip0+ip1);
	}
	ll a=*max_element(x.begin(), x.end());
	ll b=*min_element(x.begin(), x.end());
	cout<<a-b; 
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:16: error: unable to find numeric literal operator 'operator""b'
   43 |         ll n,a=0b=0;
      |                ^~
a.cc:52:12: error: redeclaration of 'll a'
   52 |         ll a=*max_element(x.begin(), x.end());
      |            ^
a.cc:43:14: note: 'll a' previously declared here
   43 |         ll n,a=0b=0;
      |              ^