This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> ii;
#define mp make_pair
int main(){
int tc;
cin >> tc;
int gridx[6] = {2, 5, 8, 11, 14, 17};
int gridy[4] = {2, 5, 8, 11};
while (tc--){
int a;
cin >> a;
bool found=0;
for (int i=0; i<6; i++){
for(int j=0; j<4; j++){
set<ii> s;
while (s.size() != 9){
cout << gridx[i] << " " << gridy[j] << '\n';
cout.flush();
int x, y;
cin >> x >> y;
if (x==0 && y==0){
found=1;
break;
} else s.insert(mp(x,y));
}
if (found) break;
}
if (found) break;
}
if (found) continue;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |