結果
問題 |
No.246 質問と回答
|
ユーザー |
![]() |
提出日時 | 2016-01-16 17:31:11 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 53 ms / 2,000 ms |
コード長 | 328 bytes |
コンパイル時間 | 682 ms |
コンパイル使用メモリ | 56,700 KB |
実行使用メモリ | 25,448 KB |
平均クエリ数 | 30.87 |
最終ジャッジ日時 | 2024-07-16 20:00:19 |
合計ジャッジ時間 | 4,479 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 30 |
ソースコード
#include <iostream> #include <vector> #include <string> using namespace std; int main(){ int l = 0, r = 1000000001; while(r - l > 1) { int m = (l + r) / 2; cout << "? " << m << endl; cout.flush(); int a; cin >> a; if(a == 0) { r = m; } else { l = m; } } cout << "! " << l << endl; cout.flush(); }