結果
問題 |
No.349 干支の置き物
|
ユーザー |
|
提出日時 | 2018-06-30 01:26:00 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 33 ms / 2,000 ms |
コード長 | 318 bytes |
コンパイル時間 | 97 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-07-01 00:42:51 |
合計ジャッジ時間 | 2,126 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
ソースコード
N = int(input()) l = [] count = 0 line = 0 flg = 0 if N % 2 == 0: line = N // 2 else: line = (N + 1) // 2 for i in range(N): l.append(input()) l.sort() while len(l) > 0: count = l.count(l[0]) if count > line: flg = 1 print("NO") del l[:count] if flg == 0: print("YES")