結果

問題 No.349 干支の置き物
ユーザー ABKZABKZ
提出日時 2023-02-11 08:40:46
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 216 bytes
コンパイル時間 299 ms
コンパイル使用メモリ 87,124 KB
実行使用メモリ 71,844 KB
最終ジャッジ日時 2023-09-22 07:39:47
合計ジャッジ時間 4,985 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 96 ms
71,624 KB
testcase_01 AC 96 ms
71,484 KB
testcase_02 AC 95 ms
71,716 KB
testcase_03 AC 94 ms
71,524 KB
testcase_04 AC 97 ms
71,640 KB
testcase_05 AC 98 ms
71,624 KB
testcase_06 AC 101 ms
71,616 KB
testcase_07 AC 96 ms
71,628 KB
testcase_08 AC 98 ms
71,480 KB
testcase_09 AC 97 ms
71,628 KB
testcase_10 AC 97 ms
71,304 KB
testcase_11 AC 94 ms
71,672 KB
testcase_12 AC 96 ms
71,748 KB
testcase_13 AC 99 ms
71,708 KB
testcase_14 AC 97 ms
71,328 KB
testcase_15 AC 95 ms
71,616 KB
testcase_16 AC 97 ms
71,500 KB
testcase_17 AC 98 ms
71,616 KB
testcase_18 AC 97 ms
71,796 KB
testcase_19 AC 98 ms
71,444 KB
testcase_20 AC 96 ms
71,368 KB
testcase_21 AC 98 ms
71,300 KB
testcase_22 AC 99 ms
71,676 KB
testcase_23 AC 96 ms
71,492 KB
testcase_24 AC 98 ms
71,820 KB
testcase_25 AC 96 ms
71,608 KB
testcase_26 WA -
testcase_27 AC 98 ms
71,620 KB
testcase_28 WA -
testcase_29 AC 96 ms
71,584 KB
testcase_30 AC 96 ms
71,464 KB
testcase_31 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections

N = int(input())
A = [input() for _ in range(N)]

_, cnts = zip(*collections.Counter(A).most_common())

if len(cnts) > 1 and (N-cnts[0] >= cnts[0]-cnts[1]):
    print("YES")
else:
    print("NO")
0