Language: C++

#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <stdlib.h>
#include <string.h>
#include <cstring>
#include <cmath>
#include <map>
#include <queue>
#include <deque>
#include <stack>
#include <set>
#include <stdio.h>
#include <tuple>
#include <bitset>
#include <cfloat>
#include <fstream>
#include <limits.h>
#include <list>
#include <math.h>
#include <random>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <numeric>
#include <utility>
#include <sstream>
// *テンプレート*
#define int long long
#define rep(i, n) for (int i = 0; i < (n); i++)
#define P pair<int, int>
#define sz(x) x.size()
#define EPS (1e-10)
// aよりbの方が小さかったら、aの値をbの値に置き換える。(swapではない！)
template<class T> inline bool chmin(T& a, T b) {
	if (a > b) {
		a = b;
		return true;
	}
	return false;
}
// aよりbの方が大きかったら、aの値をbの値に置き換える。
template<class T> inline bool chmax(T& a, T b) {
	if (a < b) {
		a = b;
		return true;
	}
	return false;
}

using namespace std;
typedef long long ll;
using Graph = vector<vector<int>>;
//最大公約数
ll gcd(ll a, ll b) {
	if (a < b)swap(a, b);
	if (b == 0) return a;
	return gcd(b, a % b);
}
//最小公倍数
ll lcm(ll a, ll b) {
	ll g = gcd(a, b);
	return a / g * b;
}
// 素数かどうか判定
bool prime(int n) {
	for (int i = 2; i <= sqrt(n); i++) {
		if (n%i == 0)return false;
	}
	return n != 1;
}

const long long MOD = 1000000007;
const long long INF = 1LL << 60;
// *テンプレートここまで*

// pair -> vector<pair<int,int>> 
//		   AandB.push_back(make_pair(a[i],b[i]))



signed main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	int n; cin >> n;
	vector<int>x(n), y(n), h(n); rep(i, n)cin >> x[i] >> y[i] >> h[i];
	rep(i, 101) {
		rep(j, 101) {
			int cnt = 0;
			rep(k, n) {
				if (h[k]) {
					cnt = h[k] + abs(i - x[k]) + abs(j - y[k]); break;
				}
			}
			rep(k, n) {
				if (h[k] != max((ll)0, cnt - abs(i - x[k]) - abs(j - y[k]))) {
					goto a;
				}
			}
			cout << i << " " << j << " " << cnt << endl;
		a:;
		}	
	}
	return 0;
}#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <stdlib.h>
#include <string.h>
#include <cstring>
#include <cmath>
#include <map>
#include <queue>
#include <deque>
#include <stack>
#include <set>
#include <stdio.h>
#include <tuple>
#include <bitset>
#include <cfloat>
#include <fstream>
#include <limits.h>
#include <list>
#include <math.h>
#include <random>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <numeric>
#include <utility>
#include <sstream>
// *テンプレート*
#define int long long
#define rep(i, n) for (int i = 0; i < (n); i++)
#define P pair<int, int>
#define sz(x) x.size()
#define EPS (1e-10)
// aよりbの方が小さかったら、aの値をbの値に置き換える。(swapではない！)
template<class T> inline bool chmin(T& a, T b) {
	if (a > b) {
		a = b;
		return true;
	}
	return false;
}
// aよりbの方が大きかったら、aの値をbの値に置き換える。
template<class T> inline bool chmax(T& a, T b) {
	if (a < b) {
		a = b;
		return true;
	}
	return false;
}

using namespace std;
typedef long long ll;
using Graph = vector<vector<int>>;
//最大公約数
ll gcd(ll a, ll b) {
	if (a < b)swap(a, b);
	if (b == 0) return a;
	return gcd(b, a % b);
}
//最小公倍数
ll lcm(ll a, ll b) {
	ll g = gcd(a, b);
	return a / g * b;
}
// 素数かどうか判定
bool prime(int n) {
	for (int i = 2; i <= sqrt(n); i++) {
		if (n%i == 0)return false;
	}
	return n != 1;
}

const long long MOD = 1000000007;
const long long INF = 1LL << 60;
// *テンプレートここまで*

// pair -> vector<pair<int,int>> 
//		   AandB.push_back(make_pair(a[i],b[i]))



signed main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	int n; cin >> n;
	vector<int>x(n), y(n), h(n); rep(i, n)cin >> x[i] >> y[i] >> h[i];
	rep(i, 101) {
		rep(j, 101) {
			int cnt = 0;
			rep(k, n) {
				if (h[k]) {
					cnt = h[k] + abs(i - x[k]) + abs(j - y[k]); break;
				}
			}
			rep(k, n) {
				if (h[k] != max((ll)0, cnt - abs(i - x[k]) - abs(j - y[k]))) {
					goto a;
				}
			}
			cout << i << " " << j << " " << cnt << endl;
		a:;
		}	
	}
	return 0;
}

Compiler output:
a.cc:109:2: error: stray '#' in program
  109 | }#include <iostream>
      |  ^
a.cc:109:3: error: 'include' does not name a type
  109 | }#include <iostream>
      |   ^~~~~~~
a.cc:155:31: error: redefinition of 'template<class T> bool chmax(T&, T)'
  155 | template<class T> inline bool chmax(T& a, T b) {
      |                               ^~~~~
a.cc:47:31: note: 'template<class T> bool chmax(T&, T)' previously declared here
   47 | template<class T> inline bool chmax(T& a, T b) {
      |                               ^~~~~
a.cc:167:4: error: redefinition of 'll gcd(ll, ll)'
  167 | ll gcd(ll a, ll b) {
      |    ^~~
a.cc:59:4: note: 'll gcd(ll, ll)' previously defined here
   59 | ll gcd(ll a, ll b) {
      |    ^~~
a.cc:173:4: error: redefinition of 'll lcm(ll, ll)'
  173 | ll lcm(ll a, ll b) {
      |    ^~~
a.cc:65:4: note: 'll lcm(ll, ll)' previously defined here
   65 | ll lcm(ll a, ll b) {
      |    ^~~
a.cc:178:6: error: redefinition of 'bool prime(long long int)'
  178 | bool prime(int n) {
      |      ^~~~~
a.cc:70:6: note: 'bool prime(long long int)' previously defined here
   70 | bool prime(int n) {
      |      ^~~~~
a.cc:185:17: error: redefinition of 'const long long int MOD'
  185 | const long long MOD = 1000000007;
      |                 ^~~
a.cc:77:17: note: 'const long long int MOD' previously defined here
   77 | const long long MOD = 1000000007;
      |                 ^~~
a.cc:186:17: error: redefinition of 'const long long int INF'
  186 | const long long INF = 1LL << 60;
      |                 ^~~
a.cc:78:17: note: 'const long long int INF' previously defined here
   78 | const long long INF = 1LL << 60;
      |                 ^~~
a.cc:194:8: error: redefinition of 'int main()'
  194 | signed main() {
      |        ^~~~
a.cc:86:8: note: 'int main()' previously defined here
   86 | signed main() {
      |        ^~~~