結果

問題 No.471 直列回転機
ユーザー 37zigen37zigen
提出日時 2016-12-27 14:45:03
言語 Java21
(openjdk 21)
結果
AC  
実行時間 900 ms / 3,141 ms
コード長 739 bytes
コンパイル時間 4,440 ms
コンパイル使用メモリ 75,728 KB
実行使用メモリ 81,484 KB
平均クエリ数 19588.39
最終ジャッジ日時 2023-09-02 03:54:19
合計ジャッジ時間 38,076 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 173 ms
72,640 KB
testcase_01 AC 166 ms
70,188 KB
testcase_02 AC 170 ms
72,800 KB
testcase_03 AC 173 ms
72,380 KB
testcase_04 AC 169 ms
72,416 KB
testcase_05 AC 229 ms
72,756 KB
testcase_06 AC 191 ms
69,556 KB
testcase_07 AC 216 ms
70,928 KB
testcase_08 AC 349 ms
76,916 KB
testcase_09 AC 360 ms
76,944 KB
testcase_10 AC 300 ms
77,116 KB
testcase_11 AC 526 ms
76,056 KB
testcase_12 AC 748 ms
77,980 KB
testcase_13 AC 752 ms
78,372 KB
testcase_14 AC 780 ms
80,996 KB
testcase_15 AC 900 ms
81,152 KB
testcase_16 AC 198 ms
72,236 KB
testcase_17 AC 166 ms
72,420 KB
testcase_18 AC 170 ms
72,484 KB
testcase_19 AC 177 ms
72,064 KB
testcase_20 AC 823 ms
81,244 KB
testcase_21 AC 395 ms
77,260 KB
testcase_22 AC 776 ms
78,536 KB
testcase_23 AC 725 ms
79,000 KB
testcase_24 AC 579 ms
74,656 KB
testcase_25 AC 371 ms
76,588 KB
testcase_26 AC 801 ms
80,948 KB
testcase_27 AC 557 ms
76,372 KB
testcase_28 AC 619 ms
77,816 KB
testcase_29 AC 666 ms
76,088 KB
testcase_30 AC 437 ms
76,500 KB
testcase_31 AC 812 ms
80,936 KB
testcase_32 AC 762 ms
74,756 KB
testcase_33 AC 646 ms
76,624 KB
testcase_34 AC 831 ms
79,744 KB
testcase_35 AC 415 ms
76,104 KB
testcase_36 AC 530 ms
77,776 KB
testcase_37 AC 342 ms
77,148 KB
testcase_38 AC 394 ms
76,296 KB
testcase_39 AC 473 ms
75,828 KB
testcase_40 AC 681 ms
75,760 KB
testcase_41 AC 810 ms
80,740 KB
testcase_42 AC 638 ms
76,712 KB
testcase_43 AC 793 ms
79,704 KB
testcase_44 AC 311 ms
76,480 KB
testcase_45 AC 678 ms
76,064 KB
testcase_46 AC 720 ms
73,484 KB
testcase_47 AC 777 ms
81,484 KB
testcase_48 AC 733 ms
78,132 KB
testcase_49 AC 708 ms
77,280 KB
testcase_50 AC 791 ms
80,224 KB
testcase_51 AC 507 ms
75,708 KB
testcase_52 AC 237 ms
72,032 KB
testcase_53 AC 236 ms
72,456 KB
testcase_54 AC 252 ms
76,104 KB
testcase_55 AC 430 ms
76,268 KB
testcase_56 AC 397 ms
76,648 KB
testcase_57 AC 350 ms
76,896 KB
testcase_58 AC 314 ms
76,720 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();
		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());
	}
}
0