結果

問題 No.514 宝探し3
ユーザー finefine
提出日時 2017-05-05 23:14:37
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 28 ms / 2,000 ms
コード長 476 bytes
コンパイル時間 1,412 ms
コンパイル使用メモリ 164,504 KB
実行使用メモリ 24,288 KB
平均クエリ数 3.50
最終ジャッジ日時 2023-09-23 13:45:39
合計ジャッジ時間 2,663 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
23,580 KB
testcase_01 AC 24 ms
23,508 KB
testcase_02 AC 24 ms
23,748 KB
testcase_03 AC 23 ms
23,508 KB
testcase_04 AC 24 ms
23,376 KB
testcase_05 AC 24 ms
23,904 KB
testcase_06 AC 25 ms
23,448 KB
testcase_07 AC 24 ms
24,000 KB
testcase_08 AC 23 ms
24,288 KB
testcase_09 AC 24 ms
24,168 KB
testcase_10 AC 23 ms
23,904 KB
testcase_11 AC 22 ms
23,532 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

const int LIM = 1000000000;

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	cout << 0 << " " << 0 << endl;
	int d1;
	cin >> d1;
	if (d1 == 0) return 0;
	cout << 0 << " " << LIM << endl;
	int d2;
	cin >> d2;
	if (d2 == 0) return 0;
	cout << LIM << " " << 0 << endl;
	int d3;
	cin >> d3;
	if (d3 == 0) return 0;
	int ay = (d1 - d2 + LIM) / 2;
	int ax = (d1 - d3 + LIM) / 2;
	cout << ax << " " << ay << endl;
	return 0;
}
0