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

#include<bits/stdc++.h>
using namespace std;
int main(void){
	int n;
	int x[101],y[101],h[101];
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>x[i]>>y[i]>>h[i];	
	}
	int height[101];
	bool flg,flg1;
	for(int i=0;i<101;i++){
		for(int j=0;j<101;j++){
			flg=false;
			flg1=false;
			int cnt=0;
			for(int k=0;k<n;k++){
				if(h[k]!=0){
					height[cnt]=abs(i-y[k])+abs(j-x[k])+h[k];
					cnt++;
				}
				else{
					flg1=true;
					height[cnt]=abs(i-y[k])+abs(j-x[k])+h[k];
					cnt++;
				}
			}
			int g;
			int l;
			if(flg1){
				for(int k=0;k<cnt;k++){
					if(k[k]!=0){
						g=height[k];
						l=k;
					}
				}
				for(int k=0;k<cnt;k++){
					if(l==k) continue;
					if(h[k]==0){
						if(g>height[k]){
							flg=true;
						}
						continue;
					}
					if(g!=height[k]) flg=true;
				}
			}
			else{
				for(int k=1;k<cnt;k++){
    				if(height[0]!=height[k]){
    					flg=true;
    				}
    			}
			}
			if(!flg){
				cout<<j<<" "<<i<<" "<<height[0];
				return 0;
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:45: error: invalid types 'int[int]' for array subscript
   32 |                                         if(k[k]!=0){
      |                                             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(void){
	int n;
	int x[101],y[101],h[101];
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>x[i]>>y[i]>>h[i];	
	}
	int height[101];
	bool flg,flg2;
	for(int i=0;i<101;i++){
		for(int j=0;j<101;j++){
			flg=false;
			flg1=false;
			int cnt=0;
			for(int k=0;k<n;k++){
				if(h[k]!=0){
					height[cnt]=abs(i-y[k])+abs(j-x[k])+h[k];
					cnt++;
				}
				else{
					flg1=true;
					height[cnt]=abs(i-y[k])+abs(j-x[k])+h[k];
					cnt++;
				}
			}
			int g;
			int l;
			if(flg1){
				for(k=0;k<cnt;k++){
					if(height[k]!=0){
						g=height[k];
						l=k;
					}
				}
				for(k=0;k<cnt;k++){
					if(l==k) continue;
					if(height[k]==0){
						if(g>height[k]){
							flg=true;
							continue;
						}
					}
					if(g!=height[k]) flg=true;
				}
			}
			else{
				for(int k=1;k<cnt;k++){
    				if(height[0]!=height[k]){
    					flg=true;
    				}
    			}
			}
			if(!flg){
				cout<<j<<" "<<i<<" "<<height[0];
				return 0;
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:25: error: 'flg1' was not declared in this scope; did you mean 'flg2'?
   15 |                         flg1=false;
      |                         ^~~~
      |                         flg2
a.cc:31:37: error: 'k' was not declared in this scope
   31 |                                 for(k=0;k<cnt;k++){
      |                                     ^
a.cc:37:37: error: 'k' was not declared in this scope
   37 |                                 for(k=0;k<cnt;k++){
      |                                     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(void){
	int n;
	int x[101],y[101],h[101];
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>x[i]>>y[i]>>h[i];	
	}
	int height[101];
	bool flg;
	for(int i=0;i<101;i++){
		for(int j=0;j<101;j++){
			flg=false;
			int cnt=0;
			for(int k=0;k<n;k++){
				height[k]=max(abs(i-y[k])+abs(j-x[k])+h[k],0);
				if(h[k]==0){
					height[k]=0;
				}
			}
			for(int k=0;k<n-1;k++){
				for(int l=k+1;l<n;l++){
					if(height[k]==0||height[l]==0) continue;
					if(height[k]!=height[l]){
						flg=true;
					}
			}
			if(!flg){
				cout<<j<<" "<<i<<" "<<height[0];
				return 0;
			}
		}
	}
	return 0;
}

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

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

typedef long long ll;

int main() {
	int n;
	cin >> n;
	
	ll x[100], y[100], h[100];
	for(int i = 0; i < n; i++){
		cin >> x[i] >> y[i] >> h[i];
	}
	
	for(int i = 0; i <= 100; i++){
		for(int j = 0; j <= 100; j++){
			bool flag = true;
			ll ansh = h[0] + abs(i - x[k]) + abs(j - y[k]);
			for(int k = 1; k < n; k++){
				if(h[k] + abs(i - x[k]) + abs(j - y[k]) != ansh){
					flag = false;
					break;
				}
			}
			if(flag){
				cout << i << " " << j << " " << ansh << endl;
				return 0;
			}
		}
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:52: error: 'k' was not declared in this scope
   19 |                         ll ansh = h[0] + abs(i - x[k]) + abs(j - y[k]);
      |                                                    ^
Language: C++

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

typedef long long ll;

int main() {
	int n;
	cin >> n;
	
	ll x[100], y[100], h[100];
	for(int i = 0; i < n; i++){
		cin >> x[i] >> y[i] >> h[i];
	}
	
	for(int i = 0; i <= 100; i++){
		for(int j = 0; j <= 100; j++){
			bool flag = true;
			ll ansh = h[k] + abs(i - x[k]) + abs(j - y[k]);
			for(int k = 0; k < n; k++){
				if(h[k] + abs(i - x[k]) + abs(j - y[k]) != ansh){
					flag = false;
					break;
				}
			}
			if(flag){
				cout << i << " " << j << " " << ansh << endl;
				return 0;
			}
		}
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:37: error: 'k' was not declared in this scope
   19 |                         ll ansh = h[k] + abs(i - x[k]) + abs(j - y[k]);
      |                                     ^
Language: C++

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <numeric>
using namespace std;
typedef long long unsigned int ll;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

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

int main() {
  int n;
  cin >> n;
  vector<int> xv(n), yv(n);
  vector<ll> hv(n);
  REP(i, n) {
    cin >> xv[i] >> yv[i] >> hv[i];
  }
  ll h;
  ll tmp;
  bool flag = true;
  int tmpx, tmpy;
  REP(cx, 101) {
    REP(cy, 101) {
      flag = true;
      REP(i, n) if (hv[i] != 0) tmp = hv[i] + abs(xv[i] - cx) + abs(yv[i] - cy);
      REP(i, n) {
        if ((hv[i] + abs(xv[i] - cx) + abs(yv[i] - cy)) != tmp && hv[i] =! 0) flag = false;
      }
      if (flag) {
        h = tmp;
        tmpx = cx;
        tmpy = cy;
      }
    }
  }
  cout << tmpx << " " << tmpy << " " << h << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:43:64: error: lvalue required as left operand of assignment
   43 |         if ((hv[i] + abs(xv[i] - cx) + abs(yv[i] - cy)) != tmp && hv[i] =! 0) flag = false;
Language: C


#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <math.h>
typedef long long int ll;
#define mod 1000000007
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define m0(x) memset(x,0,sizeof(x))

int main(void){
	int n,i,j;
	scanf("%d",&n);
	int x[n],y[n],h[n];

	rep(i,n){
		scanf("%d %d %d",&x[i],&y[i],&h[i]);
	}
	int htmp[n],flag,hmax;
	m0(htmp);
	for(i=0;i<101;i++){
		for(j=0;j<101;j++){
			flag=0;
			for(k=0;k>n&&h[k]==0;k++);
			hmax=h[k]+abs(i-x[k])+abs(j-y[k]);
			rep(k,n){
				htmp[k]=hmax-abs(i-x[k])-abs(j-y[k]);
				if(htmp[k]<0) {
					htmp[k]=0;				
				}
			}
			rep(k,n){
				if(htmp[k]!=h[k]){
					flag++;
				}
			}
			if(flag==0) goto end;
			
		}
	}

end:
	printf("%d %d %d",i,j,hmax );
	return 0;
	
}

Compiler output:
main.c: In function 'main':
main.c:26:29: error: 'k' undeclared (first use in this function)
   26 |                         for(k=0;k>n&&h[k]==0;k++);
      |                             ^
main.c:26:29: note: each undeclared identifier is reported only once for each function it appears in
Language: C++


			for (k = 0; k < n; k++) {
				delta_x = abs(x[k] - i);
				delta_y = abs(y[k] - j);
				long temp_ch = h[k] + delta_x + delta_y;
				if (temp_ch < ch ) {
					ch = temp_ch;
				}
				else if (h[k] == 0) {
					continue;
				}
				else {
					break;
				}
			}

Compiler output:
a.cc:2:25: error: expected unqualified-id before 'for'
    2 |                         for (k = 0; k < n; k++) {
      |                         ^~~
a.cc:2:37: error: 'k' does not name a type
    2 |                         for (k = 0; k < n; k++) {
      |                                     ^
a.cc:2:44: error: 'k' does not name a type
    2 |                         for (k = 0; k < n; k++) {
      |                                            ^
Language: C

#include<stdio.h>
int a[100][3]={0};
int b[100];

int main()
{
    int n,x,y,h;
    scanf("%d",&n);
    for(int i=0;i<n;i++) scanf("%d%d%d",&a[i][0],&a[i][1],&a[i][2]);
    int i,j,ok;
    if(n==1)
    {
        printf("%d %d %d",a[0][0],a[0][1],a[0][2]);
        return 0;
    }
    for(i=0;i<=100;i++){
        for(j=0;j<=100;j++)
    {
        ok=1;
        if(a[0][0]!=i)
        {
            if(a[0][1]>=j)
            {
                if(a[0][0]>i) b[0]=a[0][1]+a[0][0]-i;
                else b[0]=a[0][1]+i-a[0][0];
                h=a[0][2]+b[0]-j;
            }
            else
            {
                if(a[0][0]>i) b[0]=a[0][1]-a[0][0]+i;
                else b[0]=a[0][1]-i+a[0][0];
                h=a[0][2]+j-b[0];
            }
        }
        else h=a[0][2]+((j>a[0][1])?j-a[0][1]:a[0][1]-j);
        for(int index=1;index<n;index++)
        {
            int t;
            if(a[index][0]!=i)
            {
                if(a[index][1]>=j)
                {
                    if(a[index][0]>i) b[index]=a[index][1]+a[index][0]-i;
                    else b[index]=a[index][1]+i-a[index][0];
                    t=a[index][2]+b[index]-j;
                }
                else
                {
                    if(a[index][0]>i) b[index]=a[index][1]-a[index][0]+i;
                    else b[index]=a[index][1]-i+a[index][0];
                    t=a[index][2]+j-b[index];
                }
            }
            else t=a[index][2]+((j>a[index][1])?j-a[index][1]:a[index][1]-j);
            if(a[index][2]) {if(h!=t) ok=0;}
            else {if(h>j-b=[index]&&h>=b[index]-j) ok=0;}
        }
        if(ok) break;
    }if(ok) break;}
    printf("%d %d %d",i,j,h);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:56:25: error: invalid operands to binary - (have 'int' and 'int *')
   56 |             else {if(h>j-b=[index]&&h>=b[index]-j) ok=0;}
      |                         ^
      |                         |
      |                         int *
main.c:56:28: error: expected expression before '[' token
   56 |             else {if(h>j-b=[index]&&h>=b[index]-j) ok=0;}
      |                            ^
Language: C++

#include <iostream>
#include <string>
#include <stdlib.h>
#include <vector>
#include <algorithm>
#include <cmath>

using namespace std;

int main()
{
	int n;
	int cx,cy;
	long ch;
	

	cin >> n;

	int *x = new int[n];
	int *y = new int[n];
	long *h = new long[n];

	for (int i = 0; i < n; i++) {
		cin >> x[i] >> y[i] >> h[i];
	}

	bool find;
	for (int i = 0; i <= 100; i++) {
		for (int j = 0; j <= 100; j++) {
			cx = i;
			cy = j;
			int delta_x;
			int delta_y;
			int delta_h;
			find = false;
			ch = LONG_MAX;
			int k;
			for (k = 0; k < n; k++) {
				if (ch != -1) {
					delta_x = abs(x[k] - i);
					delta_y = abs(y[k] - j);
					long temp_ch = h[k] + delta_x + delta_y;
					if (temp_ch <= ch) {
						ch = temp_ch;
					}
					else {
						break;
					}
				}
			}
			if (k == n) {
				find = true;
				break;
			}
		}
		if (find) {
			break;
		}
	}
	cout << cx << " " << cy << " " << ch << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:36:30: error: 'LONG_MAX' was not declared in this scope
   36 |                         ch = LONG_MAX;
      |                              ^~~~~~~~
a.cc:7:1: note: 'LONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    6 | #include <cmath>
  +++ |+#include <climits>
    7 |
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:17:65: error: expected ')' before '{' token
   17 |                 if ((H != h[i]+abs(x[i]-Cx)+abs(y[i]-Cy) || H<1)
      |                    ~                                            ^
      |                                                                 )
   18 |                 {
      |                 ~                                                
main.c:22:13: error: expected expression before '}' token
   22 |             }
      |             ^
Language: C++

#include <iostream>
#include <algorithm>
#include <string>
#include <math.h>
#include <vector>
#include <map>

using namespace std;


vector<int> solve(vector<vector<int>> points){
    int x, y, h;
    for (int i=0; i <= 100; i++){
        for (int j=0; j <= 100; j++){
            h = points[0][2] + abs(points[0][0] - i) + abs(points[0][1] - j);
            for (int k = 1; k < points.size(); k ++) {
                if (h - abs(i - points[k][0]) - abs(j - points[k][1]) != points[k][2]) {
                    h = -1;
                    break;
                }
            }
            if (h >= 0){
                x = i;
                y = j;
                break;
            }
        }
        if (h >= 0) break;
    }

    return vector<int>({x, y, h});
}

int main() {
    int N;
    int x, y, h;
    cin >> N;
    vector<vector<int>> points;
    for (int i=0; i < N; i++){
        cin >> x >> y >> h;
        points.push_back(vector<int>{x, y, h});
    }

    vector<int> ans = solve(points);

    cout << ans[0] << " " << ans[1] << " " << ans[2] << endl;


    return 0;
}  return vector<int>({x, y, h});
}

Compiler output:
a.cc:50:4: error: expected unqualified-id before 'return'
   50 | }  return vector<int>({x, y, h});
      |    ^~~~~~
a.cc:50:32: error: expected unqualified-id before ')' token
   50 | }  return vector<int>({x, y, h});
      |                                ^
a.cc:51:1: error: expected declaration before '}' token
   51 | }
      | ^
Language: Java

import java.util.*;
import static java.lang.Math.*;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] xyh = new int[300];
		
		for (int i=0; i<n; i++) {
			xyh[i*3] = sc.nextInt();
			xyh[i*3+1] = sc.nextInt();
			xyh[i*3+2] = sc.nextInt();
		}
		
		for (int i=0; i<=100; i++) {
			LOOP1:for (int j=0; j<=100; j++) {
				int h = Math.abs(i, xyh[0]) + Math.abs(j, xyh[1]) + xyh[2];
				
				for (int k=1; k<n; k++) {
					int dx = Math.abs(i, xyh[k*3]);
					int dy = Math.abs(j, xyh[k*3+1]);
					if (h != dx + dy + xyh[k*3+2]) {
						break LOOP1;
					}
				}
				System.out.println(i + " " + j + " " + h);
			}
		}
		
	}
}

Compiler output:
Main.java:18: error: no suitable method found for abs(int,int)
				int h = Math.abs(i, xyh[0]) + Math.abs(j, xyh[1]) + xyh[2];
				            ^
    method Math.abs(int) is not applicable
      (actual and formal argument lists differ in length)
    method Math.abs(long) is not applicable
      (actual and formal argument lists differ in length)
    method Math.abs(float) is not applicable
      (actual and formal argument lists differ in length)
    method Math.abs(double) is not applicable
      (actual and formal argument lists differ in length)
Main.java:18: error: no suitable method found for abs(int,int)
				int h = Math.abs(i, xyh[0]) + Math.abs(j, xyh[1]) + xyh[2];
				                                  ^
    method Math.abs(int) is not applicable
      (actual and formal argument lists differ in length)
    method Math.abs(long) is not applicable
      (actual and formal argument lists differ in length)
    method Math.abs(float) is not applicable
      (actual and formal argument lists differ in length)
    method Math.abs(double) is not applicable
      (actual and formal argument lists differ in length)
Main.java:21: error: no suitable method found for abs(int,int)
					int dx = Math.abs(i, xyh[k*3]);
					             ^
    method Math.abs(int) is not applicable
      (actual and formal argument lists differ in length)
    method Math.abs(long) is not applicable
      (actual and formal argument lists differ in length)
    method Math.abs(float) is not applicable
      (actual and formal argument lists differ in length)
    method Math.abs(double) is not applicable
      (actual and formal argument lists differ in length)
Main.java:22: error: no suitable method found for abs(int,int)
					int dy = Math.abs(j, xyh[k*3+1]);
					             ^
    method Math.abs(int) is not applicable
      (actual and formal argument lists differ in length)
    method Math.abs(long) is not applicable
      (actual and formal argument lists differ in length)
    method Math.abs(float) is not applicable
      (actual and formal argument lists differ in length)
    method Math.abs(double) is not applicable
      (actual and formal argument lists differ in length)
4 errors
Language: Java

import java.util.*;
import java.lang.Math;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] xyh = new int[300];
		
		for (int i=0; i<n; i++) {
			xyh[i*3] = sc.nextInt();
			xyh[i*3+1] = sc.nextInt();
			xyh[i*3+2] = sc.nextInt();
		}
		
		for (int i=0; i<=100; i++) {
			LOOP1:for (int j=0; j<=100; j++) {
				int h = Math.abs(i, xyh[0]) + Math.abs(j, xyh[1]) + xyh[2];
				
				for (int k=1; k<n; k++) {
					int dx = Math.abs(i, xyh[k*3]);
					int dy = Math.abs(j, xyh[k*3+1]);
					if (h != dx + dy + xyh[k*3+2]) {
						break LOOP1;
					}
				}
				System.out.println(i + " " + j + " " + h);
			}
		}
		
	}
}

Compiler output:
Main.java:18: error: no suitable method found for abs(int,int)
				int h = Math.abs(i, xyh[0]) + Math.abs(j, xyh[1]) + xyh[2];
				            ^
    method Math.abs(int) is not applicable
      (actual and formal argument lists differ in length)
    method Math.abs(long) is not applicable
      (actual and formal argument lists differ in length)
    method Math.abs(float) is not applicable
      (actual and formal argument lists differ in length)
    method Math.abs(double) is not applicable
      (actual and formal argument lists differ in length)
Main.java:18: error: no suitable method found for abs(int,int)
				int h = Math.abs(i, xyh[0]) + Math.abs(j, xyh[1]) + xyh[2];
				                                  ^
    method Math.abs(int) is not applicable
      (actual and formal argument lists differ in length)
    method Math.abs(long) is not applicable
      (actual and formal argument lists differ in length)
    method Math.abs(float) is not applicable
      (actual and formal argument lists differ in length)
    method Math.abs(double) is not applicable
      (actual and formal argument lists differ in length)
Main.java:21: error: no suitable method found for abs(int,int)
					int dx = Math.abs(i, xyh[k*3]);
					             ^
    method Math.abs(int) is not applicable
      (actual and formal argument lists differ in length)
    method Math.abs(long) is not applicable
      (actual and formal argument lists differ in length)
    method Math.abs(float) is not applicable
      (actual and formal argument lists differ in length)
    method Math.abs(double) is not applicable
      (actual and formal argument lists differ in length)
Main.java:22: error: no suitable method found for abs(int,int)
					int dy = Math.abs(j, xyh[k*3+1]);
					             ^
    method Math.abs(int) is not applicable
      (actual and formal argument lists differ in length)
    method Math.abs(long) is not applicable
      (actual and formal argument lists differ in length)
    method Math.abs(float) is not applicable
      (actual and formal argument lists differ in length)
    method Math.abs(double) is not applicable
      (actual and formal argument lists differ in length)
4 errors
Language: C++

#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<string>
#include<algorithm>
#include<map>
#include<vector>
#include<random>
using namespace std;

int n;
int x[1000],y[1000],h[1000];
int Cx,Cy;
int H[1000];
void init()
{
    scanf("%d",&n);
    for (int i=0; i<n; ++i)
        scanf("%d %d %d",&x[i],&y[i],&h[i]);

}

void work()
{
    for (Cx=0; Cx<=100; ++Cx)
        for (Cy=0; Cy<=100; ++Cy)
        {
            int flag=1,Htmp=0,firstHFlag=0;
            for (int i=0; i<n; ++i)
            {
                if (h[i]>0)
                {
                    int HCheck=h[i]+abs(Cx-x[i])+abs(Cy-y[i]);
                    if (firstHFlag==0)
                    {
                        firstHFlag=1;
                        Htmp=HCheck;
                    }else if(HCheck!=Htmp)
                    {
                        flag=0;
                        break;
                    }
                }else
                {
                    if (firstHFlag==1 && Htmp-abs(x[i]-Cx)-abs(y[i]-Cy)>0)
                    {
                        flag=0;
                        break;
                    }
                }
            }
            if(flag&&H>=1) printf("%d %d %d\n",Cx,Cy,Htmp);
        }
}


int main()
{
    init();
    work();

    return 0;
}



Compiler output:
a.cc: In function 'void work()':
a.cc:54:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   54 |             if(flag&&H>=1) printf("%d %d %d\n",Cx,Cy,Htmp);
      |                      ~^~~
Language: C++

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

const int INF = pow(2, 31) - 1;
#define ll long long
#define DEBUG(x) cout << "DEBUG>" << #x << ":" << x << endl;
#define REP(i,n) for(ll i=0;i<(n);i++)
#define FOR(i,a,b) for(ll i=(a);i<=(b);i++)
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}

int main() {
  ll N;
  cin >> N;
  vector<ll> x(N), y(N), h(N);
  REP(i, N) {
    cin >> x[i] >> y[i] >> h[i];
  }
  ll x_pr, y_pr, h_pr;
  REP(i, N) {
    if(h[i] > 0) {
      x_pr = x[i];
      y_pr = y[i];
      h_pr = h[i];
      break;
    }
  }
  FOR(cx, 0, 100) {
    FOR(cy, 0, 100) {
      int H = h_pr + abs(x_pr - cx) + abs(y_pr - cy);
      bool flag = true;
      REP(i, N) {
        if(max(0, H - abs(x[i] - cx) - abs(y[i] - cy)) != h[i]) {
          flag = false;
          break;
        }
      }
      if(flag == true) {
        cout << cx << " " << cy << " " << H << endl;
        return 0;
      }
    }
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:15: error: no matching function for call to 'max(int, long long int)'
   34 |         if(max(0, H - abs(x[i] - cx) - abs(y[i] - cy)) != h[i]) {
      |            ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:34:15: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   34 |         if(max(0, H - abs(x[i] - cx) - abs(y[i] - cy)) != h[i]) {
      |            ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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
Language: C


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <ctype.h>
#include <limits.h>
#define inf (INT_MAX-1)
#define INF 9223372036854775807
#define sq(n) ((n)*(n))
#define rep(i,n) for(i=0;i<n;i++)
#define rev(i,n) for(i=n-1;i>=0;i--)
#define sort(a,n) qsort(a,n,sizeof(int),cmp)
#define sort_r(a,n) qsort(a,n,sizeof(TYPE),cmp_r);
#define chsort(s,n) qsort(s,n,sizeof(char),cmp)
#define chsort_r(s,n) qsort(s,n,sizeof(char),char_cmp_r);
#define TYPE long long
#define MEMSET(a) memset(a,0,sizeof(a))
const int mod=(int)1e09+7;

int in(void){
    int i;scanf("%d",&i);
    return i;
}
double din(void){
    double i;scanf("%lf",&i);
    return i;
}
void chin(char s[]){
    scanf("%s",s);
}
void print(int a){
    printf("%d\n",a);
}
void llprint(long long a){
    printf("%lld\n",a);
}
void dprint(double a){
    printf("%.10f\n",a);
}
void print2(int a,int b){
    printf("%d %d\n",a,b);
}
double dmax(double a,double b){
    return a>b?a:b;
}
int cmp(const void *a,const void *b){
    return *(TYPE *)a-*(TYPE *)b;
}
int cmp_r(const void *a,const void *b){
    return *(TYPE *)b-*(TYPE *)a;
}
int char_cmp(const void *a,const void *b){
    return strcmp((char *)a,(char *)b);
}
int char_cmp_r(const void *a,const void *b){
    return strcmp((char *)b,(char *)a);
}
void swap(int *a,int *b){
    int t=*a;
    *a=*b;
    *b=t;
}
int max(int x,int y){
    if(x>y)return x;
    else return y;
}

int min(int x,int y){
    if(x>y)return y;
    else return x;
}

int main(void){
    int i=0,j,k,l=0,n=in(),x[n],y[n],z[n],h[n],cx=0,cy=0,height;
    rep(i,n){
        x[i]=in();
        y[i]=in();
        h[i]=in();
    }
    i=0;
    while(1){
        if(h[i]!=0)break;
        i++;
    }
    while(1){
        while(1){
            height=h[i]+abs(x[i]-cx)+abs(y[i]-cy);
            rep(j,n){
                if((h[j]+abs(x[j]-cx)+abs(y[j]-cy))==height)k=0;
                else if(h[j]!=0||(h[j]==0&&height<h[j]+abs(x[j]-cx)+abs(y[j]-cy)){
                    k=1;
                    break;
                }
            }
            if(k==0) break;
            else cy++;
            if(cy==101){
                cy=0;
                break;
            }
        }
        if(k==0) break;
        else cx++;
    }
    printf("%d %d %d\n",cx,cy,height);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:91:82: error: expected ')' before '{' token
   91 |                 else if(h[j]!=0||(h[j]==0&&height<h[j]+abs(x[j]-cx)+abs(y[j]-cy)){
      |                        ~                                                         ^
      |                                                                                  )
main.c:95:13: error: expected expression before '}' token
   95 |             }
      |             ^
Language: C

#include<stdio.h>
int main(){
  int a,b,n;
  scanf("%d",&n);
  if(n==1)puts("Hello World");
  else{
      scanf("%d%d",&a,&b);
      printf("%d\n",a+b);
  }
  return 0;
}
17t4022f@usv:cat c.c
#include<stdio.h>
int main(){
  int n;
  scanf("%d",&n);
  int x[n],y[n],h[n];
  int i;
  for(i=0;i<n;i++){
    scanf("%d%d%d",&x[i],&y[i],&h[i]);
  }
  int ansx,ansy,ansh;
  for(ansx=0;ansx<=100;ansx++){
    for(ansy=0;ansy<=100;ansy++){
      ansh=abs(ansx-x[0])+abs(ansy-y[0])+h[0];
      for(i=0;i<n;i++){
        if(ansh!=abs(ansx-x[i])+abs(ansy-y[i])+h[i])break;
      }
      if(i==n){
        printf("%d %d %d\n",ansx,ansy,ansh);
        return 0;
      }
    }
  }
  return 0;
}

Compiler output:
main.c:12:1: error: invalid suffix "t4022f" on integer constant
   12 | 17t4022f@usv:cat c.c
      | ^~~~~~~~
main.c:12:1: error: expected identifier or '(' before numeric constant
main.c:12:9: error: stray '@' in program
   12 | 17t4022f@usv:cat c.c
      |         ^
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
  int N;
  cin >> N;
  long long x[105], y[105], h[105];
  long long ans[105][105] = {0};
  for(int i = 0; i < N; i++){
    cin >> x[i] >> y[i] >> h[i];
  }

  int flag = 0;
  for(int k = 0; k < N; k++){
    if(h[k] == 0) continue;
    for(int i = 0; i <= 100; i++){
      for(int j = 0; j <= 100; j++){
        long long H;
        //H = max( abs(x[k] - i) + abs(y[k] - j) + h[k], 0LL);//中心座標 i, jで高さH k番目の情報
        H =abs(x[k] - i) + abs(y[k] - j) + h[k];
        if(flag == 0){
          ans[i][j] = H;
        }else{
          if(ans[i][j] == H){

          }else{
            ans[i][j] = -1;
          }
        }
      }
    }
    flag = 1;
  }
  for (int k = 0;k < N; ++k){
    for(int i = 0; i <= 100; i++){
      for(int j = 0; j <= 100; j++){
        if(h[k] == 0){
          if((abs(x[k] - i) + abs(y[k] - j)) < a[i][j]){
            ans[i][j] = -1;
          }
        }
      }
    }
  }
  for(int i = 0; i <= 100; i++){
    for(int j = 0; j <= 100; j++){
      if(ans[i][j] != -1){
        cout << i << " " << j << " " << ans[i][j] << endl;
      }
    }
  }

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:48: error: 'a' was not declared in this scope
   38 |           if((abs(x[k] - i) + abs(y[k] - j)) < a[i][j]){
      |                                                ^
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
    int N;
    cin >> N;
    long long x[105], y[105], h[105];
    long long ans[105][105] = {0};
    for(int i = 0; i < N; i++){
        cin >> x[i] >> y[i] >> h[i];
    }

    int flag = 0;
    for(int k = 0; k < N; k++){
        if(h[k] == 0) continue;
        for(int i = 0; i <= 100; i++){
            for(int j = 0; j <= 100; j++){
                long long H;
                //H = max( abs(x[k] - i) + abs(y[k] - j) + h[k], 0LL);//中心座標 i, jで高さH k番目の情報
                H =abs(x[k] - i) + abs(y[k] - j) + h[k];
                if(flag == 0){
                    ans[i][j] = H;
                }else{
                    if(ans[i][j] == H){

                    }else{
                        ans[i][j] = -1;
                    }
                }
            }
        }
        flag = 1;
    }
    for (int k = 0;k < N; ++k){
        for(int i = 0; i <= 100; i++){
            for(int j = 0; j <= 100; j++){
                if(h[k] == 0){
                    if(abs(x[k] - i) + abs(y[k] - j) < H){
                        ans[i][j] = -1;
                    }
                }
            }
        }
    }
    for(int i = 0; i <= 100; i++){
        for(int j = 0; j <= 100; j++){
            if(ans[i][j] != -1){
                cout << i << " " << j << " " << ans[i][j] << endl;
            }
        }
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:56: error: 'H' was not declared in this scope
   38 |                     if(abs(x[k] - i) + abs(y[k] - j) < H){
      |                                                        ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cstdio>

#define rep(i, n) for(int i = 0;i < (int)(n); i++)
#define pb push_back
#define INF 999999999
typedef long long ll;
using namespace std;


int main() {
    int n;
    cin >> n;
    vector<int> x(n);
    vector<int> y(n);
    vector<ll> h(n);
    rep(i, n) {
        cin >> x[i] >> y[i] >> h[i];
    }
    rep(i, 101) {
        rep(j, 101) {
            ll height = h[0] + abs(max(i, x[0]) - min(i, x[0])) + abs(max(j, y[0]) - min(j, y[0]));
            rep(k, n) {
                if (height != h[k] + abs(max(i, x[k]) - min(i, x[k])) + abs(max(j, y[k]) - min(j, y[k]))) {
                    height = -INF;
                    break;
                }
            }
            if(height == -INF) continue;

            rep(k,n){
                if(h[k] == 0){
                    if(height > abs(max(i, x[k]) - min(i, x[k])) + abs(max(j, y[k]) - min(j, y[k])){
                        height = -INF;
                        break;
                    }
                }
            }
            if(height == -INF) continue;
            cout << i << " " << j << " " << height << endl;
            return 0;
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:100: error: expected ')' before '{' token
   36 |                     if(height > abs(max(i, x[k]) - min(i, x[k])) + abs(max(j, y[k]) - min(j, y[k])){
      |                       ~                                                                            ^
      |                                                                                                    )
a.cc:40:17: error: expected primary-expression before '}' token
   40 |                 }
      |                 ^
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
  int N;
  cin >> N;
  long long x[105], y[105], h[105];
  long long ans[101][101] = {0};
  for(int i = 0; i < N; i++){
    cin >> x[i] >> y[i] >> h[i];
  }

  int flag = 0;
  for(int k = 0; k < N; k++){
    for(int i = 0; i <= 100; i++){
      for(int j = 0; j <= 100; j++){
        long long H;
        H = max((abs(x[k] - i) + abs(y[k] - j) + h[k], 0LL);//中心座標 i, jで高さH k番目の情報
        if(flag == 0){
          ans[i][j] = H;
        }else{
          if(ans[i][j] == H){

          }else{
            ans[i][j] = -1;
          }
        }
      }
    }
    flag = 1;
  }
  for(int i = 0; i <= 100; i++){
    for(int j = 0; j <= 100; j++){
      if(ans[i][j] != -1){
        cout << i << " " << j << " " << ans[i][j] << endl;
      }
    }
  }

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:60: error: expected ')' before ';' token
   18 |         H = max((abs(x[k] - i) + abs(y[k] - j) + h[k], 0LL);//中心座標 i, jで高さH k番目の情報
      |                ~                                           ^
      |                                                            )
Language: C++

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

int main(){
	int n;
	vector<int> x_i(N),y_i(N),h_i(N);
	
	scanf("%d",&n);
	for (int i=0;i<n;i++){
		scanf("%d %d %d",&x[i],&y[i],&h[i]);
	}
	
	vector< pair<int,int> > candinate;

	// 中心座標を全探索する
	for (int y=0;y<=100;y++){
		for(int x=0;x<=100;x++){
			// Cx=x,Cy=yだったなら、hはどうなるか逆算
			// 探索済み >= 0
			// 未探索   = -1
			// 矛盾あり = -2
			int flg = -1;
			for(int a=0;a<n;a++){
				if (h[a]!=0){
					int h_temp = h+abs(x_i[a]-x)+abs(y_i[a]-y);;
					if (h_temp=-1) flg=h_temp;
					else if(h_temp!=flg){
						flg=-2;
						break;
					} 
				}
			}
			if (flg!=-2)
				candinate.push_back(make_pair(x,y));
		}
	}

	for (vector< pair<int,int> >::iterator ite=candinate.begin();ite!=candinate.end();ite++){
		printf("(%d,%d) ",ite->first,ite->second);
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:35: error: 'x' was not declared in this scope
   11 |                 scanf("%d %d %d",&x[i],&y[i],&h[i]);
      |                                   ^
a.cc:11:41: error: 'y' was not declared in this scope
   11 |                 scanf("%d %d %d",&x[i],&y[i],&h[i]);
      |                                         ^
a.cc:11:47: error: 'h' was not declared in this scope
   11 |                 scanf("%d %d %d",&x[i],&y[i],&h[i]);
      |                                               ^
a.cc:25:37: error: 'h' was not declared in this scope
   25 |                                 if (h[a]!=0){
      |                                     ^
Language: C++

#include <iostream>
#include <string>
#include <cstdlib>
using namespace std;
int main(){
    int N;
    cin >> N;
    int x[120],y[120],h[120];
    int j,k,l;
    int q;
    l = 0;
    for(int i=1;i<=N;i++){
        cin >> x[i] >> y[i] >> h[i];
        if(h[i]>=l){
            j = x[1];
            k = y[1];
            l = h[1];
        }
        
    }

    for(int a=0;a<=100;a++){
        for(int b=0;b<=100;b++){
            q = (abs(a-j)+abs(b-k)+l);
            for(int u=1;u<=N;u++){
                if(q != abs(a-x[u]) + abs(b-y[u]) + h[u]){
                    break;
                }
                if(u == N){
                    cout << a << " " << b << " " << q << endl;
                    return 0;
                }
                
            }
                
            }
            }
            
        

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

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

int main() {
  int N;
  cin >> N;
  long long ht=0;
  bool jg=false;
  int num;
  vector<long long> x(110);
  vector<long long> y(110);
  vector<long long> h(110);
  for(int i=0;i<N;i++){
    cin >> x[i] >> y[i]  >> h[i];
  }


  for(int nx=0;nx<=100;nx++) {
    for(int ny=0;ny<=100;ny++) {
      num=1,ht=0;

      for(int i=0;i<N;i++) {
        jg=true;
        //cout << ht << " " << (int)(ht-fabs(x[i]-nx)-fabs(y[i]-ny)) << endl;
        if(h[i]!=0 /*&& num==1*/) {
          ht=h[i]+fabs(x[i]-nx)+fabs(y[i]-ny);
          //num--;
          break
        }
      }
      for(int l=0;l<N;l++){
        if(ht!=0){
          if(h[l]!=max((int)(ht-fabs(x[l]-nx)-fabs(y[l]-ny)),0)) {
            jg=false;
            break;
          }
        }
      }
      if(jg){
        cout << nx << " " << ny << " " << ht << endl;
        return 0;
      }
    }
  }
}

        

        


Compiler output:
a.cc: In function 'int main()':
a.cc:28:16: error: expected ';' before '}' token
   28 |           break
      |                ^
      |                ;
   29 |         }
      |         ~
Language: C++

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

int main() {
  int N;
  cin >> N;
  long long ht=0;
  bool jg=false;
  int num;
  vector<long long> x(110);
  vector<long long> y(110);
  vector<long long> h(110);
  for(int i=0;i<N;i++){
    cin >> x[i] >> y[i]  >> h[i];
  }


  for(int nx=0;nx<=100;nx++) {
    for(int ny=0;ny<=100;ny++) {
      num=1,ht=0;

      for(int i=0;i<N;i++) {
        jg=true;
        //cout << ht << " " << (int)(ht-fabs(x[i]-nx)-fabs(y[i]-ny)) << endl;
        if(h[i]!=0 /*&& num==1*/) {
          ht=h[i]+fabs(x[i]-nx)+fabs(y[i]-ny);
          //num--;
          break
        }
      }
      for(int l=0;l<N;l++){
        if(ht!=0){
          if(h[i]!=max((int)(ht-fabs(x[i]-nx)-fabs(y[i]-ny)),0)) {
            jg=false;
            break;
          }
        }
      }
      if(jg){
        cout << nx << " " << ny << " " << ht << endl;
        return 0;
      }
    }
  }
}

        

        


Compiler output:
a.cc: In function 'int main()':
a.cc:28:16: error: expected ';' before '}' token
   28 |           break
      |                ^
      |                ;
   29 |         }
      |         ~       
a.cc:33:16: error: 'i' was not declared in this scope
   33 |           if(h[i]!=max((int)(ht-fabs(x[i]-nx)-fabs(y[i]-ny)),0)) {
      |                ^
Language: C++

#include<cstdio>
#include<cstdlib>
using namespace std;

int main(){
		int n;
		int x[100],y[100];
		unsigned long H;
		unsigned long h[100];

		scanf("%d",&n);
		for(int i=0 ; i<n ; ++i){
				scanf("%d %d %lu",&x[i],&y[i],&h[i]);
		}

		for(int i=0 ; i<=100 ; ++i){
				for(int j=0 ; j<=100 ; ++j){
						H = 0;
						for(int k=0 ; k<n ; ++k){
										if(H == 0){
												if(h[k] != 0){
														H = h[k] + abs(x[k] - i) + abs(y[k] - j);
												}
										else{
												if(H != max(h[k] + abs(x[k] - i) + abs(y[k] - j),0)) break;
												if(k == n-1){
														printf("%d %d %lu\n",i,j,H);
														return 0;
												}
								}
						}




				}
		}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:105: error: 'max' was not declared in this scope
   25 |                                                                                                 if(H != max(h[k] + abs(x[k] - i) + abs(y[k] - j),0)) break;
      |                                                                                                         ^~~
a.cc:39:2: error: expected '}' at end of input
   39 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;

int main(){
  int N;
  cin >> N;
  vector<int> x(N), y(N), h(N);
  for (int i=0;i<N;i++){
    cin >> x[i] >> y[i] >> h[i] ;

  }

  int MAX = 100;
  for(int posY = 0; posY <= MAX; posY++){
    for(int posX =0;posX <= MAX;posX++){
      int needH =-1;

      
      for( int i = 0; i < N; i++)
      {
        if (h[i]>0){
          int tmp =h[i] +abs (posY - y[i + abs(posX-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 = abs(posY - y[i] + abs(posX - x[i]);
          if (needH >dist){
            needH = -2;
            break;
          }
        }

      }
      if(needH == -2)continue;
      cout << posX << " " << posY << " " << needH << endl;
      return 0;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:56: error: expected ')' before ';' token
   44 |           int dist = abs(posY - y[i] + abs(posX - x[i]);
      |                         ~                              ^
      |                                                        )
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;

int main(){
  int N;
  cin >> N;
  vector<int> x(N), y(N), h(N);
  for (int i=0;i<N;i++){
    cin >> x[i] >> y[i] >> h[i] ;

  }

  int MAX = 100;
  for(int posY = 0; posY <= MAX; posY++){
    for(int posX =0;posX <= MAX;posX++){
      int needH =-1;

      
      for( int i = 0; i < N; i++)
      {
        if (h[i]>0){
          int tmp =h[i] +abs (posY - y[i + abs(posX-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 = abs(posY - y[i] + abs(posX - x[i]);
          if (needH >dist){
            needH = -2;
            break;
          }
        }

      }
      if(needH == -2)continue;
      cout << posX << " " << posY << " " << needH << endl;
      return 0;
    }
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:44:56: error: expected ')' before ';' token
   44 |           int dist = abs(posY - y[i] + abs(posX - x[i]);
      |                         ~                              ^
      |                                                        )
a.cc:56:4: error: expected '}' at end of input
   56 |   }
      |    ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main(){
	int N;
	int x[1009],y[1009];
	int h[1009];
	cin>>N;
	for(int i=0;i<N;i++)cin>>x[i]>>y[i]>>h[i];
	for(int i=0;i<=100;i++){
		for(int j=0;j<=100;j++){
			int H;
			for(int k=0;k<N;k++){
				if(h[k]>0)H=h[k]+abs(x[k]-i)+abs(y[k]-j);
			}
			bool flag=true;
			for(int k=0;k<N;k++){
			   	if(h[k]!=max(H-abs(x[k]-i)-abs(y[k]-j),0))flag=false;
			}
			if(flag==true){
				cout<<i<<" "<<j<<" "<<search_h<<endl;
				return 0;
			}
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:55: error: 'search_h' was not declared in this scope
   20 |                                 cout<<i<<" "<<j<<" "<<search_h<<endl;
      |                                                       ^~~~~~~~
Language: C++

#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cmath>
#include <queue>
#include <stack>
#include <stdio.h>
//#include <cstdlib>

#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
typedef long long ll;

using namespace std;


int inputValue() {
  int a;
  cin >> a;
  return a;
};

void inputArray(int * p, int a) {
  rep(i, a) {
    cin >> p[i];
  }
};

void inputVector(vector<int>* v) {
  //cin.tie(0);
  //ios::sync_with_stdio(false);
  int a;
  while (cin >> a) {
    if (a == -1)break;
    v->push_back(a);
  }
};

void inputVector(vector<int> * p, int a) {
  rep(i, a) {
    int input;
    cin >> input;
    p->push_back(input);
  }
}

void inputVector2(vector<vector<int>>& v, int r, int c) {
  int temp;
  for (size_t i = 0; i < r; i++)
  {
    for (size_t j = 0; j < c; j++)
    {
      scanf("%d", &temp);
      v[i][j] = temp;
    }
  }
}

template <typename T>
void output(T a, int precision) {
  if (precision > 0) {
    cout << setprecision(precision) << a << "\n";
  }
  else {
    cout << a << "\n";
  }
}



int main(int argc, const char * argv[]) {
  int width = 100;
  int n = inputValue();
  auto a1 = vector<vector<int>>(n, vector<int>(3, 0));
  auto seikai = vector<int>(3, 0);
  inputVector2(a1, n, 3);
  int htemp = 0;
  bool T = true;

  for (int i = 0; i <= width; i++)
  {
    for (int j = 0; j <= width; j++)
    {
      T = true;
      for (int k = 0; k < n; k++) {
        if (a1[k][2] > 0) {
          htemp = a1[0][2] + abs(i - a1[0][0]) + abs(j - a1[0][1]);
          break;
        }
      }
      for (int k = 0; k < n; k++) {
        if (a1[k][2] > 0 && a1[k][2] + abs(i - a1[k][0]) + abs(j - a1[k][1]) != htemp) {
          T = false;
          break;
        }
        else if (ai[k][2] = 0 && htemp - abs(i - a1[k][0]) - abs(j - a1[k][1]) > 0) {
          T = false;
          break;
        }
      }
      if (T) {
        seikai[0] = i;
        seikai[1] = j;
        seikai[2] = htemp;
        goto LABEL;
      }
    }
  }
LABEL:
  printf("%d %d %d", seikai[0], seikai[1], seikai[2]);
  return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:99:18: error: 'ai' was not declared in this scope; did you mean 'i'?
   99 |         else if (ai[k][2] = 0 && htemp - abs(i - a1[k][0]) - abs(j - a1[k][1]) > 0) {
      |                  ^~
      |                  i