Saleh127

CF 1380C

Jul 12th, 2020
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define test int t; cin>>t; while (t--)
  4. #define ll long long int
  5. #define fellow_junior ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
  6. int main()
  7. {
  8. fellow_junior
  9. test
  10. {
  11. ll a[200000],c,d=0,e,f,i,j,k,l=0,x;
  12. cin>>c>>x;
  13. for(i=0;i<c;i++)
  14. {
  15. cin>>a[i];
  16. }
  17. sort(a,a+c);
  18.  
  19. for(i=c-1;i>=0;i--)
  20. {
  21. if((l+1)*a[i]>=x)
  22. {
  23. d++;
  24. l=0;
  25. }
  26. else l++;
  27. }
  28. cout<<d<<endl;
  29. }
  30. return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment