結果
問題 | No.246 質問と回答 |
ユーザー |
|
提出日時 | 2018-02-02 12:09:57 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 441 bytes |
コンパイル時間 | 699 ms |
コンパイル使用メモリ | 68,208 KB |
実行使用メモリ | 43,300 KB |
最終ジャッジ日時 | 2024-07-16 15:32:44 |
合計ジャッジ時間 | 7,149 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | TLE * 1 -- * 29 |
ソースコード
#include <iostream> #include <algorithm> #include <string> #include <set> using namespace std; int main(){ int left = 0, right = 1e9; while(left < right){ int middle = (left + right) / 2; cout << "? " << middle << endl; bool response; cin >> response; if(response){ left = middle; }else{ right = middle - 1; } } cout << "! " << left << endl; }