結果
問題 |
No.2777 Wild Flush
|
ユーザー |
![]() |
提出日時 | 2024-06-07 22:08:21 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 117 ms / 2,000 ms |
コード長 | 355 bytes |
コンパイル時間 | 281 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 89,600 KB |
最終ジャッジ日時 | 2024-12-26 08:13:00 |
合計ジャッジ時間 | 4,106 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 5 |
other | AC * 24 |
ソースコード
N ,K = map(int,input().split()) A = list(map(int, input().split())) A.sort() num_list = [0] i = 0 j = 0 while j < N: if A[j] == i: num_list[i] += 1 j += 1 else: num_list.append(0) i += 1 max_num = max(num_list[1:]) if len(num_list) > 1 else 0 if max_num + num_list[0] >= K: print('Yes') else: print('No')