結果

問題 No.246 質問と回答
ユーザー mint6421mint6421
提出日時 2019-08-27 23:02:21
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 883 bytes
コンパイル時間 2,307 ms
コンパイル使用メモリ 163,464 KB
実行使用メモリ 24,264 KB
平均クエリ数 30.53
最終ジャッジ日時 2023-09-23 18:07:41
合計ジャッジ時間 4,739 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 43 ms
24,144 KB
testcase_02 AC 42 ms
24,252 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 42 ms
23,628 KB
testcase_06 WA -
testcase_07 AC 41 ms
23,700 KB
testcase_08 AC 41 ms
23,520 KB
testcase_09 AC 41 ms
23,316 KB
testcase_10 WA -
testcase_11 AC 41 ms
23,640 KB
testcase_12 WA -
testcase_13 AC 41 ms
23,520 KB
testcase_14 WA -
testcase_15 AC 41 ms
23,256 KB
testcase_16 AC 40 ms
23,640 KB
testcase_17 AC 40 ms
24,216 KB
testcase_18 AC 42 ms
24,204 KB
testcase_19 WA -
testcase_20 AC 41 ms
23,508 KB
testcase_21 AC 41 ms
23,928 KB
testcase_22 AC 41 ms
23,988 KB
testcase_23 AC 40 ms
23,928 KB
testcase_24 AC 41 ms
23,316 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 41 ms
24,036 KB
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
#define inf INT_MAX
#define INF LLONG_MAX
#define ll long long
#define ull unsigned long long
#define M (int)(1e9+7)
#define P pair<int,int>
#define PLL pair<ll,ll>
#define FOR(i,m,n) for(int i=(int)m;i<(int)n;i++)
#define RFOR(i,m,n) for(int i=(int)m;i>=(int)n;i--)
#define rep(i,n) FOR(i,0,n)
#define rrep(i,n) RFOR(i,n,0)
#define all(a) a.begin(),a.end()
#define IN(a,n) rep(i,n){ cin>>a[i]; }
const int vx[4] = {0,1,0,-1};
const int vy[4] = {1,0,-1,0};
#define PI 3.14159265
#define F first
#define S second
#define PB push_back
#define EB emplace_back
#define int ll
#define vi vector<int>



signed main(){
  cin.tie(0);
  ios::sync_with_stdio(false);

  int l=0,r=(int)1e9+1;

  while(r-l>1){
    int m=(r+l)/2;
    cout<<"? "<<m<<endl;
    int res;
    cin>>res;
    if(res==1) l=m;
    else r=m-1;
  }

  cout<<"! "<<r<<endl;

}
0