結果
| 問題 | 
                            No.514 宝探し3
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2017-05-06 00:07:27 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 24 ms / 2,000 ms | 
| コード長 | 446 bytes | 
| コンパイル時間 | 620 ms | 
| コンパイル使用メモリ | 63,424 KB | 
| 実行使用メモリ | 25,476 KB | 
| 平均クエリ数 | 2.67 | 
| 最終ジャッジ日時 | 2024-07-16 13:30:17 | 
| 合計ジャッジ時間 | 1,801 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 12 | 
ソースコード
#include <algorithm>
#include <functional>
#include <iostream>
#include <map>
using namespace std;
int main(int argc, const char* argv[])
{
	bool flag = false;
	auto f	= [&](uint32_t x, uint32_t y) {
		if (flag) return 0;
		cout << x << " " << y << endl;
		int d;
		cin >> d;
		if (d == 0) flag = true;
		return d;
	};
	uint32_t d0 = f(0, 0);
	uint32_t d1 = f(d0, 0);
	uint32_t x = d0 - d1 / 2, y = d1 / 2;
	uint32_t d2 = f(x, y);
	return 0;
}