結果
| 問題 |
No.1187 皇帝ペンギン
|
| コンテスト | |
| ユーザー |
square1001
|
| 提出日時 | 2020-08-22 14:26:34 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 352 bytes |
| コンパイル時間 | 604 ms |
| コンパイル使用メモリ | 64,420 KB |
| 実行使用メモリ | 25,580 KB |
| 平均クエリ数 | 16.87 |
| 最終ジャッジ日時 | 2024-07-17 06:18:12 |
| 合計ジャッジ時間 | 10,286 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 54 |
ソースコード
#include <string>
#include <iostream>
using namespace std;
string ask(int x) {
cout << "? " << x << endl;
string str;
cin >> str;
return str;
}
int main() {
int l = 0, r = 1024;
while (r - l > 1) {
int m = (l + r) >> 1;
if (ask(m) == "out" && ask(m + 1) == "out") {
r = m;
}
else {
l = m;
}
}
cout << r - 1 << endl;
return 0;
}
square1001