結果
| 問題 | No.1187 皇帝ペンギン |
| コンテスト | |
| ユーザー |
chocorusk
|
| 提出日時 | 2020-08-22 15:23:52 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 895 bytes |
| 記録 | |
| コンパイル時間 | 1,289 ms |
| コンパイル使用メモリ | 147,652 KB |
| 実行使用メモリ | 30,308 KB |
| 平均クエリ数 | 21.56 |
| 最終ジャッジ日時 | 2026-06-12 17:37:31 |
| 合計ジャッジ時間 | 7,316 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 26 WA * 28 |
ソースコード
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <cassert>
#include <fstream>
#include <utility>
#include <functional>
#include <time.h>
#include <stack>
#include <array>
#define popcount __builtin_popcount
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
int main()
{
int l=0, r=1000;
while(r-l>1){
int m=(l+r)/2;
cout<<"? "<<m<<endl;
string res; cin>>res;
if(res=="safe"){
l=m;
continue;
}
cout<<"? "<<m-1<<endl;
cin>>res;
if(res=="safe") l=m-1;
else r=m-1;
}
cout<<"! "<<l<<endl;
return 0;
}
chocorusk