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

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) (v).begin(), (v).end()
using ll = long long;
constexpr int INF = 1e9;
constexpr long long LINF = 1e18;
constexpr long long MOD = 1e9 + 7;

signed main() {
    ll n, x, m;
    cin >> n >> x >> m;
    pair<int, ll> dp[m + 1][41];
    fill(dp[0], dp[m + 1], {0, 0});
    for (int i = 0; i <= m; i++) {
        dp[i][0].first = ((ll)i * i) % m;
        dp[i][0].second = ((ll)i * i) % m;
    }
    for (int i = 0; i < 40; i++) {
        for (int j = 0; j <= m; j++) {
            dp[j][i + 1].first = dp[dp[j][i].first][i].first;
            dp[j][i + 1].second =
                dp[j][i].second + dp[dp[j][i].first][i].second;
        }
    }
    int cur = x;
    ll ans = x;
    for (int i = 40; i >= 0; i--) {
        if (n >= (1LL << i)) {
            ans += dp[cur][i].second;
            cur = dp[cur][i].first;
            n -= (1LL << i);
        }
    }
    cout << ans - cur << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: no matching function for call to 'fill(std::pair<int, long long int> [41], std::pair<int, long long int> [41], <brace-enclosed initializer list>)'
   14 |     fill(dp[0], dp[m + 1], {0, 0});
      |     ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
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:1022:5: note: candidate: 'template<class _ForwardIterator, class _Tp> void std::fill(_ForwardIterator, _ForwardIterator, const _Tp&)'
 1022 |     fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
      |     ^~~~
/usr/include/c++/14/bits/stl_algobase.h:1022:5: note:   template argument deduction/substitution failed:
a.cc:14:9: note:   couldn't deduce template parameter '_Tp'
   14 |     fill(dp[0], dp[m + 1], {0, 0});
      |     ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:191:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::fill(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  191 | fill(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:191:1: note:   candidate expects 4 arguments, 3 provided
Language: C

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

const int MAX = 1e5 + 5;
const int INFTY = (1 << 21);
int dp[MAX][MAX];

int main() {
  int N;
  cin >> N;
  int X[MAX];
  int Y[MAX];
  for (int i = 0; i < N; i++) {
    cin >> X[i] >> Y[i];
  }


  int max_dist = -INFTY;
  for (int i = 0; i < N; i++) {
    for (int j = i + 1; j < N; j++) {
      int dist = abs(X[i] - X[j]) + abs(Y[i] - Y[j]);
      if (max_dist < dist) max_dist = dist;
    }
  }

  cout << max_dist << endl;
  return 0;
}


Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: Java

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define endl '\n'
#define all(x) (x).begin(),(x).end()
const int INF=1000000000+5;
const int N=2e5+5;
const ll oo=1e18+5;
const ll mod=998244353;

struct point{
	int x,y;
};

bool cmp(const point& a,const point& b){
	return a.x+a.y<b.x+b.y;
}

int main(){
	ios::sync_with_stdio(0); cin.tie(0);
	int n;
	cin>>n;
	vector<point> a(n);
	for(int i=0;i<n;++i){
		cin>>a[i].x>>a[i].y;
	}
	sort(all(a),cmp);
	cout<<abs(a[0].x-a.back().x)+abs(a[0].y-a.back().y);
	return 0;
}


Compiler output:
Main.java:1: error: illegal character: '#'
#include <bits/stdc++.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <bits/stdc++.h>
         ^
Main.java:3: error: class, interface, enum, or record expected
typedef long long ll;
^
Main.java:4: error: class, interface, enum, or record expected
typedef unsigned long long ull;
^
Main.java:5: error: illegal character: '#'
#define endl '\n'
^
Main.java:5: error: class, interface, enum, or record expected
#define endl '\n'
        ^
Main.java:6: error: illegal character: '#'
#define all(x) (x).begin(),(x).end()
^
Main.java:8: error: class, interface, enum, or record expected
const int N=2e5+5;
^
Main.java:9: error: class, interface, enum, or record expected
const ll oo=1e18+5;
^
Main.java:10: error: class, interface, enum, or record expected
const ll mod=998244353;
^
Main.java:12: error: class, interface, enum, or record expected
struct point{
^
Main.java:14: error: class, interface, enum, or record expected
};
^
Main.java:16: error: unnamed classes are a preview feature and are disabled by default.
bool cmp(const point& a,const point& b){
^
  (use --enable-preview to enable unnamed classes)
Main.java:16: error: illegal start of type
bool cmp(const point& a,const point& b){
         ^
Main.java:21: error: not a statement
	ios::sync_with_stdio(0); cin.tie(0);
	^
Main.java:23: error: not a statement
	cin>>n;
	   ^
Main.java:24: error: not a statement
	vector<point> a(n);
	                ^
Main.java:26: error: not a statement
		cin>>a[i].x>>a[i].y;
		           ^
Main.java:29: error: not a statement
	cout<<abs(a[0].x-a.back().x)+abs(a[0].y-a.back().y);
	    ^
Main.java:21: error: ';' expected
	ios::sync_with_stdio(0); cin.tie(0);
	                    ^
Main.java:24: error: ';' expected
	vector<point> a(n);
	               ^
Main.java:24: error: ';' expected
	vector<point> a(n);
	                 ^
22 errors
Language: C++

#include <iostream>
#include <iomanip>
#include <cstdio>
#include <queue>
#include <cstring>
#include <vector>
#include <map>
#include <algorithm>
#include <cctype>
#include <cmath>
#include <bitset>
#include <set>
#include <deque>

using namespace std;

#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define RREP(i,n) for(int i=n-1;i>=0;i--)
#define FOR(i,k,n) for(int i=(k);i<(int)(n);i++)
#define all(i,n) (i),(i+n)

int dx4[4]={1,0,-1,0};
int dy4[4]={0,-1,0,1};
int dx8[8]={1,0,-1,1,-1,1,0,-1};
int dy8[8]={1,1,1,0,0,-1,-1,-1};

typedef pair<int, int> P;
typedef pair<string, int> SP;
typedef long long ll;
typedef pair<ll, ll> PLL;

const int INF = 1e9;
const ll LLINF = 1e18;
const int MAX_V = 1e6+1;
const ll mod = 1000000007;

// --------------------------------------
int n;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);

  cin >> n;

  ll xmi = LLINF, xma = --LLINF, ymi = LLINF, yma = --LLINF;
  while(n--) {
    ll x, y;
    cin >> x >> y;

    xmi = min(xmi, (x + y));
    xma = max(xma, (x + y));
    ymi = min(ymi, (x - y));
    yma = max(yma, (x - y));
  }

  cout << max(xma - xmi, yma - ymi) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:27: error: decrement of read-only variable 'LLINF'
   45 |   ll xmi = LLINF, xma = --LLINF, ymi = LLINF, yma = --LLINF;
      |                           ^~~~~
a.cc:45:55: error: decrement of read-only variable 'LLINF'
   45 |   ll xmi = LLINF, xma = --LLINF, ymi = LLINF, yma = --LLINF;
      |                                                       ^~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;

int main() {
  int N;
  cin >> N;

  // a[i]=x[i]+y[i], b[i]=x[i]-y[i]
  // max(max(a[i]-a[j]),max(b[i]-b[j]))
  ll a_min = INT_MAX, a_max = -INT_MAX;
  ll b_min = INT_MAX, int b_max = -INT_MAX;
  ll x, y;
  rep(i, N) {
    cin >> x >> y;
    ll a = x + y;
    ll b = x - y;
    a_min = min(a, a_min);
    a_max = max(a, a_max);
    b_min = min(b, b_min);
    b_max = max(b, b_max);
  }
  cout << max(a_max - a_min, b_max - b_min) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:23: error: expected unqualified-id before 'int'
   13 |   ll b_min = INT_MAX, int b_max = -INT_MAX;
      |                       ^~~
a.cc:22:5: error: 'b_max' was not declared in this scope; did you mean 'a_max'?
   22 |     b_max = max(b, b_max);
      |     ^~~~~
      |     a_max
a.cc:24:30: error: 'b_max' was not declared in this scope; did you mean 'a_max'?
   24 |   cout << max(a_max - a_min, b_max - b_min) << endl;
      |                              ^~~~~
      |                              a_max
Language: C++

#include<bits/stdc++.h>
#include<iostream>
#include<algorithm> 
#include<cstring>
#define ios ios::sync_with_stdio(false)
#define mem(arr) memset(arr,0,sizeof(arr))
using namespace std;
typedef long long ll;
const ll maxn = 1e9 + 10;
const ll mod = 1e9 + 7;
int x[maxn],y[maxn],ans[maxn];
int main()
{
	int n,k = 1;
	cin>>n;
	for(int i = 1;i <= n; i++)
		cin>>x[i]>>y[i];
	for(int i = 1;i <= n; i++)
	{
		for(int j = i + 1;j <= n; j++)
		{
			ans[k++] = abs(x[i] - x[j]) + abs(y[i] - y[j]);
		}
	}
	sort(ans,ans + k);
	cout<<ans[k]<<endl;
	return 0;
}

Compiler output:
/tmp/ccFcWGPE.o: in function `main':
a.cc:(.text+0x6a): relocation truncated to fit: R_X86_64_PC32 against symbol `y' defined in .bss section in /tmp/ccFcWGPE.o
a.cc:(.text+0xec): relocation truncated to fit: R_X86_64_PC32 against symbol `y' defined in .bss section in /tmp/ccFcWGPE.o
a.cc:(.text+0x104): relocation truncated to fit: R_X86_64_PC32 against symbol `y' defined in .bss section in /tmp/ccFcWGPE.o
a.cc:(.text+0x12c): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccFcWGPE.o
a.cc:(.text+0x163): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccFcWGPE.o
a.cc:(.text+0x170): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccFcWGPE.o
a.cc:(.text+0x18c): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccFcWGPE.o
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>
using namespace std;

typedef long long ll;

int main(){
    ll max1 = -2e9 - 6, min1 = 2e9 + 6, max2 = -2e9 - 6, min2 = 2e9 + 6, max3 = -2e9 - 6, min3 = 2e9 + 6;
    ll n, x, y; cin>>n;
    for(int i = 0; i < n; i++){
        cin>>x>>y;
        max1 = max(max1, x + y);
        min1 = min(min1, x + y);
        max2 = max(max2, x - y);
        min2 = min(min2, x - y);
        max3 = max(max3, y - x);
        min3 = min(min3, y - x);
    }
    cout<<max({max1 - min1, max2 - min3, max3 - min2})<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:14: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   18 |     cout<<max({max1 - min1, max2 - min3, max3 - min2})<<endl;
      |           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:   candidate expects 2 arguments, 1 provided
/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, 1 provided
Language: C++

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

int main(){
  int n;
  cin >> n;
  vector<int>add(n);
  vector<int>subs(n);
  
  for(int i=0; i<n; ++i){
    int x, y;
    cin >> x >> y;
    add.push_back(x+y);
    subs.push_back(x-y);
  }
  sort(add.begin(), add.end());
  sort(subs.begin(), subs.end()):
  
  int res = max(add.back()-add.front(), subs.back()-subs.front());
  
  cout << res << "\n";
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:33: error: expected ';' before ':' token
   17 |   sort(subs.begin(), subs.end()):
      |                                 ^
      |                                 ;
a.cc:21:11: error: 'res' was not declared in this scope
   21 |   cout << res << "\n";
      |           ^~~
Language: C

#include<stdio.h>
#include<cstdlib>
struct po{
	int x;
	int y;
};
typedef struct po;
int main()
{
	void quicksort(int [],int ,int);
	int f(int);
	int n;
	scanf("%d",&n);
	po * p;
	p=(po*)malloc(sizeof(po)*n);
	for(int i=0;i<n;i++)
		scanf("%d%d",&(p+i)->x,&(p+i)->y);
	//for(int i=0;i<n;i++)
	//	printf("x[%d] = %d y[%d] = %d\n",i+1,(p+i)->x,i+1,(p+i)->y);
	int c=f(n),d=f(n-2);
	int b = c/(d*2),k=0;
	int a[b];
	for(int i=0;i<n;i++)
	{
		for(int j=i+1;j<n;j++)
		{
		
			a[k] = abs((p+i)->x - (p+j)->x) + abs((p+i)->y - (p+j)->y);
			k++;
		}
	}
	//for(int i=0;i<b;i++)
	//	printf("%d\n",a[i]);
	quicksort(a,0,b-1);
	printf("%d\n",a[b-1]);
}
int f(int a)
{
	int r;
	if(a==1){
		return a;
	}
	else
		return (r=a*f(a-1));
}
void quicksort(int number[],int first,int last){
   int i, j, pivot, temp;

   if(first<last){
      pivot=first;
      i=first;
      j=last;

      while(i<j){
         while(number[i]<=number[pivot]&&i<last)
            i++;
         while(number[j]>number[pivot])
            j--;
         if(i<j){
            temp=number[i];
            number[i]=number[j];
            number[j]=temp;
         }
      }

      temp=number[pivot];
      number[pivot]=number[j];
      number[j]=temp;
      quicksort(number,first,j-1);
      quicksort(number,j+1,last);

   }
}

Compiler output:
main.c:2:9: fatal error: cstdlib: No such file or directory
    2 | #include<cstdlib>
      |         ^~~~~~~~~
compilation terminated.
Language: C++

v#include <bits/stdc++.h>

using namespace std;

int maxAbsValExpr(vector<int>& x, vector<int>& y) {
        int res = 0, n = x.size(), smallest, cur;
        for (int p : {1, -1}) {
            for (int q : {1, -1}) {
                smallest = p * x[0] + q * y[0] + 0;
                for (int i = 1; i < n; ++i) {
                    cur = p * x[i] + q * y[i] + i;
                    res = max(res, cur - smallest);
                    smallest = min(smallest, cur);
                }
            }
        }
        return res;
}

int main(){
	int n;
	cin >> n;
	vector<int> a(n);
	vector<int> b(n);
	for(int i = 0; i < n; i++){
		cin >> a[i] >> b[i];
	}
	cout << maxAbsValExpr(a,b) - 1;
	return 0;
}


Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | v#include <bits/stdc++.h>
      |  ^
a.cc:1:1: error: 'v' does not name a type
    1 | v#include <bits/stdc++.h>
      | ^
a.cc:5:19: error: 'vector' was not declared in this scope
    5 | int maxAbsValExpr(vector<int>& x, vector<int>& y) {
      |                   ^~~~~~
a.cc:5:26: error: expected primary-expression before 'int'
    5 | int maxAbsValExpr(vector<int>& x, vector<int>& y) {
      |                          ^~~
a.cc:5:35: error: 'vector' was not declared in this scope
    5 | int maxAbsValExpr(vector<int>& x, vector<int>& y) {
      |                                   ^~~~~~
a.cc:5:42: error: expected primary-expression before 'int'
    5 | int maxAbsValExpr(vector<int>& x, vector<int>& y) {
      |                                          ^~~
a.cc:5:49: error: expression list treated as compound expression in initializer [-fpermissive]
    5 | int maxAbsValExpr(vector<int>& x, vector<int>& y) {
      |                                                 ^
a.cc: In function 'int main()':
a.cc:22:9: error: 'cin' was not declared in this scope
   22 |         cin >> n;
      |         ^~~
a.cc:23:9: error: 'vector' was not declared in this scope
   23 |         vector<int> a(n);
      |         ^~~~~~
a.cc:23:16: error: expected primary-expression before 'int'
   23 |         vector<int> a(n);
      |                ^~~
a.cc:24:16: error: expected primary-expression before 'int'
   24 |         vector<int> b(n);
      |                ^~~
a.cc:26:24: error: 'a' was not declared in this scope
   26 |                 cin >> a[i] >> b[i];
      |                        ^
a.cc:26:32: error: 'b' was not declared in this scope
   26 |                 cin >> a[i] >> b[i];
      |                                ^
a.cc:28:9: error: 'cout' was not declared in this scope
   28 |         cout << maxAbsValExpr(a,b) - 1;
      |         ^~~~
a.cc:28:31: error: 'a' was not declared in this scope
   28 |         cout << maxAbsValExpr(a,b) - 1;
      |                               ^
a.cc:28:33: error: 'b' was not declared in this scope
   28 |         cout << maxAbsValExpr(a,b) - 1;
      |                                 ^
a.cc:28:34: error: 'maxAbsValExpr' cannot be used as a function
   28 |         cout << maxAbsValExpr(a,b) - 1;
      |                                  ^
Language: Java

import java.util.*;
import java.io.*;
 
public class Main{
  Scanner sc = new Scanner(System.in);	
 
  public void run(){
    int n = sc.nextInt();
    
    int MAX = 1234567
    int posMax = -MAX;
    int posMin = MAX;
    int negMax = -MAX;
    int negMin = MAX;
    
    for(int i = 0 ;i < n ; i++){
      int x = sc.nextInt();
      int y = sc.nextInt();
      
      int pos = x+y;
      int neg = x-y;
      posMax = Math.max(posMax, pos);
      posMin = Math.min(posMin, pos);
      negMax = Math.max(negMax, neg);
      negMin = Math.min(negMin, neg);
    }
    
    System.out.println(Math.max(posMax-posMin, negMax-negMin));
  }
  public static void main(String[] args){
    Main m = new Main();
    m.run();
  }
}

Compiler output:
Main.java:10: error: ';' expected
    int MAX = 1234567
                     ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long int
 
int main() {
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll q;
    cin>>q;
    int n=q;
    vector<pair<ll,ll>>v;
    while(q--){
    ll n,m;
    cin>>n>>m;
     v.push_back({n,m});
    }
    vector<ll>a,b;
    for(int i=0;i<n;i++)
    {
        a.push_back(v[i].first+v[i].second);
        b.push_back(v[i].first-v[i].second);
    }
    sort(a.begin(),a.end());
    sort(b.begin(),b.end());
    ans = abs(a[n-1]-a[0]);
    ans=max(ans,b[n-1]-b[0]);
 cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   25 |     ans = abs(a[n-1]-a[0]);
      |     ^~~
      |     abs
Language: C++

def get_ints():
  return list(map(int,input().split()))

n = int(input())
a,b = [],[]
for i in range(n):
  x,y = get_ints()
  a.append(x+y)
  b.append(x-y)

a.sort()
b.sort()
ans = max(a[-1]-a[0], b[-1]-b[0])
print(ans)



    

Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def get_ints():
      | ^~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#define Nfor(N) for(int i=0;i<N;i++)
using namespace std;

int main(){
  	int N;
  	cin >> N;
  	vector<int> x(N), y(N);
  	Nfor(N) cin >> x[i] >> y[j];
  	int maxz=0, minz=x[0]+y[0], maxw=0, minw=x[0]-y[0];
  	Nfor(N){
      	maxz=max(x[i]+y[i], maxz);
      	minz=min(x[i]+y[i], minz);
      	maxw=max(x[i]-y[i], maxw);
      	minw=min(x[i]-y[i], minw);      	
    }
  	int ans = max(maxz-minz, maxw-minw);
  	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:34: error: 'j' was not declared in this scope
   11 |         Nfor(N) cin >> x[i] >> y[j];
      |                                  ^
Language: C

#include <iostream>

int main() {
    int n, x, y;

    std::cin >> n;
    std::cin >> x >> y;

    int z, z_max, z_min, w, w_max, w_min;
    z_max = z_min = x + y;
    w_max = w_min = x - y;

    for (int i = 1; i < n; i++) {
        std::cin >> x >> y;

        z = x + y;
        w = x - y;

        if (z > z_max) {
            z_max = z;
        } else if (z < z_min) {
            z_min = z;
        }
        if (w > w_max) {
            w_max = w;
        } else if (w < w_min) {
            w_min = w;
        }
    }

    z_max -= z_min;
    w_max -= w_min;

    if (z_max > w_max) {
        std::cout << z_max << std::endl;
    } else {
        std::cout << w_max << std::endl;
    }
    
}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
#include <cmath>
#include <bitset>
#include <iomanip>
#include <stack>
#include <list>
#include <map>
#include <unordered_map>
#include <chrono>
#include <numeric>
using namespace std;
using ll = long long;
const ll INF = (ll)1e18+1;
const ll DIV = 1000000007;
//#define TEST
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
#ifdef TEST
    chrono::system_clock::time_point start, end;
    start = chrono::system_clock::now();
#endif
    long N;
    cin >> N;
    vector<ll> x(N);
    vector<ll> y(N);
    vector<ll> p, m;
    for(size_t i=0;i<N; i++)
    {
        cin >> x[i] >> y[i];
        p.push_back(x[i]+y[i]);
        m.push_back(x[i]-y[i]);
    }
    sort(p.begin(), p.end());
    sort(m.begin(), m.end());
    cout << max(p[N-1] - p[0], m[N-1], m[0]) << endl;
#ifdef TEST
    end = chrono::system_clock::now();
    cerr << static_cast<double>(chrono::duration_cast<chrono::microseconds>(end - start).count() / 1000.0) << "[ms]" << endl;
#endif
    return 0;
}

Compiler output:
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: In instantiation of 'constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare) [with _Tp = long long int; _Compare = long long int]':
a.cc:40:16:   required from here
   40 |     cout << max(p[N-1] - p[0], m[N-1], m[0]) << endl;
      |             ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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<cmath>
#include<numeric>
#include<functional>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<iomanip>
#include<queue>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<n;i++)
#define ll long long
#define INF 2147483647
using namespace std;
using Graph=vector<vector<int>>;

int main(){
  int n; cin>>n; ll x[n],y[n],candx[4],candy[4],ans=0;
  rep(i,n){
    cin>>x[i]>>y[i];
  }
  vector<pair<ll,ll>> vx,vy;
  rep(i,n){
    vx.push_back(make_pair(x[i],y[i]));
    vy.push_back(make_pair(y[i],x[i]));
  }
  sort(vx.begin(),vx.end());
  sort(vy.begin(),vy.end());
  candx[0]=vx[0].first;
  candy[0]=vx[0].second;
  candx[1]=vx[n-1].first;
  candy[1]=vx[n-1].second;
  candx[2]=vy[0].second;
  candy[2]=vy[0].first;
  candx[3]=vy[n-1].second;
  candy[3]=vy[n-1].first;
  rep(i,4){
    rep{j,n){
      ans=max(ans,abs(candx[i]-x[j])+abs(candy[i]-candy[j]));
    }
  }
  cout<<ans;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:5: error: 'rep' was not declared in this scope
   39 |     rep{j,n){
      |     ^~~
Language: C++

#include<iostream>
#include<cmath>
#include<numeric>
#include<functional>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<iomanip>
#include<queue>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<n;i++)
#define ll long long
#define INF 2147483647
using namespace std;
using Graph=vector<vector<int>>;

int main(){
  int n; cin>>n; ll x[n],y[n],candx[4],candy[4],ans=0;
  rep(i,n){
    cin>>x[i]>>y[i];
  }
  vector<pair<ll,ll>> vx,vy;
  rep(i,n){
    vx.push_back(make_pair(x[i],y[i]));
    vy.push_back(make_pair(y[i],x[i]));
  }
  sort(vx.begin(),vx.end());
  sort(vy.begin(),vy.end());
  candx[0]=vx[0].first;
  candy[0]=vx[0].second;
  candx[1]=vx[n-1].first;
  candy[1]=vx[n-1].second;
  candx[2]=vy[0].second;
  candy[2]=vy[0].first;
  candx[3]=vy[n-1].second;
  candy[3]=vy[n-1].first;
  rep(i,4){
    rep{j,n){
      ans=max(ans,abs(candx[i]-x[j])+abs(candy[i]-candy[j]));
    }
  }
  cout<<ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:5: error: 'rep' was not declared in this scope
   39 |     rep{j,n){
      |     ^~~
a.cc:44:2: error: expected '}' at end of input
   44 | }
      |  ^
a.cc:18:11: note: to match this '{'
   18 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<cmath>
#include<numeric>
#include<functional>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<iomanip>
#include<queue>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<n;i++)
#define ll long long
#define INF 2147483647
using namespace std;
using Graph=vector<vector<int>>;

int main(){
  int n; cin>>n; ll x[n],y[n],candx[4],candy[4],ans=0,dist;
  rep(i,n){
    cin>>x[i]>>y[i];
  }
  vector<pair<ll,ll> vx,vy;
  rep(i,n){
    vx.push_back(make_pair(x[i],y[i]));
    vy.push_back(make_pair(y[i],x[i]));
  }
  sort(vx.begin(),vx.end());
  sort(vy.begin(),vy.end());
  candx[0]=vx[0].first;
  candy[0]=vx[0].second;
  candx[1]=vx[n-1].first;
  candy[1]=vx[n-1].second;
  candx[2]=vy[0].second;
  candy[2]=vy[0].first;
  candx[3]=vy[n-1].second;
  candy[3]=vy[n-1].first;
  rep(i,4){
    rep{j,n){
      ans=max(ans,abs(candx[i]-x[j])+abs(candy[i]-candy[j]));
    }
  }
  cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:25: error: template argument 1 is invalid
   23 |   vector<pair<ll,ll> vx,vy;
      |                         ^~
a.cc:23:25: error: template argument 2 is invalid
a.cc:25:5: error: 'vx' was not declared in this scope; did you mean 'x'?
   25 |     vx.push_back(make_pair(x[i],y[i]));
      |     ^~
      |     x
a.cc:26:5: error: 'vy' was not declared in this scope; did you mean 'y'?
   26 |     vy.push_back(make_pair(y[i],x[i]));
      |     ^~
      |     y
a.cc:28:8: error: 'vx' was not declared in this scope; did you mean 'x'?
   28 |   sort(vx.begin(),vx.end());
      |        ^~
      |        x
a.cc:29:8: error: 'vy' was not declared in this scope; did you mean 'y'?
   29 |   sort(vy.begin(),vy.end());
      |        ^~
      |        y
a.cc:39:5: error: 'rep' was not declared in this scope
   39 |     rep{j,n){
      |     ^~~
a.cc:44:2: error: expected '}' at end of input
   44 | }
      |  ^
a.cc:18:11: note: to match this '{'
   18 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef		long long       ll;
typedef         long double      dl;
typedef     unsigned long long  ull;
#define		pb              push_back
#define		PB              pop_back
#define		nn              "\n"
#define     O_O             ios_base::sync_with_stdio(false); cin.tie(NULL)
#define		all(p)          p.begin(),p.end()
#define		zz(v)           (ll)v.size()
#define		ss              ' '
#define	       MEM(a,b)         memset(a,(b),sizeof(a))
#define	       CLR(p)           memset(p,0,sizeof(p))
#define f0(i,b) for(int i=0;i<(b);i++)
#define f1(i,b) for(int i=1;i<=(b);i++)
#define f2(i,a,b) for(int i=(a);i<=(b);i++)
#define fr(i,b,a) for(int i=(b);i>=(a);i--)
#define rep(i,a,b,c) for(int i=(a);i!=(b);i+=(c))
#define         arrsize(a)      (sizeof(a)/sizeof(a[0]))
//#define       arrsize(a)      (sizeof(a)/sizeof(*a))
#define 	S(a)            scanf("%lld",&a)
#define 	SS(a,b)         scanf("%lld %lld",&a,&b)
#define 	SSS(a,b,c)      scanf("%lld %lld %lld",&a,&b,&c)
#define		gcd(a,b)        __gcd(a,b)
#define		lcm(a,b)        (a*b)/gcd(a,b)
#define		pi              acos(-1.0)
#define	       ff               first
#define	       sc              second
typedef        pair <int, int>   pii;
typedef       pair <ll, ll>      pll;
typedef      vector< pair <ll, ll> >      vpll;
typedef		vector<ll>      vll;
typedef		map<string,ll>      msl;
typedef		map<ll,ll>      mll;
#define yes cout << "YES\n"
#define no cout<<"NO\n"
//memset(ar,-1,sizeof(ar));
//#define sort(x) sort(x.begin(), x.end())
//sort(a,a+n,greater<ll>())
//for (auto it = mp.begin(); it != mp.end(); ++it){}
// string x(w.size(),'1');
#define MAX 1000005
#define precision(a) fixed << setprecision(a)

#define mod 1000000007

ll ar[MAX],br[MAX];

int main()
{
 //O_O ;
   ll n;cin>>n;

   for(ll i=0;i<n;i++)
   {
       ll a,b;
       cin>>a>>b;
       ar[i]=a+b;
       br[i]=b-a;
   }
   sort(ar,ar+n);sort(br,br+n);
   ll ans=max(abs(ar[0]-ar[n-1]),abs(br[0]-br[n-1]));
   cout<<abs(ar[0]-ar[n-1]<<nn;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:64:27: error: invalid operands of types 'll' {aka 'long long int'} and 'const char [2]' to binary 'operator<<'
   64 |    cout<<abs(ar[0]-ar[n-1]<<nn;
      |              ~~~~~~~~~~~~~^~
      |                   |
      |                   ll {aka long long int}
Language: C++

#include<iostream>
#include<iomanip>
#include<string>
#include<algorithm>
#include<vector>
#include<utility>
#include<tuple>
#include<map>
#include<queue>
#include<stack>
#include<deque>
#include<bitset>
#include<math.h>
using namespace std;
using ll = int64_t;
using Graph = vector<vector<int> >;
const ll M = 1000000007;

int main(){
    int n;
    cin >> n;
    ll z[n],w[n];
    for(int i=0;i<n;i++){
        ll x,y;
        cin >> x >> y;
        z[i]=x+y;
        w[i]=x-y;
    }

    //cout << 2*M << endl;

    ll zmax=wmax=INT64_MIN,zmin=wmin=INT64_MAX;
    for(int i=0;i<n;i++){
        zmax=max(zmax,z[i]);
        zmin=min(zmin,z[i]);
        wmax=max(wmax,w[i]);
        wmin=min(wmin,w[i]);
    }

    ll ans=max(zmax-zmin,wmax-wmin);
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:13: error: 'wmax' was not declared in this scope; did you mean 'zmax'?
   32 |     ll zmax=wmax=INT64_MIN,zmin=wmin=INT64_MAX;
      |             ^~~~
      |             zmax
a.cc:32:18: error: 'INT64_MIN' was not declared in this scope
   32 |     ll zmax=wmax=INT64_MIN,zmin=wmin=INT64_MAX;
      |                  ^~~~~~~~~
a.cc:35:9: error: 'zmin' was not declared in this scope; did you mean 'fmin'?
   35 |         zmin=min(zmin,z[i]);
      |         ^~~~
      |         fmin
a.cc:37:9: error: 'wmin' was not declared in this scope; did you mean 'fmin'?
   37 |         wmin=min(wmin,w[i]);
      |         ^~~~
      |         fmin
a.cc:40:21: error: 'zmin' was not declared in this scope; did you mean 'fmin'?
   40 |     ll ans=max(zmax-zmin,wmax-wmin);
      |                     ^~~~
      |                     fmin
a.cc:40:31: error: 'wmin' was not declared in this scope; did you mean 'fmin'?
   40 |     ll ans=max(zmax-zmin,wmax-wmin);
      |                               ^~~~
      |                               fmin
Language: C++

#include<iostream>
#include<cstdlib>
int main()
{
  int N = 0;
  scanf("%d",&N);
  long B = 0;
  long arr[200000][2] = {0};
  for(int a = 0; a < N; a++)
  {
    std::cin>>arr[a][0]>>arr[a][1];
  }
  for(int a = 0; a < N; a++)
  {
    for(int b = a + 1; b < N; b++)
    {
      if(B < (abs(arr[a][0] - arr[b][0]) + abs(arr[a][1] - arr[b][1])))
      {
        B = (abs(arr[a][0] - arr[b][0]) + abs(arr[a][1] - arr[b][1]));
      }
    }
  }
  printf("%ld",B)
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:18: error: expected ';' before '}' token
   23 |   printf("%ld",B)
      |                  ^
      |                  ;
   24 | }
      | ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define fastIO std::ios_base::sync_with_stdio(false); std::cin.tie(0); std::cout.tie(0)
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define trace(x) cout << '>' << #x << ':' << x << "\n" 
#define trace2(x,y) cout<< '>' << #x << ':' << x << " | " << #y << ':' << y << "\n" 
#define trace3(a,b,c) cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<"\n" 
#define trace4(a,b,c,d) cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<"\n" 
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
#define endl '\n' 
typedef vector<int> VI;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> PII;
const ll mod=1000000007;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);
ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}

const int maxn = 1e5 + 10;

int n;
LLONG_MIN mx1,mi1,mx2,mi2;

int main()
{
    fastIO;
    cin >> n;
    mx1 = -1e18, mi1 = 1e18, mx2 = -1e18, mi2 = 1e18;

    for(int i = 0; i < n; ++i)
    {
        int x,y;
        cin >> x >> y;
        ll v1 = x + y, v2 = x - y;
        mx1 = max(v1,mx1);
        mi1 = min(v1,mi1);
        mx2 = max(v2,mx2);
        mi2 = min(v2,mi2);
    }
    cout << max(mx1 - mi1, mx2 - mi2) << endl;

    return 0;
}

Compiler output:
In file included from /usr/lib/gcc/x86_64-linux-gnu/14/include/limits.h:210,
                 from /usr/lib/gcc/x86_64-linux-gnu/14/include/syslimits.h:7,
                 from /usr/lib/gcc/x86_64-linux-gnu/14/include/limits.h:34,
                 from /usr/include/c++/14/climits:42,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:38,
                 from a.cc:1:
a.cc:29:1: error: expected unqualified-id before '-' token
   29 | LLONG_MIN mx1,mi1,mx2,mi2;
      | ^~~~~~~~~
a.cc:29:1: error: expected ')' before '-' token
   29 | LLONG_MIN mx1,mi1,mx2,mi2;
      | ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:35:5: error: 'mx1' was not declared in this scope
   35 |     mx1 = -1e18, mi1 = 1e18, mx2 = -1e18, mi2 = 1e18;
      |     ^~~
a.cc:35:18: error: 'mi1' was not declared in this scope
   35 |     mx1 = -1e18, mi1 = 1e18, mx2 = -1e18, mi2 = 1e18;
      |                  ^~~
a.cc:35:30: error: 'mx2' was not declared in this scope
   35 |     mx1 = -1e18, mi1 = 1e18, mx2 = -1e18, mi2 = 1e18;
      |                              ^~~
a.cc:35:43: error: 'mi2' was not declared in this scope
   35 |     mx1 = -1e18, mi1 = 1e18, mx2 = -1e18, mi2 = 1e18;
      |                                           ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define lvector vector<ll>
#define cvector vector<char>
#define svector vector<string>
#define lque queue<ll>
#define lpque priority_queue<ll>
#define dlpque priority_queue<ll,lvector,greater<ll>>
#define P pair<ll,ll>
#define ALL(a) a.begin(),a.end()
#define RALL(a) a.rbegin(),a.rend()
#define rep(i,n) for(ll i=0; i<n; ++i)
#define print(a) cout << (a) << endl

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll n,x,y;cin>>n;
  vector<P> v(n),w(n);
  rep(i,n) {cin>>x>>y;v[i]=P(x,y);w[i]=P(y,x);}
  sort(ALL(P));
  ll ans=0,tmp;
  for(ll i=1;i<n;++i) {
    tmp=abs(v[i].first-v[0].first)+abs(v[i].second-v[0].second);
    ans=max(ans,tmp);
  }
  for(ll i=0;i<n-1;++i) {
    tmp=abs(v[n-1].first-v[i].first)+abs(v[n-1].second-v[i].second);
    ans=max(ans,tmp);
  }
  print(ans);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: expected primary-expression before '.' token
   11 | #define ALL(a) a.begin(),a.end()
      |                 ^
a.cc:22:8: note: in expansion of macro 'ALL'
   22 |   sort(ALL(P));
      |        ^~~
a.cc:11:27: error: expected primary-expression before '.' token
   11 | #define ALL(a) a.begin(),a.end()
      |                           ^
a.cc:22:8: note: in expansion of macro 'ALL'
   22 |   sort(ALL(P));
      |        ^~~
Language: C++

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

#ifdef LOCAL
#define debug(var) cerr << (#var) << " = " << (var) << endl;
#else
#define debug(var)
#endif

void init() {
  ios_base::sync_with_stdio(0);
  cin.tie(0); cout.tie(0);
}

const int N = 2e5+23;

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

int closest(int x, int y) {
  long long d = 2e9;
  int ret = -1;
  for (int i = 0; i < n; ++i) {
    long long nd = abs(x-a[i].first)+abs(y-a[i].second);
    if (nd < d) {
      d = nd;
      ret = i;
    }
  }
  return ret;
}

void solve() {
  scanf("%d", &n);
  long long maX = -1e9, maY = -1e9, miX = 1e9, miY = 1e9;
  for (int i = 0; i < n; ++i) {
    scanf("%d%d", &a[i].first, &a[i].second);
    maX = max(maX, a[i].first);
    miX = min(miX, a[i].first);
    maY = max(maY, a[i].second);
    miY = min(maY, a[i].second);
  }
  int corners[8] = {closest(miX, maY), closest(maX, maY),
		    closest(miX, miY), closest(maX, miY),
                    closest(0  , maY), closest(0  , miY),
		    cloeset(maX, 0  ), closest(miX, 0  )};
  long long ans = 0;
  for (int i = 0; i < 7; ++i) {
    for (int j = i+1; j < 8; ++j) {
      if (corners[i] == corners[j]) continue;
      long long nd = abs(a[corners[j]].first-a[corners[i]].first)+
	             abs(a[corners[j]].second-a[corners[i]].second);
      ans = max(nd, ans);
    }
  }
  printf("%lld", ans);
}

int main() {
  init();
  int t = 1; //scanf("%d", &t);
  while (t--) {
    solve();
  }
  return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:46:21: error: 'cloeset' was not declared in this scope; did you mean 'closest'?
   46 |                     cloeset(maX, 0  ), closest(miX, 0  )};
      |                     ^~~~~~~
      |                     closest
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll=long long;
constexpr ll mod=1e9+7;
constexpr ll INF=1LL<<60;

int main()
{
  ll n;
  cin>>n;
  vector<pair<ll,ll>> pos(n);
  ll max_plus=0,max_minus=0,min_plus=INF,min_minus=INF;
  for(auto&& e: pos) 
  {
    cin>>e.first>>e.second;
    max_plus=max(max_plus,e.first+e.second);
    min_plus=min(min_plus,e.first+e.second);
    max_minus=max(max_minus,e.first-e.second);
    min_minus=min(min_minus,e.first-e.second);
  }
  cour<<max(abs(max_plus-min_plus),abs(max_minus-min_minus))<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:3: error: 'cour' was not declared in this scope
   21 |   cour<<max(abs(max_plus-min_plus),abs(max_minus-min_minus))<<endl;
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
#define ll long long int
#define db double
#define pb push_back
#define mpr make_pair
#define andl "\n"
#define f first
#define s second
#define mset(x,y) memset(x,y,sizeof(x))
#define fr(i,n) for(long long int i=0;i<n;i++)
#define trace(it,x) for(auto it = (x).begin(); it != (x).end(); it++)
#define mod 1000000007
#define fastio ios::sync_with_stdio (false); cin.tie (0); cout.tie (0);
#define runtime cerr<< '\n' << "Time elapsed :" << clock() * 1000.0 / CLOCKS_PER_SEC << " ms\n" ;
using namespace std;
 
// convert number to string to_string(x);
// convert string to number stoi();
 
// ll mulmod(ll x,ll y)
// {
//     return ((x%mod)*(y%mod))%mod;
// }
 
// ll binpow(ll x, ll y)
// {
//     ll z = 1;
//     while(y > 0)
//     {
//         if(y % 2 == 1)
//             z = mulmod(z, x);
//         x = mulmod(x, x);
//         y /= 2;
//     }
//     return z;
// }
 
// ll ncr(ll n,ll r)
// {
//     return mulmod(fact[n],binpow(mulmod(fact[n-r],fact[r]),mod-2));
// }
 
// ll pwr(ll n,ll m)
// {
//   if(n==1 || m==0)
//     return 1;
 
//   ll x=pwr(n,m/2);
//   if(m%2==0)
//     return x*x;
//   else
//     return n*x*x;
// }
 
// ll pwr(ll n,ll m,ll b)
// {
//   if(n==1 || m==0)
//     return 1;
 
//   ll x=pwr(n,m/2,b);
//   if(m%2==0)
//     return ((x%b)*(x%b))%b;
//   else
//     return ((n%b)*(((x%b)*(x%b))%b))%b;
// }
 
void solve()
{
  return ;
}
 
int main()
{
  fastio
  
  ll n,x,y;
  cin >> n;
  
  ll mnp=1e10,mxp=-1e10,mnn=1e10,mxn=-1e10;
  fr(i,n)
  {
  	cin >> x >> y;
  	mnp=min(mn,x+y);
  	mxp=max(mx,x+y);
  	mnn=min(mn,x-y);
  	mxn=max(mx,x-y);
  }
  cout << max(mxp-mnp,mxn-mnn);
 
  runtime
}

Compiler output:
a.cc: In function 'int main()':
a.cc:83:17: error: 'mn' was not declared in this scope; did you mean 'mxn'?
   83 |         mnp=min(mn,x+y);
      |                 ^~
      |                 mxn
a.cc:84:17: error: 'mx' was not declared in this scope; did you mean 'mxn'?
   84 |         mxp=max(mx,x+y);
      |                 ^~
      |                 mxn
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int           long long
#define pb            push_back
#define all(a)        (a).begin(),(a).end()
#define sz(x)         (int)x.size()
#define F             first
#define S             second
#define endl          "\n"
#define inf           (long long)1000000007
#define FOR(i, a, b)  for(int i=a; i<b; i++)
#define bigint        1e18
mt19937 RNG(chrono::steady_clock::now().time_since_epoch().count()); 
#define SHUF(v) shuffle(aint(v), RNG);
// Use mt19937_64 for 64 bit random numbers. 

template <typename T>
T ceil(T a, T b){ return (a+b-1)/b; }


template<typename T>
T binpow(T a, T b, T m) {
    a %= m;
    T res = 1;
    while (b > 0) {
        if (b & 1)
            res = res * a % m;
        a = a * a % m;
        b >>= 1;
    }
    return res;
}
class Solution {
    int  M = 3e9 + 7;
public:    
    Solution() {
        
    }
    solve() {
        int n; cin>>n;
        int mx1 = 0, mn1 = M, mx2 = -M, mn2 = M;
        FOR(i, 0, n) {
            int 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);
        }
        cout<<max(abs(mx1-mn1), abs(mx2-mn2));
    }
};
// abs(x1 - x2) + abs(y1 - y2)   
// (x1 - x2) + (y1-y2)       -- both +ve
// (x1 + y1) - ( x2 + y2)    -- (1) 
// OR 
// -(x1 - x2) - (y1 - y2)    -- both -ve
// -x1 + x2 - y1 + y2        -- Same as (1) (?)
// OR
// x1 - x2 - y1 + y2         -- second -ve
// (x1 - y1) - (x2 - y2)     -- (2) 
// OR
// -x1 + x2 + y1 - y2
// -(x1 - y1) + (x2 - y2)    -- Same as (2) ()

void solve(){
    Solution sol;
    sol.solve();
}

signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);     
    int t=1;
    //cin>>t;
    FOR(i, 1, t+1){ 
        //cout<<"Case #"<<i<<": ";
        solve();
    }
    cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
    return 0;
 
}

Compiler output:
a.cc:39:5: error: ISO C++ forbids declaration of 'solve' with no type [-fpermissive]
   39 |     solve() {
      |     ^~~~~
a.cc: In member function 'int Solution::solve()':
a.cc:50:5: warning: no return statement in function returning non-void [-Wreturn-type]
   50 |     }
      |     ^
Language: C++

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

int main()
{
    ll int n;
    cin>>n;
    vector<ll int> x, y;
    for(ll int i=0; i<n; i++){
        int a, b;
        cin>>a>>b;
        x.push_back(a);
        y.push_back(b);
    }
    ll int sum[n], sub[n];
    for(ll int i=0; <n; i++){
      sum[i] = x[i] + y[i];
      sub[i] = (x[i]>y[i]) ? (x[i]-y[i]) : (y[i]-x[i]);
    }
  	ll int maxval = max(*max_element(sum, sum+n)-*min_element(sum, sum+n), *max_element(sub, sub+n)-*min_element(sub, sub+n));
    cout<<maxval;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:21: error: expected primary-expression before '<' token
   17 |     for(ll int i=0; <n; i++){
      |                     ^
Language: C++

#include<iostream>
using namespace std;
long long mod = 1e9+7;

int main(){
	int n,a,b;
  	cin>>n;
  	int sum[n],diff[n];
  	for(int i=0;i<n;++i){
    	cin>>a>>b;
      	sum[i] = a+b;
      	diff[i] = a-b;
    }
  	int mini1 = INT_MAX,mini2 = INT_MAX,maxi1 = INT_MIN,maxi2 = INT_MIN;
  	for(int i=0;i<n;++i){
    	if(mini1>sum[i])mini1 = sum[i];
      	if(maxi1<sum[i])maxi1 = sum[i];
      	if(mini2>diff[i])mini2 = diff[i];
      	if(maxi2<diff[i])maxi2 = diff[i];
    }
  
  	if(maxi1-mini1 > maxi2-mini2)cout<<maxi1-mini1;
  	else cout<<maxi2-mini2;
   
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: 'INT_MAX' was not declared in this scope
   14 |         int mini1 = INT_MAX,mini2 = INT_MAX,maxi1 = INT_MIN,maxi2 = INT_MIN;
      |                     ^~~~~~~
a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include<iostream>
  +++ |+#include <climits>
    2 | using namespace std;
a.cc:17:12: error: 'maxi1' was not declared in this scope
   17 |         if(maxi1<sum[i])maxi1 = sum[i];
      |            ^~~~~
a.cc:18:12: error: 'mini2' was not declared in this scope; did you mean 'mini1'?
   18 |         if(mini2>diff[i])mini2 = diff[i];
      |            ^~~~~
      |            mini1
a.cc:19:12: error: 'maxi2' was not declared in this scope
   19 |         if(maxi2<diff[i])maxi2 = diff[i];
      |            ^~~~~
a.cc:22:12: error: 'maxi1' was not declared in this scope
   22 |         if(maxi1-mini1 > maxi2-mini2)cout<<maxi1-mini1;
      |            ^~~~~
a.cc:22:26: error: 'maxi2' was not declared in this scope
   22 |         if(maxi1-mini1 > maxi2-mini2)cout<<maxi1-mini1;
      |                          ^~~~~
a.cc:22:32: error: 'mini2' was not declared in this scope; did you mean 'mini1'?
   22 |         if(maxi1-mini1 > maxi2-mini2)cout<<maxi1-mini1;
      |                                ^~~~~
      |                                mini1
Language: C++

// #include <iostream>
// #include <fstream>
// #include <cstdio>
// #include <set>
// #include <vector>
// #include <algorithm>
// #include <cmath>
// #include <cstdlib>
// #include <queue>
// #include <string>
// #include <map>
// #include <unordered_map>
// #include <cstring>
// #include <numeric>
// #include <stack>
// #include <iomanip>
// #include <chrono>

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

#define sd(mark) scanf("%d",&mark)
#define ss(mark) scanf("%s",mark)
#define clr(mark) memset(mark,0,sizeof(mark))
#define setinf(mark) memset(mark,0x3f,sizeof(mark))
#define setneg(mark) memset(mark,-1,sizeof(mark))



#ifndef strange
#define trace(...)
// #define endl '\n'
#define start_routine() 
#define end_routine()
#endif
typedef long long ll;   
//__gcd


const ll infl=0x3f3f3f3f3f3f3f3fLL;
const int infi=0x3f3f3f3f;
#define PI 3.141592653589793238
#define mod 1000000007


#define F first 
#define S second
#define mp make_pair
#define all(x) x.begin(), x.end()
#define trav(a,x) for(auto &a:x)
#define pii pair<int,int>

#define pb push_back
#define int long long

#define fr(i, a, b) for (int i = (a), _b = (b); i <= _b; i++)
#define rep(a,b,c) for(int a=b; a<c; a++)
#define frr(i, a, b) for (int i = (a), _b = (b); i >= _b; i--)

#define sz(x) (int)(x).size()
typedef pair<pii, int> piii;
typedef vector<int> vi;
typedef vector<vi> vii;
#define vp vector <pii>
int x;

int power(int x,  int y) 
{ 
    int res = 1;   
  
    x = x % mod;  
   
    if (x == 0) return 0; 

    while (y > 0)  
    {  
        if (y & 1)  
            res = (res*x) % mod;  
  
          
        y = y>>1; 
        x = (x*x) % mod;  
    }  
    return res;  
}

bool cmp(pii a,pii b){
    return a.S<b.S;
}
// int dp[2005];
void solve(){
    int n;
    cin>>n;
    // vector<vp> quad(4);
    //first quadrant second and so on
    int x,y;
    vi a;vi b;
    rep(i,0,n){
        cin>>x>>y;
        a.pb(x+y);
        b.pb(x-y);
    }
    sort(a.begin(),a.end());
    sort(b.begin(),b.end());
    int ans=max(a[n-1]-a[0],b[n-1]-b[0]);
    return ans;


}


signed main(){
    int t=1;
    start_routine();
    cin.tie(0); cout.tie(0);
    ios_base::sync_with_stdio(NULL);
    cout<<fixed<<setprecision(10);
    
    
    // cin>>t;
    
    fr(i,1,t) {
		// cout<<"Case #"<<i<<": ";
		solve();
	}

    end_routine();
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:106:12: error: return-statement with a value, in function returning 'void' [-fpermissive]
  106 |     return ans;
      |            ^~~