| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 645393 | gun_gan | Aliens (IOI07_aliens) | C++17 | 2 ms | 364 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
int n, x, y;
bool ask(int x, int y) {
if(x <= 0 || y <= 0 || x > n || y > n) return 0;
cout << "examine " << x << " " << y << endl;
string s; cin >> s;
return s == "true";
}
int main() {
cin.tie(0); ios_base::sync_with_stdio(0);
cin >> n >> x >> y;
long long x1, x2, y1, y2;
{
int l = 0, r = n / 2;
while(l <= r) {
int mid = (l + r) / 2;
if(ask(x, y + 2 * mid)) {
l = mid + 1, y2 = mid;
} else {
r = mid - 1;
}
}
}
{
int l = 0, r = n / 2;
while(l <= r) {
int mid = (l + r) / 2;
if(ask(x, y - 2 * mid)) {
l = mid + 1, y1 = mid;
} else {
r = mid - 1;
}
}
}
{
int l = 0, r = n / 2;
while(l <= r) {
int mid = (l + r) / 2;
if(ask(x - 2 * mid, y)) {
l = mid + 1, x1 = mid;
} else {
r = mid - 1;
}
}
}
{
int l = 0, r = n / 2;
while(l <= r) {
int mid = (l + r) / 2;
if(ask(x + 2 * mid, y)) {
l = mid + 1, x2 = mid;
} else {
r = mid - 1;
}
}
}
x1 = x - 2 * x1;
x2 = x + 2 * x2;
y1 = y - 2 * y1;
y2 = y + 2 * y2;
cout << "solution " << (x1 + x2) / 2 << " " << (y1 + y2) / 2 << endl;
}컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
