結果

問題 No.349 干支の置き物
ユーザー brthyyjpbrthyyjp
提出日時 2020-12-29 09:16:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 47 ms / 2,000 ms
コード長 261 bytes
コンパイル時間 1,611 ms
コンパイル使用メモリ 82,164 KB
実行使用メモリ 55,424 KB
最終ジャッジ日時 2024-04-15 09:05:38
合計ジャッジ時間 3,304 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
54,480 KB
testcase_01 AC 43 ms
55,356 KB
testcase_02 AC 45 ms
53,888 KB
testcase_03 AC 45 ms
54,344 KB
testcase_04 AC 47 ms
53,884 KB
testcase_05 AC 44 ms
55,340 KB
testcase_06 AC 45 ms
53,844 KB
testcase_07 AC 45 ms
55,216 KB
testcase_08 AC 45 ms
54,552 KB
testcase_09 AC 44 ms
54,100 KB
testcase_10 AC 44 ms
54,104 KB
testcase_11 AC 44 ms
53,968 KB
testcase_12 AC 43 ms
54,908 KB
testcase_13 AC 43 ms
54,740 KB
testcase_14 AC 43 ms
54,472 KB
testcase_15 AC 44 ms
54,312 KB
testcase_16 AC 45 ms
54,564 KB
testcase_17 AC 44 ms
53,972 KB
testcase_18 AC 44 ms
53,824 KB
testcase_19 AC 44 ms
53,756 KB
testcase_20 AC 43 ms
54,184 KB
testcase_21 AC 43 ms
53,832 KB
testcase_22 AC 44 ms
54,128 KB
testcase_23 AC 43 ms
53,940 KB
testcase_24 AC 45 ms
54,124 KB
testcase_25 AC 44 ms
54,936 KB
testcase_26 AC 45 ms
54,716 KB
testcase_27 AC 45 ms
54,280 KB
testcase_28 AC 44 ms
54,276 KB
testcase_29 AC 44 ms
54,244 KB
testcase_30 AC 46 ms
55,404 KB
testcase_31 AC 45 ms
55,424 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
A = [str(input()) for _ in range(n)]
from collections import Counter
C = Counter(A)
V = list(C.values())
V.sort(reverse=True)
if len(V) == 1:
    print('NO')
else:
    if sum(V[1:]) >= V[0]-1:
        print('YES')
    else:
        print('NO')
0