/* -*- coding: utf-8 -*- * * 2777.cc: No.2777 Wild Flush - yukicoder */ #include #include using namespace std; /* constant */ const int MAX_N = 100000; /* typedef */ /* global variables */ int as[MAX_N]; /* subroutines */ /* main */ int main() { int n, k; scanf("%d%d", &n, &k); for (int i = 0; i < n; i++) scanf("%d", as + i); sort(as, as + n); int c0 = 0; for (int i = 0; i < n;) { int j = i; while (i < n && as[j] == as[i]) i++; if (as[j] == 0) { c0 = i - j; if (c0 >= k) { puts("Yes"); return 0; } } else { if (c0 + (i - j) >= k) { puts("Yes"); return 0; } } } puts("No"); return 0; }