#include #include #include int n,k,x,answered=0,below=1,above=1; void divide(int left,int right) { if (k>1) { if (left==right) { answered=1; printf("answer %d\n",left); fflush(stdout); char s[10]; scanf("%s",s); } else { printf("query %d\n",(left+right)/2); fflush(stdout); char s[10]; scanf("%s",s); if (strcmp(s,"broke")==0) { k--; above=(left+right)/2-1; divide(left,(left+right)/2); } else if (strcmp(s,"survived")==0) { divide((left+right)/2+1,right); below=(left+right)/2+1; } else { exit(1); } } } } int main() { scanf("%d %d",&n,&k); above=n; if (k==1) { int i=1; while (i