这是 CF D 的代码,不知道该怎么判有没有读入
#include<cstdio>
#include<algorithm>
#include<iostream>
#include<cstdlib>
#include<cmath>
using namespace std;
#define N 200005
typedef long long ll;
typedef double db;
int t,a[3];
void work(){
scanf("%d",&a[1]); int ans=0;
int now=pow(2,0); bool flag=1;
for(int j=0;j>=0;j--){
printf("- %d\n",now);
fflush(stdout); flag^=1;
scanf("%d",&a[flag]);
if(a[flag]==a[flag^1]-1) ans|=now;
now/=2;
}
printf("! %d\n",ans);
fflush(stdout);
}
int main(){
scanf("%d",&t);
while(t--) work();
return 0;
}