結果

問題 No.467 隠されていたゲーム
ユーザー wotsushi
提出日時 2017-03-14 21:00:45
言語 Ruby
(3.4.1)
結果
WA  
実行時間 -
コード長 251 bytes
コンパイル時間 38 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 12,416 KB
最終ジャッジ日時 2024-06-30 00:45:44
合計ジャッジ時間 3,497 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other AC * 6 WA * 18
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

n = gets.to_i
d = gets.split.map(&:to_i)
x, y = gets.split.map(&:to_i)
c = [x.abs, y.abs].max
ans = if c == 0
        0
      elsif d.any? {|z| z == c}
        1
      elsif d.max < c
        2
      else
        c.fdiv(d.max).ceil
      end
puts ans
0