結果
| 問題 |
No.513 宝探し2
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-05-05 22:41:50 |
| 言語 | Java (openjdk 23) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 955 bytes |
| コンパイル時間 | 4,737 ms |
| コンパイル使用メモリ | 77,676 KB |
| 実行使用メモリ | 70,960 KB |
| 平均クエリ数 | 3.75 |
| 最終ジャッジ日時 | 2024-07-16 12:59:04 |
| 合計ジャッジ時間 | 6,749 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 12 |
ソースコード
import java.io.*;
import java.util.*;
public class Main_yukicoder513 {
private static Scanner sc;
private static Printer pr;
private static void solve() {
query(0, 0);
int a0 = sc.nextInt();
query(100_000, 0);
int a1 = sc.nextInt();
int[] dx = {0, 1, 1, 0, -1, -1, -1, 0, 1};
int[] dy = {0, 0, 1, 1, 1, 0, -1, -1, -1};
int tmpx = (a0 - a1 + 100_000) / 2;
int tmpy = (a0 + a1 - 100_000) / 2;
for (int i = 0, size = dx.length; i < size; i++) {
query(tmpx + dx[i], tmpy + dy[i]);
int tmp = sc.nextInt();
}
}
private static void query(int x, int y) {
pr.printf("%d %d\n", x, y);
pr.flush();
return;
}
// ---------------------------------------------------
public static void main(String[] args) {
sc = new Scanner(System.in);
pr = new Printer(System.out);
solve();
pr.close();
sc.close();
}
private static class Printer extends PrintWriter {
Printer(PrintStream out) {
super(out);
}
}
}