結果
| 問題 | 
                            No.2777 Wild Flush
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2024-06-07 21:40:26 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 109 ms / 2,000 ms | 
| コード長 | 270 bytes | 
| コンパイル時間 | 191 ms | 
| コンパイル使用メモリ | 82,176 KB | 
| 実行使用メモリ | 99,456 KB | 
| 最終ジャッジ日時 | 2024-12-26 07:26:54 | 
| 合計ジャッジ時間 | 3,819 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 5 | 
| other | AC * 24 | 
ソースコード
from collections import defaultdict
n, k = map(int, input().split())
a = list(map(int, input().split()))
d = defaultdict(int)
for i in a:
	d[i] += 1
if d[0] >= k:
	exit(print("Yes"))
for i, j in d.items():
	if i > 0:
		if j + d[0] >= k:
			exit(print("Yes"))
print("No")