#include<bits/stdc++.h>
using namespace std;
long long t;
int main(){
cin>>t;
while(t--){
int a,n;
cin>>a;
map<pair<int,int>,bool> mat;
if(a==20){
n=2;
}
else
n=65;
int x,y;
for(int i=3;i<3+n;i++){
while(mat[{5,i-1}]!=true || mat[{6,i-1}]!=true || mat[{7,i-1}]!=true){
cout<<6<<" "<<i<<endl;
cout.flush();
cin>>x>>y;
if(x==0 && y==0)break;
mat[{x,y}]=true;
}
}
while(x!=0 || y!=0){
cout<<6<<" "<<3+n-1<<endl;
cout.flush();
cin>>x>>y;
}
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
10045 ms |
248 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
81 ms |
468 KB |
Output is correct |