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

#include <iostream>
#include <stdio.h>
#include <vector> 
#include <math.h> 
using namespace std;
int main(void){
    int N; cin >> N;
    vector<int> x(N);
    vector<int> y(N);
    vector<int> h(N);
    int i = 0;
    int Max = 0;
    long min = 10e9;
    while(i < N){
        cin >> x[i] >> y[i] >> h[i];
        if (h[i] < min) min = h[i];
        if (h[i] > Max) Max = h[i];
        i++;
    }
    i = 0;
    int j = 0; int k = 0;
    int flag = 0;
    while (i <= 100) {
        j = 0;
        while (j <= 100) {
            k = 0;
            while (max <= k && k <= Max + 200) {
                int l = 0;
                int flag2 = 1;
                while (l < N) {
                    int value = 0;
                    value = max(k - abs(i - x[l]) - abs(j - y[l]),0);
                    if ( value != h[l]) {
                        flag2 = 0;
                        break;
                    } 
                    l++;
                }
                if (flag2) {
                    flag = 1;
                    break;
                }
                k++; 
            }
            if (flag) break;
            j++;
        }
        if (flag) break;
        i++;
    }
    cout << i << " " << j << " " << k << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:24: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<='
   27 |             while (max <= k && k <= Max + 200) {
      |                    ~~~~^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
const ll mod=1000000007;
const int MAX_N = 1000;         // n の最大値
 
// nCk を取得
double nCk(int n, int k) {
double res=1.0;
for(int i=0; i<n; i++){
res*=0.5;}
for(int i=0; i<k; i++){
res*=(double)(n-i);
res/=(double)(k-i);
}
return res;}
 
int main() {
ll n;
cin>>n;
ll x[n]={},y[n]={},h[n]={};
ll ha=0;
ll b=0;
for(ll i=; i<n; i++){
cin>>x[i]>>y[i]>>h[i];}
for(ll i=0; i<=100; i++){
for(ll k=0; k<=100; k++){
ha=abs(i-x[0])+abs(k-y[0])+h[0];
for(ll q=1; q<n; q++){
if(ha!=abs(i-x[q])+abs(k-y[q])+h[q]){
b++;
break;}}
if(b==0){
cout<<i<<" "<<k<<" "<<ha;
goto end;}}}
end:
cout<<endl;}

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

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

int main()
{
  int64_t N, x, y, h, ch;
  cin >> N;
  vector<tuple<int64_t, int64_t, int64_t>> vt;
  for (int i = 0; i < N; i++)
  {
    cin >> x >> y >> h;
    vt.push_back({h, x, y});
  }
  sort(vt.begin(), vt.end());
  reverse(vt.begin(), vt.end());
  for (int cx = 0; cx <= 100; cx++)
  {
    for (int cy = 0; cy <= 100; cy++)
    {
      int64_t fx, fy, fh, H, xi, yi, hi;
      tie(fh, fx, fy) = vt.at(0);
      H = fh + abs(fx - cx) + abs(fy - cy);
      bool ok = true;
      for (int i = 0; i < N; i++)
      {
        tie(hi, xi, yi) = vt.at(i);
        if (hi != max(H - abs(xi - cx) - abs(yi - cy), 0LL))
          ok = false;
      }
      if (ok)
      {
        cout << cx << ' ' << cy << ' ' << H << endl;
        return 0;
      }
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:22: error: no matching function for call to 'max(int64_t, long long int)'
   27 |         if (hi != max(H - abs(xi - cx) - abs(yi - cy), 0LL))
      |                   ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:27:22: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and 'long long int')
   27 |         if (hi != max(H - abs(xi - cx) - abs(yi - cy), 0LL))
      |                   ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:27:22: note:   mismatched types 'std::initializer_list<_Tp>' and 'long int'
   27 |         if (hi != max(H - abs(xi - cx) - abs(yi - cy), 0LL))
      |                   ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C

#include<stdio.h>
#include<stdlib.h>
int max(int a,int b){
  if(a>b){
    return a;
  }else{
    return b;
  }
}

int main(){
  int N,i,cx,cy,H;
  int flag=0;
  scanf("%d",&N);
  int x[N],y[N];
  long long h[N];
  for(i=0;i<N;i++){scanf("%d %d %lld",&x[i],&y[i],&h[i]);}
  for(cx=0;cx<100;cx++){
    for(cy=0;cy<100;cy++){
      for(i=0;i<N;i++)if(h[i])break;
      H = h[i] +abs(x[i]-cx)+abs(y[i]-cy);
      for(i=0;i<N;i++){
        if(h[i] != max(H-abs(x[i]-cx)-abs(y[i]-cy),0))break;
        if(i == N)flag =1;
        if(flag)break;
      }
     if(flag)break;
    }
  	printf("%d %d %d\n",cx,cy,H);
  	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:31:1: error: expected declaration or statement at end of input
   31 | }
      | ^
Language: C

#include<stdio.h>
#include<stdlib.h>
int max(int a,int b){
  if(a>b){
    return a;
  }else{
    return b;
  }
}

int main(){
  int N,i,cx,cy,H;
  int flag=0;
  scanf("%d",&N);
  int x[N],y[N];
  long long h[N];
  for(i=0;i<N;i++){scanf("%d %d %lld",&x[i],&y[i],&h[i]);}
  for(cx=0;cx<100;cx++){
    for(cy=0;cy<100;cy++){
      for(i=0;i<N;i++){
        if(h[i]){
          break;
        }
      H = h[i] +abs(x[i]-cx)+abs(y[i]-cy);
      for(i=0;i<N;i++){
        if(h[i] != max(H-abs(x[i]-cx)-abs(y[i]-cy),0))break;
        if(i == N) flag =1;
        if(flag) break;
      }
     if(flag)break;
    }
   printf("%d %d %d\n",cx,cy,H);
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:34:1: error: expected declaration or statement at end of input
   34 | }
      | ^
main.c:34:1: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>
#include<stdlib.h>
int main(){
  int N,i,cx,cy,H;
  int flag=0;
  scanf("%d",&N);
  int x[N],y[N];
  long long h[N];
  for(i=0;i<N;i++){scanf("%d %d %lld",&x[i],&y[i],&h[i]);}
  for(cx=0;cx<100;cx++){
    for(cy=0;cy<100;cy++){
      for(i=0;i<N;i++){
        if(h[i]){
          break;
        }
      H = h[i] +abs(x[i]-cx)+abs(y[i]-cy);
      for(i=0;i<N;i++){
        if(h[i] != max(H-abs(x[i]-cx)-abs(y[i]-cy)))break;
      }
      if(i == N) flag =1;
      if(flag) break;
      }
     if(flag)break;
    }
   printf("%d %d %d\n",cx,cy,H);
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:20: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
   18 |         if(h[i] != max(H-abs(x[i]-cx)-abs(y[i]-cy)))break;
      |                    ^~~
main.c:27:1: error: expected declaration or statement at end of input
   27 | }
      | ^
Language: C

#include<stdio.h>

int main() {
   int N,;
   scanf("%d", &N);
   int x[N];
   int y[N];
   int h[N];
   for(int i = 0; i < N; i++) {
      scanf("%d %d", &x[i], &y[i],&h[i]);
   }
   int H;
   H = (X -x[i])-(Y-y[i]);
}

Compiler output:
main.c: In function 'main':
main.c:4:10: error: expected identifier or '(' before ';' token
    4 |    int N,;
      |          ^
main.c:13:9: error: 'X' undeclared (first use in this function)
   13 |    H = (X -x[i])-(Y-y[i]);
      |         ^
main.c:13:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:14: error: 'i' undeclared (first use in this function)
   13 |    H = (X -x[i])-(Y-y[i]);
      |              ^
main.c:13:19: error: 'Y' undeclared (first use in this function)
   13 |    H = (X -x[i])-(Y-y[i]);
      |                   ^
Language: C

#include<stdio.h>
#include<stdlib.h>
int main(){
  int N,i,cx,cy,H;
  int flag=0;
  scanf("%d",&N);
  int x[n],y[n];
  long long h[n];
  for(i=0;i<n;i++){scanf("%d %d %lld",&x[i],&y[i],&h[i]);}
  for(cx=0;cx<100;cx++){
    for(cy=0;cy<100;cy++){
      for(i=0;i<n;i++){
        if(h[i]){
          break;
        }
      H = h[i] +abs(x[i]-cx)+abs(y[i]-cy);
      for(i=0;i<n;i++){
        if(h[i] != max(H-abs(x[i]-cx)-abs(y[i]-cy)))break;
      }
      if(i == n) flag =1;
      if(flag) break;
      }
     if(flag)break;
    }
   printf("%d %d %d\n",cx,cy,H);
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: 'n' undeclared (first use in this function)
    7 |   int x[n],y[n];
      |         ^
main.c:7:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:20: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
   18 |         if(h[i] != max(H-abs(x[i]-cx)-abs(y[i]-cy)))break;
      |                    ^~~
main.c:27:1: error: expected declaration or statement at end of input
   27 | }
      | ^
Language: C++

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

int main() {
  int n;
  cin >> n;
  vector<vector<ll>>data(n,vector<ll>(3));
  rep(i,0,n) cin >> data[i][0] >> data[i][1] >> data[i][2];
  rep(cx,0,101){
    rep(cy,0,101){
      ll H = data[0][2]+abs(data[0][0]-cx)+abs(data[0][1]-cy;
      rep(i,1,n){
        if(data[i][2]+abs(data[i][0]-cx)+abs(data[i][1]-cy) != H) break;
        if(i == n-1){
          cout << cx << " " << cy << " " << H << endl;
          return 0;
        }
      }
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:61: error: expected ')' before ';' token
   13 |       ll H = data[0][2]+abs(data[0][0]-cx)+abs(data[0][1]-cy;
      |                                               ~             ^
      |                                                             )
Language: C++

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

int main() {
	int n;
	cin >> n;
	vector<vector<ll>>xyh(0, vector<ll>(3));
	for (int i = 0; i < n; i++) {
		ll x, y, z;
		cin >> x >> y >> z;
		if (z != 0) xyh.push_back({ x, y, z };
	}
	for (int i = 0; i <= 100; i++) {
		for (int j = 0; j <= 100; j++) {
			ll cx = i;
			ll cy = j;
			ll ch = abs(cx - xyh.at(0).at(0)) + abs(cy - xyh.at(0).at(1)) + xyh.at(0).at(2);
			bool b = false;
			for (int k = 0; k < xyh.size(); k++) {
				if (xyh.at(k).at(2) == 0)continue;
				if (ch != abs(cx - xyh.at(k).at(0)) + abs(cy - xyh.at(k).at(1)) + xyh.at(k).at(2)) {
					b = true;
					break;
				}
			}
			if (!b) {
				cout << cx << " " << cy << " " << ch << endl;
				return 0;
			}
			else continue;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:54: error: expected ')' before ';' token
   12 |                 if (z != 0) xyh.push_back({ x, y, z };
      |                                          ~           ^
      |                                                      )
Language: C

#include<stdio.h>
#include<string.h>
#include<stdlib.h>

int max(int a, int b){
  if(a > b) return a;
  else return b;
}

int min(int a, int b){
  if(a < b) return a;
  else return b;
}


int main(){

  int n;
  scanf("%d",&n);

  int X[n];
  int Y[n];
  int H[n];
  int h_min = 100;
  int h_max = 0;

  for(int i = 0; i < n; ++i){
    scanf("%d %d %d",&X[i],&Y[i],&H[i]);
  }

  int MAX = 100;

  int flag = 0;

  for(int y = 0; y < MAX; ++y){
    for(int x = 0; x < MAX; ++x){

      int needH = -1;

      for(int i = 0; i < n; ++i){
        if(H[i] > 0){
           int tmp = H[i] + abs(y - Y[i]) +abs(x - X[i]);
          if(needH == -1){
            needH = tmp;
          }else{
            if(needH != tmp){
              needH = -2;
              break;
            }
          }
        }
      }
      if(needH != -2) continue;

      for(int i = 0; i < n; ++i){
        if(H[i] == 0){
          int dist = H[i] + abs(y - Y[i]) +abs(x - X[i]);
          if(needH > dist){
            needH = -2;
            break;
          }
        }
      }


Compiler output:
main.c: In function 'main':
main.c:63:7: error: expected declaration or statement at end of input
   63 |       }
      |       ^
main.c:63:7: error: expected declaration or statement at end of input
main.c:63:7: error: expected declaration or statement at end of input
Language: C++

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

int main(){
  int64_t N;
  cin>>N;
  vector<vector<int64_t>> A(N,vector<int64_t>(3));
  for(vector<int64_t> &i:A)
    cin>>i.at(0)>>i.at(1)>>i.at(2);
  vector<int64_t> ve=A.at(0);
  int64_t x,y,h;
  for(int64_t i=0;i<=100;i++)
    for(int64_t j=0;j<=100;j++){
      int64_t H=ve.at(2)+abs(ve.at(0)-i)+abs(ve.at(1)-j);
      bool bo=false;
      for(vector<int64_t> &k:A)
        if(k.at(2)!=max(H-abs(k.at(0)-i)-abs(k.at(1)-j),0LL))
          bo=true;
      if(bo)
        continue;
      x=i;
      y=j;
      h=H;
      break;
    }
  cout<<x<<' '<<y<<' '<<h<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:24: error: no matching function for call to 'max(int64_t, long long int)'
   17 |         if(k.at(2)!=max(H-abs(k.at(0)-i)-abs(k.at(1)-j),0LL))
      |                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:17:24: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and 'long long int')
   17 |         if(k.at(2)!=max(H-abs(k.at(0)-i)-abs(k.at(1)-j),0LL))
      |                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:17:24: note:   mismatched types 'std::initializer_list<_Tp>' and 'long int'
   17 |         if(k.at(2)!=max(H-abs(k.at(0)-i)-abs(k.at(1)-j),0LL))
      |                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

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

int main(){
  int64_t N;
  cin>>N;
  vector<vector<int64_t>> A(N,vector<int64_t>(3));
  for(vector<int64_t> &i:A)
    cin>>i.at(0)>>i.at(1)>>i.at(2);
  vector<int64_t> ve=A.at(0);
  int64_t x,y,h;
  for(int64_t i=0;i<=100;i++)
    for(int64_t j=0;j<=100;j++){
      int64_t H=ve.at(2)+abs(ve.at(0)-i)+abs(ve.at(1)-j);
      bool bo=false;
      for(vector<int64_t> &k:A)
        if(k.at(2)!=max(H-abs(k.at(0)-i)-abs(k.at(1)-j),0))
          bo=true;
      if(bo)
        continue;
      x=i;
      y=j;
      h=H;
      break;
    }
  cout<<x<<' '<<y<<' '<<h<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:24: error: no matching function for call to 'max(int64_t, int)'
   17 |         if(k.at(2)!=max(H-abs(k.at(0)-i)-abs(k.at(1)-j),0))
      |                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h: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:17:24: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and 'int')
   17 |         if(k.at(2)!=max(H-abs(k.at(0)-i)-abs(k.at(1)-j),0))
      |                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:17:24: note:   mismatched types 'std::initializer_list<_Tp>' and 'long int'
   17 |         if(k.at(2)!=max(H-abs(k.at(0)-i)-abs(k.at(1)-j),0))
      |                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <functional>
#include <bitset>
#include <cmath>
#include <stack>
#include <iomanip>
#include <map>
#include <math.h>
typedef long long ll;
using namespace std;
const int MOD = 1000000007;

ll GCD(ll a, ll b) { return b ? GCD(b, a%b) : a; }


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
    cin>>n;
    int x[n][3];
    for(int i=0;i<n;i++){
        for(int j=0;j<3;j++){
            cin>>x[i][j];
        }
    }
    for(int i=0;i<=100;i++){
        for(int j=0;j<=100;j++){
            bool b=true;
            int h;
            for(int k=0;k<n;k++){
                if(x[k][2])h=abs(x[k][0]-i)+abs(x[k][1]-j)+x[k][2];
                break;
            }
            for(int k=0;k<n;k++){
                 if(max(0ll,h-abs(x[k][0]-i)-abs(x[k][1]-j))!=x[k][2])b=false;
            }
            if(b){
                cout<<i<<" "<<j<<" "<<h<<endl;
                return 0;
            }
        }
    }
    assert(0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:24: error: no matching function for call to 'max(long long int, int)'
   21 |                  if(max(0ll,h-abs(x[k][0]-i)-abs(x[k][1]-j))!=x[k][2])b=false;
      |                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:21:24: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   21 |                  if(max(0ll,h-abs(x[k][0]-i)-abs(x[k][1]-j))!=x[k][2])b=false;
      |                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:21:24: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   21 |                  if(max(0ll,h-abs(x[k][0]-i)-abs(x[k][1]-j))!=x[k][2])b=false;
      |                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

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


int main(){
    int n ;
    cin >> n ;
    int X[n] , Y[n] , H[n] ;
    rep(i,n) cin >> X[i] >> Y[i] >> H[i] ;
    int ans_H = 0 ;
    int ans_Y = 0 ;
    int ans_X = 0 ;
    rep(x,101){
        rep(y,101){
            int ch = H[0] + abs(x - X[0]) + abs(y - Y[0]) ;
            int count = 0 ;
            rep(i,n) if(H[i] == ch - abs(x - X[i]) - abs(y - Y[i]) )count++ ;
            if( count == n ){
                    ans_H = ch ;
                    ans_X = x  ;
                    ans_Y = y  ;
            }
        }
    }
    cout << ans_X << ' ' << ans_Y << ' ' << ans_H << endl;
}


Compiler output:
a.cc:4:13: error: conflicting declaration 'typedef int ll'
    4 | typedef int ll ;
      |             ^~
a.cc:3:19: note: previous declaration as 'typedef long long int ll'
    3 | typedef long long ll ;
      |                   ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main()
{
    set<ll> st;
    ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    ll n;
    cin >> n;
    vector<ll> x(n), y(n), h(n);
    ll height = 0;
    for (ll i = 0; i < n; i++)
    {
        cin >> x[i] >> y[i] >> h[i];
        if (h[i] != 0)
        {
            height = i;
            st.insert(i);
        }
    }
    if(n == 1){
        cout << x[0] << " " << y[0] << " " <<h[i] << endl;
        return 0; 
    }
    for (ll Cx = 0; Cx <= 100; Cx++)
    {
        for (ll Cy = 0; Cy <= 100; Cy++)
        {
            ll tmp = h[height] + abs(x[height] - Cx) + abs(y[height] - Cy);
            bool highest = true;
            for (auto i : st)
            {
                if (tmp != h[i] + abs(x[i] - Cx) + abs(y[i] - Cy))
                {
                    highest = false;
                    break;
                }
            }
            if (highest)
            {
                cout << Cx << " " << Cy << " " << tmp << endl;
                return 0;
            }
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:48: error: 'i' was not declared in this scope
   23 |         cout << x[0] << " " << y[0] << " " <<h[i] << endl;
      |                                                ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main()
{
    set<l> st;
    ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    ll n;
    cin >> n;
    vector<ll> x(n), y(n), h(n);
    ll height = 0;
    for (ll i = 0; i < n; i++)
    {
        cin >> x[i] >> y[i] >> h[i];
        if(h[i] != 0){
            height = i;
            st.insert(i);
        }
    }
    for (ll Cx = 0; Cx <= 100; Cx++)
    {
        for (ll Cy = 0; Cy <= 100; Cy++)
        {
            ll tmp = h[height] + abs(x[height] - Cx) + abs(y[height] - Cy);
            bool highest = true;
            for (auto i : st)
            {
                if (tmp != h[i] + abs(x[i] - Cx) + abs(y[i] - Cy))
                {
                    highest = false;
                    break;
                }
            }
            if (highest)
            {
                cout << Cx << " " << Cy << " " << tmp << endl;
                return 0;
            }
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'l' was not declared in this scope; did you mean 'll'?
    6 |     set<l> st;
      |         ^
      |         ll
a.cc:6:10: error: template argument 1 is invalid
    6 |     set<l> st;
      |          ^
a.cc:6:10: error: template argument 2 is invalid
a.cc:6:10: error: template argument 3 is invalid
a.cc:18:16: error: request for member 'insert' in 'st', which is of non-class type 'int'
   18 |             st.insert(i);
      |                ^~~~~~
a.cc:27:27: error: 'begin' was not declared in this scope
   27 |             for (auto i : st)
      |                           ^~
a.cc:27:27: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
                 from a.cc:1:
/usr/include/c++/14/valarray:1238:5: note:   'std::begin'
 1238 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
In file included from /usr/include/c++/14/filesystem:53,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200:
/usr/include/c++/14/bits/fs_dir.h:608:3: note:   'std::filesystem::__cxx11::begin'
  608 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
a.cc:27:27: error: 'end' was not declared in this scope
   27 |             for (auto i : st)
      |                           ^~
a.cc:27:27: note: suggested alternatives:
/usr/include/c++/14/valarray:1265:5: note:   'std::end'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/bits/fs_dir.h:613:3: note:   'std::filesystem::__cxx11::end'
  613 |   end(recursive_directory_iterator) noexcept
      |   ^~~
Language: C++

#include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <bitset>
#include <algorithm>
#include <complex>
using namespace std;
 
#define REP(i,n) for(int i=0; i<n; ++i)
#define FOR(i,a,b) for(int i=a; i<=b; ++i)
#define FORR(i,a,b) for (int i=a; i>=b; --i)
#define ALL(c) (c).begin(), (c).end()
 
typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef vector<VI> VVI;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;

int in() { int x; scanf("%d", &x); return x; }
ll lin() { ll x; scanf("%lld", &x); return x; }

int main() {
    int n;
    cin >> n;
    VI x(n), y(n), h(n);
    REP(i,n){
        cin >> x[i] >> y[i] >> h[i];
    }

    
    FOR(a,0,100) FOR(b,0,100){
        int p = h[s] + abs(x[s] - a) + abs(y[s] - b);
        bool ok = true;
        REP(i,n){
            if (h[i] != max(0, p - abs(x[i] - a) - abs(y[i] - b))) ok = false;
        }
        if (ok){
            cout << a << " " << b << " " << p << endl;
            return 0;
        }
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:44:19: error: 's' was not declared in this scope
   44 |         int p = h[s] + abs(x[s] - a) + abs(y[s] - b);
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
#define ll long long
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define rep11(i, n) for (int i = 1; i < (int)(n); ++i)
#define repo(i, o, n) for (int i = o; i < (int)(n); ++i)
#define repm(i, n) for (int i = (int)(n)-1; i >= 0; --i)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define pb(n) push_back(n)
#define mp make_pair
#define MOD 1002000007
#define INF LONG_LONG_MAX

typedef pair<int, int> P;
int main(){
    int n;
    cin>>n;
    vector<int> x(n);
    vector<int> y(n);
    vector<int> h(n);
    rep(i,n){
        cin>>x[i]>>y[i]>>h[i];
    }
    bool flag=0;
    rep(i,101){
        rep(j,101){
                int co=0;
                int p=-1;
                rep(q,n){
                    int mx=h[q]+abs(x[q]-j)+abs(y[q]-i);
                    if(h[q]==0){
                        co++;
                    }
                    if(h[q]!=0 && p==-1){
                        p=mx;
                        co++;
                    }
                    else if(mx==p){
                        co++;
                        if(h[q]==0){
                        co--;
                        }
                    }
                    if(co==n){
                        cout<<j<<" "<<i<<" "<<p<<endl;
                        flag=1;
                        break;
                    }
                }
                int co=0;
                int p=-1;
                for(int q=n-1; q>=0; q--){
                    if(flag) break;
                    int mx=h[q]+abs(x[q]-j)+abs(y[q]-i);
                    if(h[q]==0){
                        co++;
                    }
                    if(h[q]!=0 && p==-1){
                        p=mx;
                        co++;
                    }
                    else if(mx==p){
                        co++;
                        if(h[q]==0){
                        co--;
                        }
                    }
                    if(co==n){
                        cout<<j<<" "<<i<<" "<<p<<endl;
                        flag=1;
                        break;
                    }
                
                }
                if(flag) break;
            }
            if(flag) break;
        }
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:55:21: error: redeclaration of 'int co'
   55 |                 int co=0;
      |                     ^~
a.cc:32:21: note: 'int co' previously declared here
   32 |                 int co=0;
      |                     ^~
a.cc:56:21: error: redeclaration of 'int p'
   56 |                 int p=-1;
      |                     ^
a.cc:33:21: note: 'int p' previously declared here
   33 |                 int p=-1;
      |                     ^
Language: C++

#include <iostream>
#include <cmath>
using namespace std;
int main(void){

    int datanum,x_now,y_now,hight_now;
    int i,k=0;
    int tmp_diff,diff_x,diff_y,tmp_height,height;
    int field[128][8]={{0}};
    int ispeak=1;
    
    cin >> datanum;
    
    for(i=0;i<datanum;i++){
        cin >> field[i][0] >>field[i][1] >> field[i][2];
    }
    
    tmp_height = 0;
    
    //
    for(int j=0;j<10201;j++){
        x_now = j%101;
        y_now = j/101;
        ispeak= 1;
        
        height = field[1][2] + abs(field[1][0]-x_now) + abs(field[1][1]-y_now);
        
        for(i=0;i<datanum;i++){
            
            tmp_height = field[i][2] + abs(field[i][0]-x_now) + abs(field[i][1]-y_now);
            
            if(height != tmp_height){
                ispeak = 0;   
            }
        }
        if(ispeak) break;
    }
    
    cout << x_now　<< " " << y_now << " " << tmp_height << endl;
    return 0;
}

Compiler output:
a.cc:39:13: error: extended character 　 is not valid in an identifier
   39 |     cout << x_now　<< " " << y_now << " " << tmp_height << endl;
      |             ^
a.cc: In function 'int main()':
a.cc:39:13: error: 'x_now\U00003000' was not declared in this scope; did you mean 'x_now'?
   39 |     cout << x_now　<< " " << y_now << " " << tmp_height << endl;
      |             ^~~~~~~
      |             x_now
Language: Java

import sys
n = int(input())
xyh = []
for _ in range(n):
	xyh.append(list(map(int,input().split())))

for Cx in range(101):
	for Cy in range(101):

		for x,y,h in xyh:
			if h == 0:
				continue

			H = h + abs(x - Cx) + abs(y - Cy)
			break
		ok = True
		for x,y,h in xyh:
			if H - abs(x - Cx) -abs(y - Cy) != h:
				ok = False
				break
		if ok:
			print("{} {} {}".format(Cx, Cy, H))
			sys.exit(0)



Compiler output:
Main.java:1: error: '.' expected
import sys
          ^
Main.java:2: error: ';' expected
n = int(input())
 ^
2 errors
Language: C++

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(N) for (int i = 0; i < N; i++)

int main(){
    cin >> N;
    tuple<long long, long long, long long>G = make_tuple(-1, -1, -1);
    for (int i = 1; i <= N; i++) {
        cin >> X[i] >> Y[i] >> H[i];
        if (H[i] >= 1) G = make_tuple(X[i], Y[i], H[i]);
    }
    for (int i = 0; i <= 100; i++) {
        for (int j = 0; j <= 100; j++) {
            long long V = get<2>(G) + abs(get<0>(G) - i) + abs(get<1>(G) - j); V = max(V, 0LL); bool flag = true;
            for (int k = 1; k <= N; k++) {
                if (H[k] != V - abs(X[k] - i) - abs(Y[k] - j)) flag = false;
            }
            if (flag == true) cout << i << " " << j << " " << V << endl;
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'N' was not declared in this scope
    7 |     cin >> N;
      |            ^
a.cc:10:16: error: 'X' was not declared in this scope
   10 |         cin >> X[i] >> Y[i] >> H[i];
      |                ^
a.cc:10:24: error: 'Y' was not declared in this scope
   10 |         cin >> X[i] >> Y[i] >> H[i];
      |                        ^
a.cc:10:32: error: 'H' was not declared in this scope
   10 |         cin >> X[i] >> Y[i] >> H[i];
      |                                ^
a.cc:17:21: error: 'H' was not declared in this scope
   17 |                 if (H[k] != V - abs(X[k] - i) - abs(Y[k] - j)) flag = false;
      |                     ^
a.cc:17:37: error: 'X' was not declared in this scope
   17 |                 if (H[k] != V - abs(X[k] - i) - abs(Y[k] - j)) flag = false;
      |                                     ^
a.cc:17:53: error: 'Y' was not declared in this scope
   17 |                 if (H[k] != V - abs(X[k] - i) - abs(Y[k] - j)) flag = false;
      |                                                     ^
Language: C++

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(N) for (int i = 0; i < N; i++)

int main(){
    cin >> N; tuple<long long, long long, long long>G = make_tuple(-1, -1, -1);
	for (int i = 1; i <= N; i++) {
		cin >> X[i] >> Y[i] >> H[i];
		if (H[i] >= 1) G = make_tuple(X[i], Y[i], H[i]);
	}
	for (int i = 0; i <= 100; i++) {
		for (int j = 0; j <= 100; j++) {
			long long V = get<2>(G) + abs(get<0>(G) - i) + abs(get<1>(G) - j); V = max(V, 0LL); bool flag = true;
			for (int k = 1; k <= N; k++) {
				if (H[k] != V - abs(X[k] - i) - abs(Y[k] - j)) flag = false;
			}
			if (flag == true) cout << i << " " << j << " " << V << endl;
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'N' was not declared in this scope
    7 |     cin >> N; tuple<long long, long long, long long>G = make_tuple(-1, -1, -1);
      |            ^
a.cc:9:24: error: 'X' was not declared in this scope
    9 |                 cin >> X[i] >> Y[i] >> H[i];
      |                        ^
a.cc:9:32: error: 'Y' was not declared in this scope
    9 |                 cin >> X[i] >> Y[i] >> H[i];
      |                                ^
a.cc:9:40: error: 'H' was not declared in this scope
    9 |                 cin >> X[i] >> Y[i] >> H[i];
      |                                        ^
a.cc:16:37: error: 'H' was not declared in this scope
   16 |                                 if (H[k] != V - abs(X[k] - i) - abs(Y[k] - j)) flag = false;
      |                                     ^
a.cc:16:53: error: 'X' was not declared in this scope
   16 |                                 if (H[k] != V - abs(X[k] - i) - abs(Y[k] - j)) flag = false;
      |                                                     ^
a.cc:16:69: error: 'Y' was not declared in this scope
   16 |                                 if (H[k] != V - abs(X[k] - i) - abs(Y[k] - j)) flag = false;
      |                                                                     ^
Language: C++

#include<bits/stdc++.h> 
//#define <- プログラムの文字列を置換する
//typedef <- 新しい型に名前を付けるためのキーワード

using namespace std;

#define MAX_N 1
#define int long long

typedef long long ll;

const double pi = 3.141592653589793;
const long long MOD = 1e9 + 7;
const long long INF = 1e15;

struct point{
    pair<int,int> p;
    int h;
    point(int x, int y ,int H){
        p = make_pair(x,y);
        h = H;
    }
};

void main(){
    int N;
    cin >> N;
    vector<point> info;
    point ans(0,0,0);
    for(int i = 0; i < N; i++){
        int x,y,h;
        cin >> x >> y >> h;
        point temp(x,y,h);
        info.emplace_back(temp);
    } 
    for(int X  = 0; X <= 100 ; X++){
        for(int Y = 0; Y <= 100; Y++){
            int H = -1;
            int max_d = 0;
            bool flag = true;
            for(int i = 0; i < N; i++){
                int h = info[i].h;
                int x = info[i].p.first;
                int y = info[i].p.second;
                int D = abs(x - X) + abs(y - Y);
                if(h <= 0) max_d = max(max_d , D);
                else{
                    if(H < 0) H = h + D;
                    else if( H != h + D){
                        flag = false;
                        break;
                    } 
                }
            }
            if(flag && H - max_d >=0){
                cout << X << " " << Y << " " << H << endl;
                return;
            }
        }
    }
    return;
}


Compiler output:
a.cc:25:1: error: '::main' must return 'int'
   25 | void main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:57:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
   57 |                 return;
      |                 ^~~~~~
a.cc:61:5: error: return-statement with no value, in function returning 'int' [-fpermissive]
   61 |     return;
      |     ^~~~~~
Language: C++

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

int main() {
    long long N; cin >> N;
    vector<long long>X(N), Y(N), H(N);
    for (int i = 0; i < N; i++) {
        cin >> X.at(i) >> Y.at(i) >> H.at(i);
    }
    for (int i = 0; i <= 100; i++) {
        for (int j = 0; j <= 100; j++) {
            vector<long long>Height(N);
            for (int k = 0; k < N; k++) {
                Height.at(k) = H.at(k) + abs(X.at(k) - i) + abs(Y.at(k) - j);
            }
            bool check = true;
            for (int k = 0; k < N - 1; k++) {
                if (Height.at(k) != Height.at(k + 1)) check = false;
            }
            if (check) {
                cout << i << ' ' << j << ' ' << Height.at(0) << endl;
                return 0;
            }
       }
    }


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

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

int main() {
    long long N; cin >> N;
    vector<long long>X(N), Y(N), H(N);
    for (int i = 0; i < N; i++) {
        cin >> X.at(i) >> Y.at(i) >> H.at(i);
    }
    for (int i = 1; i <= 100; i++) {
        for (int j = 1; j <= 100; j++) {
            vector<long long>Height(N);
            for (int k = 0; k < N; k++) {
                Height.at(k) = H.at(k) + abs(X.at(k) - i) + abs(Y.at(k) - j);
            }
            bool check = true;
            for (int k = 0; k < N - 1; k++) {
                if (Height.at(k) != Height.at(k + 1)) check = false;
            }
            if (check) {
                cout << i << ‘ ‘ << j << ‘ ‘ << Height.at(0) << endl;
                return 0;
            }
       }
    }
}

Compiler output:
a.cc:21:30: error: extended character ‘ is not valid in an identifier
   21 |                 cout << i << ‘ ‘ << j << ‘ ‘ << Height.at(0) << endl;
      |                              ^
a.cc:21:32: error: extended character ‘ is not valid in an identifier
   21 |                 cout << i << ‘ ‘ << j << ‘ ‘ << Height.at(0) << endl;
      |                                ^
a.cc:21:42: error: extended character ‘ is not valid in an identifier
   21 |                 cout << i << ‘ ‘ << j << ‘ ‘ << Height.at(0) << endl;
      |                                          ^
a.cc:21:44: error: extended character ‘ is not valid in an identifier
   21 |                 cout << i << ‘ ‘ << j << ‘ ‘ << Height.at(0) << endl;
      |                                            ^
a.cc: In function 'int main()':
a.cc:21:30: error: '\U00002018' was not declared in this scope
   21 |                 cout << i << ‘ ‘ << j << ‘ ‘ << Height.at(0) << endl;
      |                              ^
Language: C++

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

int main(){
  ll N;cin>>N;
  vector<ll> x(N),y(N),h(N);rep(i,N) cin>>x[i]>>y[i]>>h[i];
  //中心i,j
  rep(i,101){
    rep(j,101){
      ll H;
      rep(k, N){
        if(h[k]!=0){
        H = abs(i-x[k])+abs(j-y[k])+h[k];
        break;
        }
      }
      bool flag=true;
      ll ans_h;
      rep(k, N){
        if(h[k]==0 && abs(i-x[k])+abs(j-y[k])<H){
          flag=false;
          break;
        }
        else if(h[k]>0 && abs(i-x[k])+abs(j-y[k])+h[k]!=H){
          flag=false;
          break;
        }
      }
      if(flag){ cout << i << " " <<  j << " " << H << endl;
    }
  }
}

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

#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <tuple>
using namespace std;
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define repd(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++)
#define repdm(i, a, b) for (ll i = (ll)(a); i > (ll)(b); i--)

int height(int H, int X, int Y, int Cx, int Cy)
{
  return H + abs(X - Cx) + abs(Y - Cy);
}

int main()
{

  int N;
  cin >> N;

  int x[N], y[N], h[N];

  rep(i, N) cin >> x[i] >> y[i] >> h[i];

  int MAX = 101;
  int l[MAX][MAX][N];

  repd(i, 0, MAX)
  {
    repd(j, 0, MAX)
    {
      int cnt = 1;
      int ansH = 0;

      rep(k, N)
      {
        int x0 = x[k];
        int y0 = y[k];
        int h0 = h[k];
        if (h0 <= 0)
        {
          cnt++;
          continue;
        }

        l[i][j][k] = height(h0, x0, y0, i, j);

        if (ansH == 0)
        {
          ansH = l[i][j][k];
          continue;
        }
        if (ansH != l[i][j][k])
          break;
        cnt++;
      }
      if (cnt == N)
      {
        flag = 1;
        rep(k, N)
        {
          if (ansH < h[k])
          {
            flag = 0;
          }
        }
        if (flag == 1)
        {
          cout << i << " " << j << " " << ansH << endl;
          return 0;
        }
      }
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:62:9: error: 'flag' was not declared in this scope
   62 |         flag = 1;
      |         ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <tuple>
using namespace std;
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define repd(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++)
#define repdm(i, a, b) for (ll i = (ll)(a); i > (ll)(b); i--)

int height(int H, int X, int Y, int Cx, int Cy)
{
  return H + abs(X - Cx) + abs(Y - Cy);
}

int main()
{

  int N;
  cin >> N;

  int x[N], y[N], h[N];

  rep(i, N) cin >> x[i] >> y[i] >> h[i];

  int MAX = 101;
  int l[MAX][MAX][N];

  repd(i, 0, MAX)
  {
    repd(j, 0, MAX)
    {
      int cnt = 1;
      int ansH = 0;

      rep(k, N)
      {
        int x0 = x[k];
        int y0 = y[k];
        int h0 = h[k];
        if (h0 <= 0)
        {
          cnt++;
          continue;
        }

        l[i][j][k] = height(h0, x0, y0, i, j);

        if (ansH == 0)
        {
          ansH = l[i][j][k];
          continue;
        }
        if (ansH != l[i][j][k])
          break;
        cnt++;
      }
      if (cnt == N)
      {
        flag = 1 rep(k, N)
        {
          if (ansH < h[k])
          {
            flag = 0;
          }
        }
        if (flag == 1)
        {
          cout << i << " " << j << " " << ansH << endl;
          return 0;
        }
      }
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:62:9: error: 'flag' was not declared in this scope
   62 |         flag = 1 rep(k, N)
      |         ^~~~
a.cc:62:22: error: 'k' was not declared in this scope
   62 |         flag = 1 rep(k, N)
      |                      ^
a.cc:9:34: note: in definition of macro 'rep'
    9 | #define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
      |                                  ^