結果
問題 |
No.253 ロウソクの長さ
|
ユーザー |
![]() |
提出日時 | 2015-07-24 23:59:14 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 417 bytes |
コンパイル時間 | 549 ms |
コンパイル使用メモリ | 56,144 KB |
実行使用メモリ | 25,556 KB |
平均クエリ数 | 82.31 |
最終ジャッジ日時 | 2024-07-16 05:03:55 |
合計ジャッジ時間 | 6,779 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 36 |
ソースコード
#include <iostream> int main(){ int lb = 10, ub = 1000000001; for(int i=0;i<100;i++){ int mid = (lb + ub) / 2; std::cout << "? " << mid << std::endl; int res; std::cin >> res; if(res == 0){ std::cout << "! " << mid << std::endl; return 0; }else if(res == 1){ lb = mid; }else{ ub = mid; } } }