結果

問題 No.514 宝探し3
ユーザー 37zigen
提出日時 2017-05-05 23:08:27
言語 Java
(openjdk 23)
結果
AC  
実行時間 175 ms / 2,000 ms
コード長 860 bytes
コンパイル時間 2,556 ms
コンパイル使用メモリ 87,104 KB
実行使用メモリ 71,992 KB
平均クエリ数 4.25
最終ジャッジ日時 2024-07-16 13:09:08
合計ジャッジ時間 5,467 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.Scanner;
import java.util.concurrent.SynchronousQueue;

class Main {
	int N, M;
	int[] X, Y;

	public static void main(String[] args) {
		new Main().run();
	}

	void run() {
		Scanner sc = new Scanner(System.in);
		long MAX = 1000000000;
		System.out.println(MAX + " " + 0);
		long h = sc.nextLong();
		if (h == 0)
			return;
		System.out.println(0 + " " + 0);
		long v = sc.nextLong();
		if (v == 0)
			return;
		long X = (v - h + MAX) / 2;
		System.out.println(0 + " " + MAX);
		h = sc.nextLong();
		if (h == 0)
			return;
		System.out.println(0 + " " + 0);
		v = sc.nextLong();
		if (v == 0)
			return;
		long Y = (v - h + MAX) / 2;
		System.out.println(X + " " + Y);
		int a = sc.nextInt();
		if (a == 0)
			return;
	}

	static void tr(Object... objects) {
		System.out.println(Arrays.deepToString(objects));
	}

}
0