結果
| 問題 | No.1793 実数当てゲーム |
| コンテスト | |
| ユーザー |
maspy
|
| 提出日時 | 2022-06-05 01:57:21 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 591 bytes |
| 記録 | |
| コンパイル時間 | 1,156 ms |
| コンパイル使用メモリ | 211,276 KB |
| 実行使用メモリ | 30,020 KB |
| 平均クエリ数 | 2230.56 |
| 最終ジャッジ日時 | 2026-06-26 08:07:41 |
| 合計ジャッジ時間 | 2,900 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 18 |
ソースコード
#line 1 "main.cpp"
#include <bits/stdc++.h>
using namespace std;
void solve() {
double lb = 1e-6, ub = 1.222e75;
int i;
string s;
for (i = 0; i < 24; i++) {
const double m = sqrt(lb * ub);
cout << "? " << m << endl;
cout.flush();
cin >> s;
if (s == "Yes") {
lb = m;
} else {
ub = m;
}
}
const double y = (lb + ub) / 2;
cout << "! " << y << endl;
cout.flush();
}
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout << setprecision(15);
int T;
cin >> T;
for (int i = 0; i < T; ++i) { solve(); }
return 0;
}
maspy