For this Question: Newton went to a mall. There are N items in a shop. For each i=1, 2, …, N, the price of the i- th item is Ai Rs. Newton has K coupons. Each coupon can be used on one item. You can use any number of coupons, possibly zero, on the same item. Using <code>k</code> coupons on an item with a price of <code>a</code> Rs allows him to buy it for <code>max{a−kX, 0}</code> Rs.
Print the minimum amount of money Newton needs to buy all the items.Input is given from Standard Input in the following format:
N K X
A<sub>1</sub> A<sub>2</sub>..... A<sub>N</sub>

<b>Constraints</b>
1&le;N&le;2×10^5
 1&le;K, X&le;10^9
 1&le;Ai &le;10^9

All values in the input are integers.Print the answer.<b>Sample Input 1</b>
5 4 7
8 3 10 5 13

<b>Sample Output 1</b>
12

<b>Sample Input 2</b>
5 100 7
8 3 10 5 13

<b>Sample Output 2</b>
0

<b>Sample Input 3</b>
20 815 60
2066 3193 2325 4030 3725 1669 1969 763 1653 159 5311 5341 4671 2374 4513 285 810 742 2981 202

<b>Sample Output 3</b>
112, I have written this Solution Code: #include <algorithm>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n, k, x;
ll a[200005];
int main(void)
{
    cin >> n >> k >> x;
    for (int i = 1; i <= n; i++)
        cin >> a[i];

    ll ans = 0;
    for (int i = 1; i <= n; i++)
        ans += a[i];

    ll m = 0;
    for (int i = 1; i <= n; i++)
        m += a[i] / x;
    m = min(m, k);
    ans -= m * x, k -= m;

    for (int i = 1; i <= n; i++)
        a[i] %= x;
    sort(a + 1, a + n + 1);

    for (int i = n; i >= 1; i--)
    {
        if (k == 0)
            break;
        ans -= a[i], k--;
    }

    cout << ans << endl;

    return 0;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?