結果

問題 No.513 宝探し2
ユーザー 37zigen37zigen
提出日時 2017-05-05 23:05:53
言語 Java21
(openjdk 21)
結果
AC  
実行時間 196 ms / 2,000 ms
コード長 830 bytes
コンパイル時間 2,913 ms
コンパイル使用メモリ 83,256 KB
実行使用メモリ 59,376 KB
平均クエリ数 4.25
最終ジャッジ日時 2024-07-17 01:01:56
合計ジャッジ時間 6,032 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 196 ms
58,584 KB
testcase_01 AC 191 ms
59,064 KB
testcase_02 AC 183 ms
58,924 KB
testcase_03 AC 194 ms
59,376 KB
testcase_04 AC 191 ms
59,080 KB
testcase_05 AC 177 ms
58,676 KB
testcase_06 AC 196 ms
58,760 KB
testcase_07 AC 191 ms
58,964 KB
testcase_08 AC 162 ms
57,684 KB
testcase_09 AC 168 ms
57,980 KB
testcase_10 AC 195 ms
58,684 KB
testcase_11 AC 156 ms
57,496 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);
		System.out.println(100000 + " " + 0);
		int h = sc.nextInt();
		if (h == 0)
			return;
		System.out.println(0 + " " + 0);
		int v = sc.nextInt();
		if (v == 0)
			return;
		int X = (v - h + 100000) / 2;
		System.out.println(0 + " " + 100000);
		h = sc.nextInt();
		if (h == 0)
			return;
		System.out.println(0 + " " + 0);
		v = sc.nextInt();
		if (v == 0)
			return;
		int Y = (v - h + 100000) / 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