Language: C++

#include <set>
#include <string>
#include <iostream>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <limits>
using namespace std;
static int imin = std::numeric_limits<int>::min();
static int imax = std::numeric_limits<int>::max();
#define ll long long
#define rep(i, n) for(int i = 0; i<n; ++i)
#define rep1(i, n) for(int i = 1; i<n; ++i)
#define debug(x) cout << #x << ":" << x << "\n";
template<class T>
std::ostream& operator << (std::ostream& os, std::vector<T>& vec){
  std::size_t n = vec.size();
  if(n == 0){
    return os;
  }
  for(int i = 0; i<n - 1; ++i){
    os << vec[i] << " ";
  }
  os << vec[n - 1];
  os << std::endl;
  return os;
}

template <class T>
auto mkVec(unsigned int x){
  return std::vector<int>(x);
}

template <class T>
auto mkVec2(unsigned int x, unsigned int y){
  return std::vector<std::vector<T>>(x, std::vector<T>(y));
}

template <class T>
auto mkVec3(unsigned int x, unsigned int y, unsigned int z){
  return std::vector<std::vector<std::vector<T>>>(x, std::vector<std::vector<T>>(y, std::vector<T>(z)));
}

// 113C
// #ifndef BOOST_TEST_MAIN
// int main(int const argc, char const** argv){
//   int N, M;
//   cin >> N >> M;
//   vector<ll> P;
//   vector<ll> Y;
//   auto X = mkVec2<ll>(N + 1, 0);
//   rep(i, M){
//     ll p, y;
//     cin >> p >> y;
//     P.push_back(p);
//     Y.push_back(y);
//     X[p].push_back(y);
//   }
//   rep(i, N + 1){
//     sort(X[i].begin(), X[i].end());
//   }
//   rep(i, M) {
//     ll y;
//     rep(j, N + 1){
//       auto x = find(X[j].begin(), X[j].end(), Y[i]);
//       if(x != X[j].end()){
//         y = x - X[j].begin();
//         break;
//       }
//     }
//     printf("%06lld%06lld\n", P[i], y + 1);
//   }

// }
// #endif

#ifndef BOOST_TEST_MAIN
int main(int const argc, char const** argv){
  ll N;
  vector<ll> X, Y, H;

  cin >> N;
  rep(i, N){
    ll x, y, h;
    cin >> x;
    cin >> y;
    cin >> h;
    X.push_back(x);
    Y.push_back(y);
    H.push_back(h);
  }

  rep(x, 101)
    rep(y, 101){
    if(H[0] != 0){
      ll top = H[0] + abs(x - X[0]) + abs(y - Y[0]);
    }else{
      ll top = H[1] + abs(x - X[1]) + abs(y - Y[1];
    }

    rep(n, N){
      if(H[n] != 0 && H[n] + abs(x - X[n]) + abs(y - Y[n]) != top){
        break;
      }
      if(H[n] == 0 && abs(x - X[n]) + abs(y - Y[n]) < top){
        break;
      }

      if(n == N - 1){
        cout << x <<  " " << y << " " << top;
        return 0;
      }      
    }
  }
  
}
#endif


Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:99:51: error: expected ')' before ';' token
   99 |       ll top = H[1] + abs(x - X[1]) + abs(y - Y[1];
      |                                          ~        ^
      |                                                   )
a.cc:103:63: error: 'top' was not declared in this scope
  103 |       if(H[n] != 0 && H[n] + abs(x - X[n]) + abs(y - Y[n]) != top){
      |                                                               ^~~
a.cc:106:55: error: 'top' was not declared in this scope
  106 |       if(H[n] == 0 && abs(x - X[n]) + abs(y - Y[n]) < top){
      |                                                       ^~~
a.cc:111:42: error: 'top' was not declared in this scope
  111 |         cout << x <<  " " << y << " " << top;
      |                                          ^~~