結果
| 問題 | No.246 質問と回答 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-09 23:20:50 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 52 ms / 2,000 ms |
| コード長 | 283 bytes |
| 記録 | |
| コンパイル時間 | 1,133 ms |
| コンパイル使用メモリ | 208,884 KB |
| 実行使用メモリ | 30,040 KB |
| 平均クエリ数 | 30.90 |
| 最終ジャッジ日時 | 2026-06-07 16:35:08 |
| 合計ジャッジ時間 | 4,539 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int l=1;
int r=1e9;
while (r-l>1) {
int m=(l+r)/2;
cout<<"? "<<m<<endl;
int b;
cin>>b;
if (b) l=m;
else r=m;
}
cout<<"! "<<l<<endl;
}