func_code_string: #include <bits/stdc++.h>   using namespace std;   const int mod = 1e9 + 7;   const double PI = acos(-1.0);   const int MAXN = 2e5 + 5;   long long int freq[MAXN];   long long int pref_sum(int l, int r) {     return (l ? freq[r] - freq[l - 1] : freq[r]);   }   void cp() {     int n;     long long int k;     cin >> n >> k;     vector<long long int> arr(n);     memset(freq, 0, sizeof(freq));     for (int i = 0; i < n; i++) cin >> arr[i], freq[arr[i]]++;     for (int i = 1; i < MAXN; i++) freq[i] += freq[i - 1];     sort(arr.begin(), arr.end());     int need = arr[0];     int ans = 0;     long long int cost = 0;     for (int i = 2e5; i >= need; i--) {       long long int cnt = pref_sum(i + 1, MAXN - 1);       long long int total = cost + cnt;       if (total > k) {         ans++;         cost = cnt;       } else         cost += cnt;     }     if (cost) {       ans++;     }     cout << ans <<   n ;   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cout.tie(NULL);     ;     int t;     t = 1;     while (t--) {       cp();     }     return 0;   }   