結果
問題 |
No.471 直列回転機
|
ユーザー |
|
提出日時 | 2016-12-27 14:45:03 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 929 ms / 3,141 ms |
コード長 | 739 bytes |
コンパイル時間 | 4,928 ms |
コンパイル使用メモリ | 79,400 KB |
実行使用メモリ | 71,040 KB |
平均クエリ数 | 19588.39 |
最終ジャッジ日時 | 2024-06-11 10:36:22 |
合計ジャッジ時間 | 41,170 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 58 |
ソースコード
package yukicoder; import java.util.*; public class Q471 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int M = sc.nextInt(); int[] x = new int[M]; int[] y = new int[M]; for (int i = 0; i < M; ++i) { x[i] = sc.nextInt(); y[i] = sc.nextInt(); } System.out.println("? 0 0"); int dx = sc.nextInt(); int dy = sc.nextInt(); System.out.println("? 1 0"); int cos = sc.nextInt() - dx; int sin = sc.nextInt() - dy; System.out.println("!"); StringBuilder sb = new StringBuilder(); for (int i = 0; i < M; ++i) { int nx = cos * x[i] - sin * y[i] + dx; int ny = sin * x[i] + cos * y[i] + dy; sb.append(nx + " " + ny + "\n"); } System.out.println(sb.toString()); } }