#include using namespace std; inline int check(int minx,int maxx){ cout<>d1; if(d1==0)return -1; cout<>d2; if(d2==0)return -1; if(d1==d2)return 0; else if(d1>d2)return 2; else return 1; } int main(){ int minx=0,maxx=100000; int resx=0; bool flag=0; while(maxx-minx>1){ int temp=check(minx,maxx); if(temp==-1)return 0; else if(temp==0){ resx=(minx+maxx)/2; flag=1; break; }else if(temp==1){ maxx=(minx+maxx)/2; }else{ minx=(minx+maxx)/2; } } if(!flag){ int temp=check(minx,maxx); if(temp==1)resx=minx; else resx=maxx; } cout<>dd; cout<