Submission #44956

#TimeUsernameProblemLanguageResultExecution timeMemory
44956wzyUntitled (GCJ18Q_gogopher)C++11
30 / 30
81 ms1332 KiB
#include <bits/stdc++.h> using namespace std; #define F first #define S second #define int long long // LEMBRAR DE TROCAR CASO PROBLEMA DE MEMORIA #define pii pair<int,int> #define ieps (int) 1e6 #define eps (int) 1e9 #define mp make_pair #define pb push_back bool vis[1001][1001]; int32_t main(){ int t; cin>>t; while(t--){ int a; cin>>a; int currx = 4 , curry = 4; for(int i = 0 ; i < 1001 ; i++) for(int j = 0 ; j < 1001 ; j++) vis[i][j] = 0; while(true){ cout<<currx<<" "<<curry<<endl; int a , b; cin>>a>>b; if(a == 0 && b == 0) break; else vis[a][b] = true; while(vis[currx - 1][curry - 1] && vis[currx][curry-1] && vis[currx + 1][curry - 1]){ curry++; } } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...