結果

問題 No.349 干支の置き物
コンテスト
ユーザー ssmkzk
提出日時 2018-06-30 01:26:00
言語 Python3
(3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 27 ms / 2,000 ms
+ 186µs
コード長 318 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 53 ms
コンパイル使用メモリ 14,592 KB
実行使用メモリ 11,520 KB
最終ジャッジ日時 2026-10-15 12:55:56
合計ジャッジ時間 3,145 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge5_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 31
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N = int(input())
l = []
count = 0
line = 0
flg = 0
if N % 2 == 0:
    line = N // 2
else:
    line = (N + 1) // 2


for i in range(N):
    l.append(input())

l.sort()

while len(l) > 0:
    count = l.count(l[0])
    if count > line:
        flg = 1
        print("NO")
    del l[:count]

if flg == 0:
    print("YES")
0