Submission #231095

#TimeUsernameProblemLanguageResultExecution timeMemory
231095cstuartUntitled (GCJ18Q_gogopher)C++17
30 / 30
95 ms384 KiB
#include <bits/stdc++.h> using namespace std; int T, A; int main() { ios_base::sync_with_stdio(0); cin >> T; for (int q = 0; q < T; q++) { cin >> A; int x = 2; int b = 0; bool done[3][3]; memset(done, 0, sizeof done); while (true) { cout << x << " 2" << endl; int i, j; cin >> i >> j; if (i == 0 && j == 0) break; if (i == -1 && j == -1) return 0; if (!done[i-x+1][j-1]) { done[i-x+1][j-1] = 1; b++; } if (b == 9) { x += 3; b = 0; memset(done, 0, sizeof done); } } } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...