結果

問題 No.349 干支の置き物
ユーザー Yuhel Tanaka
提出日時 2018-10-09 15:34:46
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 188 bytes
コンパイル時間 233 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-10-12 16:32:21
合計ジャッジ時間 2,187 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict as dd
d=dd(int)
n=int(input())
for _ in range(n):
  d[input()]+=1

for i in d.keys():
  if d[i]>n-d[i]-1:
    print("NO")
    break
else:
  print("YES")
0