| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 723735 | rshohruh | Worm Worries (BOI18_worm) | C++14 | 1 ms | 208 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <bits/stdc++.h>
#include <time.h>
using namespace std;
int N, Q, K, M;
int ask(int x) {
cout << "? " << x << " 1 1" << endl;
int h;
cin >> h;
return h;
}
int main() {
cin >> N >> M >> K >> Q;
int left = 1, right = N;
while (left < right) {
int mid = (left + right) / 2;
int h1 = ask(mid);
int h2 = ask(mid + 1);
if (h1 > h2) {
right = mid;
} else {
left = mid + 1;
}
}
cout << "! " << left << " 1 1" << endl;
return 0;
}| # | 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... | ||||
