結果

問題 No.514 宝探し3
ユーザー parukiparuki
提出日時 2017-05-05 22:51:14
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 26 ms / 2,000 ms
コード長 804 bytes
コンパイル時間 1,404 ms
コンパイル使用メモリ 163,340 KB
実行使用メモリ 24,156 KB
平均クエリ数 3.50
最終ジャッジ日時 2023-09-23 13:26:31
合計ジャッジ時間 2,683 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
24,072 KB
testcase_01 AC 25 ms
23,616 KB
testcase_02 AC 25 ms
23,676 KB
testcase_03 AC 25 ms
24,132 KB
testcase_04 AC 25 ms
24,156 KB
testcase_05 AC 23 ms
24,144 KB
testcase_06 AC 25 ms
23,712 KB
testcase_07 AC 25 ms
23,700 KB
testcase_08 AC 24 ms
23,724 KB
testcase_09 AC 25 ms
23,484 KB
testcase_10 AC 25 ms
23,700 KB
testcase_11 AC 25 ms
24,072 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "bits/stdc++.h"
using namespace std;
#define FOR(i,j,k) for(int (i)=(j);(i)<(int)(k);++(i))
#define rep(i,j) FOR(i,0,j)
#define each(x,y) for(auto &(x):(y))
#define mp make_pair
#define mt make_tuple
#define all(x) (x).begin(),(x).end()
#define debug(x) cout<<#x<<": "<<(x)<<endl
#define smax(x,y) (x)=max((x),(y))
#define smin(x,y) (x)=min((x),(y))
#define MEM(x,y) memset((x),(y),sizeof (x))
#define sz(x) (int)(x).size()
#define pb push_back
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<ll> vll;

int ask(int x, int y) {
    cout << x << ' ' << y << endl;
    int res;
    cin >> res;
    if (res == 0)exit(0);
    return res;
}

int main(){
    int x = 0, y = (ask(1000000000, 0) + ask(0, 0) - 1000000000) / 2;
    x = ask(x, y);
    ask(x, y);
}
0