結果

問題 No.514 宝探し3
ユーザー paruparu
提出日時 2017-05-05 23:03:28
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 24 ms / 2,000 ms
コード長 479 bytes
コンパイル時間 563 ms
コンパイル使用メモリ 56,168 KB
実行使用メモリ 25,460 KB
平均クエリ数 3.00
最終ジャッジ日時 2024-07-16 13:06:24
合計ジャッジ時間 1,658 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main () {
    cout << 0 << ' ' << 0 << endl;
    long d;
    cin >> d;
    if (d <= 1000000000) {
        cout << 0 << ' ' << d << endl;;
        long D;
        cin >> D;
        cout << D / 2 << ' ' << d - D / 2 << endl;
    }
    else {
        cout << d - 1000000000 << ' ' << 1000000000 << endl;
        long D;
        cin >> D;
        cout << d - 1000000000 + D / 2 << ' ' << 1000000000 - D / 2 << endl;
    }
    return 0;
}
0