結果

問題 No.513 宝探し2
ユーザー misora192misora192
提出日時 2020-07-24 21:43:32
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 379 bytes
コンパイル時間 1,429 ms
コンパイル使用メモリ 163,624 KB
実行使用メモリ 35,928 KB
最終ジャッジ日時 2023-09-24 03:57:10
合計ジャッジ時間 7,978 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for(int i=(0);i<(n);i++)

using namespace std;

typedef long long ll;

int ask(int x, int y){
	cout << x << " " << y;
	int ret;
	cin >> ret;
	if(ret == 0) exit(0);
	return ret;
}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);

	int a = ask(0, 0);
	int b = ask(0, 1e7);
	int x = (a + b - 1e7) / 2;
	int y = a - x;

	ask(x, y);
}
0