結果
問題 | No.1187 皇帝ペンギン |
ユーザー | kappybar |
提出日時 | 2020-08-23 17:13:10 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 893 bytes |
コンパイル時間 | 1,386 ms |
コンパイル使用メモリ | 164,948 KB |
実行使用メモリ | 24,468 KB |
平均クエリ数 | 17.56 |
最終ジャッジ日時 | 2023-09-24 06:25:06 |
合計ジャッジ時間 | 9,285 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 30 ms
24,012 KB |
testcase_01 | AC | 23 ms
23,544 KB |
testcase_02 | WA | - |
testcase_03 | AC | 26 ms
24,036 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | AC | 24 ms
23,496 KB |
testcase_07 | AC | 25 ms
24,468 KB |
testcase_08 | AC | 24 ms
23,604 KB |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | AC | 25 ms
23,520 KB |
testcase_12 | AC | 25 ms
23,328 KB |
testcase_13 | WA | - |
testcase_14 | AC | 26 ms
24,336 KB |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | AC | 26 ms
24,216 KB |
testcase_21 | WA | - |
testcase_22 | AC | 24 ms
23,988 KB |
testcase_23 | AC | 23 ms
23,676 KB |
testcase_24 | AC | 24 ms
23,256 KB |
testcase_25 | AC | 26 ms
23,640 KB |
testcase_26 | WA | - |
testcase_27 | AC | 25 ms
24,012 KB |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | AC | 24 ms
23,448 KB |
testcase_31 | AC | 23 ms
24,336 KB |
testcase_32 | WA | - |
testcase_33 | WA | - |
testcase_34 | WA | - |
testcase_35 | AC | 24 ms
24,456 KB |
testcase_36 | AC | 24 ms
24,408 KB |
testcase_37 | AC | 26 ms
23,616 KB |
testcase_38 | WA | - |
testcase_39 | AC | 26 ms
23,340 KB |
testcase_40 | WA | - |
testcase_41 | AC | 25 ms
24,348 KB |
testcase_42 | AC | 24 ms
23,412 KB |
testcase_43 | WA | - |
testcase_44 | WA | - |
testcase_45 | AC | 26 ms
23,640 KB |
testcase_46 | WA | - |
testcase_47 | WA | - |
testcase_48 | AC | 23 ms
23,604 KB |
testcase_49 | WA | - |
testcase_50 | WA | - |
testcase_51 | WA | - |
testcase_52 | WA | - |
testcase_53 | WA | - |
ソースコード
#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,t; int l = 0,r = 1000; while(r-l>1){ int m = (l+r)/2; cout << "? " << m << endl << flush; cin >> s; if(s=="out"){ cout << "? " << m+1 << endl << flush; cin >> t; if(t=="out"){ r = m; }else{ l = m; } }else{ l = m; } } cout << "? " << l << endl << flush; if(s=="out"){ cout << "! " << l-1 << endl << flush; }else{ cout << "! " << l << endl; } return 0; }