結果

問題 No.349 干支の置き物
ユーザー maimai
提出日時 2016-03-11 22:31:20
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 163 bytes
コンパイル時間 791 ms
コンパイル使用メモリ 11,944 KB
実行使用メモリ 16,228 KB
最終ジャッジ日時 2023-10-25 05:33:55
合計ジャッジ時間 4,889 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
16,228 KB
testcase_01 AC 83 ms
16,228 KB
testcase_02 AC 83 ms
16,228 KB
testcase_03 AC 84 ms
16,228 KB
testcase_04 AC 82 ms
16,228 KB
testcase_05 AC 84 ms
16,228 KB
testcase_06 AC 82 ms
16,228 KB
testcase_07 AC 82 ms
16,228 KB
testcase_08 AC 83 ms
16,228 KB
testcase_09 AC 83 ms
16,228 KB
testcase_10 AC 82 ms
16,228 KB
testcase_11 AC 80 ms
16,228 KB
testcase_12 AC 81 ms
16,228 KB
testcase_13 AC 80 ms
16,228 KB
testcase_14 AC 79 ms
16,224 KB
testcase_15 AC 80 ms
16,228 KB
testcase_16 AC 82 ms
16,228 KB
testcase_17 AC 81 ms
16,228 KB
testcase_18 WA -
testcase_19 AC 81 ms
16,224 KB
testcase_20 WA -
testcase_21 AC 83 ms
16,228 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 80 ms
16,228 KB
testcase_26 AC 82 ms
16,228 KB
testcase_27 AC 85 ms
16,228 KB
testcase_28 AC 82 ms
16,228 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 AC 85 ms
16,228 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n=gets.to_i

a=[]
n.times{
    a+=[gets.chomp]
}

a.sort!

ml=0;m=1
a.inject{|s,e|
    m+=1
    m=1 if s!=e
    ml = m if ml<m
    s=e
}
puts ml*2<n ? "YES" : "NO"
0