結果
問題 | No.246 質問と回答 |
ユーザー |
![]() |
提出日時 | 2016-07-08 17:42:49 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 52 ms / 2,000 ms |
コード長 | 257 bytes |
コンパイル時間 | 470 ms |
コンパイル使用メモリ | 56,012 KB |
実行使用メモリ | 25,604 KB |
平均クエリ数 | 30.90 |
最終ジャッジ日時 | 2024-07-16 20:04:57 |
合計ジャッジ時間 | 3,351 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 30 |
ソースコード
#include<iostream>using namespace std;int main(){long long min=1,max=1000000000;bool ans;while(min<max-1){long long mid=(max+min)/2;cout<<"? "<<mid<<endl<<flush;cin>>ans;if(ans) min=mid;else max=mid;}cout<<"! "<<min<<endl;}