結果
問題 | No.216 FAC |
ユーザー |
|
提出日時 | 2018-03-19 14:42:02 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 103 ms / 1,000 ms |
コード長 | 302 bytes |
コンパイル時間 | 378 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-12-31 10:44:16 |
合計ジャッジ時間 | 4,304 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n Syntax OK
ソースコード
n = gets.to_ipoints = gets.split.map(&:to_i)solved = gets.chomp.splith = Hash.newsolved.zip(points) do |solved, points|if h[solved].nil?h[solved] = pointselseh[solved] += pointsendendif h.sort.sort_by{|k,v| -v}[0][0] == "0"puts "YES"elseputs "NO"end