結果

問題 No.514 宝探し3
ユーザー 37zigen37zigen
提出日時 2017-05-05 23:08:27
言語 Java21
(openjdk 21)
結果
AC  
実行時間 193 ms / 2,000 ms
コード長 860 bytes
コンパイル時間 2,208 ms
コンパイル使用メモリ 77,380 KB
実行使用メモリ 72,844 KB
平均クエリ数 4.25
最終ジャッジ日時 2023-09-23 13:32:59
合計ジャッジ時間 5,408 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 186 ms
72,840 KB
testcase_01 AC 183 ms
72,740 KB
testcase_02 AC 193 ms
72,844 KB
testcase_03 AC 181 ms
70,244 KB
testcase_04 AC 179 ms
72,788 KB
testcase_05 AC 184 ms
72,284 KB
testcase_06 AC 178 ms
72,460 KB
testcase_07 AC 178 ms
72,708 KB
testcase_08 AC 159 ms
71,456 KB
testcase_09 AC 161 ms
72,388 KB
testcase_10 AC 181 ms
72,704 KB
testcase_11 AC 164 ms
72,308 KB
権限があれば一括ダウンロードができます

ソースコード

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