結果
| 問題 | No.246 質問と回答 |
| コンテスト | |
| ユーザー |
Lay_ec
|
| 提出日時 | 2015-07-17 22:32:55 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 511 bytes |
| 記録 | |
| コンパイル時間 | 723 ms |
| コンパイル使用メモリ | 78,984 KB |
| 実行使用メモリ | 25,520 KB |
| 平均クエリ数 | 30.97 |
| 最終ジャッジ日時 | 2024-07-16 06:51:25 |
| 合計ジャッジ時間 | 4,089 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 30 |
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <functional>
#include <set>
#include <sstream>
#include <map>
#include <queue>
#include <stack>
using namespace std;
int main()
{
long long l=1,r=1000000000;
while(l!=r){
//cout<<"l="<<l<<" r="<<r<<endl;
long long m=(l+r)/2;
cout<<"? "<<m<<endl;
int res;
cin>>res;
if(res) l=m+1;
else r=m;
}
cout<<"! "<<l<<endl;
return 0;
}
Lay_ec