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

//                          VIVEK UPADHYAY
//                         MANIT, BHOPAL(M.P)
/**********************************************************************************************/
/**********************************************************************************************/
//                        $$ JAB-TAK TODEGA NHI,
//                         TAB -TAK CHODEGA NHI :D
#include<iostream>
#include<algorithm>
#include<vector>
#include<list>
#include<cstdlib>
#include<unistd.h>
#include<string>
#include<cstring>
#include<stack>
#include<queue>
#include<utility>
#include<cmath>
#include<set>
#include<unordered_map>
#include<cstdio>
#include<map>
#include<numeric>
using namespace std;
#define F first
#define S second
#define mk(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define LINE cout<<endl ;
#define ok cout<<"ok\n" ;
typedef long long ll;
const int MAXN = 1e5+ 10 ;
const int MAX = 1e7 ;
double pi = 3.1415926535897932384626433832795;
const ll inf=1e18 ;
int x[] = {1,1,1,-1,-1,-1,0,0};
int y[] = {0,1,-1,0,-1,1,1,-1};
struct Node{
    ll x , y , h ;
} ;
ll max(ll a , ll b){
    return a > b? a : b ;
}
int main() {
    int N ;
    cin >> N ;
    Node a[N] ;
    for(int i=0;i<N;i++)
        cin >> a[i].x >> a[i].y >> a[i].h ;
    ll H=-1 ;
    for(int X = 0 ;X <= 100 ;X++)
        for(int Y=0;Y<=100;Y++)
        {
            H = -1 ;
            for(int i=0;i<N;i++){
                ll v = abs(X-a[i].x) + abs(Y-a[i].y) ;
                if(v==0) continue ;
                if(a[i].h > 0){
                    if(H==-1) H = a[i].h + v ;
                    else if(H!=a[i].h+v){
                        H=-1 ;
                        break ;
                    }
                }
                
            }
            if(H!=-1 && H>0){
                    
                    cout<<X<<" "<<Y<<" "<<H<<endl;
                    return 0 ;
                }
        }
        for(int X = 0 ;X <= 100 ;X++)
            for(int Y=0;Y<=100;Y++)
            {
                bool flag=true ;
                for(int i=0;i<N;i++)
                    if(a[i].h!=max(1-abs(X-a[i].x)-abs(Y-a[i].y),0) || (X==a[i].x && Y==a[i].Y)){
                        flag=false ;
                        break ;
                    }
                if(flag){
                    cout<<X<<" "<<Y<<" "<<"1\n" ;
                    return 0 ;
                }
            }
    
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:78:94: error: 'struct Node' has no member named 'Y'
   78 |                     if(a[i].h!=max(1-abs(X-a[i].x)-abs(Y-a[i].y),0) || (X==a[i].x && Y==a[i].Y)){
      |                                                                                              ^
Language: C

#include <bits/stdc++.h>
using namespace std;
int main() {
    int n;
    cin>>n;
    vector<int> d[3];
    for (int i = 0; i < n; ++i) {
        int x,y,h;
        cin>>x>>y>>h;
        d[0].emplace_back(x);
        d[1].emplace_back(y);
        d[2].emplace_back(h);
    }
    long lh=1,hh=1000000000,midh;
    for (int x = 0; x <= 100; ++x) {
        for (int y = 0; y <=100 ; ++y) {
            lh=1;
            hh=1000000000;
            midh=1;
            while(midh!=(lh+hh)/2){
                int stat=-1;
                if(hh-lh==1){
                    midh=hh;
                    for(int i=0;i<n;++i){
                        if(midh-abs(d[0][i]-x)-abs(d[1][i]-y)>d[2][i]){
                            if(stat==-1)stat=1;
                        }
                        else if(midh-abs(d[0][i]-x)-abs(d[1][i]-y)<d[2][i]){
                            if(stat==-1)stat=2;
                        }
                    }

                    if(stat==1){
                        hh=midh;
                    }
                    else if(stat==2){
                        lh=midh;
                    }
                    else {
                        cout<<x<<" "<<y<<" "<<midh<<endl;
                        return 0;
                    }
                }
                midh=(lh+hh)/2;
                for(int i=0;i<n;++i){
                    if(midh-abs(d[0][i]-x)-abs(d[1][i]-y)>d[2][i]){
                        if(stat==-1)stat=1;
                    }
                    else if(midh-abs(d[0][i]-x)-abs(d[1][i]-y)<d[2][i]){
                        if(stat==-1)stat=2;
                    }
                }

                if(stat==1){
                    hh=midh;
                }
                else if(stat==2){
                    lh=midh;
                }
                else {
                    cout<<x<<" "<<y<<" "<<midh<<endl;
                    return 0;
                }
            }
        }
    }
    return 0;
}

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

int main()
{
	cin >> N;
	int i;
	for( i = 0; i < N; i++ ) {
		cin >> x[i] >> y[i] >> h[i];
	}
	for( Cx = 0; Cx <= 100; Cx++ ) {
		for( Cy = 0; Cy <= 100; Cy++ ) {
			H1 = abs(Cx-x[0]) + abs(Cy-y[0]) + h[0];
			if( H1 <= 0 ) continue;
			for( i = 1; i < N; i++ ) {
				H2 = abs(Cx-x[i]) + abs(Cy-y[i]) + h[i];
				if( H1 != H2 )break;
			}
			if( i == N ) {
				cout << Cx << " " << Cy << " " << H1;
				return 0;
			}
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'cin' was not declared in this scope
    3 |         cin >> N;
      |         ^~~
a.cc:3:16: error: 'N' was not declared in this scope
    3 |         cin >> N;
      |                ^
a.cc:6:24: error: 'x' was not declared in this scope
    6 |                 cin >> x[i] >> y[i] >> h[i];
      |                        ^
a.cc:6:32: error: 'y' was not declared in this scope
    6 |                 cin >> x[i] >> y[i] >> h[i];
      |                                ^
a.cc:6:40: error: 'h' was not declared in this scope
    6 |                 cin >> x[i] >> y[i] >> h[i];
      |                                        ^
a.cc:8:14: error: 'Cx' was not declared in this scope
    8 |         for( Cx = 0; Cx <= 100; Cx++ ) {
      |              ^~
a.cc:9:22: error: 'Cy' was not declared in this scope
    9 |                 for( Cy = 0; Cy <= 100; Cy++ ) {
      |                      ^~
a.cc:10:25: error: 'H1' was not declared in this scope
   10 |                         H1 = abs(Cx-x[0]) + abs(Cy-y[0]) + h[0];
      |                         ^~
a.cc:10:37: error: 'x' was not declared in this scope
   10 |                         H1 = abs(Cx-x[0]) + abs(Cy-y[0]) + h[0];
      |                                     ^
a.cc:10:30: error: 'abs' was not declared in this scope
   10 |                         H1 = abs(Cx-x[0]) + abs(Cy-y[0]) + h[0];
      |                              ^~~
a.cc:10:52: error: 'y' was not declared in this scope
   10 |                         H1 = abs(Cx-x[0]) + abs(Cy-y[0]) + h[0];
      |                                                    ^
a.cc:10:60: error: 'h' was not declared in this scope
   10 |                         H1 = abs(Cx-x[0]) + abs(Cy-y[0]) + h[0];
      |                                                            ^
a.cc:13:33: error: 'H2' was not declared in this scope
   13 |                                 H2 = abs(Cx-x[i]) + abs(Cy-y[i]) + h[i];
      |                                 ^~
a.cc:17:33: error: 'cout' was not declared in this scope
   17 |                                 cout << Cx << " " << Cy << " " << H1;
      |                                 ^~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <utility>
#include <cstring>
#include <cmath>
const int MOD = 1e9 + 7;
const int dx[] = {1, -1, 0, 0};
const int dy[] = {0, 0, 1, -1};
using namespace std;
typedef long long ll;
int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);
	int n;
	cin >> n;
	ll x[n + 1], y[n + 1], h[n + 1];
	for(int i = 0; i < n; i++)
	{
		cin >> x[i] >> y[i] >> h[i];
	}
	for(int i = 0; i <= 100; i++)
	{
		for(int j = 0; j <= 100; j++)
		{
			for(int k = 0; k < n; k++)
			{
				bool flag = true;
				ll H = h[k] + abs(x[k] - i) + abs(y[k] - j);
				for(int l = 0; l < n; l++)
				{
					ll tmp = H - abs(x[l] - i) - abs(y[l] - j);
					if(tmp < 0)
						tmp = 0;
					if(tmp != h[l])
						flag = false;
				}
				if(flag)
				{
					cout << i << " " << j << " " << H << endl;
					return 0;
				}
			}
		}
	}



Compiler output:
a.cc: In function 'int main()':
a.cc:47:10: error: expected '}' at end of input
   47 |         }
      |          ^
a.cc:14:1: note: to match this '{'
   14 | {
      | ^
Language: C++

#include <algorithm>
using namespace std;

int main()
{   
    int n;
    cin>>n;
    int x[n],y[n],h[n],a[n];
    for(int i=0;i<n;i++){
        cin>>x[i]>>y[i]>>h[i];
    }
    for(int i=0;i<=100;i++){
        for(int j=0;j<=100;j++){
            for(int k=0;k<n;k++){
                a[k]=abs(x[k]-i)+abs(y[k]-j)+h[k];
                if(k!=0&&a[k]!=a[k-1]) break;
                else if(k==n-1){
                    cout<<i<<" "<<j<<" "<<a[k]<<endl;
                    return 0;
                }
            }
        }
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: 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 <algorithm>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:18:21: error: 'cout' was not declared in this scope
   18 |                     cout<<i<<" "<<j<<" "<<a[k]<<endl;
      |                     ^~~~
a.cc:18:21: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:49: error: 'endl' was not declared in this scope
   18 |                     cout<<i<<" "<<j<<" "<<a[k]<<endl;
      |                                                 ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <algorithm>
  +++ |+#include <ostream>
    2 | using namespace std;
Language: C++

#include <bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
#define int long long
using namespace std;
typedef pair<int,int>P;
typedef pair<int,P>P2;
#define fi first
#define se second
int dx[]={0,1,0,-1};
int dy[]={-1,0,1,0};
 
signed main(){
	int n;
	cin>>n;
	int x[n],y[n],h[n];
	r(i,n)cin>>x[i]>>y[i]>>h[i];
 
	for(int i=0;i<=100;i++){
		for(int j=0;j<=100;j++){
			set<int>st;
			int H;
			for(int k=0;k<n;k++){
				//if(h[k]<=0)continue;
				int a=abs(i-y[k]);
				int b=abs(j-x[k]);
				H=h[k]+a+b;
				H=max(0,H);
				st.insert(H);
			}
			//cout<<st.size()<<endl;
			if(st.size()==0)return 1;
			if((st.size()==1)&&(H>=1)){
				cout<<j<<' '<<i<<' '<<H<<endl;
				return 0;
			}
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:38: error: no matching function for call to 'max(int, long long int&)'
   27 |                                 H=max(0,H);
      |                                   ~~~^~~~~
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:27:38: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   27 |                                 H=max(0,H);
      |                                   ~~~^~~~~
/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:27:38: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   27 |                                 H=max(0,H);
      |                                   ~~~^~~~~
Language: C++

#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define INF (1<<30)
#define INFLL (1ll<<60)
typedef pair<ll, ll> P;
typedef pair<ll, P> E;
#define MOD (1000000007ll)
#define l_ength size
#define hg first
#define p second.first
#define q second.second

void mul_mod(ll& a, ll b){
	a *= b;
	a %= MOD;
}

void add_mod(ll& a, ll b){
	b += MOD;
	a += b;
	a %= MOD;
}

vector<E> v;

bool comp(E a, E b){
	return (a.hg < b.hg);
}

int main(void){
	int n,i;
	ll cx,cy,x,y,h;
	bool flag = true;
	cin >> n;
	for(i=0; i<n; ++i){
		cin >> x >> y >> h;
		v.push_back(E(h,P(x,y)));
	}
	for(cx=0ll; cx<=100ll; ++cx){
		for(cy=0ll; cy<=100ll; ++cy){
			h=INFLL;
			for(i=0; i<n; ++i){
				h = min(v[i].hg+abs(v[i].p-cx)+abs(v[i].q-cy),h);
			}
			flag = true;
			for(i=0; i<n; ++i){
				if(max(h-abs(v[i].p-cx)-abs(v[i].q-cy),0ll)!=v[i].hg){
					flag = false;
					break;
				}
			}
			if(flag){
				cout << cx << " " << cy << " " << h << endl;
				retrun 0;
			}
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:55:33: error: 'retrun' was not declared in this scope
   55 |                                 retrun 0;
      |                                 ^~~~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<cmath>
#include<vector>
#include<queue>
#include<map>
#include<algorithm>
#include<set>
#include<complex>
#include<string>
#include<cstring>
using namespace std;
#define rep2(x,from,to) for(long long x=(from);(x)<(to);(x)++)
#define rep(x,to) rep2(x,0,to)
#define INF 100000000
#define debug(x) cout<<#x<<": "<<x<<endl

#define all(x) x.begin(),x.end()
typedef pair<long long,long long> P;
typedef pair<long long,P> PP;

long long n;

long long x[101];
long long y[101];
long long h[101];
long long f;
long long hai[101][101][101];
int main()
{
	cin>>n;
	rep(i,n)
	{
		cin>>x[i]>>y[i]>>h[i];
		if(h[i]!=0)rep(j,101)rep(k,101)
		{
			hai[i][j][k]=h[i]+abs(x[i]-j)+abs(y[i]-k);
		}
	}
	rep(j,101)rep(k,101)
	{
		f=1;
		rep(i,n)
		{
			if(h[i]!=0&&hai[i][j][k]!=hai[0][j][k])f=0;
		}
		if(f)
		{
			f=1;
			rep(i,n)
			{
				if(max(hai[0][j][k]-abs(j-x[i])-abs(k-y[i]),(long long)0)!=h[i])f=0;
			}
			if(f==1&&hai[0][j][k]>=1&&)cout<<j<<" "<<k<<" "<<hai[0][j][k]<<endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:54:51: error: expected primary-expression before ')' token
   54 |                         if(f==1&&hai[0][j][k]>=1&&)cout<<j<<" "<<k<<" "<<hai[0][j][k]<<endl;
      |                                                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >>n;
int x[n],y[n];
long long int 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++){
            for (long long int hh=(h[0]-200);hh<=h[0]+200;hh++){
bool xyz=true;
                     for (int i=0;i<n;i++){
if(h[i]!=max(hh-abs(cx-x[i])-abs(cy-y[i]),0)) xyz=false;
}
if (xyz==true) cout <<cx <<" "<< cy <<" "<<hh <<endl;
           }
      }
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:13: error: no matching function for call to 'max(long long int, int)'
   16 | if(h[i]!=max(hh-abs(cx-x[i])-abs(cy-y[i]),0)) xyz=false;
      |          ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:16:13: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   16 | if(h[i]!=max(hh-abs(cx-x[i])-abs(cy-y[i]),0)) xyz=false;
      |          ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:16:13: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   16 | if(h[i]!=max(hh-abs(cx-x[i])-abs(cy-y[i]),0)) xyz=false;
      |          ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>

using namespace std;
const int N=100+10;
int dx[4]={-1,1,0,0};
int dy[4]={0,0,-1,1};
int n,x1,y1,h1;

struct abc
{
    int x,y,h;
};

abc a[N];

int main()
{
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        cin>>a[i].x>>a[i].y>>a[i].h;
    }
    for(int i=0;i<=100;i++)
    {
        for(int j=0;j<=100;j++)
        {
            h1=a[1].h+abs(a[1].x-i)+abs(a[1].y-j);
            bool flag=true;
            for(int k=2;k<=n;k++)
            {
                if(a[k].h!=h1-abs(a[k].x-i)-abs(a[k].y-j))
                {
                    flag=false;
                    break;
                }
            }
            if(flag)
            {
                cout<<i<<' '<<j<<' '<<h1<<endl;
                return 0;
            }
        }
    }



    return 0;


}


Compiler output:
a.cc:7:10: error: 'int y1' redeclared as different kind of entity
    7 | int n,x1,y1,h1;
      |          ^~
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:683,
                 from /usr/include/c++/14/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:33,
                 from a.cc:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:257:1: note: previous declaration 'double y1(double)'
  257 | __MATHCALL (y1,, (_Mdouble_));
      | ^~~~~~~~~~
Language: C++

#include <algorithm>
#include <bitset>
#include <cmath>
#include <functional>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <unordered_map>
#include <unordered_set>
using namespace std;

#define ABS(a) (((a) >= 0) ? (a) : -(a))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) > (b) ? (b) : (a))
#define FOR(i, a, b) for (int i = (a); i <= (b); ++i)
#define RFOR(i, a, b) for (int i = (a); i >= (b); --i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define NINTH_POWER_OF_TEN 1000000000
#define LL_INF (numeric_limits<long long>::max()/2)
#define int long long

typedef long long ll;
typedef pair<int, int> Pair;

const int kMaxN = 100;

int N;
int x[kMaxN], y[kMaxN], h[kMaxN];
int ans = 0;

void Swap(int a[], int i, int j) {
  int tmp = a[i];
  a[i] = a[j];
  a[j] = tmp;
}

signed main() {
  cin >> N;
  REP(i, N) { cin >> x[i] >> y[i] >> h[i]; }

  int idx = 0;
  while (h[idx] != 0) { ++idx; }
  Swap(x, 0, idx);
  Swap(y, 0, idx);
  Swap(h, 0, idx);

  int Cx, Cy, H;
  FOR(i, 0, 100) {
    FOR(j, 0, 100) {
      Cx = i; Cy = j;
      H = h[0] + ABS(x[0]-Cx) + ABS(y[0]-Cy);
      bool f = true;
      REP(k, N-1) {
        if (h[1+k] != MAX(H[i]-ABS(x[1+k]-Cx)-ABS(y[1+k]-Cy), 0)) {
          f = false;
          break;
        }
      }
      if (f) { goto r;}
    }
  }

r:
  cout << Cx << " " << Cy << " " << H << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:59:28: error: invalid types 'long long int[long long int]' for array subscript
   59 |         if (h[1+k] != MAX(H[i]-ABS(x[1+k]-Cx)-ABS(y[1+k]-Cy), 0)) {
      |                            ^
a.cc:18:21: note: in definition of macro 'MAX'
   18 | #define MAX(a, b) ((a) > (b) ? (a) : (b))
      |                     ^
a.cc:59:28: error: invalid types 'long long int[long long int]' for array subscript
   59 |         if (h[1+k] != MAX(H[i]-ABS(x[1+k]-Cx)-ABS(y[1+k]-Cy), 0)) {
      |                            ^
a.cc:18:33: note: in definition of macro 'MAX'
   18 | #define MAX(a, b) ((a) > (b) ? (a) : (b))
      |                                 ^
Language: C++

//************************
//*  Date: 2018.9.28     *
//*  Problem:            *
//*  Author: xuziyuan    * 
//************************

#include <bits/stdc++.h>

#define rt0 return 0
#define rep(i,n) for(LL i=0;i<n;i++)
#define repn(i,n) for(LL i=1;i<=n;i++)
#define LL long long
#define pii pair<int,int>
#define pb push_back
#define fi first
#define se second
#define mpr make_pair

using namespace std;

const LL MOD=1e9+7;

LL n;
LL x[110],y[110],h[110];

int main()
{
	cin>>n;
	rep(i,n) cin>>x[i]>>y[i]>>h[i];
	rep(i,101)
	{
		rep(j,101)
		{
			LL cx=i,cy=j,hh=-1;
			bool can=true;
			rep(k,n)
			{
				LL p=hh;
				if(hh!=-1)
				{
					LL mu=max(hh-abs(cx-x[k])-abs(cy-y[k]),(LL)0);
					if(mu!=h[k])
					{
						can=false;
						break;
					}
				}
				p=h[k]+abs(cx-x[k])+abs(cy-y[k]);
				if(hh!=-1&&p!=hh)
				{
					can=false;
					break;
				}
				hh=p;
			}
			if(can&&h>1)
			{
				cout<<i<<' '<<j<<' '<<hh<<endl;
				rt0;
			}
		}
	}
	rt0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:56:34: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   56 |                         if(can&&h>1)
      |                                 ~^~
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define int long long
#define pb push_back
#define FOR(i, a, b) for(int i=(a);i<(b);i++)
#define REP(i, n) FOR(i, 0, n)
#define RFOR(i, a, b) for(int i=(a);i>=(b);i--)
#define RREP(i, n) FOR(i, n, 0);

signed main () {
  cin.tie(0);
  cout << setprecision(10);

  int n; cin >> n;
  vector<int> x(n), y(n), h(n);
  REP(i, n) {
    cin >> x[i] >> y[i] >> h[i];
  }
  bool ok = false;
  vector<int> ans(3);
  ans[0] = -1;
  ans[1] = -1;
  ans[2] = -1;
  REP(cx, 101) {
    REP(cy, 101) {
      int hmax = 0;
      ok = true;
      REP(i, n) {
        if(hmax == 0 && (h[i] != 0) {
          hmax = h[i] + abs(cx - x[i]) + abs(cy - y[i]);
          i = -1;
        }
        if(h[i] == 0 && abs(cx - x[i]) + abs(cy - y[i]) < hmax) {
          ok = false;
          break;
        } else if (h[i] > 0 && abs(cx - x[i]) + abs(cy - y[i]) + h[i] != hmax) {
          ok = false;
          break;
        }
      }
      if(ok) {
        ans[0] = cx;
        ans[1] = cy;
        ans[2] = hmax;
        break;
      }
    }
  }

  cout << ans[0] << " " << ans[1] << " " << ans[2] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:36: error: expected ')' before '{' token
   31 |         if(hmax == 0 && (h[i] != 0) {
      |           ~                        ^~
      |                                    )
a.cc:42:7: error: expected primary-expression before '}' token
   42 |       }
      |       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN=1e6+5;
int x[MAXN], y[MAXN], h[MAXN];

bool check(int i, int j, int n)
{
	set <int> st;
	for(int k=0;k<n;k++)
		st.insert(h[k] + abs(x[k]-i) + abs(y[k]-j));
	st.erase(0);
	if(st.size()==1){
		cout << i << ' ' << j << ' ' << *st.begin();
		return true;
	}
	return false;
}

int main(){
    ios::sync_with_stdio(0);
    cout.tie(0);
    cin.tie(0);
    int n;
    cin >> n;
    for(int i=0;i<n;i++)
		cin >> x[i] >> y[i] >> h[i];
	
	for(int i=0;i<=100;i++)
		for(int j=0;j<=100;j++)
			if(check(i,j, n))
				return 0;
	cout << 		
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:1: error: expected primary-expression before '}' token
   34 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define ALL(A) A.begin(),A.end()
#define RALL(A) A.rbegin(),A.rend()
typedef long long LL;
typedef pair<LL,LL> P;
const LL mod=998244353;
const LL LINF=1LL<<62;




int main(){
    int n;cin >> n;
    LL x[n],y[n],h[n];
    for(int i=0;i<n;i++){
        cin >> x[i] >> y[i] >> h[i];
    }
    for(LL i=0;i<=100;i++){
        for(LL j=0;j<=100;j++){
            LL z=0;
            for(int k=0;k<n;k++){
                LL t=abs(x[k]-i)+abs(y[k]-j);
                LL s=max(h[k]+t,0);
                if(z==0&&s>=1) z=s;
                else if(z&&z!=h[k]+t&&h[k]+t>=1) break;
                if(k==n-1&&z>=1){
                    cout << i << " " << j << " " << z << endl;
                    return 0;
                }
            }
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:25: error: no matching function for call to 'max(LL, int)'
   29 |                 LL s=max(h[k]+t,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:29:25: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   29 |                 LL s=max(h[k]+t,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:29:25: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   29 |                 LL s=max(h[k]+t,0);
      |                      ~~~^~~~~~~~~~
Language: C++


#include<algorithm>
#include<iostream>
#include<vector>
#include<string>
#include<cstring>
#include<utility>
#include<queue>
using namespace std;
#define REP(i, a,b) for(i=a;i<b;i++) 
#define REP1(i,b,a) for(i=b-1;i>=a;i--)
#define output(x) cout<<x<<endl;
#define pb(x) push_back(x);
typedef long long int ll;
const int MAX = 510000;
const int MOD = 1000000007;

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()
{
	ll  i, j, k, l, m, sum, flag, N,  M, K, H, W, B;
	sum = 0;
	flag = 0;
	cin >> N;
	vector<ll>x(N);
	vector<ll>y(N);
	vector<ll>h(N);
	REP(i, 0, N) {
		cin >> x[i] >> y[i] >> h[i];
	}
	REP(i, 0, 101) {
		REP(j, 0, 101) {
			flag = 0;
			REP(k, 0, N) {
				if (h[k] != 0) {
					H = abs(x[k] - i) + abs(y[k] - j) + h[k];
					break;
					
				}
			}
			REP(k, 0, N) {
				if (fmax(H - abs(x[k] - i) - abs(y[k] - j), 0) != h[k]) {
					flag = 1;
					break;
				
				}
				}
			if(flag==0){
				break;
			}

		}
		if (flag == 0) {
			break;
		}
	}
	cout << i << " " << j << " " << H;
	
}













Compiler output:
a.cc: In function 'int main()':
a.cc:64:37: error: 'fmax' was not declared in this scope
   64 |                                 if (fmax(H - abs(x[k] - i) - abs(y[k] - j), 0) != h[k]) {
      |                                     ^~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <set>
using namespace std;

const int INF = 1e9;

int n;
int X[100], Y[100], H[100];

int sub(int x, int y) {
  set<int> st;
  int lim = INF;
  for (int i = 0; i < n; ++i) {
    int diff = abs(X[i] - x) + abs(Y[i] - y);
    if (H[i] == 0) {
      lim = min(lim, diff);
      continue;
    }
    
    st.insert(H[i] + diff);
  }
  
  int ans = *st.begin();
  if (st.size() == 1 && ans <= mx) return ans;
  return -1;
}

int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> X[i] >> Y[i] >> H[i];
  }
  
  for (int i = 0; i <= 100; ++i) {
    for (int j = 0; j <= 100; ++j) {
      int ans = sub(i, j);
      if (ans > 0) {
        cout << i << ' ' << j << ' ' << ans << endl;
      }
    }
  }
}


Compiler output:
a.cc: In function 'int sub(int, int)':
a.cc:26:32: error: 'mx' was not declared in this scope; did you mean 'x'?
   26 |   if (st.size() == 1 && ans <= mx) return ans;
      |                                ^~
      |                                x
Language: C++

#pragma GCC optimize("O2")
#include <iostream>
#include <cmath>
using namespace std;
#define ll long long
ll x[105],y[105],h[105];
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    ll n;
    cin >> n;
    for (ll i=0;i<n;i++) {
        cin >> x[i] >> y[i] >> h[i];
    }
    for (ll i=0;i<=100;i++) {
        for (ll j=0;j<=100;j++) {
            ll H;
            for (ll k=0;k<n;k++) {
                if (h[k]!=0) {
                    H = h[k] + abs(x[k]-i) + abs(y[k]-j);
                    break;
                }
            }
            bool check = true;
            for (ll k=0;k<n;k++) {
                if (max(H-abs(x[k]-i)-abs(y[k]-j),0)!=h[k]) {check=false;break;}
            }
            if (check) {
                cout << i << ' ' << j << ' ' << H << endl;
                return 0;
            }
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:24: error: no matching function for call to 'max(long long int, int)'
   26 |                 if (max(H-abs(x[k]-i)-abs(y[k]-j),0)!=h[k]) {check=false;break;}
      |                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:2:
/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:26:24: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   26 |                 if (max(H-abs(x[k]-i)-abs(y[k]-j),0)!=h[k]) {check=false;break;}
      |                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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
Language: C++

#include <iostream>
#include <algorithm>
#include <bitset>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#include <complex>
#include <string.h>
#include <numeric>
using namespace std;

//#define int long long
#define reps(i,s,n) for(int (i)=(s);(i)<(n);++(i))
#define rep(i,n) reps(i,0,n)
#define rept(i,n) rep(i,(n)+1)
#define repst(i,s,n) reps(i,s,(n)+1)
#define reprt(i,n,t) for(int (i)=(n);(i)>=(t);--(i))
#define repr(i,n) reprt(i,n,0)
#define each(i,v) for(auto &(i):(v))
#define eachr(i,v) for(auto &(i)=(v).rbegin();(i)!=(v).rend();(i)++)
#define all(c) (c).begin(),(c).end()
#define rall(c) (c).rbegin(),(c).rend()
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define tmax(x,y,z) max(x,max(y,z))
#define tmin(x,y,z) min(x,min(y,z))
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
#define ln '\n'
#define bln(i,n) (((i)==(n)-1)?'\n':' ')
#define dbg(x) cout<<#x" = "<<(x)<<ln<<flush
#define dbga(x,n) {cout<<#x" : ";for(int (i)=0;i<(n);++i){cout<<((x)[i])<<(i==((n)-1)?'\n':' ')<<flush;}}
#define zero(a) memset(a,0,sizeof(a))
#define unq(a) sort(all(a)),a.erase(unique(all(a)),a.end())

//typedef complex<double> P;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<string> vst;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<vector<int> > mat;

const ll inf = (ll)1e9+10;
const ll linf = (ll)1e18+10;
const ll mod = (ll)(1e9+7);
const int dx[] = {0, 1, 0, -1};
const int dy[] = {1, 0, -1, 0};
const int ddx[] = {0, 1, 1, 1, 0, -1, -1, -1};
const int ddy[] = {1, 1, 0, -1, -1, -1, 0, 1};
const double eps = 1e-10;

ll mop(ll a,ll b,ll m=mod) {ll r=1;a%=m;for(;b;b>>=1){if(b&1)r=r*a%m;a=a*a%m;}return r;}
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;}
bool ool(int x,int y,int h,int w) {return((x<0)||(h<=x)||(y<0)||(w<=y));}
bool deq(double a,double b) {return abs(a-b)<eps;}

struct oreno_initializer {
	oreno_initializer() {
		cin.tie(0);
		ios::sync_with_stdio(0);
	}
} oreno_initializer;



int n, x[101], y[101], h[101];

signed main() {
	cin >> n;
	rep(i,n) cin >> x[i] >> y[i] >> h[i];
	rep(i,101) rep(j,101) {
		int h = h[0] + abs(i-x[0]) + abs(j-y[0]);
		bool ok = 1;
		rep(i,n) if (max(h-abs(i-x[i])-abs(j-y[i]),0)!=h[i]) ok = 0;
		if (ok) return cout << i << ' ' << j << ' ' << h << endl, 0;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:83:26: error: invalid types 'int[int]' for array subscript
   83 |                 int h = h[0] + abs(i-x[0]) + abs(j-y[0]);
      |                          ^
a.cc:85:65: error: invalid types 'int[int]' for array subscript
   85 |                 rep(i,n) if (max(h-abs(i-x[i])-abs(j-y[i]),0)!=h[i]) ok = 0;
      |                                                                 ^
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
using namespace std;

const int INF = 1e9;

int n;
int X[100], Y[100], H[100];

int sub(int x, int y) {
  set<int> st;
  for (int i = 0; i < n; ++i) {
    int diff = abs(X[i] - x) + abs(Y[i] - y);
    st.insert(H[i] + diff);
  }
  if (st.size() == 1) return *st.begin();
  return -1;
}

int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> X[i] >> Y[i] >> H[i];
  }
  
  for (int i = 0; i <= 100; ++i) {
    for (int j = 0; j <= 100; ++j) {
      int ans = sub(i, j);
      if (ans > 0) {
        cout << i << ' ' << j << ' ' << ans << endl;
      }
    }
  }
}

Compiler output:
a.cc: In function 'int sub(int, int)':
a.cc:12:3: error: 'set' was not declared in this scope
   12 |   set<int> st;
      |   ^~~
a.cc:4:1: note: 'std::set' is defined in header '<set>'; this is probably fixable by adding '#include <set>'
    3 | #include <algorithm>
  +++ |+#include <set>
    4 | using namespace std;
a.cc:12:7: error: expected primary-expression before 'int'
   12 |   set<int> st;
      |       ^~~
a.cc:15:5: error: 'st' was not declared in this scope; did you mean 'std'?
   15 |     st.insert(H[i] + diff);
      |     ^~
      |     std
a.cc:17:7: error: 'st' was not declared in this scope; did you mean 'std'?
   17 |   if (st.size() == 1) return *st.begin();
      |       ^~
      |       std
Language: C++

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


//約数列挙
vector<long long> calc(long long N) {
	vector<long long> x;
	for (int long long = 1; i <= sqrt(N); i++) {
		if (0 == N % i) {
			x.push_back(i);
			if (N != i * i) {
				x.push_back(N / i);
			}
		}
	}
	return x;
}

int main() {
	long long N,M;
	cin >> N>>M;
	vector <long long > v = calc(M);
	std::sort(v.begin(), v.end(), std::greater<long long>());
	for (int n = 0;n<v.size();++n) {
		if (M >= v[n]*N) {
			cout << v[n]<<endl;
			break;
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'std::vector<long long int> calc(long long int)':
a.cc:8:28: error: expected unqualified-id before '=' token
    8 |         for (int long long = 1; i <= sqrt(N); i++) {
      |                            ^
a.cc:8:27: error: expected ';' before '=' token
    8 |         for (int long long = 1; i <= sqrt(N); i++) {
      |                           ^~
      |                           ;
a.cc:8:28: error: expected primary-expression before '=' token
    8 |         for (int long long = 1; i <= sqrt(N); i++) {
      |                            ^
a.cc:8:33: error: 'i' was not declared in this scope
    8 |         for (int long long = 1; i <= sqrt(N); i++) {
      |                                 ^
a.cc:8:45: error: expected ')' before ';' token
    8 |         for (int long long = 1; i <= sqrt(N); i++) {
      |             ~                               ^
      |                                             )
a.cc:8:47: error: 'i' was not declared in this scope
    8 |         for (int long long = 1; i <= sqrt(N); i++) {
      |                                               ^
Language: C++

#include <bits/stdc++.h>
typedef long long ll;
typedef long double ld;
#define rep(i,n) for(ll i=0;i<(n);i++)
#define repr(i,n) for(ll i=(n-1);i>=0;i--)
#define all(x) x.begin(),x.end()
#define br cout << "\n";
using namespace std;
const long long INF = 1e10;
const long long MOD = 1e9+7;
using Graph = vector<vector<ll>>;
using pll = pair<ll, ll>;
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;}

// 0 false, 1 true 
// string to int : -48
// a to A : -32
// ceil(a)  1.2->2.0
// c++17	g++ -std=c++17 a.cpp

int main() {
    std::cout << std::fixed << std::setprecision(15);
    ll n, m; cin >> n >> m;
    ll ans = 1;
    for(ll i = 1; i <= min(m/n, 100000); i++){
        ll d = m / i;
        ll amari = m % i;
        if(amari != 0) continue;
        if(d >= n) ans = max(ans, i);
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:27: error: no matching function for call to 'min(ll, int)'
   26 |     for(ll i = 1; i <= min(m/n, 100000); i++){
      |                        ~~~^~~~~~~~~~~~~
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:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:26:27: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   26 |     for(ll i = 1; i <= min(m/n, 100000); i++){
      |                        ~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281: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:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:26:27: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   26 |     for(ll i = 1; i <= min(m/n, 100000); i++){
      |                        ~~~^~~~~~~~~~~~~
Language: C++

#include<iostream>
using namespace std;
typedef long long ll;
int main(){
  ll n,m;
  cin>>n>>m;
  ll ans=-1;
  for(ll i=1;i*i<=m;i++)
    if(m/i>=n)
      ans = max(ans,i)
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: expected ';' before 'cout'
   10 |       ans = max(ans,i)
      |                       ^
      |                       ;
   11 |   cout<<ans<<endl;
      |   ~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
  ll n,m;
  cin>>n>>m;
  ll ans=-1;
  for(ll i=1;i*i<=m;i++)
    if(m/i>=n)
      ans = max(ans,i)
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: expected ';' before 'cout'
   10 |       ans = max(ans,i)
      |                       ^
      |                       ;
   11 |   cout<<ans<<endl;
      |   ~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ALL(x) (x).begin(),(x).end()
#define COUT(x) cout<<(x)<<"\n"
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define REP(i, n) for(int i=0;i<n;i++)
#define YES(x) cout<<(x?"YES":"NO")<<"\n"
#define Yes(x) cout<<(x?"Yes":"No")<<"\n"
#define dump(x) cout<<#x<<" = "<<(x)<<"\n"
#define endl "\n"
using G = vector<vector<int>>;
using M = map<int,int>;
using P = pair<int,int>;
using PQ = priority_queue<int>;
using PQG = priority_queue<int,vector<int>,greater<int>>;
using V = vector<int>;
using ll = long long;
using edge = struct { int to; int cost; };
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
const int INF = 1e9;
const int MOD = 1e9+7;
const ll LINF = 1e18;

int main() {
  IOS;
  int n,m; cin >> n >> m;
  int ans = 1;
  for (ll a=1; a*a <= m; a++) {
    if (m%a) continue;

    ll b = m/a;
    if (a*n <= m) chmax(ans,a);
    if (b*n <= m) chmax(ans,b);
  }
  COUT(ans);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:24: error: no matching function for call to 'chmax(int&, ll&)'
   33 |     if (a*n <= m) chmax(ans,a);
      |                   ~~~~~^~~~~~~
a.cc:19:23: note: candidate: 'template<class T> bool chmax(T&, const T&)'
   19 | template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
      |                       ^~~~~
a.cc:19:23: note:   template argument deduction/substitution failed:
a.cc:33:24: note:   deduced conflicting types for parameter 'const T' ('int' and 'll' {aka 'long long int'})
   33 |     if (a*n <= m) chmax(ans,a);
      |                   ~~~~~^~~~~~~
a.cc:34:24: error: no matching function for call to 'chmax(int&, ll&)'
   34 |     if (b*n <= m) chmax(ans,b);
      |                   ~~~~~^~~~~~~
a.cc:19:23: note: candidate: 'template<class T> bool chmax(T&, const T&)'
   19 | template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
      |                       ^~~~~
a.cc:19:23: note:   template argument deduction/substitution failed:
a.cc:34:24: note:   deduced conflicting types for parameter 'const T' ('int' and 'll' {aka 'long long int'})
   34 |     if (b*n <= m) chmax(ans,b);
      |                   ~~~~~^~~~~~~
Language: C++

#include<cstdio>
#include<vector>
#include<functional>
#include<algorithm>
using namespace std;

int main(){
	unsigned N, M;
	scanf("%u %u", &N, &M);
	vector<unsigned> divisor;
	for (unsigned i = 1; i*i <= N; ++i){
	if(!(N%i)){
		divisors.push_back(i);
			if(i != N/i) divisors.push_back(N/i);
		}
	}
	sort(divisor.begin(), divisor.end(), greater<unsigned>());
	for(unsigned gcd : divisor){
		if(M/gcd >= N){
			printf("%u\n", gcd);
			return 0;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: 'divisors' was not declared in this scope; did you mean 'divisor'?
   13 |                 divisors.push_back(i);
      |                 ^~~~~~~~
      |                 divisor
Language: C++

#include <iostream>
#include <utility>
#include <cmath>

using namespace std;

int e_gcd(int a, int b)         //C++17だとgcdでは競合するため
{
    if (b > a) swap(a, b);
    if (a % b == 0)
    {
        return b;
    }else
    {
        return (e_gcd(b, a % b));
    }
    
}

int main(int argc, char const *argv[])
{
    int N, M;
    cin >> N >> M;
    int ans;
    if (M % N == 0)
    {
        ans = M / N;
    }else
    {
        for (int i = 1; (int)pow(M / (N - 1 + i)) <= M; i++)
        {
            if (M % (N - 1 + i) == 0)
            {
                ans = M / (N - 1 + i);
                break;
            }
            
        }
           
    }
    
    cout << ans << endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:30:33: error: no matching function for call to 'pow(int)'
   30 |         for (int i = 1; (int)pow(M / (N - 1 + i)) <= M; i++)
      |                              ~~~^~~~~~~~~~~~~~~~~
In file included from a.cc:3:
/usr/include/c++/14/cmath:1074:5: note: candidate: 'template<class _Tp, class _Up> constexpr typename __gnu_cxx::__promote_2<_Tp, _Up>::__type std::pow(_Tp, _Up)'
 1074 |     pow(_Tp __x, _Up __y)
      |     ^~~
/usr/include/c++/14/cmath:1074:5: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:683,
                 from /usr/include/c++/14/bits/requires_hosted.h:31,
                 from /usr/include/c++/14/iostream:38,
                 from a.cc:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:173:1: note: candidate: 'double pow(double, double)'
  173 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:173:1: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/cmath:380:3: note: candidate: 'constexpr long double std::pow(long double, long double)'
  380 |   pow(long double __x, long double __y)
      |   ^~~
/usr/include/c++/14/cmath:380:3: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/cmath:376:3: note: candidate: 'constexpr float std::pow(float, float)'
  376 |   pow(float __x, float __y)
      |   ^~~
/usr/include/c++/14/cmath:376:3: note:   candidate expects 2 arguments, 1 provided