結果
| 問題 | No.246 質問と回答 |
| コンテスト | |
| ユーザー |
184
|
| 提出日時 | 2015-07-17 23:39:54 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 515 bytes |
| 記録 | |
| コンパイル時間 | 941 ms |
| コンパイル使用メモリ | 84,196 KB |
| 実行使用メモリ | 28,964 KB |
| 平均クエリ数 | 30.67 |
| 最終ジャッジ日時 | 2026-03-30 20:44:05 |
| 合計ジャッジ時間 | 3,208 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 WA * 18 |
ソースコード
#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <iostream>
using namespace std;
//namaega184
int main(){
int left=0,right=1000000000,mid=0;
while(left<right){
mid=(left+right)/2;
//printf("? %d",mid);
//fflush(stdout);
cout << "? " << mid << endl;
int res;
scanf("%d",&res);
if(res){
left=mid;
if(left+1==right){mid=left;break;}
}
else{
right=mid-1;
}
}
cout << "! " << mid << endl;
//printf("! %d\n",mid);
//fflush(stdout);
return 0;
}
184