結果

問題 No.3011 あ、俺こいつの役やりたい!
ユーザー てるてる坊主
提出日時 2025-01-25 12:47:28
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 23 ms / 2,000 ms
コード長 1,046 bytes
コンパイル時間 2,778 ms
コンパイル使用メモリ 274,268 KB
実行使用メモリ 25,844 KB
平均クエリ数 12.45
最終ジャッジ日時 2025-01-25 22:21:08
合計ジャッジ時間 5,702 ms
ジャッジサーバーID
(参考情報)
judge3 / judge7
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 44
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i,n) for(int i=0;i<(n);i++)
#define drep(i,n) for(int i=(n)-1;i>=0;i--)
#define rrep(i,n) for(int i=1;i<(n);i++)
#define Yes cout << "Yes" << endl
#define No cout << "No" << endl
#define YN {cout << "Yes" << endl;}else{cout << "No" << endl;}
#define dame cout << -1 << endl
#define nall(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define vout(a) {rep(i,(int)a.size()){cout << a[i] << ' ';} cout << endl;}
#define vvout(a) rep(i,(int)a.size()){{rep(j,(int)a[i].size()) cout << a[i][j] << ' ';}cout << '\n';}
void chmax(auto& x,auto y){x = max(x,y);}
void chmin(auto& x,auto y){x = min(x,y);}
#define INF 2e9
void pirntf(ld x) {printf("%.10Lf\n",x);}
vector<int> dx = {1,0,-1,0};
vector<int> dy = {0,-1,0,1};
#define Mod 998244353

int main(){
  ll l = 0, r = 2e9;
  while(r-l>1){
    int c = (r+l)/2;
    cout << c << endl;
    int res;
    cin >> res;
    if(res==-1) return 0;
    if(res){l = c; return 0;}
    else r = c;
  }
}
0