結果
| 問題 | No.349 干支の置き物 |
| コンテスト | |
| ユーザー |
siman
|
| 提出日時 | 2016-03-19 20:21:03 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 291 bytes |
| 記録 | |
| コンパイル時間 | 224 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-10-01 09:15:00 |
| 合計ジャッジ時間 | 3,938 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 WA * 3 |
コンパイルメッセージ
Syntax OK
ソースコード
class Yukicoder
def initialize
n = gets.chomp.to_i
hash = Hash.new(0)
n.times do
eto = gets.chomp
hash[eto] += 1
end
hash = hash.sort_by{|k,v| -v}.to_h.values
if hash[0] > n/2
puts "NO"
else
puts "YES"
end
end
end
Yukicoder.new
siman