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

#include<bits/stdc++.h>
using namespace std;
using ll=long long;
const int INF = 100000000;
ll i,j,k;
ll mod=1000000007;

int main(){
    ll n;cin>>n;
    map<pair<ll,ll>,ll> H;
    vector<pair<ll,ll>> P(n);
    for(i=0;i<n;i++){
        ll x,y,h;
        cin>>x>>y>>h;
        P[i]=make_pair(x,y);
        H[make_pair(x,y)]=h;
    }

    ll h;
    for(i=0;i<=100;i++){
        for(j=0;j<=100;j++){
            h=H[P[0]]+abs(P[0].first-i)+abs(P[0].second-j);
            bool ok=true;
            for(k=0;k<n;k++){
                if(max(h-abs(P[k].first-i)-abs(P[k].second-j),0)!=H[P[k]]){
                    ok=false;
                }
            }
            if(ok){cout<<i<<" "<<j<<" "<<h<<endl;return 0;}
        }
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:23: error: no matching function for call to 'max(ll, int)'
   25 |                 if(max(h-abs(P[k].first-i)-abs(P[k].second-j),0)!=H[P[k]]){
      |                    ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 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:25:23: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   25 |                 if(max(h-abs(P[k].first-i)-abs(P[k].second-j),0)!=H[P[k]]){
      |                    ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:25:23: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   25 |                 if(max(h-abs(P[k].first-i)-abs(P[k].second-j),0)!=H[P[k]]){
      |                    ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll=long long;
const int INF = 100000000;
ll i,j,k;
ll mod=1000000007;

int main(){
    int n;cin>>n;
    map<pair<ll,ll>,ll> H;
    vector<pair<ll,ll>> P(n);
    for(i=0;i<n;i++){
        ll x,y,h;
        cin>>x>>y>>h;
        P[i]=make_pair(x,y);
        H[make_pair(x,y)]=h;
    }

    ll h;
    for(i=0;i<=100;i++){
        for(j=0;j<=100;j++){
            h=H[P[0]]+abs(P[0].first-i)+abs(P[0].second-j);
            bool ok=true;
            for(k=0;k<n;k++){
                if(max(h-abs(P[k].first-i)-abs(P[k].second-j),0)!=H[P[k]]){
                    ok=false;
                }
            }
            if(ok){cout<<i<<" "<<j<<" "<<h<<endl;return 0;}
        }
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:23: error: no matching function for call to 'max(ll, int)'
   25 |                 if(max(h-abs(P[k].first-i)-abs(P[k].second-j),0)!=H[P[k]]){
      |                    ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 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:25:23: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   25 |                 if(max(h-abs(P[k].first-i)-abs(P[k].second-j),0)!=H[P[k]]){
      |                    ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:25:23: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   25 |                 if(max(h-abs(P[k].first-i)-abs(P[k].second-j),0)!=H[P[k]]){
      |                    ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define sc(x) scanf("%d",&x);
static const int MAX = 101;
int main(){
    int n; sc(n)
    vector<int> x(n), y(n), h(n);
    for (int i = 0; i < n; i++){
        sc(x[i]) sc(y[i]) sc(h[i])
    }
    int H, tmp;
    bool check;
    for (int i = 0; i < MAX; i++){
        for (int j = 0; j < MAX; j++){
            check = true; H = 0;
            for (int k = 0; k < n; k++){
                if (h[k] != 0)H = h[k] + abs(i - x[k]) + abs(j - y[k]), break;
            }
            for (int k = 0; k < n; k++){
                tmp = h[k] + abs(i - x[k]) + abs(j - y[k]);
                if (h[k] == 0) continue;
                if (h[k] == 0 && tmp > H) check = false;
                if (h[k] != 0 && tmp != H) check = false;
                if (!check) break;
            }
            if (H != 0 && check){
                cout << i << " " << j << " " << H << endl;
                break;
            }
        }
        if (H != 0 && check) break;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:73: error: expected primary-expression before 'break'
   20 |                 if (h[k] != 0)H = h[k] + abs(i - x[k]) + abs(j - y[k]), break;
      |                                                                         ^~~~~
Language: C++

#include <iostream>
#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++)
    {
      // 頂上がどれくらいの高さであって欲しいか
      // -1はまだよくわからない時。0以上は確定してる時
      // -2はダメだってわかった時
      int needH = -1;

      for (int i = 0; i < N; i++)
      {
        if (h[i] > 0)
        {
          //この頂点から見て、頂上がposY, posXの時に、
          // どれくらいの高さがあって欲しいかとを求める
          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:55:58: error: expected ',' or ';' before 'if'
   55 |           int dist = abs(posY - y[i]) + abs(posX - x[i]) if (needH > dist)
      |                                                          ^~
Language: Java

import java.io.*;
import java.util.*;
public class Main {
    public static final long mod = (long)1e9+7;
    public static final long INF = Long.MAX_VALUE/10;
    public static final int inf = Integer.MAX_VALUE/10;

    static void solve(InputReader in, PrintWriter out){
        int n = in.ni(), x, y, h, H;
        pair sp = new pair();
        pair[] p = new pair[n];
        boolean start = true, flag;
        for (int i = 0; i < n; i++) {
            x = in.ni(); y = in.ni(); h = in.ni();
            if(start&&h!=0){
                sp.x = x; sp.y = y; sp.h = h;
                start  = false;
            }
            p[i] = new pair();
            p[i].x = x; p[i].y = y; p[i].h = h;
        }
        out:for (int i = 0; i <= 100; i++) {
            for (int j = 0; j <= 100; j++) {
                flag = true;
                for(pair a: p){
                    H = sp.h+Math.abs(sp.x-i)+Math.abs(sp.y-j)-Math.abs(a.x-i)-Math.abs(a.y-j);
                    if(H>0&&H!=a.h || H<=0&&a.h!=0){
                        flag = false;
                        break;
                    }
                }
                if(flag){
                    out.printf("%d %d %d", i, j, h);
                    break out;
                }
            }
        }
    }
    public static class pair{ int x, y, h;}
    public static void main(String[] args) throws Exception{
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        solve(in, out);
        out.close();
    }
    public static class InputReader{
        private BufferedReader br;
        private StringTokenizer st;
        public InputReader(InputStream is){
            br = new BufferedReader(new InputStreamReader(is));
            st = null;
        }
        public String ns(){
            if(st == null || !st.hasMoreTokens()){
                try{
                    st = new StringTokenizer(br.readLine());
                }catch (Exception e){
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }
        public long nl(){
            return Long.parseLong(ns());
        }
        public int ni(){
            return Integer.parseInt(ns());
        }
        public Double nd(){
            return Double.parseDouble(ns());
        }
        public int[] ni(int n){
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }
        public long[] nl(int n){
            long[] a = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = nl();
            }
            return a;
        }
        public double[] nd(int n){
            double[] a = new double[n];
            for (int i = 0; i < n; i++) {
                a[i] = nd();
            }
            return a;
        }
    }
}


Compiler output:
Main.java:33: error: variable h might not have been initialized
                    out.printf("%d %d %d", i, j, h);
                                                 ^
1 error
Language: C++

#include <stdc++.h>
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;
        }
    }
    return 0;
}

Compiler output:
a.cc:1:10: fatal error: stdc++.h: No such file or directory
    1 | #include <stdc++.h>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
// Welcome to my source code!

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

Compiler output:
a.cc: In function 'int main()':
a.cc:21:26: error: no matching function for call to 'max(int&, long long int)'
   21 |                 tmp = max(tmp, 0LL);
      |                       ~~~^~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 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:21:26: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   21 |                 tmp = max(tmp, 0LL);
      |                       ~~~^~~~~~~~~~
/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
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:21:26: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   21 |                 tmp = max(tmp, 0LL);
      |                       ~~~^~~~~~~~~~
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(i - get<0>(a[k])) + abs(j - get<1>(a[k])), 0);
                if (k == 0) {
                    H = temp;
                } else {
                    if (H != temp) {
                        all = false;
                    } 

                    if (get<2>(a[k]) == 0 && temp > abs(i - get<0>(a[k])) + abs(j - get<1>(a[k]))) {
                        all = false;
                    } 
                }
            }
            if (all) {
                Cx = i;
                Cy = j;
                H = temp;
            }
        }
    }
                cout << Cx;
                cout << " ";
                cout << Cy;
                cout << " ";
                cout << H << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:96:21: error: 'temp' was not declared in this scope; did you mean 'tm'?
   96 |                 H = temp;
      |                     ^~~~
      |                     tm
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <algorithm>
#include <cmath>
#include <ios>
#include <ctype.h>
#include <stack>
#include <istream>
#include <stdio.h>
#include <map>
#include <set>
#include <queue>
#include <unordered_map>
#include <functional>
#include <bitset>
#include <list>
#include <deque>
#include <time.h>
#include <random>
#include <iomanip>
#include <fstream>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define REP(i,a,b) for (int i = a; i < (b); ++i)
#define RREP(i,a,b) for (int i = a; i > (b); --i)
#define all(x) (x).begin(),(x).end()
const long long INF = 1000000007;
typedef long long ll;
using namespace std;
using Graph = vector<vector<int>>;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; }
ll lcm(ll a, ll b) { return (a * b) / gcd(a,b); }
int xyh[1000][3];
int solve(){
  int n;
  cin>>n;
  rep(i,n){
    rep(j,3)cin>>xyh[i][j];
  }
  rep(x,101){
    rep(y,101){
      map<ll,ll>m;
      rep(i,n){
        int X = xyh[i][0], Y = xyh[i][1], H = xyh[i][2];
        int tmp = abs(X - x) - abs(Y - y);
        tmp = max(tmp,0);
        if(H != 0)m[tmp + H];
        else{
          rep(i,tmp){
            m[i + 1]++;
          }
        }
      }
      for(auto& i : m){
        if(i.second == n){
          cout << x << " " << y << " " << i.first << endl;
          return 0;
        }
      }
    }
    
  }
  return 0;
}
int main(){
  ios::sync_with_stdio(false);cin.tie(nullptr);
  // cout << fixed;cout << setprecision(16);
  solve();
  return 0;
}v

Compiler output:
a.cc:73:2: error: 'v' does not name a type
   73 | }v
      |  ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0;i<n;i++)
#define rep1(i,n) for(int i = 1;i<n;i++)
typedef long long ll;
#define vint vector<int>
#define vstring vector<string>
#define vll vector<ll>
#define vbool vector<bool>
#define INF 100000000

ll max(ll a, ll b){
  if(a <= b)
    return b;
  else
    return a;  
}
int main(){
  ll n;
  cin >> n;
  vector<vll> H(101,vll(101));
  vll x(101);
  vll y(101);
  vector<vll> xyh(n,vll(3));
  vector<vbool> judge(101,vbool(101,true));
  rep(i,101){
    x[i] = i;
    y[i] = i;
  }
  rep(i,n) cin >> xyh[i][0] >> xyh[i][1] >> xyh[i][2];
  rep(i,n){
    if(i == 0){
      rep(j,101) rep(s,101)
        H[j][s] = xyh[i][2] + abs(x[j] - xyh[i][0]) + abs(y[s] - xyh[i][1]);
        if(H[j][s] == 0) judge[j][s] = false;
    else{
      rep(j,101) rep(s,101)
        if(max(H[j][s] - abs(x[j] - xyh[i][0]) - abs(y[s] - xyh[i][1]),0) == xyh[i][2]){}
        else judge[j][s] = false;
    }
  }
  if(n == 1){

  }
  else
    rep(i,101) rep(s,101) if(judge[i][s] && H[i][s]) cout << x[i] <<' ' << y[s] <<' ' << H[i][s];
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:14: error: 'j' was not declared in this scope
   35 |         if(H[j][s] == 0) judge[j][s] = false;
      |              ^
a.cc:35:17: error: 's' was not declared in this scope
   35 |         if(H[j][s] == 0) judge[j][s] = false;
      |                 ^
a.cc:47:2: error: expected '}' at end of input
   47 | }
      |  ^
a.cc:18:11: note: to match this '{'
   18 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0;i<n;i++)
#define rep1(i,n) for(int i = 1;i<n;i++)
typedef long long ll;
#define vint vector<int>
#define vstring vector<string>
#define vll vector<ll>
#define vbool vector<bool>
#define INF 100000000

ll max(ll a, ll b){
  if(a <= b)
    return b;
  else
    return a;  
}
int main(){
  ll n;
  cin >> n;
  vector<vll> H(101,vll(101));
  vll x(101);
  vll y(101);
  vector<vll> xyh(n,vll(3));
  vector<vbool> judge(101,vbool(101,true));
  rep(i,101){
    x[i] = i;
    y[i] = i;
  }
  rep(i,n) cin >> xyh[i][0] >> xyh[i][1] >> xyh[i][2];
  rep(i,n){
    if(i == 0){
      rep(j,101) rep(s,101)
        H[j][s] = xyh[i][2] + abs(x[j] - xyh[i][0]) + abs(y[s] - xyh[i][1]);
        if(H[i][s] == 0) judge[i][s] = false;
    else{
      rep(j,101) rep(s,101)
        if(max(H[j][s] - abs(x[j] - xyh[i][0]) - abs(y[s] - xyh[i][1]),0) == xyh[i][2]){}
        else judge[j][s] = false;
    }
  }
  if(n == 1){

  }
  else
    rep(i,101) rep(s,101) if(judge[i][s] && H[i][s]) cout << x[i] <<' ' << y[s] <<' ' << H[i][s];
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:17: error: 's' was not declared in this scope
   35 |         if(H[i][s] == 0) judge[i][s] = false;
      |                 ^
a.cc:47:2: error: expected '}' at end of input
   47 | }
      |  ^
a.cc:18:11: note: to match this '{'
   18 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, a, b) for(ll i=(a); i<(b); i++)
#define PER(i, a, b) for(ll i=(a); i>=(b); i--)
#define rep(i, n) REP(i, 0, n)
#define per(i, n) PER(i, n, 0)
const ll INF = 1e18+18;
const ll MAX = 400005;
const ll MOD = 1000000007;
#define Yes(n) cout << ((n) ? "Yes" : "No") << endl;
#define YES(n) cout << ((n) ? "YES" : "NO") << endl;

/*long long fac[MAX], finv[MAX], inv[MAX];

void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}

long long COM(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}*/


int main(){
    int N;
    cin>>N;
    vector<ll> X(N), Y(N), H(N);
    rep(i, N){
        cin>>X[i]>>Y[i]>>H[i];
    }
    rep(x, 101){
        rep(y, 101){
                bool T=true;
                ll height=0;
          		bool HeightB=false;
               ll MaxHeight=MOD+100;
            rep(i, N){
                if(HeightB&&!(height-abs(x-X[i])-abs(y-Y[i])==H[i])&&H[i]>0){
                    T=false;
                    break;
                }
              	if(Maxheight<height-abs(x-X[i])-abs(y-Y[i])){
                  	T=false;
                  	break;
                }
              	Maxheight=min(Maxheight, H[i]+abs(x-X[i])+abs(y-Y[i]))
              	if(!(HeightB)){
                  	if(H[i]>0){
                      	HeightB=true;
                      	height=H[i]+abs(X[i]-x)+abs(Y[i]-y);
                    }
                }
            }
            if(HeightB&&T){
                cout<<x<<" "<<y<<" "<<height<<endl;
                return 0;
            }
        }
    }
  	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:52:20: error: 'Maxheight' was not declared in this scope; did you mean 'MaxHeight'?
   52 |                 if(Maxheight<height-abs(x-X[i])-abs(y-Y[i])){
      |                    ^~~~~~~~~
      |                    MaxHeight
a.cc:56:17: error: 'Maxheight' was not declared in this scope; did you mean 'MaxHeight'?
   56 |                 Maxheight=min(Maxheight, H[i]+abs(x-X[i])+abs(y-Y[i]))
      |                 ^~~~~~~~~
      |                 MaxHeight
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; ++i)
using namespace std;

int main() {
  int n, x, y, h;
  cin >> n;
  vector<tuple<int, int, int>> v(n);
  rep(i, n){
    int p, q, r;
    cin >> p >> q >> r;
    v[i] = make_tuple(a, b, c);
  }
  sort(v.begin(), v.end());
  rep(i, 101){
    rep(j, 101){
      x = i; y = j; h = abs(get<0>(v[0])-x)+abs(get<1>(v[0])-y)+get<2>(v[0]);
      bool b = 1;
      rep(k, n-1){
        if(abs(get<0>(v[k+1])-x)+abs(get<1>(v[k+1])-y)+get<2>(v[k+1]) != h && get<2>(v[k+1]) != 0){
          b = 0;
          break;
        }
      }
      if(b) break;
    }
  }
  cout << x << " " << y << " " << h << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:23: error: 'a' was not declared in this scope
   12 |     v[i] = make_tuple(a, b, c);
      |                       ^
a.cc:12:26: error: 'b' was not declared in this scope
   12 |     v[i] = make_tuple(a, b, c);
      |                          ^
a.cc:12:29: error: 'c' was not declared in this scope
   12 |     v[i] = make_tuple(a, b, c);
      |                             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int n,a,b,u,x[101],h[101],y[101],cx,cy,H;
int main()
{
scanf("%d",&n);//cin>>n;
for(int i=1;i<=n;++i)
{
scanf("%d%d%d",&x[i],&y[i],&h[i]); //cin>>x[i]>>y[i]>>h[i];
if(h[i]!=0)u=i;
} f
or(int xi=0;xi<=100;++xi)
for(int yi=0;yi<=100;++yi)
{
cx=xi,cy=yi;
H=h[u]+abs(x[u]-cx)+abs(y[u]-cy);
for(int i=1;i<=n;++i)
{
if(h[i]!=max(H-abs(x[i]-cx)-abs(y[i]-cy),0))break;
if(i==n)
{ printf("%d %d %d",cx,cy,H);return 0;}
}
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'f' was not declared in this scope
   11 | } f
      |   ^
a.cc:12:4: error: expected primary-expression before 'int'
   12 | or(int xi=0;xi<=100;++xi)
      |    ^~~
a.cc:12:4: error: expected ')' before 'int'
   12 | or(int xi=0;xi<=100;++xi)
      |   ~^~~
      |    )
a.cc:12:13: error: 'xi' was not declared in this scope; did you mean 'x'?
   12 | or(int xi=0;xi<=100;++xi)
      |             ^~
      |             x
a.cc:13:14: error: 'yi' was not declared in this scope; did you mean 'yn'?
   13 | for(int yi=0;yi<=100;++yi)
      |              ^~
      |              yn
Language: C++

#include <stdlib.h>
using namespace std;

int main() {
	long N, i, j, k, l, check = 0, x[101] = {}, y[101] = {};
	long hight, l_hight, z[101] = {};
	cin >> N;
	for (i = 0;i < N;i++) {
		cin >> x[i] >> y[i] >> z[i];
	}
	for (j = 0;j < 101;j++) {
		for (k = 0;k < 101;k++) {
			hight = z[0] + abs(j - x[0]) + abs(k - y[0]);
			check = 0;
			for (l = 0;l < N;l++) {
				l_hight = hight - abs(j - x[l]) - abs(k - y[l]);
				if (z[l] != l_hight) {
					check = 1;
				}
			}
			if (check == 0) {
				cout << j << " " << k << " " << hight;
			}
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin >> N;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <stdlib.h>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:22:33: error: 'cout' was not declared in this scope
   22 |                                 cout << j << " " << k << " " << hight;
      |                                 ^~~~
a.cc:22:33: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include<bits/stdc++.h>
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i++)
#define repR(i,n) for(ll i=n;i>=0;i--)
#define all(v)(v).begin(),(v).end()
#define rall(v)(v).rbegin(),(v).rend()
#define F first
#define S second
#define pb push_back
#define pu push
#define COUT(x) cout<<(x)<<endl
#define PQ priority_queue<ll>
#define PQR priority_queue<ll,vector<ll>,greater<ll>>
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define mp make_pair
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define sz(x) (int)(x).size()
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll MOD = 1000000007LL;
const ll INF = 1LL << 60;
using vll = vector<ll>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvll = vector<vll>;
using vstr = vector<string>;
using pll = pair<ll, ll>;
ll gcd(ll a, ll b) { return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) { return a/gcd(a,b)*b;}
int main(){
  ll n;
  cin>>n;
  vvll x(n,vll(3));
  rep(i,n)rep(j,3)cin>>x[i][j];
  rep(i,101)rep(j,101){
    ll h;
    rep(u,n){
      if(x[u][2]!=0){
        h=abs(x[u][0]-i)+abs(x[u][1]-j)+x[u][2];
        break;
      }
    }
    ll k=1;
    rep(d,n){
      if(x[d][2]!=max(h-abs(x[u][1]-j)-abs(x[u][0]-i),0)){
        k=1;
        break;
      }
    }
    if(k){
      cout<<i<<" "<<j<<" "<<h<<endl;
      return 0;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:53:31: error: 'u' was not declared in this scope
   53 |       if(x[d][2]!=max(h-abs(x[u][1]-j)-abs(x[u][0]-i),0)){
      |                               ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(),a.end()
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define limit(x,l,r) max(l,min(x,r))
#define lims(x,l,r) (x = max(l,min(x,r)))
#define isin(x,l,r) ((l) <= (x) && (x) < (r))
#define pb push_back
#define sz(x) (int)(x).size()
#define uni(x) x.erase(unique(rng(x)),x.end())
#define snuke srand((unsigned)clock()+(unsigned)time(NULL));
#define show(x) cout<<#x<<" = "<<x<<endl;
#define PQ(T) priority_queue<T,v(T),greater<T> >
#define dup(x,y) (((x)+(y)-1)/(y))
#define v(T) vector<T>
#define vv(T) v(v(T))
typedef long long int ll;
typedef unsigned uint;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef tuple<int,int,int> T;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
typedef vector<T> vt;
inline int getInt() { int x; scanf("%d",&x); return x;}
template<typename T>inline istream& operator>>(istream&i,v(T)&v)
{rep(j,sz(v))i>>v[j];return i;}
template<typename T>string join(const v(T)&v)
{stringstream s;rep(i,sz(v))s<<' '<<v[i];return s.str().substr(1);}
template<typename T>inline ostream& operator<<(ostream&o,const v(T)&v)
{if(sz(v))o<<join(v);return o;}
template<typename T1,typename T2>inline istream& operator>>(istream&i,pair<T1,T2>&v)
{return i>>v.fi>>v.se;}
template<typename T1,typename T2>inline ostream& operator<<(ostream&o,const pair<T1,T2>&v)
{return o<<v.fi<<","<<v.se;}
const double eps = 1e-10;
const ll LINF = 1001002003004005006ll;
const int INF = 1001001001;
const int MX = 200005;
#define dame { puts("-1"); return 0;}
#define yn {puts("Yes");}else{puts("No");}
//---------------------------------------------------------------
#define fastio std::ios::sync_with_stdio(false);
#define myio ifstream iofi; if(argc>1){iofi.open(argv[1]); std::cin.rdbuf(iofi.rdbuf());}
//--------------------------------------------------------------

void Main(){
  int n;
  cin>>n;
  vi x(n,0),y(n,0);
  vl h(n,0ll);
  int cx,cy,sx,sy; ll ch,sh;
  rep(i,n){
    cin>>x[i]>>y[i]>>h[i];
    if(h[i]!=0){sx = x[i];sy=y[i];sh = h[i];}
  }
  rep(i,101){
    cx = i;
    rep(j,101){
      cy = j;
      ch = sh+(ll)(abs(cx-sx)+abs(cy-sy));
      bool f = true;
      rep(k,n){
        ll up = h[k]+(ll)(abs(cx-x[k])+abs(cy-y[k]))
        if( h[k]!=0 and  ch != up ){f = false;break;}
        if( h[k]==0 and  ch <= up ){f = false;break;}
      }
      if(f){cout<<cx<<" "<<cy<<" "<<ch; return;}
    }
  }
  exit(1);
}

int main(int argc,char** argv)
{fastio; myio; Main();}


Compiler output:
a.cc: In function 'void Main()':
a.cc:74:9: error: expected ',' or ';' before 'if'
   74 |         if( h[k]!=0 and  ch != up ){f = false;break;}
      |         ^~
Language: C++

n = int(input())
xyh = [list(map(int, input().split())) for i in range(n)]

for cx in range(101):
    for cy in range(101):
        H = set()
        for x, y, h in xyh:
            if h != 0:
                H.add(h + abs(x - cx) + abs(y - cy))
        if len(H) == 1:
            print(cx, cy, list(H)[0])

Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: C++

#include<bits/stdc++.h>
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];
  
  for(int cx=0;cx<=100;cx++)for(int cy=0;cy<=100;cy++){
    int hh=-1;
    bool ok=true;
    for(int i=0;i<N;i++){
      int vx=X[i]-cx,vy=Y[i]-cy;
      long h=(H[i]>0?H[i]+abs(vx)+abs(vy)hh);
      if(hh==-1)hh=h;
      else if(h!=hh || h<1){ok=false;break;}
    }
    if(ok){cout<<cx<<" "<<cy<<" "<<hh<<endl;return 0;}
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:42: error: expected ':' before 'hh'
   13 |       long h=(H[i]>0?H[i]+abs(vx)+abs(vy)hh);
      |                                          ^~
      |                                          :
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long; 
#define rep(i, n) for (int i = 0; i < (int)n; i++)
ll inf = 1e10;

int main(){
  int n;
  cin >> n;
  vector<int> x(n), y(n);
  vector<ll> h(n);
  rep(i, n) cin >> x[i] >> y[i] >> h[i];
  
  int cx, cy;
  ll H;
  
  for(int tx = 0; tx <= 100; tx++){
    
    for(int ty = 0; ty <= 100; ty++){
      ll th = 0;
      bool can = false;
      for(int i = 0; i < n; i++){
        if(th >= 1){
          if(max(th - abs(x[i]-tx) - abs(y[i]-ty) , 0) == h[i]) can = true;
          else {
            can = false;
            break;
          }
        }
        else th = h[i] + abs(x[i]-tx) + abs(y[i]-ty);
      }
      if(can){
        cout << tx << " " << ty << " " << th << endl;
        return 0;
      } 
    }
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:17: error: no matching function for call to 'max(ll, int)'
   24 |           if(max(th - abs(x[i]-tx) - abs(y[i]-ty) , 0) == h[i]) can = true;
      |              ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 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:24:17: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   24 |           if(max(th - abs(x[i]-tx) - abs(y[i]-ty) , 0) == h[i]) can = true;
      |              ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:24:17: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   24 |           if(max(th - abs(x[i]-tx) - abs(y[i]-ty) , 0) == h[i]) can = true;
      |              ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ALL(v) (v).begin(),(v).end()
#define REP(i,p,n) for(int i=p;i<(int)(n);++i)
#define rep(i,n) REP(i,0,n)
#define SZ(x) ((int)(x).size())
#define debug(x) cerr << #x << ": " << x << '\n'
#define INF 999999999
typedef long long int Int;
typedef pair<int,int> P;
using ll = long long;
using VI = vector<int>;


int main(){
    int n;cin >> n;
    vector<tuple<Int,Int,Int>> zahyo;
    rep(i,n){
        Int x,y,g; cin >> x >> y >> g;
        H = max(g,H);
        zahyo.emplace_back(x,y,g);
    }
    
    for(int cx=0;cx<=100;cx++){
        for(int cy=0;cy<=100;cy++){
            Int H = abs(cx-get<0>(zahyo[0]))+abs(cy-get<1>(zahyo[0]))+get<2>(zahyo[0]);
            bool flag = true;
            for(auto &i:zahyo){
                Int kakuh = abs(cx-get<0>(i))+abs(cy-get<1>(i))+get<2>(i);
                if(kakuh!=H) {flag = false;break;}
            }
            if(flag){
                cout << cx << " " << cy << " " << H << endl;
            }
        }
    }   

}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:9: error: 'H' was not declared in this scope
   20 |         H = max(g,H);
      |         ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
const ll INF = 1e14;
const ll MOD = 1000000007;
const double PI = 3.1415926535897;

signed main() {
    int N;
    cin >> N;
    vector<tuple<int,int,int>> vec;
    for(int i = 0;i < N;i++) {
        int A,B,C;
        cin >> A >> B >> C;
        if(C != 0) {
            vec.emplace_back(A, B, C);
        }
    }
    int M = vec.size();
    for(int i = 0;i <= 100;i++) {
        for(int j = 0;j <= 100;j++) {
            int high = get<2>(vec.at(0)) + abs(i - get<0>(vec.at(0))) + abs(j - get<1>(vec.at(0)));
            bool judge = true;
            for(int k = 1;k < M;k++) {
                int cnt = get<2>(vec.at(k)) + abs(i - get<0>(vec.at(k))) + abs(j - get<1>(vec.at(k)));
                if(high != cnt) {
                    judge = false;
                }
            }
            if(judge == true) {
                cout << i << " " << j << " " << high << endl;
                return;
            }
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:17: error: return-statement with no value, in function returning 'int' [-fpermissive]
   33 |                 return;
      |                 ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, N) for(int i=0; i<N; i++)
typedef long long ll;

int main() {
    int n; cin >> n;
    vector<ll> x(n), y(n);
    vector<ll> h(n);
    rep(i,n) cin >> x.at(i) >> y.at(i) >> h.at(i);

    ll H = -1;
    rep(X, 101){
        rep(Y, 101){
            bool ok = true;
            H = -1;
            rep(k, n){
                if(h.at(k)<1) break;
                ll tmp = h.at(k) + (ll)abs(x.at(k)-X) + (ll)abs(y.at(k)-Y);
                tmp = max(tmp, 0);
                if(H==-1) H = tmp;
                if(H!=tmp) ok = false;
            }

            if(ok){
                cout << X << " " << Y << " "<< H << endl;
                return 0;
            }
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:26: error: no matching function for call to 'max(ll&, int)'
   20 |                 tmp = max(tmp, 0);
      |                       ~~~^~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 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:20:26: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   20 |                 tmp = max(tmp, 0);
      |                       ~~~^~~~~~~~
/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
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:20:26: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   20 |                 tmp = max(tmp, 0);
      |                       ~~~^~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define SORT(x) sort((x).begin(), (x).end())
#define ALL(x) (x).begin(), (x).end()
#define rep(i, n) for (ll i = 0; i < n; i++)
#define reps(i, m, n) for (ll i = m; i < n; i++)
#define repr(i, m, n) for (ll i = m; i >= n; i--)
template <class T> bool maxi(T &a, const T &b) {
    if (a < b) {
        a = b;
        return 1;
    }
    return 0;
}
template <class T> bool mini(T &a, const T &b) {
    if (b < a) {
        a = b;
        return 1;
    }
    return 0;
}
#define dame {cout<< "NO" <<"\n"; return;}
#define INF2 1000000000000000037
#define INF  1000000007
#define MOD  1000000007
#define PI (acos(-1))
using namespace std;
using ll = long long;
using ld = long double;
using P  = pair<ll,ll>;
//--GLOBAL---------------------------------

//--MAIN-----------------------------------
void Main() {
    ll N; cin>>N;
    vector<ll> x(N);
    vector<ll> y(N);
    vector<ll> h(N);

    rep(i,N) cin>>x[i]>>y[i]>>h[i];

    rep(xx,101){
        rep(yy,101){
            rep(i,N){
                if(h[i]!=0) tyuh=h[i]+abs(x[i]-xx)+abs(y[i]-yy);
            }
            bool ok=true;
            rep(i,N){
                if(h[i]!=max(0LL,tyuh-(abs(x[i]-xx)+abs(y[i]-yy)))) ok=false; 
            }
            if(ok){
                cout<< xx <<" "<< yy <<" "<< tyuh <<"\n"; return;
            }
        }
    }

}
//--START----------------------------------
int main() {
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    Main();
}
//-----------------------------------------


Compiler output:
a.cc: In function 'void Main()':
a.cc:44:29: error: 'tyuh' was not declared in this scope
   44 |                 if(h[i]!=0) tyuh=h[i]+abs(x[i]-xx)+abs(y[i]-yy);
      |                             ^~~~
a.cc:48:34: error: 'tyuh' was not declared in this scope
   48 |                 if(h[i]!=max(0LL,tyuh-(abs(x[i]-xx)+abs(y[i]-yy)))) ok=false;
      |                                  ^~~~
a.cc:51:46: error: 'tyuh' was not declared in this scope
   51 |                 cout<< xx <<" "<< yy <<" "<< tyuh <<"\n"; return;
      |                                              ^~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i=0; i<(n); ++i)
#define rep2(i, s, n) for(int i=s; i<(n); ++i)

using namespace std;

typedef long long ll;

static const int INTINF = (2147483647);
static const ll LLINF = (9223372036854775807);
static const int MAX = 100001;
static const ll MOD = 1000000007;

//--global--//

ll dp[101][101];

//----------//

ll cir(ll x, ll y, ll h, ll cx, ll cy){
    return max((h + abs(x-cx) + abs(y-cy), 0LL);
}

int main(int argc, const char * argv[]) {
    //提出時、消す----//
    //--------------//
    
    ll n;
    cin >> n;
    
    memset(dp, -1, sizeof(dp));
    rep(i, 101){
        rep(j, 101){
            //cout << dp[i][j];
        }
    }

    ll x, y, h;
    rep(i, n){
        cin >> x >> y >> h;

        rep(j, 101){
            rep(k, 101){
                if(!i){
                    dp[j][k] = cir(x, y, h, j, k);
                }
                else{
                    if(dp[j][k] != cir(x, y, h, j, k)){
                        dp[j][k] = -1;
                    }
                }
            }
        }
    }

    ll cx, cy, hh;

    rep(i, 101){
        rep(j, 101){
            if(dp[i][j] != -1){
                cx = i;
                cy = j;
                hh = max(h + abs(x-cx) + abs(y-cy), 0LL);
            }
        }
    }

    cout << cx << " " << cy << " " << hh << endl;
    
    return 0;
}


Compiler output:
a.cc: In function 'll cir(ll, ll, ll, ll, ll)':
a.cc:21:48: error: expected ')' before ';' token
   21 |     return max((h + abs(x-cx) + abs(y-cy), 0LL);
      |               ~                                ^
      |                                                )