제출 #1154605

#제출 시각아이디문제언어결과실행 시간메모리
1154605YSH2020Aliens (IOI07_aliens)C++20
0 / 100
2 ms476 KiB
#include <bits/stdc++.h> using namespace std; int main() { int n, x1, y1; cin >> x1 >> y1; int left = x1; int right = x1; while (left > 1) { cout << "examine " << left-1 << ' ' << y1 << endl; bool x; cin >> x; if (x == false) break; left--; } while (right < n) { cout << "examine " << right+1 << ' ' << y1 << endl; bool x; cin >> x; if (x == false) break; right++; } //so now the size is right-left+1 int size=(right-left+1); x1 = (right+left)/2; int left2 = x1; while (left2 > size) { cout << "examine " << left2-size << ' ' << y1 << endl; bool x; cin >> x; if (x == false) break; left -= size; } int ans_x = left2+2*size; int high = x1; while (high > 1) { cout << "examine " << ans_x << ' ' << high-1 << endl; bool x; cin >> x; if (x == false) break; high--; } int low = high-size+1; //so now the size is right-left+1 y1 = (high+low)/2; int high2 = x1; while (high2 > size) { cout << "examine " << ans_x << ' ' << high2-size << endl; bool x; cin >> x; if (x == false) break; high2 -= size; } int ans_y = high2+2*size; cout << "solution " << ans_x << ' ' << ans_y << endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...