結果

問題 No.471 直列回転機
ユーザー cielciel
提出日時 2016-12-27 21:46:28
言語 Ruby
(3.3.0)
結果
AC  
実行時間 450 ms / 3,141 ms
コード長 232 bytes
コンパイル時間 976 ms
コンパイル使用メモリ 11,456 KB
実行使用メモリ 36,644 KB
平均クエリ数 19588.39
最終ジャッジ日時 2023-09-02 03:54:59
合計ジャッジ時間 18,117 ms
ジャッジサーバーID
(参考情報)
judge16 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 107 ms
30,976 KB
testcase_01 AC 94 ms
31,360 KB
testcase_02 AC 95 ms
31,232 KB
testcase_03 AC 96 ms
30,924 KB
testcase_04 AC 95 ms
31,476 KB
testcase_05 AC 103 ms
30,648 KB
testcase_06 AC 98 ms
31,264 KB
testcase_07 AC 101 ms
30,812 KB
testcase_08 AC 136 ms
31,916 KB
testcase_09 AC 139 ms
31,948 KB
testcase_10 AC 116 ms
31,236 KB
testcase_11 AC 237 ms
32,508 KB
testcase_12 AC 369 ms
33,940 KB
testcase_13 AC 373 ms
33,872 KB
testcase_14 AC 406 ms
36,164 KB
testcase_15 AC 450 ms
36,240 KB
testcase_16 AC 101 ms
30,996 KB
testcase_17 AC 94 ms
30,892 KB
testcase_18 AC 97 ms
30,940 KB
testcase_19 AC 94 ms
31,364 KB
testcase_20 AC 417 ms
36,512 KB
testcase_21 AC 182 ms
31,484 KB
testcase_22 AC 383 ms
33,808 KB
testcase_23 AC 360 ms
34,168 KB
testcase_24 AC 257 ms
32,668 KB
testcase_25 AC 160 ms
31,568 KB
testcase_26 AC 422 ms
36,332 KB
testcase_27 AC 245 ms
32,328 KB
testcase_28 AC 283 ms
32,500 KB
testcase_29 AC 298 ms
34,304 KB
testcase_30 AC 184 ms
31,948 KB
testcase_31 AC 425 ms
36,376 KB
testcase_32 AC 359 ms
33,896 KB
testcase_33 AC 298 ms
34,788 KB
testcase_34 AC 406 ms
36,272 KB
testcase_35 AC 174 ms
31,984 KB
testcase_36 AC 230 ms
32,636 KB
testcase_37 AC 132 ms
31,884 KB
testcase_38 AC 161 ms
31,396 KB
testcase_39 AC 211 ms
31,604 KB
testcase_40 AC 321 ms
34,712 KB
testcase_41 AC 429 ms
36,140 KB
testcase_42 AC 306 ms
34,916 KB
testcase_43 AC 385 ms
36,644 KB
testcase_44 AC 130 ms
31,724 KB
testcase_45 AC 341 ms
34,516 KB
testcase_46 AC 332 ms
34,260 KB
testcase_47 AC 398 ms
36,184 KB
testcase_48 AC 347 ms
33,944 KB
testcase_49 AC 335 ms
34,144 KB
testcase_50 AC 399 ms
36,212 KB
testcase_51 AC 214 ms
32,280 KB
testcase_52 AC 99 ms
31,512 KB
testcase_53 AC 99 ms
30,608 KB
testcase_54 AC 103 ms
30,772 KB
testcase_55 AC 179 ms
31,632 KB
testcase_56 AC 172 ms
31,728 KB
testcase_57 AC 146 ms
31,516 KB
testcase_58 AC 120 ms
31,144 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

m=gets.to_i.times.map{gets.split.map(&:to_f)}
$>.<<("? 0 0\n? 1 1\n!\n").flush
dx,dy=gets.split.map(&:to_f)
cms,cps=gets.split.map(&:to_f)
cms-=dx
cps-=dy
c=(cms+cps)/2
s=(cps-cms)/2
m.each{|x,y|puts '%f %f'%[x*c-y*s+dx,x*s+y*c+dy]}
0