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

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int mod=1e9+7,N=200010;
int n;
struct node
{
	int x,y;
	friend operator < (node &a,node &b)
	{
		if(atan2(a.y,a.x)!=atan2(b.y,b.x))
    	     return atan2(a.y,a.x)<atan2(b.y,b.x);
	    else return a.x<b.x;
	 } 
}e[N];
int get(int i,int j)
{
	return abs(e[i].x-e[j].x)+abs(e[i].y-e[j].y);
}
int main()
{
	scanf("%d",&n);
	for(int i=1;i<=n;i++)
	{
		scanf("%d%d",&e[i].x,&e[i].y);
	}
	sort(e+1,e+n+1);
	int ans=0;
	for(int i=1;i<n;i++)
	{
		int res=0;
		for(int j=i+1;j!=i;j=(j+1)%(n+1))
		{
			if(!j) continue;
			int num=get(i,j);
			if(num<res) break;
			else res=num;
		}
		ans=max(res,ans);
	}
	printf("%d\n",ans);
	
	
	return 0;
} 

Compiler output:
a.cc:9:16: error: ISO C++ forbids declaration of 'operator<' with no type [-fpermissive]
    9 |         friend operator < (node &a,node &b)
      |                ^~~~~~~~
Language: C++

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

using namespace std;

int main(){
  	int N;
  	cin >> N;
  	vector<long long> x(N), y(N);
  	for(int i=0;i<N;i++){
      	cin >> x[i] >> y[i];
    }
  	long long ans=0;
  	for(int i=0;i<N;i++){
      	for(int j=0;j<i;j++){
          	ans=max(abs(x[i]-x[j])+abs(y[i]-y[j]));
        }
    }
  	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:24: error: no matching function for call to 'max(long long int)'
   18 |                 ans=max(abs(x[i]-x[j])+abs(y[i]-y[j]));
      |                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/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:   template argument deduction/substitution failed:
a.cc:18:24: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   18 |                 ans=max(abs(x[i]-x[j])+abs(y[i]-y[j]));
      |                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:   candidate expects 2 arguments, 1 provided
Language: Java

import java.util.*;

public class pair {
	int x;
	int y;
	
	pair(int x,int y){
		this.x= x;
		this.y= y;
	}

}


public class pair {
	int x;
	int y;
	
	pair(int x,int y){
		this.x= x;
		this.y= y;
	}
}

public class Main {
	static pair[]a;

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc= new Scanner(System.in);
		
		int N=sc.nextInt();
		a= new pair[N];
		
		for(int i=0;i<N;i++){
			int x= sc.nextInt();
			int y= sc.nextInt();
			
			a[i]= new pair(x,y);
			
		}
		
		sc.close();
		
		int ans=0;
		for(int i=0;i<N;i++){
			for(int j=0;j<N;j++){
				if(i == j)continue;
				int d= dist(a[i],a[j]);
				if(ans < d)ans= d;
			}
		}
		
		System.out.println(ans);
		
	}

	
	static int dist(pair i,pair j){
		int res=  Math.abs(i.x- j.x)+ Math.abs(i.y- j.y);
		return res;
	}
}


Compiler output:
Main.java:3: error: class pair is public, should be declared in a file named pair.java
public class pair {
       ^
Main.java:15: error: class pair is public, should be declared in a file named pair.java
public class pair {
       ^
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
#define INF 1000000000001
#define DIM 100001
#define mod 1000000007
#define PI 3.1415926535897932384626433
#include<bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
#define T true
#define F false
#define fi first
#define endl "\n"
#define se second
#define DIM 100001
#define pb push_back
#define amen exit(0);
#define qwe return 0;
#define mod 1000000007
#define INF 1000000000001
#define gg cout<<"OPS"<<endl;
#define PI 3.1415926535897932384626433
#define fast ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
#define time cout << "\nTime Elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " sec\n";
typedef char ch;
typedef bool boll;
typedef string st;
typedef long long ll;
typedef long double ld;
typedef set < string > sst;
typedef set < long long > sll;
typedef unsigned long long ull;
typedef queue < long long > que;
typedef deque < long long > deq;
typedef vector < long long > vec;
typedef map < long long, long long > mll;
typedef pair < long long, long long > pll;
typedef pair < long long, unsigned long long > pul;
typedef vector < pair < long long, long long > > vpl;
typedef tree <ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> myset;
ll n,z,x,s;
pair <ll, pll> a[200001],b[200001];
int main()
{
     fast;
     ll n;
     cin>>n;
     for(int i=1;i<=n;i++){
           ll x,y;
           cin>>x>>y;
           a[i].fi=x+y;
           a[i].se.fi=x;
           a[i].se.se=y;
           b[i].fi=x+y;
           b[i].se.fi=y;
           b[i].se.fi=x;
     }
     sort(a+1,a+1+n);
     sort(b+1,b+1+n);
     cout<<max(abs(a[n].se.se-a[1].se.se)+abs(a[n].se.fi-a[1].se.fi),abs(b[n].se.se-b[1].se.se)+abs(b[n].se.fi-b[1].se.fi)<<endl;

}



Compiler output:
a.cc: In function 'int main()':
a.cc:63:123: error: invalid operands of types 'long long int' and 'const char [2]' to binary 'operator<<'
   63 |      cout<<max(abs(a[n].se.se-a[1].se.se)+abs(a[n].se.fi-a[1].se.fi),abs(b[n].se.se-b[1].se.se)+abs(b[n].se.fi-b[1].se.fi)<<endl;
      |                                                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
      |                                                                                                |
      |                                                                                                long long int
Language: C++

#include <iostream>
#include <string>
#include <list>
#include <vector>
#include <set>
#include <unordered_set>
#include <stack>
#include <algorithm>
#include <queue>
#include <ctime>
#include <iomanip>
#include <tuple>
#include <functional>
#include <map> 
#include <numeric> 

using namespace std;


#define ll long long
#define pi pair<int, int>
#define vi vector<int>
#define vp vector<pi>
#define msa(A, a, n) memset(A, a, n*sizeof(A))
#define msv(A, a) fill(A.begin(), A.end(), a);
#define msc(A, n) memset(A, '\0', n)
#define rep_itr(itr, c) for(itr = (c).begin(); itr != (c).end(); itr++)
#define rep(i, a, b) for(int i = a; i < b; i++)
#define per(i, a, b) for(int i = a; i >= b; i--)
#define pern(i, b) per(i, b - 1, 0)
#define repn(i, b) rep(i, 0, b)
#define repe(i, a, b) for(int i = a; i <= b; i++)
#define repen(i, b) repe(i, 1, b)
#define fast ios_base::sync_with_stdio();cin.tie(0);
#define endl "\n"
//#define MYDEBUG

void my_return(int code)
{
#ifdef MYDEBUG
	std::cout << "\n\nTime = " << fixed << std::setprecision(3) << double(clock()) / CLOCKS_PER_SEC << endl;
#endif
	exit(code);
}

struct item
{
	int x, y;

	bool operator<(const item& a) 
	{
		if (x == a.x) return y < a.y;
		else return x < a.x;
	}
};

int dist(int x1, int x2, int y1, int y2) {
	return abs(x1 - x2) + abs(y1 - y2);
}

int main()
{
	fast
#ifdef MYDEBUG
		freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	int n;
	cin >> n;
	vector<item> arr(n);
	repn(i, n) cin >> arr[i].x >> arr[i].y;

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

	int mx = INT_MIN;
	repn(i, n - 1) {
		int d = dist(arr[i].x, arr[i + 1].x, arr[i].y, arr[i + 1].y);
		mx = max(d, mx);
	}

	cout << mx << endl;

	my_return(0);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:76:18: error: 'INT_MIN' was not declared in this scope
   76 |         int mx = INT_MIN;
      |                  ^~~~~~~
a.cc:16:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   15 | #include <numeric>
  +++ |+#include <climits>
   16 |
Language: Java

import java.util.Scanner;

//atcoderはScannerクラスのsc.next()で行ける
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long ans1;
        long ans2;
        int n = sc.nextInt();
        ArrayList<long[]> dists = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            long tmp = sc.nextLong();
            long tmp1 = sc.nextLong();
            dists.add(new long[]{tmp, tmp1});
        }

        long[] min = dists.get(0);
        long[] max = dists.get(0);
        for (long[] arr : dists) {
            if (min[0] * min[1] >= arr[0] * arr[1]) {
                min = arr;
            }
            if (max[0] * max[1] <= arr[0] * arr[1]) {
                max = arr;
            }
        }
        ans1 = zettaiti(min[0] - max[0]);
        ans2 = zettaiti(min[1] - max[1]);
        System.out.println(ans1 + ans2);
    }

    public static long zettaiti(long a) {
        return a >= 0 ? a : a * -1;
    }
}

Compiler output:
Main.java:10: error: cannot find symbol
        ArrayList<long[]> dists = new ArrayList<>();
        ^
  symbol:   class ArrayList
  location: class Main
Main.java:10: error: cannot find symbol
        ArrayList<long[]> dists = new ArrayList<>();
                                      ^
  symbol:   class ArrayList
  location: class Main
2 errors
Language: C++

//AUTHOR - NIMISH UPADHYAY
//FROM IIIT ALLAHABAD
#include<bits/stdc++.h>
using namespace std;
#define ll long long int 
#define pb push_back
#define NIMISH ios_base::sync_with_stdio(false);cin.tie(NULL);
#define UPADHYAY int t;cin>>t;while(t--)
ll p=1e9+7;
ll power(ll n,ll m){
    if(m==0)return 1;
    ll k=power(n,m/2);
    k=(k*k)%p;
    if(m&1)
    return (k*n)%p;
    return k;
    
}
int main(){
    ll n;
    cin>>n;
    ll m1=0,m2=1e18,x=0,y=0,j=0;
    ll c[n],c1[n];
    for(i=0;i<n;i++){
        cin>>c[i]>>c1[i];
        if(c[i]+c1[i]>m1){
            m1=c1[i]+c[i];
            x=c1[i];
            y=c[i];
        }
        
    }
    for(i=0;i<n;i++){
        j=max(j,abs(x-c[i])+abs(y-c1[i]));
    }
    cout<<j;
}

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

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

#define REP(i, init, n) for(int i = (int)(init); i < (int)(n); i++)

#define vi vector<int>
#define vl vector<long>
#define vvi vector<vector<int>>
#define vvl vector<vector<long>>
#define pint pair<int, int>
#define plong pair<long, long>

int main() {
    int N;
    cin>>N;
    vector<pint> P(N);
    REP(i, 0, N){
        int x, y;
        cin >> x >> y;
        P[i] = {x, y};
    }
    pair<pint, pint> Max = {{P[0].first, P[0].second}, {P[1].first, P[1].second}};
    int dist = abs(P[0].first - P[1].first) + abs(P[0].second - P[1].second);
    REP(i, 2, N){
        int x_tmp = P[i].first, y_tmp = P[i].second;
        int dist_tmp1 = abs(Max.first.first - x_tmp) + abs(Max.first.second - y_tmp);
        int dist_tmp2 = abs(Max.second.first - x_tmp) + abs(Max.second.second - y_tmp);
        if(dist_tmp1 > dist || dist_tmp2 > dist){
            if(dist_tmp1 > dist_tmp2){
                Max.second = {P[i].first, P[i].second};
                dist = dist_tmp1;
            }else{
                Max.first = {P[i].first, P[i].second};
                dist = dist_tmp2;
            }
        }
    }
    cout << dist << endl;
}

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

    #include<iostream>
    #include<bits/stdc++.h>
    #define mod 1000000007
    using namespace std;
    int main() {
        long long n;
        cin>>n;
        long long a=LONG_MAX,b=LONG_MIN,c=LONG_MAX,d=LONG_MIN;
        long long x,y,a1=0,a2=0,b1=0,b2=0,c1=0,c2=0,d1=0,d2=0;
        while(n--)
        {
            cin>>x>>y;
          if(x+y>a)
          {
              
              a=x+y;
          }
          else if(x+y<b)
          {
              b=x+y;
          }
        }
       ans=b-x;
        cout<<ans;
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:23:8: error: 'ans' was not declared in this scope; did you mean 'abs'?
   23 |        ans=b-x;
      |        ^~~
      |        abs
Language: C++

#include <bits/stdc++.h>
#include <atcoder/all>

using namespace std;
using namespace atcoder;
typedef long long ll;

#define REP(i,n) for(ll i=0;i<ll(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=a;i<=ll(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=ll(b);i--)
#define ALL(x) x.begin(),x.end() 
#define SIZE(x) ll(x.size())

#define INF 1000000000000 //10^12:∞
#define MOD 1000000007 //10^9+7:合同式の法
#define MAXR 100000 //10^5:配列の最大のrange

#define PB push_back //挿入
#define MP make_pair //pairのコンストラクタ
#define F first //pairの一つ目の要素
#define S second //pairの二つ目の要素

template<typename T, typename U, typename Comp=less<>>
bool chmax(T& xmax, const U& x, Comp comp={}) {
    if(comp(xmax, x)) {
        xmax = x;
        return true;
    }
    return false;
}

template<typename T, typename U, typename Comp=less<>>
bool chmin(T& xmin, const U& x, Comp comp={}) {
    if(comp(x, xmin)) {
        xmin = x;
        return true;
    }
    return false;
}

void solve() {
    ll N;
    cin >> N;
    vector<pair<ll, ll>> p(N);
    REP(i, N) {
        ll x, y;
        cin >> x >> y;
        p[i] = MP(x-y, x+y);
    }
    ll ans, max_f, min_f, max_s, min_s;
    ans = LLONG_MIN;
    max_f = LLONG_MIN;
    min_f = LLONG_MAX;
    max_s = LLONG_MIN;
    min_s = LLONG_MAX;
    REP(i, N) {
        chmax(max_f, p[i].F);
        chmin(min_f, p[i].F);
        chmax(max_s, p[i].S);
        chmin(min_s, p[i].S);
    }
    ans = max(max_f - min_f, max_s - min_s);
    cout << ans << endl;
}

int main() {
    solve();
    return 0;
}

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

#include <bits/stdc++.h>
#define ll long long
#define mod 1000000007
using namespace std;
	
int main() 
{
	ll n, ans = 0;
	cin >> n;
	ll x[n], y[n], xx, yy;
	xx = yy = 0;
	for(ll i = 0; i < n; i++)
	{
		cin >> x[i] >> y[i];
		if(abs(xx - 0) + abs(yy = 0) < abs(x[i] - 0) + abs(y[i] - 0))
		{
			xx = x[i];
			yy = y[i];
		}
	}
	for(ll i = 0; i < n; i++)
	{
		ans = max(ans, abs(x[i] - x[j]) + abs(y[i] - y[j]));
	}
	cout << ans << '\n';
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:45: error: 'j' was not declared in this scope
   23 |                 ans = max(ans, abs(x[i] - x[j]) + abs(y[i] - y[j]));
      |                                             ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define ll long long
#define speed ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define bug cout << "ok" << endl

const ll INF = 1e9 + 5, N = 2e3 + 5, mod = 1e9 + 7, M = 1e5 + 5;

int main(){
	ll n;
	cin >> n;
	vector <pair <int, int> > cd;
	for(int i = 1; i <= n; i++){
		int x, y;
		cin >> x >> y;
		cd.pb({x, y});
	}
	sort(cd.begin(), cd.end());
	ll ans = 0;
	for(int i = 1; i < n; i++){
		for(int j = 0; j < i; j++){
			if(cd[i].second < cd[j].second) continue;
			ans = max(ans, (cd[i].first + cd[i].second) - (cd[j].first - cd[j].second));
		}
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:34: error: no matching function for call to 'max(long long int&, int)'
   26 |                         ans = max(ans, (cd[i].first + cd[i].second) - (cd[j].first - cd[j].second));
      |                               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:34: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   26 |                         ans = max(ans, (cd[i].first + cd[i].second) - (cd[j].first - cd[j].second));
      |                               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:34: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   26 |                         ans = max(ans, (cd[i].first + cd[i].second) - (cd[j].first - cd[j].second));
      |                               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
 #define MAX 1000000000005
 #define ll long long int
 int main()
 {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
      int  n;
     cin>>n;
      ll  i,sum=0,q=10,x,j,c,d,y,p,r,s=0,t=0;
       vector<ll>a; 
         for(i=0;i<n;i++)
             {cin>>x>>y;
              a.push_back(x+y);
             }
             sort(a.begin(),a.end());
             cout<<abs(a[0]-a[s.size()-1])<<endl;
 }


Compiler output:
a.cc: In function 'int main()':
a.cc:18:33: error: request for member 'size' in 's', which is of non-class type 'long long int'
   18 |              cout<<abs(a[0]-a[s.size()-1])<<endl;
      |                                 ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
	
typedef long long ll;
typedef unsigned long long ull;
typedef long double db;
	
#define MOD 1000000007
#define mini 18446744073709551615
#define ff first
#define ss second
#define pb push_back
#define vii vector<int>
#define pii pair<int,int>
#define vpii vector<pii>


int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	int T=1;
	//cin>>T;
	while(T--)
	{
		ll n,ma=-2000000001,mi=2000000001;
		cin>>n
		ll x,y,mxp=0,mxm=0,mip=mi,mim=mi;
		for(int i=0;i<n;i++)
		{
			cin>>x>>y;
			mxp=max(mxp,x+y);
			mxm=max(mxm,x-y);
			mip=min(mip,x+y);
			mim=min(mim,x-y);
		}
		cout<<max(mxp-mip,mxm-mim);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:23: error: expected ';' before 'll'
   27 |                 cin>>n
      |                       ^
      |                       ;
   28 |                 ll x,y,mxp=0,mxm=0,mip=mi,mim=mi;
      |                 ~~     
a.cc:31:30: error: 'x' was not declared in this scope
   31 |                         cin>>x>>y;
      |                              ^
a.cc:31:33: error: 'y' was not declared in this scope
   31 |                         cin>>x>>y;
      |                                 ^
a.cc:32:25: error: 'mxp' was not declared in this scope; did you mean 'exp'?
   32 |                         mxp=max(mxp,x+y);
      |                         ^~~
      |                         exp
a.cc:33:25: error: 'mxm' was not declared in this scope
   33 |                         mxm=max(mxm,x-y);
      |                         ^~~
a.cc:34:25: error: 'mip' was not declared in this scope; did you mean 'mi'?
   34 |                         mip=min(mip,x+y);
      |                         ^~~
      |                         mi
a.cc:35:25: error: 'mim' was not declared in this scope; did you mean 'mi'?
   35 |                         mim=min(mim,x-y);
      |                         ^~~
      |                         mi
a.cc:37:27: error: 'mxp' was not declared in this scope; did you mean 'exp'?
   37 |                 cout<<max(mxp-mip,mxm-mim);
      |                           ^~~
      |                           exp
a.cc:37:31: error: 'mip' was not declared in this scope; did you mean 'mi'?
   37 |                 cout<<max(mxp-mip,mxm-mim);
      |                               ^~~
      |                               mi
a.cc:37:35: error: 'mxm' was not declared in this scope
   37 |                 cout<<max(mxp-mip,mxm-mim);
      |                                   ^~~
a.cc:37:39: error: 'mim' was not declared in this scope; did you mean 'mi'?
   37 |                 cout<<max(mxp-mip,mxm-mim);
      |                                       ^~~
      |                                       mi
Language: C

#include <iostream>
#include <string>
#include <algorithm>
#include <utility>
#include <vector>
using namespace std;
#define ll long long

ll d(pair<ll, ll> a, pair<ll, ll> b){
    ll dis = abs(a.first-b.first) + abs(a.second - b.second);
    return dis;
}

int main(){
    int n;
    cin >> n;
    vector<pair<ll, ll> > r(n);
    vector<pair<ll, ll> > r2(n);
    for (int i = 0; i < n; i++)
    {
        ll x, y;
        cin >> x >> y;
        r[i] = make_pair(x, y);
        r2[i] = make_pair(y, x);
    }

    sort(r.begin(), r.end());
    sort(r2.begin(), r2.end());

    ll ans = 0;
    for (int i = 0; i < n; i++)
    {
        ans = max(ans, d(r[0], r[i]) );
        ans = max(ans, d(r[n-1], r[i]) );
        ans = max(ans, d(r2[n-1], r2[i]) );
        ans = max(ans, d(r2[n-1], r2[i]) );
    }
    
    cout << ans << endl;
    
    return 0;
}

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

#include<iostream>
using namespace std;

int main()
{
  long long x;
  cin>>x;
  int arr[x][2];
  for(int i=0; i<x; i++)
    cin>>arr[i][0]>>arr[i][1];
  
  int d = -1;
  for(int i=0; i<x; i++)
  {
    for(int j=i+1; j<x; j++)
    {
      t = abs(arr[i][0]-arr[j][0])+abs(arr[i][1]-arr[j][1]);
      if (t>d)
      {
        d = t;
      }
    }
  }
  cout<<d;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:7: error: 't' was not declared in this scope
   17 |       t = abs(arr[i][0]-arr[j][0])+abs(arr[i][1]-arr[j][1]);
      |       ^
Language: C++

#include <bits/stdc++.h>
#include <atcoder/all>
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define REPLL(i, n) for (ll i = 0; i < (ll)(n); i++)
using namespace std;
using namespace atcoder;
template<class T>inline bool chmax(T &a, const T &b){if(a < b){a = b; return 1;}return 0;}
template<class T>inline bool chmin(T &a, const T &b){if(a > b){a = b; return 1;}return 0;}
typedef long long ll;

int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N; cin >> N;
  vector<ll> X(N);
  vector<ll> Y(N);
  vector<pair<ll, int> > xy(N);
  REP(i, N){
    cin >> X[i] >> Y[i];
    xy[i] = {X[i]+Y[i], i};
  }
  sort(xy.begin(), xy.end());
  int midx = xy[0].second;
  int Midx = xy[N-1].second;
  ll ans = abs(X[Midx]-X[midx]) + abs(Y[Midx]-Y[midx]);
  cout << ans << endl;
}

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

#include<bits/stdc++.h>
using namespace std;
 
int main()
{
  int n, ans=0;	cin>>n;
  
  vector<vector<int>> v;
  for(i=0; i<n; i++)
  {
    int x, y;	cin>>x>>y;
    vector<int> t;
    t.push_back(x);
    t.push_back(y);
    
    v.push_back(t);
  }
  
  for(int i=0; i<n; i++)
  {
    for(int j=i+1; j<n; j++)
    {
      ans=max(ans, abs(v[i][0]-v[j][0]) + abs(v[i][1]-v[j][1]));
    }
  }
  

  cout<<ans;
}
 
static int fastio = []() {
    #define endl '\n'
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(0);
    return 0;
}();

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

#include<bits/stdc++.h>
using namespace std;
 
int main()
{
  int n, ans=0;	cin>>n;
  
  vector<vector<int>> v;
  for(i=0; i<n; i++)
  {
    int x, y;	c>>x>>y;
    vector<int> t;
    t.push_back(x);
    t.push_back(y);
    
    v.push_back(t);
  }
  
  for(int i=0; i<n; i++)
  {
    for(int j=i+1; j<n; j++)
    {
      ans=max(ans, abs(v[i][0]-v[j][0]) + abs(v[i][1]-v[j][1]));
    }
  }
  

  cout<<ans;
}
 
static int fastio = []() {
    #define endl '\n'
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(0);
    return 0;
}();

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: 'i' was not declared in this scope
    9 |   for(i=0; i<n; i++)
      |       ^
a.cc:11:17: error: 'c' was not declared in this scope
   11 |     int x, y;   c>>x>>y;
      |                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
int main()
{
  int n, ans=0;	cin>>n;
  
  vector<vector<int>> v;
  for(i=0; i<n; i++)
  {
    int x, y;	c>>x>>y;
    vector<int> t;
    t.push_back(x);
    t.push_back(y);
  }
  
  for(int i=0; i<n; i++)
  {
    for(int j=i+1; j<n; j++)
    {
      ans=max(ans, abs(A[i][0]-A[j][0]) + abs(A[i][1]-A[j][1]));
    }
  }
  

  cout<<ans;
}
 
static int fastio = []() {
    #define endl '\n'
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(0);
    return 0;
}();

Compiler output:
a.cc: In function 'int main()':
a.cc:9:7: error: 'i' was not declared in this scope
    9 |   for(i=0; i<n; i++)
      |       ^
a.cc:11:17: error: 'c' was not declared in this scope
   11 |     int x, y;   c>>x>>y;
      |                 ^
a.cc:21:24: error: 'A' was not declared in this scope
   21 |       ans=max(ans, abs(A[i][0]-A[j][0]) + abs(A[i][1]-A[j][1]));
      |                        ^
Language: C++

#include<bits/stdc++.h>
#include<set>
#include<map>
#include<bitset>
#define rep(i,a,b)  for(i=a;i<b;i++)
#define Sort(a)	sort(a.begin(),a.end())
#define rev(a)	reverse(a.begin(),a.end())
#define all(a)	(a).begin(),(a).end()
#define vll vector<long long int>
#define lli long long int
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define db double
#define M 1000000007
#define pi 3.1415926535897932384626433832795028841971
#define INF 1e18

#define MAX 200005

using namespace std;
lli min(lli a,lli b){return a<b?a:b;}
lli min(lli a,lli b,lli c){a=min(a,b);a=min(a,c);return a;}
lli max(lli a,lli b){return a>b?a:b;}
lli max(lli a,lli b,lli c){a=max(a,b);a=max(a,c);return a;}
lli dsum(lli n){lli ans=0;while(n){ans+=(n%10);n/=10;}return ans;}
lli power(lli a,lli b){lli res=1;while(b){if(b&1) res=res*a;a=a*a;b>>=1;}return res;}
lli power(lli a,lli b,lli m){if(b==0)	return 1;if(b==1)	return a%m;lli res=1;a=a%m;while(b){if(b&1){res=(res*a)%m;}a=((a%m)*(a%m))%m;b>>=1;}return res;}
lli Ceil(lli a,lli b){lli res=a/b;if(a%b!=0)	res++;return res;}

template<typename T>istream &operator>>(istream &is, vector<T> &v) { for (T &t : v) is >> t; return is; }
template<typename T>ostream &operator<<(ostream &os, const vector<T> &v) { for (const T &t : v) {os << t <<" ";} os << '\n'; return os; }

lli dxx[]={1,1,0,-1,-1,-1,0,1};
lli dyy[]={0,1,1,1,0,-1,-1,-1};
lli dx[]={1,0,-1,0};
lli dy[]={0,1,0,-1};

struct pll{
	lli x,y;
};
void solve(lli the)
{
	char ch;
	db aa,bb,cc,dd,xx;
	string s1,s2,s3,str;
    lli i,j,k,a,b,c,d,n,m,l,r,x,y,z,low,high,mid,sum=0,ans=0,temp,t;
    cin >> n;
    pair<lli,lli>pa[n];
    rep(i,0,n){
    	cin >> pa[i].first >> pa[i].second;
    }
    sort(pa,pa+n,cmp);
    cout << abs(pa[n-1].first-pa[0].first)+abs(pa[n-1].second-pa[0].second);
    
    
}















int main()
{
	long long int t=1,c=1;
	// scanf("%lld",&t);
	while(t--){
		solve(c);
		c++;
	}
	return 0;
}

Compiler output:
a.cc: In function 'void solve(long long int)':
a.cc:53:18: error: 'cmp' was not declared in this scope; did you mean 'bcmp'?
   53 |     sort(pa,pa+n,cmp);
      |                  ^~~
      |                  bcmp
Language: C++

#include<sstream>
#include<functional>
#include<list>
#include<queue>
using namespace std;
#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
#define all(x) (x).begin(),(x).end()
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
typedef long long ll;
typedef pair<int, int> P;
typedef pair<ll, ll> p;
typedef pair<int, pair<int, pair<int, int>>> PP;
typedef vector<int> vec;
using Graph = vector<vector<int>>;
using graph = vector<vector<ll>>;

const long long INF = 1LL << 60;
const int inf = 1e9;
const long long MOD = 1000000007;


int main() {
    ll n;
    cin >> n;
    vector<ll> x(n);
    vector<ll> y(n);
    rep(i, n) {
        cin >> x[i] >> y[i];
    }
    vector<ll> v(n), V(n);
    rep(i, n) {
        v[i] = x[i] - y[i];
        V[i] = x[i] + y[i];
    }
    sort(all(v));
    sort(all(V));
    cout << max(v[n - 1] - v[0], V[n - 1] - V[0]) << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:5: error: 'cin' was not declared in this scope
   26 |     cin >> n;
      |     ^~~
a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    4 | #include<queue>
  +++ |+#include <iostream>
    5 | using namespace std;
a.cc:37:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   37 |     sort(all(v));
      |     ^~~~
      |     short
a.cc:39:5: error: 'cout' was not declared in this scope
   39 |     cout << max(v[n - 1] - v[0], V[n - 1] - V[0]) << endl;
      |     ^~~~
a.cc:39:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

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

using ll = long long;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using pii = pair<int,int>;
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
#define pb push_back


int main() {
  ll N; cin>>N;
  ll maxa=-1,mina=10000000000,maxb=-1,maxa=10000000000;
  ll x,y;
  rep(i,N) {
    cin>>x>>y;
    maxa=max(maxa,x+y);
    mina=min(mina,x+y);
    maxb=max(maxb,x-y);
    minb=min(minb,x-y);
  }
  cout<<max(maxa-mina,maxb-minb)<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:39: error: redeclaration of 'll maxa'
   14 |   ll maxa=-1,mina=10000000000,maxb=-1,maxa=10000000000;
      |                                       ^~~~
a.cc:14:6: note: 'll maxa' previously declared here
   14 |   ll maxa=-1,mina=10000000000,maxb=-1,maxa=10000000000;
      |      ^~~~
a.cc:21:5: error: 'minb' was not declared in this scope; did you mean 'mina'?
   21 |     minb=min(minb,x-y);
      |     ^~~~
      |     mina
a.cc:23:28: error: 'minb' was not declared in this scope; did you mean 'mina'?
   23 |   cout<<max(maxa-mina,maxb-minb)<<endl;
      |                            ^~~~
      |                            mina
Language: C++

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

typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
static const double EPS = 1e-12;
static const double PI = acos(-1.0);

template <class T>
using V = vector<T>;
template <class T>
using VV = V<V<T>>;

#define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(a) (a).begin(), (a).end()
#ifdef LOCAL
#define dbg(x) cerr << __LINE__ << " : " << #x << " = " << (x) << endl
#else
#define dbg(x) true
#endif

void solve(long long N, std::vector<long long> x, std::vector<long long> y) {
  vector<ll> a(N);
  REP(i, N) {
    a[i] = x[i] - y[i];
  }
  sort(ALL(a));
  ll ans = a[N - 1] - a[0];
  vector<ll> b(N);
  REP(i, N) {
    b[i] = x[i] + y[i];
  }
  sort(ALL(b));
  ans = max(ans, b[N - 1] - b[0]);
  cout << ans << endl;
}

int main() {
  long long N;
  scanf("%lld", &N);
  std::vector<long long> x(N);
  std::vector<long long> y(N);
  for (int i = 0; i < N; i++) {
    scanf("%lld", &x[i]);
    scanf("%lld", &y[i]);
  }
  solve(N, std::move(x), std::move(y));
  return 0;
}


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

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

int main(){
    long long n;
    cin >> n;

    long long x[n], y[n];

    long long ans = -1;
    for(long long i = 0; i < n; i++){
        cin >> x[i] >> y[i];
    }

    long long ans = 0;
    for(long long i = 0; i < n - 1; i++){
        for(long long j = i + 1; j < n; j++){
            if(x[j - 1] == x[j] && y[j - 1] == y[j])
                continue;
            long long cnt = abs(x[i] - x[j]) + abs(y[i] - y[j]);
            ans = max(ans,cnt);
        }
    }

    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: redeclaration of 'long long int ans'
   15 |     long long ans = 0;
      |               ^~~
a.cc:10:15: note: 'long long int ans' previously declared here
   10 |     long long ans = -1;
      |               ^~~
Language: C++

#define all(x) x.begin(), x.#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <cmath>
#include <iomanip>
#include <stack>
#include <queue>
#include <numeric>
#include <map>
#include <unordered_map>
#include <set>
#include <fstream>
#include <chrono>
#include <random>
#include <bitset>
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define sz(x) ((int)(x).size())
#define pb push_back
using ll = long long;
using namespace std;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
ll gcd(ll a, ll b) {return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) {return a/gcd(a,b)*b;}

int main(){
  int N; cin >> N;
  vector<pair<ll,ll>> xy(N); rep(i,N) cin >> xy[i].first >> xy[i].second;
  vector<pair<ll,ll>> AB(N);
  rep(i,N) {
    AB[i].first = xy[i].first-xy[i].second;
    AB[i].second = xy[i].first+xy[i].second;
  }
  vector<ll> a(N), b(N);
  rep(i,N) {
    a[i] = AB[i].first;
    b[i] = AB[i].second;
  }
  sort(all(a));
  sort(all(b));
  ll ans = max(abs(a[0]-a[N-1]),abs(b[0]-b[N-1]));
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc:1:14: error: '#' is not followed by a macro parameter
    1 | #define all(x) x.begin(), x.#include <iostream>
      |              ^
a.cc: In function 'int main()':
a.cc:31:10: error: 'cin' was not declared in this scope
   31 |   int N; cin >> N;
      |          ^~~
a.cc:18:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
   17 | #include <bitset>
  +++ |+#include <iostream>
   18 | #define rep(i,n) for(int i=0;i<(n);i++)
a.cc:46:3: error: 'cout' was not declared in this scope
   46 |   cout << ans << endl;
      |   ^~~~
a.cc:46:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<iostream>
#include<vector>
#include<cstdio>
typedef long long i64;
using namespace std;
 
    i64 cross(pair<i64,i64>P,pair<i64,i64>Q,pair<i64,i64> R)//if return >0 then point R is upper of lineseg PQ else down
        {
            return  (Q.first-P.first)*(R.second-P.second)-(R.first-P.first)*(Q.second-P.second);
        }
    void hull(vector<pair<i64,i64> > &P,vector<pair<i64,i64> > &L,vector<pair<i64,i64> > &U)
        {
            int j=0,k=0,n=P.size();
            sort(P.begin(),P.end());
            U.resize(2*n);
            L.resize(2*n);
            for(int i=0;i<n;i++)
             {
                while(j>=2 && cross(L[j-2],L[j-1],P[i])<=0)//p[i] is making right turn we need left turn
                    j--;
                while(k>=2 && cross(U[k-2],U[k-1],P[i])>=0)//p[i] is making left turn we need right
                    k--;
                L[j++]=P[i];
                U[k++]=P[i];
            }
            U.resize(k);
            L.resize(j);
        }
    i64 fun(pair<i64,i64> P ,pair<i64,i64> Q)
        {
            return (P.first-Q.first)*(P.first-Q.first)+(P.second-Q.second)*(P.second-Q.second);
        }
 
    int main()
        {
            i64 t=1,n,k1,k2;
            vector<pair<i64,i64> >v,U,L;
            //cin>>t;
            while(t--)
             {
                v.clear();
                U.clear();
                L.clear();
                cin>>n;
                for(int i=0;i<n;i++)
                 cin>>k1>>k2,v.push_back(make_pair(k1,k2));
                if(n==1)
                {
                    cout<<"0\n";
                    continue;
                }
                hull(v,L,U);
              
                /*cout<<"lower hull\n";
                for(int i=0;i<L.size();i++)
                    cout<<L[i].first<<" "<<L[i].second<<endl;
                cout<<"upper hull"<<endl;
                for(int i=0;i<U.size();i++)
                    cout<<U[i].first<<" "<<U[i].second<<endl;*/
                int i=0,j,m;
                j=L.size()-1;
                m=U.size()-1;
                i64 dist=-1;
                while(i<m || j>0)
                {
                    dist=max(dist,fun(U[i],L[j]));
                    if(i==m)
                        j--;
                    else if(j==0)
                        i++;
                    else
                    {
                        if ( (U[i+1].second-U[i].second) * (L[j].first-L[j-1].first) > (L[j].second-L[j-1].second) * (U[i+1].first-U[i].first) )
                        i++;
                    else
                        j--;
                    }
                }
                cout<<dist<<endl;
            }
        }  

Compiler output:
a.cc: In function 'void hull(std::vector<std::pair<long long int, long long int> >&, std::vector<std::pair<long long int, long long int> >&, std::vector<std::pair<long long int, long long int> >&)':
a.cc:14:13: error: 'sort' was not declared in this scope; did you mean 'short'?
   14 |             sort(P.begin(),P.end());
      |             ^~~~
      |             short
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
  int n=0;
  cin >> n;
  vector<int> x(n,0), y(n,0);
  for(int i=0; i<n; i++) {
    cin >> x[i] >> y[i] ;
  }
  long long maxm=INT_MIN;
  for(int i=0; i<n; i++) {
	for(int j=i+1; j<n; j++) {
        maxm = max(abs(x[i]-x[j])+abs(y[i]-y[j]), maxm);
    }
  }
  cout << maxm<< endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: no matching function for call to 'max(int, long long int&)'
   13 |         maxm = max(abs(x[i]-x[j])+abs(y[i]-y[j]), maxm);
      |                ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:13:19: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   13 |         maxm = max(abs(x[i]-x[j])+abs(y[i]-y[j]), maxm);
      |                ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:13:19: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   13 |         maxm = max(abs(x[i]-x[j])+abs(y[i]-y[j]), maxm);
      |                ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C

#include<stdio.h>

int abs(int a){
  if(a>=0){
    return a;
  }else{
    a=-1*a
    return a;
  }
}

int main(void){
  int N;
  scanf("%d",&N);
   
  int x[N],y[N];
  scanf("%d %d",&x[0],&y[0]);
  double b=(double)x[0]*y[0];
  int g=0;
  double s=(double)x[0]*y[0];
    int l=0;
  int i;
  for(i=1;i<N;i++){
    scanf("%d %d",&x[i],&y[i]);
    if(b<(double)x[i]*y[i]){
      b=(double)x[i]*y[i];
      g=i;
    }
    if(s>(double)x[i]*y[i]){
      s=(double)x[i]*y[i];
      l=i;
    }
  }
  
  int p=abs(x[g]-x[l])+abs(y[g]-y[l]);
  printf("%d",p);
}
  
  
    


Compiler output:
main.c: In function 'abs':
main.c:7:11: error: expected ';' before 'return'
    7 |     a=-1*a
      |           ^
      |           ;
    8 |     return a;
      |     ~~~~~~
Language: C

#include<stdio.h>

int abs(int a){
  if(a>=0){
    return a;
  }else{
    a=-1*a
    return a;
  }
}

int main(void){
  int N;
  scanf("%d",&N);
   
  int x[N],y[N];
  scanf("%d %d",&x[0],&y[0]);
  double b=(double)x[0]*y[0];
  int g=0;
  double s=(double)x[0]*y[0];
    int l=0
  int i;
  for(i=1;i<N;i++){
    scanf("%d %d",&x[i],&y[i]);
    if(b<(double)x[i]*y[i]){
      b=(double)x[i]*y[i];
      g=i;
    }
    if(s>(double)x[i]*y[i]){
      s=(double)x[i]*y[i];
      l=i;
    }
  }
  
  int p=abs(x[g]-x[l])+abs(y[g]-y[l]);
  printf("%d",p);
}
  
  
    


Compiler output:
main.c: In function 'abs':
main.c:7:11: error: expected ';' before 'return'
    7 |     a=-1*a
      |           ^
      |           ;
    8 |     return a;
      |     ~~~~~~ 
main.c: In function 'main':
main.c:22:3: error: expected ',' or ';' before 'int'
   22 |   int i;
      |   ^~~
main.c:23:7: error: 'i' undeclared (first use in this function)
   23 |   for(i=1;i<N;i++){
      |       ^
main.c:23:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<unistd.h>
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<stdbool.h>
#include<stdint.h>
#include<time.h>
#include<tgmath.h>
inline int max(int a, int b){return a>b?a:b;}
inline int min(int a, int b){return a>b?b:a;}
long gcd(long a, long b){return b?gcd(b, a%b):a;}

//fast(?) Input
#define buf_sz 1<<24
char buf[buf_sz];
unsigned int nextint(){
	static int idx = 0;
	if(idx == 0)read(0, buf, buf_sz);
	unsigned int res = 0;
	while(idx<buf_sz && buf[idx]<'0' || '9'<buf[idx])idx++;
	while(idx<buf_sz && '0'<=buf[idx] && buf[idx]<='9'){
		res *= 10;
		res += buf[idx++] - '0';
	}if(idx>=buf_sz)exit(1);
	return res;
}

const long mod = 1e9 + 7;
long modpow(long x, long y, long m){
    long res = 1, tmp = x;
    while(y){
        if(y&1) res = res * tmp % m;
        tmp = tmp * tmp % m;
        y >>= 1;
    }
    return res;
}
long pom(long x, long y){return modpow(x, y, mod);}
long COM(long x, long y){
    if(x < y) return 0;
    if(x < 0 || y < 0) return 0;
    long res = 1;
    for(int i=0; i<y; i++){
        res = res * (x-i) % mod * pom(y-i, mod-2) % mod;
    }
    return res;
}
int main(){
	int N = nextint();
	int maxi[2] = {}, mini[2] = {1<<31, 1<<31};
	for(int i=0; i<N; i++){
		int x = nextint();
		int y = nextint();
		maxi[0] = max(maxi[0], x-y);
		maxi[1] = max(maxi[1], x+y);
		mini[0] = min(mini[0], x-y);
		mini[1] = min(mini[1], x+y);
	}
	printf("%d\n", max(maxi[0]-mini[0], maxi[1]-mini[1]));
	return 0;


Compiler output:
main.c: In function 'main':
main.c:60:9: error: expected declaration or statement at end of input
   60 |         return 0;
      |         ^~~~~~
Language: C

#include<stdio.h>

int abs(int a){
  if(a>=0){
    return a;
  }else{
    a=-1*a
    return a;
  }
}

int main(void){
  int N;
  scanf("%d",&N);
   
  int x[N],y[N];
  scanf("%d %d",&x[0],&y[0]);
  double b=(double)x[0]*y[0];
  int g=0;
  double s=(double)x[0]*y[0];
    int l=0
  
  for(int i=1;i<N;i++){
    scanf("%d %d",&x[i],&y[i]);
    if(b<(double)x[i]*y[i]){
      b=(double)x[i]*y[i];
      g=i;
    }
    if(s>(double)x[i]*y[i]){
      s=(double)x[i]*y[i];
      l=i;
    }
  }
  
  int p=abs(x[g]-x[l])+abs(y[g]-y[l]);
  printf("%d",p);
}
  
  
    

Compiler output:
main.c: In function 'abs':
main.c:7:11: error: expected ';' before 'return'
    7 |     a=-1*a
      |           ^
      |           ;
    8 |     return a;
      |     ~~~~~~ 
main.c: In function 'main':
main.c:23:3: error: expected ',' or ';' before 'for'
   23 |   for(int i=1;i<N;i++){
      |   ^~~
main.c:23:15: error: 'i' undeclared (first use in this function)
   23 |   for(int i=1;i<N;i++){
      |               ^
main.c:23:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:23:22: error: expected ';' before ')' token
   23 |   for(int i=1;i<N;i++){
      |                      ^
      |                      ;
main.c:23:22: error: expected statement before ')' token
Language: C++

#include <stdio.h>
#include <vector>

long long manhattan_distance(size_t pos1, size_t pos2, const std::vector<long long> &x, const std::vector<long long> &y){
    return abs(x[pos1] - x[pos2]) + abs(y[pos1] - y[pos2]);
}

void solve(long long N, std::vector<long long> x, std::vector<long long> y){
    long long ans = 0;
    for (size_t i = 0; i < N; i++) {
        for (size_t j = 0; j < N; j++) {
            long long dist = manhattan_distance(i, j, x, y);
            ans = (dist > ans) ? dist : ans;
        }
    }
    printf("%lld\n", ans);
}

int main(){
    long long N;
    scanf("%lld",&N);
    std::vector<long long> x(N);
    std::vector<long long> y(N);
    for(int i = 0 ; i < N ; i++){
        scanf("%lld",&x[i]);
        scanf("%lld",&y[i]);
    }
    solve(N, std::move(x), std::move(y));
    return 0;
}


Compiler output:
a.cc: In function 'long long int manhattan_distance(size_t, size_t, const std::vector<long long int>&, const std::vector<long long int>&)':
a.cc:5:12: error: 'abs' was not declared in this scope
    5 |     return abs(x[pos1] - x[pos2]) + abs(y[pos1] - y[pos2]);
      |            ^~~