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