Language: C++

#include <bits/stdc++.h>
#define fi first
#define se second
#define ll long long
#define db double
#define pb push_back
#define wrln cout<<'\n';
#define pii pair<int,int>
using namespace std;
const int H=1e9+7;
const int N=2e5+100;

ll x[N],y[N],n,res,d[6],x1[6],y1[6];

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);


    d[1]=d[2]=d[3]=d[4]=LLONG_MIN;
    cin>>n;
    for (int i=1; i<=n; i++)
    {
        cin>>x[i]>>y[i];
        if (d[1]<x[i]+y[i])
        {
            d[1]=x[i]+y[i];
            x1[1]=x[i];
            y1[1]=y[i];
        }
        if (d[2]<x[i]-y[i])
        {
            d[2]=x[i]-y[i];
            x1[2]=x[i];
            y1[2]=y[i];
        }
        if (d[3]<-x[i]+y[i])
        {
            d[3]=-x[i]+y[i];
            x1[3]=x[i];
            y1[3]=y[i];
        }
        if (d[4]<-x[i]-y[i])
        {
            d[4]=-x[i]-y[i];
            x1[4]=x[i];
            y1[4]=y[i];
        }
    }
    for (int i=1; i<=4; i++)
    {
        for (int j=1; j<=n; j++)
        {
            res=max(res,abs(x[j]-x1[i]) + abs( y[j]-y1[i]) );
        }
    }
    cout<<res;
}


Compiler output:
a.cc:13:35: error: 'long long int y1 [6]' redeclared as different kind of entity
   13 | ll x[N],y[N],n,res,d[6],x1[6],y1[6];
      |                                   ^
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:683,
                 from /usr/include/c++/14/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:33,
                 from a.cc:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:257:1: note: previous declaration 'double y1(double)'
  257 | __MATHCALL (y1,, (_Mdouble_));
      | ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:30:17: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   30 |             y1[1]=y[i];
      |                 ^
a.cc:30:18: error: assignment of read-only location '*(y1 + 1)'
   30 |             y1[1]=y[i];
      |             ~~~~~^~~~~
a.cc:36:17: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   36 |             y1[2]=y[i];
      |                 ^
a.cc:36:18: error: assignment of read-only location '*(y1 + 2)'
   36 |             y1[2]=y[i];
      |             ~~~~~^~~~~
a.cc:42:17: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   42 |             y1[3]=y[i];
      |                 ^
a.cc:42:18: error: assignment of read-only location '*(y1 + 3)'
   42 |             y1[3]=y[i];
      |             ~~~~~^~~~~
a.cc:48:17: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   48 |             y1[4]=y[i];
      |                 ^
a.cc:48:18: error: assignment of read-only location '*(y1 + 4)'
   48 |             y1[4]=y[i];
      |             ~~~~~^~~~~
a.cc:55:57: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   55 |             res=max(res,abs(x[j]-x1[i]) + abs( y[j]-y1[i]) );
      |                                                         ^
a.cc:55:52: error: invalid operands of types 'long long int' and 'double(double) noexcept' to binary 'operator-'
   55 |             res=max(res,abs(x[j]-x1[i]) + abs( y[j]-y1[i]) );
      |                                                ~~~~^~~~~~
      |                                                   |     |
      |                                                   |     double(double) noexcept
      |                                                   long long int