結果
| 問題 | No.246 質問と回答 |
| コンテスト | |
| ユーザー |
not_522
|
| 提出日時 | 2015-08-04 11:11:53 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 249 bytes |
| 記録 | |
| コンパイル時間 | 2,175 ms |
| コンパイル使用メモリ | 158,584 KB |
| 実行使用メモリ | 25,844 KB |
| 平均クエリ数 | 30.90 |
| 最終ジャッジ日時 | 2024-07-16 07:44:17 |
| 合計ジャッジ時間 | 4,548 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 30 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
int l = 1, h = 1e9 + 1;
while (l + 1 < h) {
int m = (l + h) / 2;
cout << "? " << m << endl;
int res;
cin >> res;
(res == 1 ? l : h) = m;
}
cout << l << endl;
}
not_522