Submission #45559

# Submission time Handle Problem Language Result Execution time Memory
45559 2018-04-15T12:11:40 Z MrBrionix Go, Gopher! (GCJ18Q_gogopher) C++14
30 / 30
74 ms 308 KB
#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=5;
        }
        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 Correct 10 ms 248 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 74 ms 308 KB Output is correct