Language: C++

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

using ll=long long;
using int64=int64_t;
const int inf=100000000;

int in(){
  int a;
  cin >> a;
  return a;
}//int型関数の受け取り

void forin(int* x,int y){
  for (int i=0;i<y;i++){
    cin >> x[i];
  }
}//(x,y) int型配列x[y]の受け取り

int intpow(int x,int y){
  double a=x,b=y;
  return pow(a,b);
}//(x,y) xをy乗

int intfabs(int x){
  double a=x;
  return fabs(a);
}//(x) xの絶対値

int fact(int x){
  if (x == 1) return 1;
  return x*fact(x-1);
}//(x) x!

int fib(int x){
  if (x <= 2) return x;
  int a[x];
  a[0]=1;
  a[1]=2;
  for (int i=2;i<x;i++){
    a[i]=a[i-1]+a[i-2];
  }
  return a[x-1];
}//(x) フィボナッチ数列のx番目

int div1(ll x){
  return x%1000000007;
}

struct pt{
    int x,y,h;
}

int height(int x, int y, int cx, int cy, int ch){
    return max(0,ch-intfabs(x-cx)-intfabs(y-cy));
}

main(){
    int n=in(),h,i,fx,fy;
    bool tf;
    pt xyh[n];
    for (i=0;i<n;i++) cin >> xyh.x[i] >> xyh.y[i] >> xyh.h[i];
    for (int x=0;x<101;x++){
        for (int y=0;y<101;y++){
            tf=true;
            h=-1;
            for (i=0;h<=0;i++) h=xyh.h[i];
            h=h+intfabs(x-xyh.x[i])+intfabs(y-xyh.y[i]);
            for (i=0;i<n;i++){
                if (xyh.h[i]!=h-intfabs(x-xyh.x[i])-intfabs(y-xyh.y[i])) tf=false;
            }
            if (tf) {
                cout << x << ' ' << y << ' ' << h << endl;
                return 0;
            }
        }
    }
}

Compiler output:
a.cc:52:2: error: expected ';' after struct definition
   52 | }
      |  ^
      |  ;
a.cc:58:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   58 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:62:34: error: request for member 'x' in 'xyh', which is of non-class type 'pt [n]'
   62 |     for (i=0;i<n;i++) cin >> xyh.x[i] >> xyh.y[i] >> xyh.h[i];
      |                                  ^
a.cc:62:46: error: request for member 'y' in 'xyh', which is of non-class type 'pt [n]'
   62 |     for (i=0;i<n;i++) cin >> xyh.x[i] >> xyh.y[i] >> xyh.h[i];
      |                                              ^
a.cc:62:58: error: request for member 'h' in 'xyh', which is of non-class type 'pt [n]'
   62 |     for (i=0;i<n;i++) cin >> xyh.x[i] >> xyh.y[i] >> xyh.h[i];
      |                                                          ^
a.cc:67:38: error: request for member 'h' in 'xyh', which is of non-class type 'pt [n]'
   67 |             for (i=0;h<=0;i++) h=xyh.h[i];
      |                                      ^
a.cc:68:31: error: request for member 'x' in 'xyh', which is of non-class type 'pt [n]'
   68 |             h=h+intfabs(x-xyh.x[i])+intfabs(y-xyh.y[i]);
      |                               ^
a.cc:68:51: error: request for member 'y' in 'xyh', which is of non-class type 'pt [n]'
   68 |             h=h+intfabs(x-xyh.x[i])+intfabs(y-xyh.y[i]);
      |                                                   ^
a.cc:70:25: error: request for member 'h' in 'xyh', which is of non-class type 'pt [n]'
   70 |                 if (xyh.h[i]!=h-intfabs(x-xyh.x[i])-intfabs(y-xyh.y[i])) tf=false;
      |                         ^
a.cc:70:47: error: request for member 'x' in 'xyh', which is of non-class type 'pt [n]'
   70 |                 if (xyh.h[i]!=h-intfabs(x-xyh.x[i])-intfabs(y-xyh.y[i])) tf=false;
      |                                               ^
a.cc:70:67: error: request for member 'y' in 'xyh', which is of non-class type 'pt [n]'
   70 |                 if (xyh.h[i]!=h-intfabs(x-xyh.x[i])-intfabs(y-xyh.y[i])) tf=false;
      |                                                                   ^