제출 #45558

#제출 시각아이디문제언어결과실행 시간메모리
45558MrBrionix무제 (GCJ18Q_gogopher)C++14
20 / 30
10045 ms468 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...