結果

問題 No.349 干支の置き物
ユーザー fagfagdfa
提出日時 2017-08-25 21:25:49
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 308 bytes
コンパイル時間 52 ms
コンパイル使用メモリ 6,784 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-15 15:44:16
合計ジャッジ時間 1,167 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 13 WA * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

n = input()

dic = {}

for i in range(n):
    tmp = raw_input()
    if tmp not in dic:
        dic[tmp] = 1
    else:
        dic[tmp] += 1

keys = dic.keys()

maxes = 0

for i in keys:
    if maxes < dic[i]:
        maxes = dic[i]

a = (n - maxes) / maxes
if a % 3 == 1:
    print "NO"
else:
    print "YES"
0