結果
| 問題 | No.349 干支の置き物 |
| コンテスト | |
| ユーザー |
ohana
|
| 提出日時 | 2023-10-23 15:16:17 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 36 ms / 2,000 ms |
| + 601µs | |
| コード長 | 235 bytes |
| 記録 | |
| コンパイル時間 | 447 ms |
| コンパイル使用メモリ | 64,700 KB |
| 実行使用メモリ | 53,776 KB |
| 最終ジャッジ日時 | 2026-10-15 21:25:31 |
| 合計ジャッジ時間 | 3,690 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 31 |
ソースコード
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