結果
| 問題 | 
                            No.349 干支の置き物
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2023-02-18 22:20:01 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 46 ms / 2,000 ms | 
| コード長 | 241 bytes | 
| コンパイル時間 | 326 ms | 
| コンパイル使用メモリ | 81,920 KB | 
| 実行使用メモリ | 53,888 KB | 
| 最終ジャッジ日時 | 2024-07-20 05:23:54 | 
| 合計ジャッジ時間 | 2,902 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 29 | 
ソースコード
from collections import defaultdict
n = int(input())
counter = defaultdict(int)
for _ in range(n):
    a = input()
    counter[a] += 1
for cnt in counter.values():
    if cnt > (n + 1) // 2:
        print("NO")
        exit()
print("YES")