Reunite
2024-11-19 08:02:43
考虑
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
using namespace std;
int T,n;
int main(){
scanf("%d",&T);
while(T--){
scanf("%d",&n);
int X,a,b;
puts("1 10");
fflush(stdout);
scanf("%d",&X);
puts("1 11");
fflush(stdout);
scanf("%d",&a);
puts("1 1");
fflush(stdout);
scanf("%d",&b);
int x1=b-a;
if(b==0){puts("0 1 0");fflush(stdout);scanf("%d",&X);continue;}
if(b==n){puts("0 1 1");fflush(stdout);scanf("%d",&X);continue;}
if(x1==X){printf("0 %d 0\n",n);fflush(stdout);scanf("%d",&X);continue;}
else printf("0 %d 1\n",n),fflush(stdout),scanf("%d",&X);;
}
return 0;
}