結果

問題 No.513 宝探し2
ユーザー kcz146kcz146
提出日時 2017-12-02 16:29:48
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 29 ms / 2,000 ms
コード長 345 bytes
コンパイル時間 398 ms
コンパイル使用メモリ 24,528 KB
実行使用メモリ 24,312 KB
平均クエリ数 3.00
最終ジャッジ日時 2023-09-24 01:36:53
合計ジャッジ時間 1,684 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
23,784 KB
testcase_01 AC 25 ms
23,604 KB
testcase_02 AC 25 ms
23,352 KB
testcase_03 AC 25 ms
23,352 KB
testcase_04 AC 25 ms
23,520 KB
testcase_05 AC 25 ms
24,012 KB
testcase_06 AC 23 ms
24,024 KB
testcase_07 AC 24 ms
24,312 KB
testcase_08 AC 24 ms
24,012 KB
testcase_09 AC 24 ms
23,616 KB
testcase_10 AC 25 ms
23,496 KB
testcase_11 AC 24 ms
24,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<cstdio>

int main(void) {
    int xx, yy;
    printf("0 0\n");
    fflush(stdout);
    int d1, d2;
    scanf("%d", &d1);
    // x + y = d1
    printf("100000 0\n");
    fflush(stdout);
    // 100000-x + y = d2
    scanf("%d", &d2);
    int x = (d1 - d2 + 100000)/2;
    int y = d1 - x;
    printf("%d %d\n", x, y);
    fflush(stdout);
}
0