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

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <limits.h>
#include <queue>
#include <stack>
#include <cmath>
#include <map>
#include <set>
#include <vector>

using namespace std;
typedef long long ll;
const int maxn = 2e5 + 7;
const int mod = 1e9 + 7;
struct node
{
	int u, v;
}p[maxn];

bool cmp1(node a, node b)
{
	if(a.u == b.u) return a.v < b.v;
	return a.u < b.u;
}

bool cmp2(node a, node b)
{
	if(a.v == b.v) return a.u > b.u;
	return a.v > b.v;
}
int main(void)
{
	int n ;
	cin >> n;
	for(int i = 1; i <= n; i ++ ) cin >> p[i].u >> p[i].v;
	sort(p + 1, p + 1 + n, cmp1);
//	for(int i = 1; i <= n; i ++ ) cout << p[i].u << " " << p[i].v << endl;
	LL a = p[1].u, b = p[1].v;
	sort(p + 1, p + 1 + n, cmp2);
//	for(int i = 1; i <= n; i ++ ) cout << p[i].u << " " << p[i].v << endl;
	LL c = p[1].u, d = p[1].v;
	cout << abs(a - c) + abs(b - d);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:9: error: 'LL' was not declared in this scope; did you mean 'll'?
   40 |         LL a = p[1].u, b = p[1].v;
      |         ^~
      |         ll
a.cc:43:11: error: expected ';' before 'c'
   43 |         LL c = p[1].u, d = p[1].v;
      |           ^~
      |           ;
a.cc:44:21: error: 'a' was not declared in this scope
   44 |         cout << abs(a - c) + abs(b - d);
      |                     ^
a.cc:44:25: error: 'c' was not declared in this scope
   44 |         cout << abs(a - c) + abs(b - d);
      |                         ^
a.cc:44:34: error: 'b' was not declared in this scope
   44 |         cout << abs(a - c) + abs(b - d);
      |                                  ^
a.cc:44:38: error: 'd' was not declared in this scope
   44 |         cout << abs(a - c) + abs(b - d);
      |                                      ^
Language: C++

#include <bits/stdc++.h> 
using namespace std; 
int main{
  int n; cin >> n;
        vector<int> s;
        vector<int> d;
        int xi, yi;
        for (int i = 0; i < n; i++)
        {
            cin >> xi >> yi;
            s.push_back(xi+yi);
            d.push_back(xi-yi);
        }
        sort(s.begin(), s.end());
        sort(d.begin(), d.end());
        int ans = max(s[n-1]-s[0], d[n-1]-d[0]);
 	cout<<ans<<endl;
  return 0;
} 

Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main{
      |     ^~~~
a.cc:4:3: error: expected primary-expression before 'int'
    4 |   int n; cin >> n;
      |   ^~~
a.cc:4:3: error: expected '}' before 'int'
a.cc:3:9: note: to match this '{'
    3 | int main{
      |         ^
a.cc:4:10: error: 'cin' does not name a type
    4 |   int n; cin >> n;
      |          ^~~
a.cc:8:9: error: expected unqualified-id before 'for'
    8 |         for (int i = 0; i < n; i++)
      |         ^~~
a.cc:8:25: error: 'i' does not name a type
    8 |         for (int i = 0; i < n; i++)
      |                         ^
a.cc:8:32: error: 'i' does not name a type
    8 |         for (int i = 0; i < n; i++)
      |                                ^
a.cc:14:13: error: expected constructor, destructor, or type conversion before '(' token
   14 |         sort(s.begin(), s.end());
      |             ^
a.cc:15:13: error: expected constructor, destructor, or type conversion before '(' token
   15 |         sort(d.begin(), d.end());
      |             ^
a.cc:16:25: error: 'n' was not declared in this scope; did you mean 'yn'?
   16 |         int ans = max(s[n-1]-s[0], d[n-1]-d[0]);
      |                         ^
      |                         yn
a.cc:16:38: error: 'n' was not declared in this scope; did you mean 'yn'?
   16 |         int ans = max(s[n-1]-s[0], d[n-1]-d[0]);
      |                                      ^
      |                                      yn
a.cc:17:9: error: 'cout' does not name a type
   17 |         cout<<ans<<endl;
      |         ^~~~
a.cc:18:3: error: expected unqualified-id before 'return'
   18 |   return 0;
      |   ^~~~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: Java

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        long max = 0;
        List<List<Long>> lists = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            long x = sc.nextLong();
            long y = sc.nextLong();
            List<Long> list = new ArrayList<>();
            list.add(x);
            list.add(y);
            if (lists.size() == 0) {
                lists.add(list);
            } else {
                for (int j = 0; j < lists.size(); j++) {
                    List<Long> node = lists.get(j);
                    long d = Math.abs(x - node.get(0)) + Math.abs(y - node.get(1));
                    if (d > max) {
                        max = d;
                        lists.clear();
                        lists.add(list);
                        lists.add(node);
                    }
                }
            }

        }
        System.out.println(max);

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
        Scanner sc = new Scanner(System.in);
        ^
  (use --enable-preview to enable unnamed classes)
Main.java:5: error: class, interface, enum, or record expected
        for (int i = 0; i < n; i++) {
        ^
Main.java:5: error: class, interface, enum, or record expected
        for (int i = 0; i < n; i++) {
                        ^
Main.java:5: error: class, interface, enum, or record expected
        for (int i = 0; i < n; i++) {
                               ^
Main.java:9: error: class, interface, enum, or record expected
            list.add(x);
            ^
Main.java:10: error: class, interface, enum, or record expected
            list.add(y);
            ^
Main.java:11: error: class, interface, enum, or record expected
            if (lists.size() == 0) {
            ^
Main.java:13: error: class, interface, enum, or record expected
            } else {
            ^
Main.java:14: error: class, interface, enum, or record expected
                for (int j = 0; j < lists.size(); j++) {
                                ^
Main.java:14: error: class, interface, enum, or record expected
                for (int j = 0; j < lists.size(); j++) {
                                                  ^
Main.java:17: error: class, interface, enum, or record expected
                    if (d > max) {
                    ^
Main.java:19: error: class, interface, enum, or record expected
                        lists.clear();
                        ^
Main.java:20: error: class, interface, enum, or record expected
                        lists.add(list);
                        ^
Main.java:21: error: class, interface, enum, or record expected
                        lists.add(node);
                        ^
Main.java:22: error: class, interface, enum, or record expected
                    }
                    ^
15 errors
Language: C++

//include
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cmath> 
#include <iomanip>
#include <math.h>
#include <utility>
#include <functional>
#include <cstdlib>//絶対値　abs()
//using
using namespace std;
using vl = vector <long long>;
using vs = vector <string>;
using vc = vector <char>;
using ll= long long;
using vvl = vector<vector<ll> >;
//vector<vector<char> > hyou(N, vector<char>(N));
using vd = vector <double>;
//define
//#define int long long
#define rep(i,n) for(int i=0; i<n; i++)
#define print(n) cout<<n<<endl;
#define sortp(d) sort(d.begin(),d.end()) //1234
#define sortm(d) sort(d.rbegin(),d.rend()) //4321
//素数判定　O(√A) 
bool is_prime(int x){
 if(x<=1) return false;
 for(int i=2;i*i<=x;i++)
 if(x%i==0) return false;
 return true;
 }
/*順列生成
do {
  // 順列に対する処理
} while (next_permutation(配列変数.begin(), 配列変数.end()));*/

//グローバル変数宣言
 ll p=0,q=0,r=0;

int main(){
  ll n;
  cin>>n;
  vvl a(2, vl(n));
  vl b(n);
  rep(i,n){cin>>a[0][i]>>a[1][i];b[i]=a[0][i]+a[1][i]}

  sortp(b);
    print(b[n]);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:54: error: expected ';' before '}' token
   47 |   rep(i,n){cin>>a[0][i]>>a[1][i];b[i]=a[0][i]+a[1][i]}
      |                                                      ^
      |                                                      ;
Language: C++

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

int main() {
    int n;
    cin >> n;
    long long x, y;
    vector<long long> a(n), b(n), c(n), d(n);
    for (int i = 0; i < n; i++) {
        cin >> x >> y;
        a[i] = x+y;
        b[i] = x-y;
        c[i] = -x+y;
        d[i] = -x-y;
    }
    long long ans = 0;
    long long n = *min_element(a.begin(), a.end());
    long long x = *max_element(a.begin(), a.end());
    ans = max(ans, x-n);
    long long n = *min_element(b.begin(), b.end());
    long long x = *max_element(b.begin(), b.end());
    ans = max(ans, x-n);
    long long n = *min_element(c.begin(), c.end());
    long long x = *max_element(c.begin(), c.end());
    ans = max(ans, x-n);
    long long n = *min_element(d.begin(), d.end());
    long long x = *max_element(d.begin(), d.end());
    ans = max(ans, x-n);
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:15: error: conflicting declaration 'long long int n'
   18 |     long long n = *min_element(a.begin(), a.end());
      |               ^
a.cc:6:9: note: previous declaration as 'int n'
    6 |     int n;
      |         ^
a.cc:19:15: error: redeclaration of 'long long int x'
   19 |     long long x = *max_element(a.begin(), a.end());
      |               ^
a.cc:8:15: note: 'long long int x' previously declared here
    8 |     long long x, y;
      |               ^
a.cc:21:15: error: conflicting declaration 'long long int n'
   21 |     long long n = *min_element(b.begin(), b.end());
      |               ^
a.cc:6:9: note: previous declaration as 'int n'
    6 |     int n;
      |         ^
a.cc:22:15: error: redeclaration of 'long long int x'
   22 |     long long x = *max_element(b.begin(), b.end());
      |               ^
a.cc:8:15: note: 'long long int x' previously declared here
    8 |     long long x, y;
      |               ^
a.cc:24:15: error: conflicting declaration 'long long int n'
   24 |     long long n = *min_element(c.begin(), c.end());
      |               ^
a.cc:6:9: note: previous declaration as 'int n'
    6 |     int n;
      |         ^
a.cc:25:15: error: redeclaration of 'long long int x'
   25 |     long long x = *max_element(c.begin(), c.end());
      |               ^
a.cc:8:15: note: 'long long int x' previously declared here
    8 |     long long x, y;
      |               ^
a.cc:27:15: error: conflicting declaration 'long long int n'
   27 |     long long n = *min_element(d.begin(), d.end());
      |               ^
a.cc:6:9: note: previous declaration as 'int n'
    6 |     int n;
      |         ^
a.cc:28:15: error: redeclaration of 'long long int x'
   28 |     long long x = *max_element(d.begin(), d.end());
      |               ^
a.cc:8:15: note: 'long long int x' previously declared here
    8 |     long long x, y;
      |               ^
Language: C++

#include <bits/stdc++.h>
#define INF 0x3f3f3f3f
#define rep(i, a, n) for (int i=(a); i<(n); i++)
#define per(i, a, n) for (int i=(a); i>(n); i--)
typedef long long ll;
const int maxn = 2e5+5;
const int mod = 1e9+7;
using namespace std;

struct node {
	ll x, y;
} p[maxn];

void solve() {
	ll n; cin >> n;
	vector<node> v;
	rep(i,1,n+1) cin >> p[i].x >> p[i].y;
	sort(p+1,p+n+1,[](node a, node b) {
		return a.x > b.x;
	});
	ll ans = abs(p[1].x - p[n].x) + abs(p[1].y - p[n].y);
	v.push_bakc(p[1]); v.push_bakc(p[n]);
	sort(p+1,p+n+1,[](node a, node b) {
		return a.y > b.y;
	});
	v.push_bakc(p[1]); v.push_bakc(p[n]);
	rep(i,0,4) {
		rep(j,0,4) {
			ans = max(ans, abs(v[i].x - v[j].x) + abs(v[i].y - v[j].y));
		}
	}
	cout << ans << '\n';
}

int main(int argc, char * argv[]) 
{
	ios_base::sync_with_stdio(false); cin.tie(0);
#ifdef DEBUG
	freopen("C:/Users/Fish_Brother/Desktop/in", "r", stdin);
	//freopen("C:/Users/Fish_Brother/Desktop/out", "w", stdout);
#endif

	//int t; cin >> t; while(t--)
	solve();

    return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:22:11: error: 'class std::vector<node>' has no member named 'push_bakc'; did you mean 'push_back'?
   22 |         v.push_bakc(p[1]); v.push_bakc(p[n]);
      |           ^~~~~~~~~
      |           push_back
a.cc:22:30: error: 'class std::vector<node>' has no member named 'push_bakc'; did you mean 'push_back'?
   22 |         v.push_bakc(p[1]); v.push_bakc(p[n]);
      |                              ^~~~~~~~~
      |                              push_back
a.cc:26:11: error: 'class std::vector<node>' has no member named 'push_bakc'; did you mean 'push_back'?
   26 |         v.push_bakc(p[1]); v.push_bakc(p[n]);
      |           ^~~~~~~~~
      |           push_back
a.cc:26:30: error: 'class std::vector<node>' has no member named 'push_bakc'; did you mean 'push_back'?
   26 |         v.push_bakc(p[1]); v.push_bakc(p[n]);
      |                              ^~~~~~~~~
      |                              push_back
Language: C++

#pragma region header
#include <algorithm>
#include <bitset>
#include <tuple>
#include <cstdint>
#include <cctype>
#include <assert.h>
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <ctime>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <memory>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#include <math.h>
#include <cstring>
#include <array>
// ===============================================================
//using系
#pragma region header
using namespace std;
using lint = long long;
using ld = long double;
using ulint = unsigned long long;
const int dx[] = { 1,0,-1,0 };
const int dy[] = { 0,1,0,-1 };
constexpr lint mod = 1000000007;
constexpr long double pi = 3.141592653589793238462643383279;
#pragma endregion
// ========================================================================
//define
#define INF (lint)10000000000000000;
#define mod (int)1000000007
#pragma region header
template <class T, class U>
inline bool chmin(T& lhs, const U& rhs) {
	if (lhs > rhs) {
		lhs = rhs;
		return 1;
	}
	return 0;
}
template <class T, class U>
inline bool chmax(T& lhs, const U& rhs) {
	if (lhs < rhs) {
		lhs = rhs;
		return 1;
	}
	return 0;
}
#pragma endregion
#pragma endregion

lint dp[1000][2020];

int main(void) {
	ios::sync_with_stdio(false);
	cin.tie(0);
	lint n; cin >> n;
	lint x = 0;//x+y最大
	lint y = INF;
	lint s = 0;
	lint q = INF;
	pair<lint, lint> q;
	for (int i = 0; i < n; i++) {
		lint a, b; cin >> a >> b;
		x = max(x, a + b);
		y = min(y, a + b);
		s = max(s, a - b);
		q = min(q, a - b);
	}
	cout << max({ x - y ,s - q,x - q,s - y }) << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:83:26: error: conflicting declaration 'std::pair<long long int, long long int> q'
   83 |         pair<lint, lint> q;
      |                          ^
a.cc:82:14: note: previous declaration as 'lint q'
   82 |         lint q = INF;
      |              ^
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cstring>
#include<queue>
#include<tuple>
#include<utility>
#include<map>
#include<math.h>
#include<iomanip>
#include<stdio.h>
#include<stdlib.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define FOR(i, a, b) for (int i=a; i<(b); i++)
#define range(a) a.begin(), a.end()
#define endl "\n"
#define Yes() cout << "Yes" << endl
#define No() cout << "No" << endl
#define MP make_pair
using Graph = vector<vector<int>>;
const unsigned long long mod = 1e9 + 7;
const long long INF = 1LL<<60;
const int dx[4]={1,0,-1,0};
const int dy[4]={0,1,0,-1};
void chmin(long long &a, long long b) { if (a > b) a = b; }
void chmax(long long &a, long long b) { if (a < b) a = b; }

int main(void){
	ios::sync_with_stdio(0);
	cin.tie(0);
	int N;
	ll ans=-1;
	cin >> N;
	ll a, b, c, d;
	cin >> a >> b >> c >> d;
	ans = max({a + b - (c + d), -(a - b) + (c - d), a - b - (c - d), -(a + b) + (c + d)});
	N -= 2;
	while (N--)
	{
		ll e, f;
		cin >> e >> f;
		if(max({a + b - (e + f), -(a - b) + (e - f), a - b - (e - f), -(a + b) + (e + f)})>ans&&max({e + f - (c + d), -(e - f) + (c - d), e - f - (c - d), -(e + f) + (c + d)})>ans){
			if(max({a + b - (e + f), -(a - b) + (e - f), a - b - (e - f), -(a + b) + (e + f)})>=max({e + f - (c + d), -(e - f) + (c - d), e - f - (c - d), -(e + f) + (c + d)}){
				ans = max({a + b - (e + f), -(a - b) + (e - f), a - b - (e - f), -(a + b) + (e + f)});
				c = e;
				d = f;
			}
			else{
				ans = max({e + f - (c + d), -(e - f) + (c - d), e - f - (c - d), -(e + f) + (c + d)});
				a = e;
				b = f;
			}
		}
		else if(max({a + b - (e + f), -(a - b) + (e - f), a - b - (e - f), -(a + b) + (e + f)})>ans){
			ans = max({a + b - (e + f), -(a - b) + (e - f), a - b - (e - f), -(a + b) + (e + f)});
			c = e;
			d = f;
		}
		else if(max({e + f - (c + d), -(e - f) + (c - d), e - f - (c - d), -(e + f) + (c + d)})>ans){
			ans = max({e + f - (c + d), -(e - f) + (c - d), e - f - (c - d), -(e + f) + (c + d)});
			a = e;
			b = f;
		}
	}

	cout << ans << endl;

	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:48:188: error: expected ')' before '{' token
   48 |                         if(max({a + b - (e + f), -(a - b) + (e - f), a - b - (e - f), -(a + b) + (e + f)})>=max({e + f - (c + d), -(e - f) + (c - d), e - f - (c - d), -(e + f) + (c + d)}){
      |                           ~                                                                                                                                                                ^
      |                                                                                                                                                                                            )
a.cc:58:17: error: expected primary-expression before '}' token
   58 |                 }
      |                 ^
Language: C++

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

int main()
{
   long long int n,x[200000],y[200000],a=0;
   cin>>n;
   for(int i=0;i<n;i++){
       cin>>x[i];
       cin>>y[i];
}
   for(int i=0;i<n/2-1;i++){
       for(int j=i+1;j<n;j++){
       a=max(a,abs(x[i]-x[j])+abs(y[i]-y[j]));
}
for(int i=n/2;i<n-1;i++){
       for(int j=i+1;j<n;j++){
       a=max(a,abs(x[i]-x[j])+abs(y[i]-y[j]));
}


}
cout<<a<<endl;

   
   return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:2: error: expected '}' at end of input
   29 | }
      |  ^
a.cc:7:1: note: to match this '{'
    7 | {
      | ^
Language: C++

//include
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cmath> 
#include <iomanip>
#include <math.h>
#include <utility>
#include <functional>
#include <cstdlib>//絶対値　abs()
//using
using namespace std;
using vl = vector <long long>;
using vs = vector <string>;
using vc = vector <char>;
using ll= long long;
using vvl = vector<vector<ll> >;
//vector<vector<char> > hyou(N, vector<char>(N));
using vd = vector <double>;
//define
//#define int long long
#define rep(i,n) for(int i=0; i<n; i++)
#define print(n) cout<<n<<endl;
#define sortp(d) sort(d.begin(),d.end()) //1234
#define sortm(d) sort(d.rbegin(),d.rend()) //4321
//素数判定　O(√A) 
bool is_prime(int x){
 if(x<=1) return false;
 for(int i=2;i*i<=x;i++)
 if(x%i==0) return false;
 return true;
 }
/*順列生成
do {
  // 順列に対する処理
} while (next_permutation(配列変数.begin(), 配列変数.end()));*/

//グローバル変数宣言
 ll p=0,q=0,r=0;

int main(){
  ll n;
  cin>>n;
  vvl a(2, vl(n));
  vl b(n)
  rep(i,n){cin>>a[0][i]>>a[1][i];b[i]=a[0][i]+a[1][j]}

  sortp(b)
    print(b[n]);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:18: error: expected ',' or ';' before 'for'
   23 | #define rep(i,n) for(int i=0; i<n; i++)
      |                  ^~~
a.cc:47:3: note: in expansion of macro 'rep'
   47 |   rep(i,n){cin>>a[0][i]>>a[1][i];b[i]=a[0][i]+a[1][j]}
      |   ^~~
a.cc:47:7: error: 'i' was not declared in this scope
   47 |   rep(i,n){cin>>a[0][i]>>a[1][i];b[i]=a[0][i]+a[1][j]}
      |       ^
a.cc:23:31: note: in definition of macro 'rep'
   23 | #define rep(i,n) for(int i=0; i<n; i++)
      |                               ^
a.cc:24:18: error: expected ';' before 'cout'
   24 | #define print(n) cout<<n<<endl;
      |                  ^~~~
a.cc:50:5: note: in expansion of macro 'print'
   50 |     print(b[n]);
      |     ^~~~~
Language: C++

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

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] + 1;
                for (int i = 1; i < n; ++i) {
                    cur = p * x[i] + q * y[i] + i+1;
                    res = max(res, cur - smallest);
                    smallest = min(smallest, cur);
                }
            }
        }
        return res;
    }

signed main() {
   int n;
   cin>>n;
//    vector<int>x,y;
    int mini1=1000000000000;
    int maxx1=-1000000000000;
    int mini2=1000000000000;
    int maxx2=-1000000000000;
    for(i=0;i<n;i++)
    {
        cin>>x>>y;
        mini1=min(mini1,x+y);
        mini2=min(mini2,x-y);
        maxx1=max(maxx1,x+y);
        maxx2=max(maxx2,x-y);
    }
    int res=max((maxx1-mini1),(maxx2-mini2));
    cout<<res<<endl;
   }

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

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

int main(){
  int n;
  vector<long long> x;
  vector<long long> y;
  cin >> n;
  
  long long m = 0, d = 0;
  
  for(int i=0; i<n; i++){
    cin >> x[i] >> y[i];
  }
  for(int i=0; i<n; i++){
    for(int j=0; j<i; j++){
      if(x[i]>x[j]){
        d = x[i]-x[j];
      }
      else{
        d = x[j]-x[i];
      }
      if(y[i]>y[j]){
        d += y[i]-y[j];
      }
      else{
        d += y[j]-y[i];
      }
      if(d>m){
        m = d;
      }
  }
  cout << m;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:2: error: expected '}' at end of input
   34 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

const long long N = 200001, P = 1e9 + 7;

long long power(long long val, long long st, long long p) {
    if (st == 0) {
        return 1;
    }
    long long temp = power(val, st / 2, p);
    temp = temp * temp;
    temp %= p;
    if (st % 2 == 1) {
        temp *= val;
        temp %= p;
    }
    return temp;
}


8
long long fact[300000];

void fct(long long n, long long p) {
    fact[0] = 1;
    for (long long i = 1; i <= n; i++) {
        fact[i] = (fact[i - 1] * i) % p;
    }
}

long long c(long long n, long long k, long long p = -1) {
    if (p == -1) {
        long long x = fact[n];
        long long y = (fact[k] * fact[n - k]);
        return (x / y);
    } else {
        long long x = fact[n];
        long long y = (fact[k] * fact[n - k]) % p;
        x = (x * power(y, p - 2, p)) % p;
        return x;
    }
}


int32_t main() {
    long long n;
    cin >> n;
    fct(n + 1, P);
    long long ans = 0;
    for (int i = 2; i <= n; i++) {
        ans += ((((c(n, i, P) * ((power(2ll, i, P) - 2 + P) % P)) % P) * power(8ll, n - i, P)) % P);
        ans %= P;
    }
    cout << ans << "\n";
}


Compiler output:
a.cc:21:1: error: expected unqualified-id before numeric constant
   21 | 8
      | ^
a.cc: In function 'void fct(long long int, long long int)':
a.cc:25:5: error: 'fact' was not declared in this scope; did you mean 'fct'?
   25 |     fact[0] = 1;
      |     ^~~~
      |     fct
a.cc: In function 'long long int c(long long int, long long int, long long int)':
a.cc:33:23: error: 'fact' was not declared in this scope; did you mean 'fct'?
   33 |         long long x = fact[n];
      |                       ^~~~
      |                       fct
a.cc:37:23: error: 'fact' was not declared in this scope; did you mean 'fct'?
   37 |         long long x = fact[n];
      |                       ^~~~
      |                       fct
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
  int n, x, y;
  long long s[n][2];
  for(int i=0;i<n; i++) {
    cin>>x>>y;
    s[i][0] = x;
    s[i][1] = y;
  }
  long long res = INT_MIN;
  long long mxPlus = INT_MIN, mxSub = INT_MIN, mnPlus = INT_MAX, mnSub = INT_MAX;
  for(int i=0; i<n; i++) {
    mxPlus = max(mxPlus, s[i].first+s[i].second);
    mxSub = max(mxSub, s[i].first-s[i].second);
    mnPlus = min(mnPlus, s[i].first+s[i].second);
    mnSub = min(mnSub, s[i].first-s[i].second);
  }
  res = max(mxPlus-mnPlus, mxSub-mnSub);
  cout<<res;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:31: error: request for member 'first' in 's[i]', which is of non-class type 'long long int [2]'
   14 |     mxPlus = max(mxPlus, s[i].first+s[i].second);
      |                               ^~~~~
a.cc:14:42: error: request for member 'second' in 's[i]', which is of non-class type 'long long int [2]'
   14 |     mxPlus = max(mxPlus, s[i].first+s[i].second);
      |                                          ^~~~~~
a.cc:15:29: error: request for member 'first' in 's[i]', which is of non-class type 'long long int [2]'
   15 |     mxSub = max(mxSub, s[i].first-s[i].second);
      |                             ^~~~~
a.cc:15:40: error: request for member 'second' in 's[i]', which is of non-class type 'long long int [2]'
   15 |     mxSub = max(mxSub, s[i].first-s[i].second);
      |                                        ^~~~~~
a.cc:16:31: error: request for member 'first' in 's[i]', which is of non-class type 'long long int [2]'
   16 |     mnPlus = min(mnPlus, s[i].first+s[i].second);
      |                               ^~~~~
a.cc:16:42: error: request for member 'second' in 's[i]', which is of non-class type 'long long int [2]'
   16 |     mnPlus = min(mnPlus, s[i].first+s[i].second);
      |                                          ^~~~~~
a.cc:17:29: error: request for member 'first' in 's[i]', which is of non-class type 'long long int [2]'
   17 |     mnSub = min(mnSub, s[i].first-s[i].second);
      |                             ^~~~~
a.cc:17:40: error: request for member 'second' in 's[i]', which is of non-class type 'long long int [2]'
   17 |     mnSub = min(mnSub, s[i].first-s[i].second);
      |                                        ^~~~~~
Language: C++

#include<bits/stdc++.h>
#include <vector>
#include <iostream>
#include <cmath>
#include <math.h>
#include<algorithm> 

using namespace std;
//long long int m= m = 1000000007;
int main(){
    int n;
    cin>>n;
    long long int max= 0;
    long long int min= 1000000007;
    vector <int> x(n,0);
    vector <int> y(n,0);
    int mini=0,maxi=0; 
    for ( int i=0; i<n; i++){
        int a, b;
        cin>>a>>b;
        x[i]=a;
        y[i]=b;
        if ((a+b)>max){
        max= a+b;
        maxi= i;}
        if ((a+b<min){
            min= a+b;
            mini= i;
        })

    }
    long long int q= abs(x[maxi]-x[mini])+ abs(y[maxi]-y[mini]);
    
    cout<<q<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:22: error: expected ')' before '{' token
   26 |         if ((a+b<min){
      |            ~         ^
      |                      )
a.cc:31:5: error: expected primary-expression before '}' token
   31 |     }
      |     ^
Language: C++

#include <bits/stdc++.h>

#define F first
#define S second
#define MP make_pair
#define pb push_back
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define LCM(a, b) (a) / __gcd((a), (b)) * (b)
#define CEIL(a, b) (a)/(b)+(((a)%(b))?1:0)
#define log_2(a) (log((a)) / log(2))
#define ln '\n'

using namespace std;
using LL = long long;
using ldouble = long double;
using P = pair<int, int>;
using LP = pair<LL, LL>;

static const int INF = INT_MAX;
static const LL LINF = LLONG_MAX;
static const int MIN = INT_MIN;
static const LL LMIN = LLONG_MIN;
static const int MOD = 1e9 + 7;
static const int SIZE = 200005;

const int dx[] = {0, -1, 1, 0};
const int dy[] = {-1, 0, 0, 1};

vector<LL> Div(LL n) {
    vector<LL> ret;
    for(LL i = 1; i * i <= n; ++i) {
        if(n % i == 0) {
            ret.pb(i);
            if(i * i != n) ret.pb(n / i);
        }
    }
    sort(all(ret));
    return ret;
}

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

    vector<pair<int, P>> v(N);
    for(int i = 0; i < N; ++i) {
        cin >> v[i].S.F >> v[i].S.S;
        v[i].F = v[i].S.F + v[i].S.S;
    }

    sort(all(v));
    cout << abs(v[0].S.F - v[N - 1].S.F) + abs(v[0].S.S - v[N - 1].S.S) << endl;
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:46:28: error: 'N' was not declared in this scope
   46 |     vector<pair<int, P>> v(N);
      |                            ^
Language: C

#include <stdio.h>

int main(void){
    
    int N, i,j,k;
    int max = 0;
    int range=0;
    scanf("%d", &N);

    int x[N];
    int y[N];

    
        scanf("%d", &x[0]);
        scanf("%d", &y[0]);
    

    for(j = 0;j < N;j++){
        scanf("%d", &x[j+1]);
        scanf("%d", &y[j+1]);
    
        for(k = j+1;k < N;k++){
            range = abs(x[j] - x[k]) + abs(y[j] - y[k])
            if(range > max){
                max = range;
            }
        }
    }

    printf("%d", max);
}

Compiler output:
main.c: In function 'main':
main.c:23:21: error: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
   23 |             range = abs(x[j] - x[k]) + abs(y[j] - y[k])
      |                     ^~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
    1 | #include <stdio.h>
  +++ |+#include <stdlib.h>
    2 | 
main.c:23:56: error: expected ';' before 'if'
   23 |             range = abs(x[j] - x[k]) + abs(y[j] - y[k])
      |                                                        ^
      |                                                        ;
   24 |             if(range > max){
      |             ~~
Language: C

# include <stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
const int xl=-10000;
const int yl=-10000;
const int xr=10000;
const int yr=-10000;
int main()
{
	int n,i;
	scanf("%d",&n);
    int Max1, Max2;
    int Min1, Min2;
    int x, y;
    for(i=0;i<n;i++){
        scanf("%d %d", &x, &y);
        Max1=max(abs(x-xl)+abs(y-yl), Max1);
        Min1=min(abs(x-xl)+abs(y-yl), Min1);
        Max2=max(abs(x-xr)+abs(y-yr), Max2);
        Min2=min(abs(x-xr)+abs(y-yr), Min2);
    }
    int ans=max(Max1-Min1, Max2-Min2);
    printf("%d\n", ans);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:14: error: implicit declaration of function 'max'; did you mean 'fmax'? [-Wimplicit-function-declaration]
   18 |         Max1=max(abs(x-xl)+abs(y-yl), Max1);
      |              ^~~
      |              fmax
main.c:19:14: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration]
   19 |         Min1=min(abs(x-xl)+abs(y-yl), Min1);
      |              ^~~
      |              main
Language: C++

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

int main(){
long long n;
  cin >> n;
vector<vector<int64_t>> d(n,vector<int64_t>(2)) ;
for(int i=0;i<n;i++){
for(int j=0;j<2;j++){
cin >> d[i][j];
}
}
long long max=-1;  
for(int i=0;i<n-1;i++){
long long dist=abs(d[i][0]-d[i+1][0])+abs(d[i][1]-d[i+1][1]);
max=max(max,dist);
}
  cout << max << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:8: error: 'max' cannot be used as a function
   16 | max=max(max,dist);
      |     ~~~^~~~~~~~~~
Language: C++

/*
在太阳西斜的这个世界里
置身天上之森。
等这场战争结束之后
不归之人与望眼欲穿的众人
人人本着正义之名
长存不灭的过去
逐渐消逝的未来
我回来了
纵使日薄西山
即便看不到未来
此时此刻的光辉
盼君勿忘
*/

#include <iostream>
#include <cstdio>
#include <algorithm>

using namespace std;
const int N=200010;

int n;
struct node{
	int x,y;
}p[N];

bool cmp(node A,node B){
	return A.x+A.y<B.x+B.y;
}

int main(){
    cin>>n;
    for(int i=1; i<=n; i++) cin>>p[i].x>>p[i].y;
    sort(p+1,p+n+1,cmp);
    cout<<abs(p[1].x-p[n].x)+abs(p[1].yE - Dist MaxE - Dist Max-p[n].y);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:39: error: 'struct node' has no member named 'yE'; did you mean 'y'?
   36 |     cout<<abs(p[1].x-p[n].x)+abs(p[1].yE - Dist MaxE - Dist Max-p[n].y);
      |                                       ^~
      |                                       y
a.cc:36:44: error: 'Dist' was not declared in this scope
   36 |     cout<<abs(p[1].x-p[n].x)+abs(p[1].yE - Dist MaxE - Dist Max-p[n].y);
      |                                            ^~~~
Language: C++

#include <bits/stdc++.h>
#define endl "\n"
using namespace std;

#define ll long long
const long long llINF = 1LL << 60;
const int iINF = 0x20000000;
template<class T> inline bool chmin(T& a, T b) { if (b < a) { 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; }

void execute();
int main() 
{
    cin.tie(nullptr);
    ios::sync_with_stdio(false);// cin と scanfの併用禁止
    cout << fixed << setprecision(15);
    execute();
    return 0;
}

    ll cx = 0;
    ll cy = 0;

bool compare_by_dist(pair<int, int> pi, pair<int, int> pj) {
    return abs(cx-pi.first ) + abs(cy-pi.second) < abs(cx - pj.first) + abs(cy - pj.second);
}

void execute()
{
    ll N;
    int f[200000]={};
    cin >> N;

    vector<pair<int, int>> pos(N);
    for(int i = 0; i < N; i++){
        int x, y;
        cin >> x >> y;
        cx += x;
        cy += y;
        pos[i] = make_pair(x, y);
    }
    cx /= N;
    cy /= N;

    sort(pos.begin(), pos.end(), compare_by_dist);

    ll ma = 0;
    int min_x = 1000000001;
    int min_y = 1000000001;
    int max_x = 0;
    int max_y = 0;
    for(int i = 0; i < N; i++){
        pair<int, int> &pi = pos[i];
        if(min_x < pi.first && pi.first < max_x &&
           min_y < pi.second && pi.second < max_y) {
            f[i] = 1;
            continue;
        }
        for(int j = N-1; 0 < j; j--){
            if(f[j]) continue;
            if(min_x < pj.first && pj.first < max_x &&
            min_y < pj.second && pj.second < max_y) {
                f[j] = 1;
                continue;
            }
            pair<int, int> &pj = pos[j];
            ll dist = abs(pi.first - pj.first)
                    + abs(pi.second - pj.second);
            if(ma < dist){
                ma = dist;
                min_x = (pi.first < pj.first) ? pi.first : pj.first;
                min_y = (pi.second < pj.second) ? pi.second : pj.second;
                max_x = pi.first + pj.first - min_x;
                max_y = pi.second + pj.second - min_y;
            }
        }
    }
    cout << ma;
}


Compiler output:
a.cc: In function 'void execute()':
a.cc:61:24: error: 'pj' was not declared in this scope; did you mean 'j'?
   61 |             if(min_x < pj.first && pj.first < max_x &&
      |                        ^~
      |                        j
Language: C++

// Author: HarshKumar

#include <bits/stdc++.h>
using namespace std;
#define ll int64_t
const ll N = 1e6 + 6, M = 3e9 + 7;
int main()
{
    ios::sync_with_stdio(false), cin.tie(nullptr);
    ll n, mxp = 0, mnp = M, , mxn = 0, mnn = M, x, y;
    cin >> n;
    for (ll i = 0; i < n; i++)
        cin >> x >> y, mnp = min(mnp, x + y), mxp = max(mxp, x + y), mnn = min(mnn, x - y), mxn = max(mxn, x - y);
    cout << max(abs(mxp - mnp), abs(mxn - mnn)) << '\n';
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:29: error: expected unqualified-id before ',' token
   10 |     ll n, mxp = 0, mnp = M, , mxn = 0, mnn = M, x, y;
      |                             ^
Language: C++

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

int main(){
long long n;
  cin >> n;
vector<vector<int64_t>> d(n,vector<int64_t>(2)) 
for(int i=0;i<n;i++){
for(int j=0;j<2;j++){
cin >> d[i][j];
}
}
long long max=-1;  
for(int i=0;i<n-1;i++){
long long dist=abs(d[i][0]-d[i+1][0])+abs(d[i][1]-d[i+1][1]);
max=max(max,dist);
}
  cout << max << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: expected ',' or ';' before 'for'
    8 | for(int i=0;i<n;i++){
      | ^~~
a.cc:8:13: error: 'i' was not declared in this scope
    8 | for(int i=0;i<n;i++){
      |             ^
a.cc:16:8: error: 'max' cannot be used as a function
   16 | max=max(max,dist);
      |     ~~~^~~~~~~~~~
Language: C++

const long long MAX_N = 200000;

int O_x[MAX_N + 1], O_y[MAX_N + 1];

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

        int res = 0;
        for (int i = 0; i < N; i++) {
                int a, b;
                cin >> a >> b;
                O_x[i] = a;
                O_y[i] = b;
        }

        for (int i = 0; i < N; i++) {
                for (int j = i + 1; j < N; j++) {
                        int X = abs(O_x[i] - O_x[j]);
                        int Y = abs(O_y[i] - O_y[j]);
                        int r = X + Y;
                        res = max(res, r);
                }
        }
        cout << res << endl;
        return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> N;
      |         ^~~
a.cc:19:33: error: 'abs' was not declared in this scope
   19 |                         int X = abs(O_x[i] - O_x[j]);
      |                                 ^~~
a.cc:22:31: error: 'max' was not declared in this scope
   22 |                         res = max(res, r);
      |                               ^~~
a.cc:25:9: error: 'cout' was not declared in this scope
   25 |         cout << res << endl;
      |         ^~~~
a.cc:25:24: error: 'endl' was not declared in this scope
   25 |         cout << res << endl;
      |                        ^~~~
Language: C++

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

int main(){
long long n;
  cin >> n;
vector<vector<int_64t>> d(n,vector<int64_t>(2)) 
for(int i=0;i<n;i++){
for(int j=0;j<2;j++){
cin >> d[i][j];
}
}
long long max=-1;  
for(int i=0;i<n-1;i++){
long long dist=abs(d[i][0]-d[i+1][0])+abs(d[i][1]-d[i+1][1]);
max=max(max,dist);
}
  cout << max << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: 'int_64t' was not declared in this scope; did you mean 'int64_t'?
    7 | vector<vector<int_64t>> d(n,vector<int64_t>(2))
      |               ^~~~~~~
      |               int64_t
a.cc:7:15: error: template argument 1 is invalid
a.cc:7:15: error: template argument 2 is invalid
a.cc:7:22: error: template argument 1 is invalid
    7 | vector<vector<int_64t>> d(n,vector<int64_t>(2))
      |                      ^~
a.cc:7:22: error: template argument 2 is invalid
a.cc:7:47: error: expression list treated as compound expression in initializer [-fpermissive]
    7 | vector<vector<int_64t>> d(n,vector<int64_t>(2))
      |                                               ^
a.cc:7:29: error: cannot convert 'std::vector<long int>' to 'int' in initialization
    7 | vector<vector<int_64t>> d(n,vector<int64_t>(2))
      |                             ^~~~~~~~~~~~~~~~~~
      |                             |
      |                             std::vector<long int>
a.cc:8:13: error: 'i' was not declared in this scope
    8 | for(int i=0;i<n;i++){
      |             ^
a.cc:15:21: error: invalid types 'int[int]' for array subscript
   15 | long long dist=abs(d[i][0]-d[i+1][0])+abs(d[i][1]-d[i+1][1]);
      |                     ^
a.cc:15:29: error: invalid types 'int[int]' for array subscript
   15 | long long dist=abs(d[i][0]-d[i+1][0])+abs(d[i][1]-d[i+1][1]);
      |                             ^
a.cc:15:44: error: invalid types 'int[int]' for array subscript
   15 | long long dist=abs(d[i][0]-d[i+1][0])+abs(d[i][1]-d[i+1][1]);
      |                                            ^
a.cc:15:52: error: invalid types 'int[int]' for array subscript
   15 | long long dist=abs(d[i][0]-d[i+1][0])+abs(d[i][1]-d[i+1][1]);
      |                                                    ^
a.cc:16:8: error: 'max' cannot be used as a function
   16 | max=max(max,dist);
      |     ~~~^~~~~~~~~~
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;
        vector<vector<long>> v(n,vector<long> (2));
        long long x,y;
       while(n--)
       {   cin>>x>>y;
           if(b<x+y)
               {
                   
                b=x+y;
                b1=x;
                b2=y;
               }
           if(a>x+y)
           {
               
           
                a=x+y;
                a1=x;
                a2=y;
                
                
           }
           if(d<x-y)
                {
                    d=x-y;
                    d1=x;
                    d2=y;
                }
           if(c>x-y)
            {
                c=x-y;
                c1=x;
                c2=y;
            }
            
       }
       long long ans=max(a+b,a+c);
       ans=max(a+d,ans);
       ans=max(b+c,ans);
       ans=max(b+d,ans);
       ans=max(c+d,ans);
       cout<<ans<<endl;
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:11:19: error: redeclaration of 'long long int x'
   11 |         long long x,y;
      |                   ^
a.cc:9:19: note: 'long long int x' previously declared here
    9 |         long long x,y,a1=0,a2=0,b1=0,b2=0,c1=0,c2=0,d1=0,d2=0;
      |                   ^
a.cc:11:21: error: redeclaration of 'long long int y'
   11 |         long long x,y;
      |                     ^
a.cc:9:21: note: 'long long int y' previously declared here
    9 |         long long x,y,a1=0,a2=0,b1=0,b2=0,c1=0,c2=0,d1=0,d2=0;
      |                     ^
Language: Java


import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Scanner;
import java.util.Set;

import atCoder.template.f.Main.Pair;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int n = sc.nextInt();
		
		Pair LU = new Pair(0,0);
		Pair RU = new Pair(0,Integer.MAX_VALUE);
		Pair LD = new Pair(Integer.MAX_VALUE,0);
		Pair RD = new Pair(Integer.MAX_VALUE,Integer.MAX_VALUE);

		Pair LUN = RD;
		Pair RUN = LD;
		Pair LDN = RU;
		Pair RDN = LU;

		for( int i=0; i<n ; i++ ) {
			int x = sc.nextInt();
			int y = sc.nextInt();
			Pair c = new Pair(x,y);
			
			if(	LU.dist(c) < LU.dist(LUN) ) {
				LUN = c;
			}
			if(	RU.dist(c) < RU.dist(RUN) ) {
				RUN = c;
			}
			if(	LD.dist(c) < LD.dist(LDN) ) {
				LDN = c;
			}
			if(	RD.dist(c) < RD.dist(RDN) ) {
				RDN = c;
			}
		}

		long ans = Integer.MIN_VALUE;
		ans = Math.max( ans, LUN.dist(RUN) );
		ans = Math.max( ans, LUN.dist(LDN) );
		ans = Math.max( ans, LUN.dist(RDN) );
		ans = Math.max( ans, RUN.dist(LDN) );
		ans = Math.max( ans, RUN.dist(RDN) );
		ans = Math.max( ans, LDN.dist(RDN) );
		
		System.out.println(ans);
		
	}
	
	public static class Pair implements Comparable<Pair>{
		int c = 0;
		int d = 0;
		
		public Pair(int c, int d) {
			super();
			this.c = c;
			this.d = d;
		}

		public long dist( Pair o) {
			return Math.abs((long)o.c-c)+Math.abs((long)o.d-d);
		};
		
		@Override
		public int compareTo(Pair o) {
			int dd = this.d - o.d;
			if( dd != 0 ) {
				return dd;
			}
			int cc = this.c - o.c;
			return cc;
		}

		@Override
		public String toString() {
			return "Pair [c=" + c + ", d=" + d + "]";
		}
		
	}
}


Compiler output:
Main.java:12: error: package atCoder.template.f.Main does not exist
import atCoder.template.f.Main.Pair;
                              ^
1 error
Language: C++

#include<bits/stdc++.h>
#define mod 1000000007
using namespace std;
typedef long long int ll;
int main()
  {
      ll n;
      cin>>n;
      map<ll,ll>m;
      for(ll i=0;i<n;i++)
      {
          ll a,b;
          cin>>a>>b;
          m.insert(make_pair<ll,ll>(a+b,i));
      }
      auto x=m.begin();
      auto y=m.rbegin();
      ll ans=y->first-x->first;

      if(ans>=0)
      cout<<ans<<endl;
      else
      {
          ans=ans*(-1);
      cout<<ans<<endl;
      }
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:14:41: error: cannot bind rvalue reference of type 'long long int&&' to lvalue of type 'll' {aka 'long long int'}
   14 |           m.insert(make_pair<ll,ll>(a+b,i));
      |                                         ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 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_pair.h:1132:32: note:   initializing argument 2 of 'constexpr std::pair<typename std::__strip_reference_wrapper<typename std::decay<_Tp>::type>::__type, typename std::__strip_reference_wrapper<typename std::decay<_Tp2>::type>::__type> std::make_pair(_T1&&, _T2&&) [with _T1 = long long int; _T2 = long long int; typename __strip_reference_wrapper<typename decay<_Tp>::type>::__type = long long int; typename decay<_Tp>::type = long long int; typename __strip_reference_wrapper<typename decay<_Tp2>::type>::__type = long long int; typename decay<_Tp2>::type = long long int]'
 1132 |     make_pair(_T1&& __x, _T2&& __y)
      |                          ~~~~~~^~~
Language: C++

#include<iostream>
#include<math.h>
#include<stdlib.h>
#include<string>
#include<limits.h>
#include<utility>
#include<queue>
#include<vector>
#include<tuple>
#include<algorithm>
#include<map>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
#define rep(i,n) for(int i=0;i<n;i++)
#define ALL(A) A.begin(),A.end()
bool comparator(P a, P b) {
	return a.first / a.second < b.first / b.second;
}

int main() {
	ll n;
	cin >> n;
	ll X[n], Y[n];
	
	rep(i, n) {
		cin >> X[i] >> Y[i];
	}
	ll YE = Y[0], XE = X[0], XW = X[0], YW = Y[0];
	ll XN = X[0], YN = Y[0], XS = X[0], YS = Y[0];
	rep(i, n) {
		if (XE > X[i]) {
			XE = X[i];
			YE = Y[i];
		}
		if (XW < X[i]) {
			XW = X[i];
			YW = Y[i];
		}
		if (YN < Y[i]) {
			XN = X[i];
			YN = Y[i];
		}
		if (YS > Y[i]) {
			XS = X[i];
			YS = Y[i];
		}
	}
	ll px = (XS + XN) / 2;
	ll py = (YE + YW) / 2;
	ll dista[4];
	ll XX[4]; ll YY[4];
	rep(i, 4) {
		dista[i] = 0;
		XX[i] = px;
			YY[i] = py;
	}
	rep(i, n) {
		ll d = dist(px, py, X[i], Y[i]);
		if (X[i] >= px && Y[i] >= py) {
			if (dist[0] < d) {
				XX[0] = X[i];
				YY[0] = Y[i];
			}
		}
		if (X[i] <= px && Y[i] >= py) {
			if (dist[1] < d) {
				XX[1] = X[i];
				YY[1] = Y[i];
			}
		}
		if (X[i] <= px && Y[i] <= py) {
			if (dist[2] < d) {
				XX[2] = X[i];
				YY[2] = Y[i];
			}
		}
		if (X[i] >= px && Y[i] <= py) {
			if (dist[3] < d) {
				XX[3] = X[i];
				YY[3] = Y[i];
			}
		}
	}
	ll ans = 0;
	for (ll i = 0; i < 3; i++) {
		for (ll j = i + 1; j < 4; j++) {
			ll d = dist(XX[i], YY[i], XX[j], YY[j]);
			if (d > ans) {
				ans = d;
			}
		
		}
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:59:24: error: 'dist' was not declared in this scope; did you mean 'dista'?
   59 |                 ll d = dist(px, py, X[i], Y[i]);
      |                        ^~~~
      |                        dista
a.cc:88:32: error: 'dist' was not declared in this scope; did you mean 'dista'?
   88 |                         ll d = dist(XX[i], YY[i], XX[j], YY[j]);
      |                                ^~~~
      |                                dista