系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#91864 | #1028. 小秋的完美数字 | Accepted | 100 | 18 ms | 388 K | C++ 11 / 463 B | Corycle | 2023-06-28 15:13:59 |
/*====Corycle====*/
#include <bits/stdc++.h>
#define ll long long
using namespace std;
const int inf = 0x3f3f3f3f;
int main() {
// freopen("_.in","r",stdin);
// freopen("_.out","w",stdout);
int l = 1, r = 1e9;
while (l <= r) {
int mid = (l + r) >> 1;
cout << mid << endl;
fflush(stdout);
int x;
cin >> x;
if (x == 0)
return 0;
if (x == 1)
r = mid - 1;
if (x == -1)
l = mid + 1;
}
return 0;
}