結果

問題 No.471 直列回転機
ユーザー 37zigen37zigen
提出日時 2016-12-27 14:35:59
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 839 bytes
コンパイル時間 4,312 ms
コンパイル使用メモリ 79,136 KB
実行使用メモリ 88,304 KB
平均クエリ数 19588.39
最終ジャッジ日時 2024-07-16 11:58:54
合計ジャッジ時間 62,398 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 177 ms
71,816 KB
testcase_01 AC 171 ms
71,900 KB
testcase_02 AC 198 ms
71,600 KB
testcase_03 AC 173 ms
71,740 KB
testcase_04 AC 196 ms
72,056 KB
testcase_05 AC 296 ms
76,084 KB
testcase_06 AC 235 ms
74,984 KB
testcase_07 AC 279 ms
76,404 KB
testcase_08 AC 583 ms
79,080 KB
testcase_09 AC 625 ms
79,552 KB
testcase_10 AC 510 ms
81,096 KB
testcase_11 AC 1,166 ms
79,952 KB
testcase_12 AC 1,456 ms
83,032 KB
testcase_13 AC 1,714 ms
82,672 KB
testcase_14 AC 1,704 ms
84,532 KB
testcase_15 WA -
testcase_16 AC 248 ms
74,628 KB
testcase_17 AC 182 ms
71,516 KB
testcase_18 AC 183 ms
71,628 KB
testcase_19 AC 202 ms
71,716 KB
testcase_20 AC 1,606 ms
84,552 KB
testcase_21 AC 722 ms
79,704 KB
testcase_22 AC 1,471 ms
82,196 KB
testcase_23 AC 1,474 ms
82,340 KB
testcase_24 AC 1,171 ms
82,052 KB
testcase_25 AC 595 ms
79,280 KB
testcase_26 AC 1,632 ms
84,568 KB
testcase_27 AC 1,331 ms
80,232 KB
testcase_28 AC 1,087 ms
82,084 KB
testcase_29 AC 1,261 ms
81,308 KB
testcase_30 AC 782 ms
80,080 KB
testcase_31 AC 1,521 ms
84,552 KB
testcase_32 AC 1,459 ms
84,740 KB
testcase_33 AC 1,307 ms
81,976 KB
testcase_34 AC 1,596 ms
82,448 KB
testcase_35 AC 690 ms
79,932 KB
testcase_36 AC 1,059 ms
79,684 KB
testcase_37 AC 519 ms
80,512 KB
testcase_38 AC 696 ms
79,740 KB
testcase_39 AC 1,020 ms
80,028 KB
testcase_40 AC 1,313 ms
82,264 KB
testcase_41 AC 1,558 ms
86,120 KB
testcase_42 AC 1,208 ms
81,536 KB
testcase_43 AC 1,433 ms
84,224 KB
testcase_44 AC 437 ms
78,576 KB
testcase_45 AC 1,246 ms
82,796 KB
testcase_46 AC 1,372 ms
81,600 KB
testcase_47 AC 1,461 ms
86,416 KB
testcase_48 AC 1,348 ms
82,640 KB
testcase_49 AC 1,433 ms
81,960 KB
testcase_50 AC 1,570 ms
83,828 KB
testcase_51 AC 1,065 ms
79,864 KB
testcase_52 AC 291 ms
76,308 KB
testcase_53 AC 299 ms
76,596 KB
testcase_54 AC 322 ms
76,572 KB
testcase_55 AC 719 ms
80,592 KB
testcase_56 AC 677 ms
79,096 KB
testcase_57 AC 507 ms
79,660 KB
testcase_58 AC 468 ms
79,408 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