結果

問題 No.513 宝探し2
ユーザー 37zigen37zigen
提出日時 2017-05-05 23:05:53
言語 Java21
(openjdk 21)
結果
AC  
実行時間 157 ms / 2,000 ms
コード長 830 bytes
コンパイル時間 2,358 ms
コンパイル使用メモリ 78,600 KB
実行使用メモリ 72,908 KB
平均クエリ数 4.25
最終ジャッジ日時 2023-09-24 01:07:06
合計ジャッジ時間 4,556 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 152 ms
72,496 KB
testcase_01 AC 153 ms
72,600 KB
testcase_02 AC 151 ms
72,364 KB
testcase_03 AC 152 ms
72,212 KB
testcase_04 AC 151 ms
72,908 KB
testcase_05 AC 151 ms
72,596 KB
testcase_06 AC 149 ms
72,768 KB
testcase_07 AC 148 ms
72,356 KB
testcase_08 AC 129 ms
70,540 KB
testcase_09 AC 129 ms
71,892 KB
testcase_10 AC 157 ms
72,492 KB
testcase_11 AC 130 ms
71,960 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