結果
| 問題 |
No.1187 皇帝ペンギン
|
| コンテスト | |
| ユーザー |
umezo
|
| 提出日時 | 2020-08-27 16:08:59 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 547 bytes |
| コンパイル時間 | 2,100 ms |
| コンパイル使用メモリ | 192,692 KB |
| 最終ジャッジ日時 | 2025-01-13 15:19:31 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 54 |
ソースコード
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;
#include <bits/stdc++.h>
using namespace std;
int main(){
string s;
int left=0,right=1e9,mid;
while(right-left>1){
mid=(left+right)/2;
cout<<"? "<<mid<<endl;
cin>>s;
if(s=="safe"){
left=mid;
continue;
}
cout<<"? "<<mid-1<<endl;
cin>>s;
if(s=="out"){
right=mid;
continue;
}
else{
left=mid;
continue;
}
}
cout<<"! "<<left-1<<endl;
return 0;
}
umezo