版本比较
题解:P13134 [GCJ 2018 Qualification] Go, Gopher!
正文
增加 5 行删除 5 行
34 行未改动353637383939404142424344454647474849505152535354555657585960606162636424 行未改动34 行未改动
int main() { ios::sync_with_stdio(false); cin.tie(nullptr);
int T; cin >> T;
for (int t = 1; t <= T; ++t) { int A; cin >> A; fill(&p[0][0], &p[1002][1002], false);
int tr = 2, tc = 2; while (true) { // 发送目标坐标 cout << tr << " " << tc << endl; cout.flush();
int r, c; cin >> r >> c;
// 检查结束条件 if (r == 0 && c == 0) break; if (r == -1 && c == -1) return 0;
p[r][c] = true;
// 检查当前区域是否已填满 bool f = true;24 行未改动