結果
| 問題 |
No.349 干支の置き物
|
| コンテスト | |
| ユーザー |
brthyyjp
|
| 提出日時 | 2020-12-29 09:16:14 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 39 ms / 2,000 ms |
| コード長 | 261 bytes |
| コンパイル時間 | 185 ms |
| コンパイル使用メモリ | 82,264 KB |
| 実行使用メモリ | 55,240 KB |
| 最終ジャッジ日時 | 2024-10-05 01:56:56 |
| 合計ジャッジ時間 | 2,525 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 |
ソースコード
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')
brthyyjp