結果

問題 No.514 宝探し3
ユーザー uwiuwi
提出日時 2017-05-06 02:21:02
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 982 bytes
コンパイル時間 3,869 ms
コンパイル使用メモリ 77,276 KB
実行使用メモリ 149,776 KB
平均クエリ数 3.00
最終ジャッジ日時 2023-09-23 13:55:51
合計ジャッジ時間 8,441 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 WA -
testcase_09 RE -
testcase_10 RE -
testcase_11 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

package contest170505;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

public class BB2 {
	static Scanner in;
	static PrintWriter out;
	static String INPUT = "";
	
	static long d(long x, long y)
	{
		out.println(x + " " + y);
		out.flush();
		return nl();
	}
	
	static void solve()
	{
		long D = 1000000000;
		long d00 = d(0, -D);
		long d01 = d(0, D+D);
		// a+b=D1
		// a+c=D2
		// b+c=3*D
		long a = (d00+d01+3*D)/2-D;
		long b = (d00+d01+3*D)/2-d01-D;
		d(a, b);
	}
	
	public static void main(String[] args) throws Exception
	{
		in = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(INPUT);
		out = new PrintWriter(System.out);
		
		solve();
		out.flush();
	}
	
	static int ni() { return Integer.parseInt(in.next()); }
	static long nl() { return Long.parseLong(in.next()); }
	static double nd() { return Double.parseDouble(in.next()); }
	static void tr(Object... o) { if(INPUT.length() != 0)System.out.println(Arrays.deepToString(o)); }
}
0