結果

問題 No.514 宝探し3
ユーザー face4face4
提出日時 2018-09-25 08:46:36
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 28 ms / 2,000 ms
コード長 271 bytes
コンパイル時間 548 ms
コンパイル使用メモリ 62,920 KB
実行使用メモリ 24,300 KB
平均クエリ数 2.75
最終ジャッジ日時 2023-09-23 16:21:33
合計ジャッジ時間 1,886 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
24,168 KB
testcase_01 AC 24 ms
23,376 KB
testcase_02 AC 25 ms
23,664 KB
testcase_03 AC 25 ms
23,436 KB
testcase_04 AC 25 ms
23,616 KB
testcase_05 AC 25 ms
24,228 KB
testcase_06 AC 26 ms
23,556 KB
testcase_07 AC 24 ms
23,340 KB
testcase_08 AC 25 ms
24,300 KB
testcase_09 AC 25 ms
24,216 KB
testcase_10 AC 25 ms
24,216 KB
testcase_11 AC 25 ms
24,000 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;

int query(int x, int y){
    int ans;
    cout << x << " " << y << endl << flush;
    cin >> ans;
    if(ans == 0)    exit(0);
    return ans;
}

int main(){
    int a = query(0,0);
    int b = query(0,a);
    query(b/2, a-b/2);
}
0