intmain(){ int n = 0, p = 0; cin >> n >> p; longlong a[100001]; for (int i = 0; i < n; i++) { cin >> a[i]; } if (n == 0 || p < 0) { cout << n; return0; }
sort(a, a + n);
long cnt = 1; for (int i = n - 1; i >= 1; i--) { int temp = 1; longlong M = a[i]; for (int j = i - cnt; j >= 0 && M * 1.0 / a[j] <= p; j--) { temp = i - j + 1; } cnt = cnt > temp ? cnt : temp; }