結果
| 問題 | No.246 質問と回答 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-06-17 21:35:56 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 363 bytes |
| 記録 | |
| コンパイル時間 | 296 ms |
| コンパイル使用メモリ | 73,088 KB |
| 実行使用メモリ | 6,016 KB |
| 平均クエリ数 | 1.00 |
| 最終ジャッジ日時 | 2026-08-13 23:33:40 |
| 合計ジャッジ時間 | 2,648 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 30 |
ソースコード
#include <iostream>
#include <string>
#include <iomanip>
using namespace std;
int main(){
int max = 1000000000, min = 1, mid = (min + max) / 2;
int res;
while(min - max > 1){
cout << "? " << mid << endl << flush;
cin >> res;
if(res){
min = mid;
}else{
max = mid;
}
mid = (min + max) / 2;
}
cout << "! " << mid << endl;
return 0;
}