Language: C++

//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define all(v) v.begin(), v.end()
using in = int64_t;
#define rep(i, n) for (in i = 0; i < (in)(n); i++)
#define REP(i,a,b) for(in i=(in)(a);i<(in)(b);i++)
#define Yes cout<<"Yes"<<endl
#define No cout<<"No"<<endl
#define yes cout<<"yes"<<endl
#define no cout<<"no"<<endl
const double PI=3.14159265358979323846;
const in MOD = 1000000007;
const in INF=1e18+7;
const in inf=1e9+7;
using P=pair<in,in>;
vector<in> dx={0,1,-1,0};
vector<in> dy={1,0,0,-1};

in sq4(in x){
    in y=1;
    while(y*y*y*y<x){
        y ++;
    }
    return y;
}

in p5(in x){
    in y=x*x;
    return y*y*x;
}

int main(){
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
cout << fixed << setprecision(10);
    in x;
    cin>>x;
    in limb=sq4(x);

    in s=0;
    while(p5(s)<=x){
        if(p5(s)==x){
            cout<<s<<" "<<0<<endl;
            return 0;
        }
        s ++;
    }

    for(in b=-limb;b<limb;b++){//1e4
        if(b==0) continue;
        in b2=b*b;
        for(in a=max(1,b+1);a*a*b2<=x;a++){
            if(p5(a)-p5(b)==x){
                cout<<a<<" "<<b<<endl;
                return 0;
            }
        }
    }
}/*
./problem.exe
*/

Compiler output:
a.cc: In function 'int main()':
a.cc:52:21: error: no matching function for call to 'max(int, in)'
   52 |         for(in a=max(1,b+1);a*a*b2<=x;a++){
      |                  ~~~^~~~~~~
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: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:52:21: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'in' {aka 'long int'})
   52 |         for(in a=max(1,b+1);a*a*b2<=x;a++){
      |                  ~~~^~~~~~~
/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:52:21: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   52 |         for(in a=max(1,b+1);a*a*b2<=x;a++){
      |                  ~~~^~~~~~~