結果

問題 No.246 質問と回答
ユーザー zunda1stzunda1st
提出日時 2019-01-23 00:53:33
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 45 ms / 2,000 ms
コード長 832 bytes
コンパイル時間 916 ms
コンパイル使用メモリ 92,648 KB
実行使用メモリ 24,384 KB
平均クエリ数 30.87
最終ジャッジ日時 2023-09-23 20:30:22
合計ジャッジ時間 3,917 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
24,072 KB
testcase_01 AC 42 ms
23,676 KB
testcase_02 AC 42 ms
24,252 KB
testcase_03 AC 42 ms
23,652 KB
testcase_04 AC 41 ms
23,316 KB
testcase_05 AC 41 ms
23,388 KB
testcase_06 AC 42 ms
24,072 KB
testcase_07 AC 41 ms
24,216 KB
testcase_08 AC 42 ms
23,604 KB
testcase_09 AC 42 ms
23,676 KB
testcase_10 AC 42 ms
24,204 KB
testcase_11 AC 42 ms
24,228 KB
testcase_12 AC 42 ms
24,072 KB
testcase_13 AC 44 ms
24,312 KB
testcase_14 AC 42 ms
23,580 KB
testcase_15 AC 42 ms
23,604 KB
testcase_16 AC 42 ms
23,580 KB
testcase_17 AC 42 ms
24,216 KB
testcase_18 AC 42 ms
23,832 KB
testcase_19 AC 42 ms
23,676 KB
testcase_20 AC 42 ms
24,384 KB
testcase_21 AC 41 ms
23,652 KB
testcase_22 AC 42 ms
23,316 KB
testcase_23 AC 42 ms
23,352 KB
testcase_24 AC 42 ms
23,340 KB
testcase_25 AC 42 ms
23,676 KB
testcase_26 AC 42 ms
24,324 KB
testcase_27 AC 41 ms
23,952 KB
testcase_28 AC 41 ms
23,856 KB
testcase_29 AC 43 ms
23,652 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<map>
#include<iostream>
#include<deque>
#include<algorithm>
#include<string>
#include<cctype>
#include<iomanip>
#include<vector>
#include<queue>
#include<tuple>
#include<stdio.h>
 
using namespace std;
#define REP(i,b,e) for(ll i=(ll)b;i<(ll)e;i++)
#define rep0(i,n) REP(i,0ll,n)
#define rep1(i,n) REP(i,1ll,n+1)
 
#define shosu setprecision(10)
 
typedef long long ll;
typedef pair<ll,ll> P;
typedef pair<P,ll> Q;
ll longinf=1ll<<60;
int inf=1<<29;
int dh[]={1,-1,0,0};
int dw[]={0,0,1,-1};

int main(){
      int ok=1e9;
      int ng=0;
      while(ok-ng>1){
            int mid=(ok+ng)/2;
            cout<<"? "<<mid<<endl;
            fflush(stdout);
            int x;
            cin>>x;
            if(x) ng=mid;
            else ok=mid;
      }
      cout<<"! "<<ok-1<<endl;
      fflush(stdout);

      return 0;
}
0