結果
| 問題 | No.349 干支の置き物 |
| コンテスト | |
| ユーザー |
koheijkt
|
| 提出日時 | 2025-04-07 20:41:32 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 353 bytes |
| 記録 | |
| コンパイル時間 | 640 ms |
| コンパイル使用メモリ | 95,596 KB |
| 実行使用メモリ | 79,264 KB |
| 最終ジャッジ日時 | 2026-07-08 13:33:18 |
| 合計ジャッジ時間 | 4,775 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 29 |
ソースコード
from collections import Counter
N = int(input())
A = [input() for _ in range(N)]
cnt = Counter(A)
print(cnt.most_common())
most_common_item = cnt.most_common()[0][1]
nokori = N - most_common_item
# 間:most_common_item - 1
# nokori が 間の個数以上あればよい
if nokori >= most_common_item - 1:
print('YES')
else:
print('NO')
koheijkt