Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef int64_t llo;
#define mp make_pair
#define pb push_back
#define a first
#define b second
llo coo=0;
llo ask(llo aa){
	coo+=1;
	if(coo==65){
		while(true){
			continue;
		}
	}
	cout<<"? "<<aa<<endl;

	char x;
	cin>>x;
	if(x=='Y'){
		return 1;
	}
	else{
		return 0;
	}
}
llo pre[13];
llo pre2[13];
int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	llo pp=1;
	llo ind=0;
	pre[0]=1;
	for(llo i=1;i<13;i++){
		pre[i]=pre[i-1]*(llo)10;
	}
	pre2[0]=9;
	for(llo i=1;i<13;i++){
		pre2[i]=pre2[i-1]+9*pre[i];
	}
	for(llo i=1;i<11;i++){
		if(ask(pp)){
			ind=max(ind,i);
		}
		else{
			break;
		}
		pp*=10;
	}
	if(ind==10){
		llo num=1;
		if(ask(9)){
			cout<<"! "<<1<<endl;
			return 0;
		}
		for(llo i=1;i<10;i++){
			num*=10;
			if(ask(num+pre[i-1]*9)){
				cout<<"! "<<(num)<<endl;
				return 0;
			}
		}


	}
	else{
		llo num=0;
		for(llo i=0;i<ind;i++){
			llo low=0;
			llo high=9;
			/*if(ask(num+pre[ind-i]*9)){
				num+=9*pre[ind-i];
				continue;
			}*/
			while(low<high-1){
				llo mid=(low+high)/2;
				if(ask(num+pre[ind-i]*mid+pre2[ind-i-1])){
					high=mid;
				}
				else{
					low=mid+1;
				}
			}
			llo ans=9;
			for(int i=low;i<high+1;i++){
			//	if()
			/*}
			if(low!=high){*/
				if(ask(num+pre[ind-i]*i+pre2[ind-i-1])){
					ans=min(ans,i);
				}
			}
			num+=(pre[ind-i]*(ans));
		}
		cout<<"!"<<" "<<(num)/(llo)10<<endl;
	}




	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:91:48: error: no matching function for call to 'min(llo&, int&)'
   91 |                                         ans=min(ans,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:91:48: note:   deduced conflicting types for parameter 'const _Tp' ('long int' and 'int')
   91 |                                         ans=min(ans,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:91:48: note:   mismatched types 'std::initializer_list<_Tp>' and 'long int'
   91 |                                         ans=min(ans,i);
      |                                             ~~~^~~~~~~