#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define FOR(i, a, b) for(int i = (int)a; i <= (int)b; i++)
#define DEC(i, a, b) for(int i = (int)a; i >= (int)b; i--)
typedef pair<int, int> pi;
#define f first
#define s second
#define pb push_back
#define all(v) v.begin(), v.end()
#define fastio ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); //can be used by calling rng() or shuffle(A, A+n, rng)
inline ll rand(ll x, ll y) { ++y; return (rng() % (y-x)) + x; } //inclusivesss
int t, a, lim;
void solve() {
cin >> a; lim = (a == 20 ? 9 : 69);
FOR(i, 1, lim) {
set<pi> s; s.clear();
while (s.size() < 9) {
cout << "3 " << i * 3 << "\n"; cout.flush();
int x, y; cin >> x >> y;
if ((x == -1 and y == -1) or (x == 0 and y == 0)) return;
x = 3 - x, y = i*3 - y;
s.insert(pi(x, y));
}
}
}
int main() {
fastio; cin >> t;
while (t--) solve();
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
23 ms |
384 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
106 ms |
384 KB |
Output is correct |