結果

問題 No.471 直列回転機
ユーザー tubo28tubo28
提出日時 2016-12-12 14:17:20
言語 Ruby
(3.3.0)
結果
AC  
実行時間 444 ms / 3,141 ms
コード長 414 bytes
コンパイル時間 469 ms
コンパイル使用メモリ 11,336 KB
実行使用メモリ 37,880 KB
平均クエリ数 19588.39
最終ジャッジ日時 2023-09-02 03:36:29
合計ジャッジ時間 18,001 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 98 ms
31,128 KB
testcase_01 AC 97 ms
31,460 KB
testcase_02 AC 96 ms
31,000 KB
testcase_03 AC 95 ms
31,144 KB
testcase_04 AC 91 ms
31,356 KB
testcase_05 AC 98 ms
31,264 KB
testcase_06 AC 96 ms
31,028 KB
testcase_07 AC 98 ms
31,148 KB
testcase_08 AC 135 ms
31,820 KB
testcase_09 AC 139 ms
31,760 KB
testcase_10 AC 116 ms
31,612 KB
testcase_11 AC 224 ms
33,720 KB
testcase_12 AC 369 ms
37,140 KB
testcase_13 AC 373 ms
36,496 KB
testcase_14 AC 391 ms
36,812 KB
testcase_15 AC 444 ms
37,596 KB
testcase_16 AC 99 ms
30,864 KB
testcase_17 AC 93 ms
31,228 KB
testcase_18 AC 98 ms
31,084 KB
testcase_19 AC 97 ms
31,144 KB
testcase_20 AC 417 ms
36,920 KB
testcase_21 AC 167 ms
31,944 KB
testcase_22 AC 378 ms
37,312 KB
testcase_23 AC 347 ms
36,720 KB
testcase_24 AC 250 ms
34,256 KB
testcase_25 AC 155 ms
31,756 KB
testcase_26 AC 401 ms
36,788 KB
testcase_27 AC 242 ms
34,292 KB
testcase_28 AC 272 ms
34,840 KB
testcase_29 AC 310 ms
35,568 KB
testcase_30 AC 181 ms
32,452 KB
testcase_31 AC 410 ms
37,880 KB
testcase_32 AC 360 ms
36,384 KB
testcase_33 AC 293 ms
35,184 KB
testcase_34 AC 405 ms
37,300 KB
testcase_35 AC 174 ms
32,140 KB
testcase_36 AC 226 ms
34,216 KB
testcase_37 AC 129 ms
31,528 KB
testcase_38 AC 152 ms
32,188 KB
testcase_39 AC 205 ms
32,232 KB
testcase_40 AC 324 ms
35,192 KB
testcase_41 AC 405 ms
37,256 KB
testcase_42 AC 297 ms
35,480 KB
testcase_43 AC 376 ms
37,336 KB
testcase_44 AC 132 ms
31,328 KB
testcase_45 AC 277 ms
35,348 KB
testcase_46 AC 336 ms
34,948 KB
testcase_47 AC 378 ms
37,448 KB
testcase_48 AC 348 ms
36,432 KB
testcase_49 AC 333 ms
36,788 KB
testcase_50 AC 384 ms
36,668 KB
testcase_51 AC 214 ms
33,728 KB
testcase_52 AC 102 ms
30,936 KB
testcase_53 AC 100 ms
31,004 KB
testcase_54 AC 96 ms
31,080 KB
testcase_55 AC 178 ms
32,120 KB
testcase_56 AC 169 ms
32,024 KB
testcase_57 AC 139 ms
31,748 KB
testcase_58 AC 118 ms
31,676 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def get
  x, y = gets.split.map(&:to_i);
  Complex(x, y)
end

m = gets.to_i
raise unless m.between?(1, 50000)

ps = m.times.map { get }
ps.each { |p|
  x, y = p.rect
  raise unless x.between?(-10000, +10000)
  raise unless y.between?(-10000, +10000)
}

puts "? 0 0"
$>.flush
org = get

puts "? 1 0"
$>.flush
r = get - org

puts "!"
ps.map { |c| c*r + org }.each { |c|
  x, y = c.rect
  puts "#{x} #{y}"
}
$>.flush
0