結果
| 問題 |
No.349 干支の置き物
|
| コンテスト | |
| ユーザー |
ohana
|
| 提出日時 | 2023-10-23 15:16:17 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 43 ms / 2,000 ms |
| コード長 | 235 bytes |
| コンパイル時間 | 208 ms |
| コンパイル使用メモリ | 82,380 KB |
| 実行使用メモリ | 55,480 KB |
| 最終ジャッジ日時 | 2024-09-22 10:19:39 |
| 合計ジャッジ時間 | 2,462 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 |
ソースコード
from collections import defaultdict
n = int(input())
mx = 0
dd = defaultdict(int)
for i in range(n):
a = input()
dd[a] += 1
mx = max(mx, dd[a])
if n % 2:
mx -= 1
if mx * 2 <= n:
print("YES")
else:
print("NO")
ohana