Language: C++

#include <vector>
#include <math.h>
#include <iostream>
#include <string>
#include <algorithm>
#include <queue>
#include <iomanip>
#include <deque>
#include <map>
#include <tuple>

typedef long long ll;
#define rep(i, a, n) for(int i = a; i<n; i++)
#define ALL(a) begin(a), end(a)
#define mii map<int, int>
#define msi map<string, int>
#define vi vector<int>
#define vl vector<ll>
#define MOD 1000000007
#define INF 1e9
#define showVector(v) rep(i,0,v.size()){p(v[i]);p(" ")} pl("")
#define p(s) std::cout << s ;
#define pl(s)  std::cout << s << endl;
using namespace std;

// 素数判定 O(√n)
bool is_prime(int n){
    for(int i = 2; i * i <= n; i++){
        if(n % i == 0) return false;
    }
    return true;
}

// 各桁の和を計算する関数
int findSumOfDigits(int n) {
  int sum = 0;
  while (n > 0) { // n が 0 になるまで
    sum += n % 10;
    n /= 10;
  }
  return sum;
}

template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;

}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

//想定解答との絶対誤差または相対誤差が 10−6以下の場合+1以上だしておく。適当に15とかでもおｋ．
//cout << fixed << setprecision(15);

int main() {
    int N;
    cin >> N;
    int Cx, Cy;
    ll H;
    vector<tuple<int, int, int> > a;
    rep(i, 0, N) {
        int x, y, h;
        cin >> x >> y >> h;
        tuple<ll, ll, ll> t = make_tuple(x, y, h);
        a.push_back(t);
    }

    rep(i, 0, 101) {
        rep (j, 0, 101) {
            bool all = true;
            rep(k, 0, N) {
                ll temp = max(get<2>(a[k]) + abs(get<0>(i - a[k])) + abs(get<1>(j - a[k])), 0);
                if (k == 0) {
                    H = temp;
                } else {
                    if (H != temp) {
                        all = false;
                        break;
                    }
                }
            }
            if (all) {
                Cx = i;
                Cy = j;
                cout << Cx;
                cout << " ";
                cout << Cy;
                cout << " ";
                cout << H << endl;
                return 0;
            }
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:80:59: error: no match for 'operator-' (operand types are 'int' and '__gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int, int> >, std::tuple<int, int, int> >::value_type' {aka 'std::tuple<int, int, int>'})
   80 |                 ll temp = max(get<2>(a[k]) + abs(get<0>(i - a[k])) + abs(get<1>(j - a[k])), 0);
In file included from /usr/include/c++/14/bits/stl_algobase.h:67,
                 from /usr/include/c++/14/vector:62,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
  618 |     operator-(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:618:5: note:   template argument deduction/substitution failed:
a.cc:80:64: note:   mismatched types 'const std::reverse_iterator<_Iterator>' and 'int'
   80 |                 ll temp = max(get<2>(a[k]) + abs(get<0>(i - a[k])) + abs(get<1>(j - a[k])), 0);
      |                                                                ^
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
 1790 |     operator-(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note:   template argument deduction/substitution failed:
a.cc:80:64: note:   mismatched types 'const std::move_iterator<_IteratorL>' and 'int'
   80 |                 ll temp = max(get<2>(a[k]) + abs(get<0>(i - a[k])) + abs(get<1>(j - a[k])), 0);
      |                                                                ^
a.cc:80:83: error: no match for 'operator-' (operand types are 'int' and '__gnu_cxx::__alloc_traits<std::allocator<std::tuple<int, int, int> >, std::tuple<int, int, int> >::value_type' {aka 'std::tuple<int, int, int>'})
   80 |                 ll temp = max(get<2>(a[k]) + abs(get<0>(i - a[k])) + abs(get<1>(j - a[k])), 0);
/usr/include/c++/14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
  618 |     operator-(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:618:5: note:   template argument deduction/substitution failed:
a.cc:80:88: note:   mismatched types 'const std::reverse_iterator<_Iterator>' and 'int'
   80 |                 ll temp = max(get<2>(a[k]) + abs(get<0>(i - a[k])) + abs(get<1>(j - a[k])), 0);
      |                                                                                        ^
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
 1790 |     operator-(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note:   template argument deduction/substitution failed:
a.cc:80:88: note:   mismatched types 'const std::move_iterator<_IteratorL>' and 'int'
   80 |                 ll temp = max(get<2>(a[k]) + abs(get<0>(i - a[k])) + abs(get<1>(j - a[k])), 0);
      |                                                                                        ^