結果

問題 No.514 宝探し3
ユーザー gigimegigime
提出日時 2017-05-05 22:51:34
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 29 ms / 2,000 ms
コード長 691 bytes
コンパイル時間 2,127 ms
コンパイル使用メモリ 162,716 KB
実行使用メモリ 24,300 KB
平均クエリ数 4.00
最終ジャッジ日時 2023-09-23 13:26:39
合計ジャッジ時間 2,598 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

#define FOR(i,l,r) for(int i = (int) (l);i < (int) (r);i++)
#define ALL(x) x.begin(),x.end()
template<typename T> bool chmax(T& a,const T& b){ return a < b ? (a = b,true) : false; }
template<typename T> bool chmin(T& a,const T& b){ return b < a ? (a = b,true) : false; }
typedef long long ll;

const int MAX = 1000000000;

int main()
{
	ll A,B,C;
	printf("%d %d\n",0,0);
	fflush(stdout);
	scanf("%lld",&A);
	printf("%d %d\n",0,MAX);
	fflush(stdout);
	scanf("%lld",&B);
	printf("%d %d\n",MAX,0);
	fflush(stdout);
	scanf("%lld",&C);
	ll X = (A + B - MAX) / 2;
	ll Y = (A + C - MAX) / 2;
	printf("%lld %lld\n",X,Y);
	fflush(stdout);

	return 0;
}
0