結果
| 問題 |
No.246 質問と回答
|
| コンテスト | |
| ユーザー |
tkw_tech
|
| 提出日時 | 2015-09-28 19:01:58 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 795 bytes |
| コンパイル時間 | 803 ms |
| コンパイル使用メモリ | 90,376 KB |
| 実行使用メモリ | 25,476 KB |
| 平均クエリ数 | 30.00 |
| 最終ジャッジ日時 | 2024-07-16 07:49:30 |
| 合計ジャッジ時間 | 3,666 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 30 |
ソースコード
#include <iostream>
#include <sstream>
#include <vector>
#include <cmath>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <bitset>
#include <iomanip>
#include <algorithm>
#include <queue>
#include <numeric>
#include <functional>
using namespace std;
#define REP(i, n) for(int i = 0; i < (int)(n); i++)
#define FOR(i,n,m) for (int i=n; i<(int)(m); i++)
#define INF 1000000007
typedef long long ll;
typedef long double ld;
ll dy[4]={-1,1,0,0};
ll dx[4]={0,0,1,-1};
int main(){
int ub = INF;
int lb = 0;
bool ans=false;
while(ub - lb > 1){
int mid = (ub+lb)/2;
cout << "?" << mid << endl;
cin >> ans;
if(ans) lb=mid;
else ub=mid;
}
cout << "!" << lb << endl;
return 0;
}
tkw_tech