結果
| 問題 |
No.1187 皇帝ペンギン
|
| コンテスト | |
| ユーザー |
akane
|
| 提出日時 | 2020-08-22 17:26:24 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 647 bytes |
| コンパイル時間 | 2,257 ms |
| コンパイル使用メモリ | 192,684 KB |
| 最終ジャッジ日時 | 2025-01-13 10:37:44 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 54 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for (int i=0; i < (n); i++)
using namespace std;
using ll = long long;
int main(){
ios::sync_with_stdio(false);
int safe = 0, out=1000;
int t=25;
while(t--){
int c = (safe+out)/2;
cout << "? " << c << endl;
string s; cin >> s;
if(s=="safe"){
safe = c;
}else if(s=="out"){
if(t==0) break;
t--;
cout << "?" << c+1 << endl;
cin >> s;
if(s=="out"){
out = c;
}else{
safe = c+1;
}
}
}
cout << safe << endl;
}
akane