結果
| 問題 | 
                            No.246 質問と回答
                             | 
                    
| コンテスト | |
| ユーザー | 
                             kongarishisyamo
                         | 
                    
| 提出日時 | 2016-07-08 17:42:08 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 251 bytes | 
| コンパイル時間 | 653 ms | 
| コンパイル使用メモリ | 53,980 KB | 
| 実行使用メモリ | 25,856 KB | 
| 平均クエリ数 | 30.90 | 
| 最終ジャッジ日時 | 2024-07-16 10:33:06 | 
| 合計ジャッジ時間 | 3,767 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | WA * 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;
}
            
            
            
        
            
kongarishisyamo