結果
| 問題 |
No.349 干支の置き物
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-03-16 21:51:17 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 29 ms / 2,000 ms |
| コード長 | 273 bytes |
| コンパイル時間 | 89 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-11-17 07:27:35 |
| 合計ジャッジ時間 | 1,855 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 |
ソースコード
from collections import Counter
n = int(input())
i = 0
s = []
while i < n:
s.append(input())
i += 1
if n % 2 != 0:
n += 1
j = n / 2 + 1
counter = Counter(s)
answer = "YES"
for word, c in counter.most_common():
if c >= j:
answer = "NO"
print(answer)