結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 190 ms
73,128 KB
testcase_01 AC 183 ms
72,924 KB
testcase_02 AC 189 ms
72,928 KB
testcase_03 AC 186 ms
72,684 KB
testcase_04 AC 189 ms
72,944 KB
testcase_05 AC 313 ms
76,440 KB
testcase_06 AC 262 ms
75,652 KB
testcase_07 AC 289 ms
77,944 KB
testcase_08 AC 597 ms
78,488 KB
testcase_09 AC 585 ms
78,272 KB
testcase_10 AC 480 ms
78,464 KB
testcase_11 AC 929 ms
79,592 KB
testcase_12 AC 1,315 ms
82,784 KB
testcase_13 AC 1,283 ms
84,396 KB
testcase_14 AC 1,462 ms
84,616 KB
testcase_15 WA -
testcase_16 AC 275 ms
76,064 KB
testcase_17 AC 180 ms
72,948 KB
testcase_18 AC 184 ms
71,052 KB
testcase_19 AC 195 ms
73,116 KB
testcase_20 AC 1,592 ms
85,384 KB
testcase_21 AC 718 ms
80,348 KB
testcase_22 AC 1,560 ms
85,428 KB
testcase_23 AC 1,533 ms
84,196 KB
testcase_24 AC 1,198 ms
81,512 KB
testcase_25 AC 645 ms
76,156 KB
testcase_26 AC 1,604 ms
84,968 KB
testcase_27 AC 1,196 ms
81,748 KB
testcase_28 AC 1,314 ms
81,808 KB
testcase_29 AC 1,307 ms
81,920 KB
testcase_30 AC 771 ms
78,008 KB
testcase_31 AC 1,461 ms
85,572 KB
testcase_32 AC 1,235 ms
83,528 KB
testcase_33 AC 1,400 ms
81,920 KB
testcase_34 AC 1,661 ms
83,780 KB
testcase_35 AC 778 ms
80,612 KB
testcase_36 AC 910 ms
78,840 KB
testcase_37 AC 567 ms
80,940 KB
testcase_38 AC 712 ms
81,332 KB
testcase_39 AC 978 ms
80,620 KB
testcase_40 AC 1,441 ms
82,136 KB
testcase_41 AC 1,462 ms
84,212 KB
testcase_42 AC 1,326 ms
81,348 KB
testcase_43 AC 1,409 ms
85,256 KB
testcase_44 AC 480 ms
77,700 KB
testcase_45 AC 1,067 ms
83,396 KB
testcase_46 AC 1,423 ms
83,076 KB
testcase_47 AC 1,461 ms
85,920 KB
testcase_48 AC 1,499 ms
85,484 KB
testcase_49 AC 1,514 ms
85,020 KB
testcase_50 AC 1,587 ms
84,796 KB
testcase_51 AC 852 ms
79,156 KB
testcase_52 AC 299 ms
76,412 KB
testcase_53 AC 315 ms
78,436 KB
testcase_54 AC 326 ms
77,440 KB
testcase_55 AC 819 ms
79,984 KB
testcase_56 AC 725 ms
81,716 KB
testcase_57 AC 601 ms
79,968 KB
testcase_58 AC 489 ms
78,372 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;
		System.out.println("!");
		StringBuilder sb=new StringBuilder();
		for (int i = 0; i < M; ++i) {
			double nx = cos * x[i] - sin * y[i] + dx;
			double ny = sin * x[i] + cos * y[i] + dy;
			sb.append(nx+" "+ny+"\n");
		}
		System.out.println(sb.toString());
	}
}
0