結果
問題 | No.349 干支の置き物 |
ユーザー |
|
提出日時 | 2024-04-09 15:08:29 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 25 ms / 2,000 ms |
コード長 | 335 bytes |
コンパイル時間 | 297 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-10-01 17:50:48 |
合計ジャッジ時間 | 1,970 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
ソースコード
import collections def main(): n=int(input()) a=[input() for _ in range(n)] count=collections.Counter(a) if count.most_common()[0][1] > (n+1)/2: # print(count) # print(n) # print(count.most_common()[0][1]) print("NO") else: print("YES") if __name__ == "__main__": main()