結果

問題 No.471 直列回転機
ユーザー 37zigen37zigen
提出日時 2016-12-27 14:35:59
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 839 bytes
コンパイル時間 3,851 ms
コンパイル使用メモリ 77,032 KB
実行使用メモリ 89,056 KB
平均クエリ数 19588.39
最終ジャッジ日時 2023-09-23 12:22:50
合計ジャッジ時間 64,065 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 196 ms
72,720 KB
testcase_01 AC 189 ms
73,164 KB
testcase_02 AC 192 ms
73,364 KB
testcase_03 AC 190 ms
72,620 KB
testcase_04 AC 192 ms
71,552 KB
testcase_05 AC 323 ms
76,832 KB
testcase_06 AC 268 ms
77,072 KB
testcase_07 AC 307 ms
77,420 KB
testcase_08 AC 633 ms
80,800 KB
testcase_09 AC 581 ms
78,732 KB
testcase_10 AC 462 ms
79,000 KB
testcase_11 AC 1,133 ms
81,916 KB
testcase_12 AC 1,552 ms
85,176 KB
testcase_13 AC 1,579 ms
85,412 KB
testcase_14 AC 1,638 ms
85,040 KB
testcase_15 WA -
testcase_16 AC 281 ms
76,424 KB
testcase_17 AC 185 ms
73,408 KB
testcase_18 AC 181 ms
73,312 KB
testcase_19 AC 186 ms
72,520 KB
testcase_20 AC 1,611 ms
86,936 KB
testcase_21 AC 711 ms
80,988 KB
testcase_22 AC 1,543 ms
83,492 KB
testcase_23 AC 1,272 ms
85,332 KB
testcase_24 AC 959 ms
79,036 KB
testcase_25 AC 644 ms
79,212 KB
testcase_26 AC 1,423 ms
86,280 KB
testcase_27 AC 993 ms
81,064 KB
testcase_28 AC 1,102 ms
83,648 KB
testcase_29 AC 1,354 ms
83,480 KB
testcase_30 AC 860 ms
80,888 KB
testcase_31 AC 1,631 ms
85,880 KB
testcase_32 AC 1,534 ms
83,416 KB
testcase_33 AC 1,396 ms
79,740 KB
testcase_34 AC 1,668 ms
84,024 KB
testcase_35 AC 650 ms
79,504 KB
testcase_36 AC 907 ms
79,000 KB
testcase_37 AC 543 ms
79,124 KB
testcase_38 AC 739 ms
80,656 KB
testcase_39 AC 827 ms
77,576 KB
testcase_40 AC 1,188 ms
83,240 KB
testcase_41 AC 1,665 ms
86,004 KB
testcase_42 AC 1,099 ms
82,400 KB
testcase_43 AC 1,300 ms
85,368 KB
testcase_44 AC 468 ms
77,876 KB
testcase_45 AC 1,367 ms
83,496 KB
testcase_46 AC 1,462 ms
82,468 KB
testcase_47 AC 1,361 ms
84,432 KB
testcase_48 AC 1,272 ms
82,952 KB
testcase_49 AC 1,248 ms
86,108 KB
testcase_50 AC 1,379 ms
83,012 KB
testcase_51 AC 1,052 ms
82,228 KB
testcase_52 AC 303 ms
77,336 KB
testcase_53 AC 301 ms
77,776 KB
testcase_54 AC 337 ms
79,492 KB
testcase_55 AC 811 ms
81,536 KB
testcase_56 AC 633 ms
78,376 KB
testcase_57 AC 521 ms
78,040 KB
testcase_58 AC 484 ms
78,512 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.util.*;

public class Q471 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int M = sc.nextInt();
		double[] x = new double[M];
		double[] y = new double[M];
		for (int i = 0; i < M; ++i) {
			x[i] = sc.nextDouble();
			y[i] = sc.nextDouble();
		}
		System.out.println("? 0 0");
		double dx = sc.nextDouble();
		double dy = sc.nextDouble();
		System.out.println("? 1 0");
		double cos = sc.nextDouble() - dx;
		double sin = sc.nextDouble() - dy;
		double[] nx = new double[M];
		double[] ny = new double[M];
		System.out.println("!");
		StringBuilder sb=new StringBuilder();
		for (int i = 0; i < M; ++i) {
			nx[i] = cos * x[i] - sin * y[i] + dx;
			ny[i] = sin * x[i] + cos * y[i] + dy;
			sb.append(nx[i]+" "+ny[i]+"\n");
		}
		System.out.println(sb.toString());
	}
}
0