結果

問題 No.349 干支の置き物
ユーザー lloyzlloyz
提出日時 2023-02-18 22:20:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 86 ms / 2,000 ms
コード長 241 bytes
コンパイル時間 750 ms
コンパイル使用メモリ 86,880 KB
実行使用メモリ 71,772 KB
最終ジャッジ日時 2023-09-27 11:16:53
合計ジャッジ時間 4,710 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
71,516 KB
testcase_01 AC 80 ms
71,480 KB
testcase_02 AC 81 ms
71,604 KB
testcase_03 AC 82 ms
71,484 KB
testcase_04 AC 83 ms
71,476 KB
testcase_05 AC 81 ms
71,772 KB
testcase_06 AC 79 ms
71,616 KB
testcase_07 AC 79 ms
71,396 KB
testcase_08 AC 83 ms
71,512 KB
testcase_09 AC 78 ms
71,384 KB
testcase_10 AC 79 ms
71,396 KB
testcase_11 AC 82 ms
71,648 KB
testcase_12 AC 76 ms
71,396 KB
testcase_13 AC 81 ms
71,544 KB
testcase_14 AC 81 ms
71,600 KB
testcase_15 AC 80 ms
71,664 KB
testcase_16 AC 82 ms
71,544 KB
testcase_17 AC 80 ms
71,236 KB
testcase_18 AC 81 ms
71,680 KB
testcase_19 AC 81 ms
71,592 KB
testcase_20 AC 78 ms
71,612 KB
testcase_21 AC 78 ms
71,408 KB
testcase_22 AC 78 ms
71,596 KB
testcase_23 AC 81 ms
71,408 KB
testcase_24 AC 82 ms
71,616 KB
testcase_25 AC 79 ms
71,384 KB
testcase_26 AC 85 ms
71,604 KB
testcase_27 AC 86 ms
71,384 KB
testcase_28 AC 82 ms
71,528 KB
testcase_29 AC 79 ms
71,392 KB
testcase_30 AC 77 ms
71,608 KB
testcase_31 AC 78 ms
71,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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")
0