結果

問題 No.471 直列回転機
ユーザー koba-e964koba-e964
提出日時 2016-12-21 14:12:19
言語 Ruby
(3.3.0)
結果
AC  
実行時間 401 ms / 3,141 ms
コード長 421 bytes
コンパイル時間 282 ms
コンパイル使用メモリ 11,220 KB
実行使用メモリ 32,244 KB
平均クエリ数 19589.39
最終ジャッジ日時 2023-09-02 03:47:37
合計ジャッジ時間 17,727 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 98 ms
30,676 KB
testcase_01 AC 94 ms
31,044 KB
testcase_02 AC 95 ms
31,124 KB
testcase_03 AC 93 ms
30,744 KB
testcase_04 AC 92 ms
31,224 KB
testcase_05 AC 100 ms
30,700 KB
testcase_06 AC 98 ms
30,852 KB
testcase_07 AC 96 ms
30,724 KB
testcase_08 AC 127 ms
30,832 KB
testcase_09 AC 134 ms
30,952 KB
testcase_10 AC 116 ms
30,628 KB
testcase_11 AC 217 ms
31,248 KB
testcase_12 AC 340 ms
31,736 KB
testcase_13 AC 331 ms
31,728 KB
testcase_14 AC 362 ms
31,788 KB
testcase_15 AC 401 ms
31,988 KB
testcase_16 AC 100 ms
30,680 KB
testcase_17 AC 96 ms
30,880 KB
testcase_18 AC 96 ms
30,684 KB
testcase_19 AC 96 ms
30,852 KB
testcase_20 AC 363 ms
32,244 KB
testcase_21 AC 175 ms
31,488 KB
testcase_22 AC 345 ms
31,488 KB
testcase_23 AC 319 ms
31,224 KB
testcase_24 AC 235 ms
31,384 KB
testcase_25 AC 153 ms
31,308 KB
testcase_26 AC 362 ms
31,456 KB
testcase_27 AC 227 ms
31,372 KB
testcase_28 AC 252 ms
31,680 KB
testcase_29 AC 279 ms
31,712 KB
testcase_30 AC 175 ms
31,516 KB
testcase_31 AC 363 ms
31,452 KB
testcase_32 AC 333 ms
32,032 KB
testcase_33 AC 268 ms
31,564 KB
testcase_34 AC 365 ms
32,176 KB
testcase_35 AC 170 ms
31,548 KB
testcase_36 AC 209 ms
31,884 KB
testcase_37 AC 127 ms
30,980 KB
testcase_38 AC 153 ms
30,708 KB
testcase_39 AC 199 ms
31,432 KB
testcase_40 AC 291 ms
31,576 KB
testcase_41 AC 367 ms
31,904 KB
testcase_42 AC 278 ms
31,660 KB
testcase_43 AC 341 ms
31,684 KB
testcase_44 AC 132 ms
30,864 KB
testcase_45 AC 263 ms
31,948 KB
testcase_46 AC 299 ms
31,440 KB
testcase_47 AC 345 ms
32,152 KB
testcase_48 AC 320 ms
31,576 KB
testcase_49 AC 302 ms
32,068 KB
testcase_50 AC 338 ms
31,564 KB
testcase_51 AC 198 ms
30,908 KB
testcase_52 AC 101 ms
31,200 KB
testcase_53 AC 101 ms
30,868 KB
testcase_54 AC 99 ms
30,852 KB
testcase_55 AC 172 ms
31,072 KB
testcase_56 AC 162 ms
30,948 KB
testcase_57 AC 147 ms
30,800 KB
testcase_58 AC 120 ms
31,388 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

m=gets.to_i
x=Array.new(m)
y=Array.new(m)
(0 ... m).each {|i|
  x[i], y[i] = gets.split.map &:to_i
}
puts "? 0 0"
STDOUT.flush
ox, oy = gets.split.map &:to_i
puts "? 1 0"
STDOUT.flush
kx, ky = gets.split.map &:to_i
kx -= ox
ky -= oy
puts "? 0 1"
STDOUT.flush
lx, ly = gets.split.map &:to_i
lx -= ox
ly -= oy

puts "!"
(0 ... m).each {|i|
  print ox + kx * x[i] + lx * y[i]
  print " "
  puts oy + ky * x[i] + ly * y[i]
}
0