結果

問題 No.514 宝探し3
ユーザー snrnsidysnrnsidy
提出日時 2021-09-25 16:43:33
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 28 ms / 2,000 ms
コード長 332 bytes
コンパイル時間 2,002 ms
コンパイル使用メモリ 193,700 KB
最終ジャッジ日時 2025-01-24 18:12:16
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

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

	int a,b;
	
	cout << 0 << " " << 0 << endl;
	cin >> a;
	if(a==0) return 0;
	cout << a << " " << 0 << endl;
	cin >> b;
	if(b==0) return 0;
	int x = 2*a - b;
	x/=2;
	int y = a - x;
	cout << x << " " << y << endl;
	return 0;
}
0