#include #include using namespace std; int n,i,j,v,x; int cautx(int a,int b) { int m=(a+b)>>1; if (a==b) return a; else { cout<>v; if (v<0) return cautx(m+1,b); else { if (v==0) exit(0); return cautx(a,m); } } } void cauty(int l,int a,int b) { int m=(a+b)>>1; if (a==b) { cout<>v; if (v==0) exit(0); if (v<0) cauty(l,m+1,b); else cauty(l,a,m); } } int main() { n=3; x=cautx(0,n-1); cout<>v; if (v==0) exit(0); if (v>0) x--; cout<>v; if (v<0) cauty(x+1,0,n-1); else { if (v==0) exit(0); else cauty(x,0,n-1); } return 0; }