結果
| 問題 | 
                            No.349 干支の置き物
                             | 
                    
| コンテスト | |
| ユーザー | 
                             ohana
                         | 
                    
| 提出日時 | 2023-10-23 15:10:22 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 201 bytes | 
| コンパイル時間 | 308 ms | 
| コンパイル使用メモリ | 82,788 KB | 
| 実行使用メモリ | 55,612 KB | 
| 最終ジャッジ日時 | 2024-09-22 10:19:24 | 
| 合計ジャッジ時間 | 2,794 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 25 WA * 4 | 
ソースコード
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])
print("YNEOS"[mx > (n - mx) * 2 - 1 :: 2])
            
            
            
        
            
ohana