結果

問題 No.514 宝探し3
ユーザー olpheolphe
提出日時 2017-05-05 22:34:38
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 26 ms / 2,000 ms
コード長 834 bytes
コンパイル時間 946 ms
コンパイル使用メモリ 106,592 KB
実行使用メモリ 24,384 KB
平均クエリ数 4.00
最終ジャッジ日時 2023-09-23 13:18:57
合計ジャッジ時間 2,034 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
23,796 KB
testcase_01 AC 23 ms
23,352 KB
testcase_02 AC 19 ms
24,060 KB
testcase_03 AC 21 ms
23,676 KB
testcase_04 AC 23 ms
23,400 KB
testcase_05 AC 22 ms
24,024 KB
testcase_06 AC 23 ms
24,000 KB
testcase_07 AC 25 ms
24,348 KB
testcase_08 AC 23 ms
23,844 KB
testcase_09 AC 22 ms
24,084 KB
testcase_10 AC 21 ms
23,688 KB
testcase_11 AC 21 ms
24,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "math.h"
#include "utility"
#include "string"
#include "map"
#include "unordered_map"
#include "iomanip"
#include "random"

using namespace std;
const long long int MOD = 1000000007;

long long int a, b, c, d;

int main() {
	ios::sync_with_stdio(false);
	cout << "0 " << "500000000\n";
	cin >> a;
	cout << "1000000000 " << "500000000\n";
	cin >> b;
	c = a + b - 1000000000;
	c /= 2;
	if (a < b) {
		cout << 1000000000 - b + c << " " << 500000000 + c << endl;
		cin >> d;
		cout << 1000000000 - b + c << " " << 500000000 - c << endl;
	}
	else {
		cout << 0 + a - c << " " << 500000000 + c << endl;
		cin >> d;
		cout << 0 + a - c << " " << 500000000 - c << endl;
	}

	return 0;
}
0