結果
問題 | No.246 質問と回答 |
ユーザー |
![]() |
提出日時 | 2020-08-12 03:12:39 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 64 ms / 2,000 ms |
コード長 | 342 bytes |
コンパイル時間 | 2,123 ms |
コンパイル使用メモリ | 191,488 KB |
最終ジャッジ日時 | 2025-01-12 21:02:39 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 30 |
ソースコード
#define rep(i, n) for (int i = 0; i < (int)(n); i++)#define ALL(v) v.begin(), v.end()typedef long long ll;#include <bits/stdc++.h>using namespace std;int main(){ll l=0,r=1e9+1;while(r-l>1){ll m=(r+l)/2;cout<<"? "<<m<<endl;ll x;cin>>x;if(x==1) l=m;else r=m;}cout<<"! "<<l<<endl;return 0;}