結果
問題 | No.2777 Wild Flush |
ユーザー |
|
提出日時 | 2024-06-07 21:39:06 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 120 ms / 2,000 ms |
コード長 | 363 bytes |
コンパイル時間 | 170 ms |
コンパイル使用メモリ | 82,096 KB |
実行使用メモリ | 109,440 KB |
最終ジャッジ日時 | 2024-12-26 07:24:31 |
合計ジャッジ時間 | 3,220 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 5 |
other | AC * 24 |
ソースコード
N,K = map(int, input().split()) A = list(map(int, input().split())) from collections import Counter c = Counter(A) d = c.most_common() #print(c) if len(d) == 1: ans = d[0][1] else: if d[0][0] == 0: #print("a") ans = d[0][1] + d[1][1] else: ans = d[0][1] + c[0] #print(ans) if ans >= K: print("Yes") else: print("No")