結果

問題 No.349 干支の置き物
ユーザー ああいいああいい
提出日時 2022-03-17 21:35:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 43 ms / 2,000 ms
コード長 208 bytes
コンパイル時間 208 ms
コンパイル使用メモリ 82,452 KB
実行使用メモリ 55,744 KB
最終ジャッジ日時 2024-04-09 20:17:59
合計ジャッジ時間 2,560 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
53,952 KB
testcase_01 AC 41 ms
54,468 KB
testcase_02 AC 41 ms
55,316 KB
testcase_03 AC 38 ms
54,904 KB
testcase_04 AC 37 ms
54,580 KB
testcase_05 AC 39 ms
54,668 KB
testcase_06 AC 39 ms
54,700 KB
testcase_07 AC 38 ms
54,928 KB
testcase_08 AC 38 ms
53,720 KB
testcase_09 AC 36 ms
53,492 KB
testcase_10 AC 39 ms
54,484 KB
testcase_11 AC 38 ms
54,216 KB
testcase_12 AC 43 ms
54,184 KB
testcase_13 AC 38 ms
53,772 KB
testcase_14 AC 39 ms
55,744 KB
testcase_15 AC 38 ms
53,676 KB
testcase_16 AC 38 ms
54,816 KB
testcase_17 AC 38 ms
54,252 KB
testcase_18 AC 37 ms
54,200 KB
testcase_19 AC 39 ms
54,452 KB
testcase_20 AC 38 ms
53,956 KB
testcase_21 AC 39 ms
53,960 KB
testcase_22 AC 37 ms
55,084 KB
testcase_23 AC 37 ms
54,040 KB
testcase_24 AC 37 ms
55,052 KB
testcase_25 AC 39 ms
53,776 KB
testcase_26 AC 39 ms
54,600 KB
testcase_27 AC 39 ms
54,300 KB
testcase_28 AC 38 ms
54,132 KB
testcase_29 AC 37 ms
54,416 KB
testcase_30 AC 38 ms
54,536 KB
testcase_31 AC 39 ms
54,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = [input() for _ in range(N)]
from collections import defaultdict
d = defaultdict(int)
for a in A:
    d[a] += 1
M = max(d.values())
if M > (N+1)//2:
    print('NO')
else:
    print('YES')
0