結果

問題 No.1187 皇帝ペンギン
ユーザー kappybarkappybar
提出日時 2020-08-23 17:06:25
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 733 bytes
コンパイル時間 1,464 ms
コンパイル使用メモリ 164,968 KB
実行使用メモリ 24,480 KB
平均クエリ数 11.87
最終ジャッジ日時 2023-09-24 06:24:17
合計ジャッジ時間 9,410 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 26 ms
24,024 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 26 ms
23,388 KB
testcase_06 AC 26 ms
23,352 KB
testcase_07 AC 27 ms
23,868 KB
testcase_08 AC 28 ms
23,808 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 27 ms
23,700 KB
testcase_13 WA -
testcase_14 AC 25 ms
23,388 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 26 ms
23,388 KB
testcase_20 AC 27 ms
23,232 KB
testcase_21 WA -
testcase_22 AC 26 ms
23,508 KB
testcase_23 AC 27 ms
23,976 KB
testcase_24 AC 27 ms
23,628 KB
testcase_25 AC 27 ms
23,520 KB
testcase_26 WA -
testcase_27 AC 27 ms
23,268 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 27 ms
23,628 KB
testcase_31 AC 26 ms
23,268 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 AC 27 ms
23,340 KB
testcase_36 AC 28 ms
23,232 KB
testcase_37 AC 26 ms
23,376 KB
testcase_38 WA -
testcase_39 AC 26 ms
23,484 KB
testcase_40 WA -
testcase_41 AC 27 ms
23,796 KB
testcase_42 AC 26 ms
23,976 KB
testcase_43 WA -
testcase_44 AC 27 ms
23,280 KB
testcase_45 AC 26 ms
23,232 KB
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 WA -
testcase_50 WA -
testcase_51 WA -
testcase_52 WA -
testcase_53 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
using namespace std;
using ll = long long ;
using P = pair<int,int> ;
using pll = pair<long long,long long>;
constexpr int INF = 1e9;
constexpr long long LINF = 1e17;
constexpr int MOD = 1000000007;
constexpr double PI = 3.14159265358979323846;

int main(){
    string s;
    int l = 0,r = 1001;
    while(r-l>1){
        int m = (l+r)/2;
        cout << "? " << m << endl << flush;
        cin >> s;
        if(s=="out"){
            r = m;
        }else{
            l = m;
        }
    }
    cout << "? " << l << endl << flush;
    if(s=="out"){
        cout << "! " << l-1 << endl << flush;
    }else{
        cout << "! " << l << endl;
    }
    return 0;
}
0