結果

問題 No.349 干支の置き物
ユーザー mlihua09mlihua09
提出日時 2020-08-28 12:00:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 95 ms / 2,000 ms
コード長 231 bytes
コンパイル時間 587 ms
コンパイル使用メモリ 86,676 KB
実行使用メモリ 71,716 KB
最終ジャッジ日時 2023-08-08 18:04:29
合計ジャッジ時間 5,697 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 92 ms
71,264 KB
testcase_01 AC 93 ms
71,484 KB
testcase_02 AC 93 ms
71,456 KB
testcase_03 AC 93 ms
71,716 KB
testcase_04 AC 93 ms
71,132 KB
testcase_05 AC 90 ms
71,500 KB
testcase_06 AC 93 ms
71,260 KB
testcase_07 AC 93 ms
71,268 KB
testcase_08 AC 95 ms
71,108 KB
testcase_09 AC 94 ms
71,464 KB
testcase_10 AC 94 ms
71,640 KB
testcase_11 AC 94 ms
71,520 KB
testcase_12 AC 94 ms
71,444 KB
testcase_13 AC 93 ms
71,352 KB
testcase_14 AC 92 ms
71,572 KB
testcase_15 AC 92 ms
71,260 KB
testcase_16 AC 92 ms
71,260 KB
testcase_17 AC 94 ms
71,600 KB
testcase_18 AC 93 ms
71,676 KB
testcase_19 AC 93 ms
71,348 KB
testcase_20 AC 93 ms
71,364 KB
testcase_21 AC 92 ms
71,564 KB
testcase_22 AC 92 ms
71,680 KB
testcase_23 AC 95 ms
71,264 KB
testcase_24 AC 94 ms
71,472 KB
testcase_25 AC 93 ms
71,580 KB
testcase_26 AC 95 ms
71,688 KB
testcase_27 AC 93 ms
71,136 KB
testcase_28 AC 91 ms
71,476 KB
testcase_29 AC 94 ms
71,660 KB
testcase_30 AC 93 ms
71,184 KB
testcase_31 AC 94 ms
71,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict

N = int(input())

X = defaultdict(int)

for i in range(N):
    
    a = input()
    
    X[a] += 1
    
if max(X.values()) <= (N + 1) // 2:
    
    print('YES')
    
else:
    
    print('NO')
0