For this Question: Given an array <b>A</b> of <b>N</b> integers. Your teacher has asked you to find the maximum quotient of the array. Quotient of an array A of size N can be calculated in the following way:
1) Let the sum of the N elements of array A be <b>X</b>.
2) Let pre[] be another array of size N in which for every index i (1 <= i <= N), <b>pre<sub>i</sub></b> gives us the sum of elements <b>A<sub>1</sub> + A<sub>2</sub> +. . + A<sub>i</sub></b>.
3) Quotient of the array A will be equal to the <b>summation of the floored value of X/pre<sub>i</sub> over every value of i from 1 to N</b>.

You can swap any two elements of the array A. FInd the <b>maximum</b> possible quotient of array A.First line of the input contains a single integer N.
The second line contains N space seperated integers A<sub>i</sub>

Constraints:
1 <= N <= 10<sup>5</sup>
1 <= A<sub>i</sub> <= 10<sup>8</sup>Print the maximum possible quotient of array A.Sample Input:
3
1 1 3

Sample Output:
8

Explaination:
Array pre[] = [1, 2, 5]
Sum X of array A = 5
Quotient of array A = 5/1 + 5/2 + 5/5 = 5 + 2 + 1 = 8
It can be proved that their is no greater quotient of array A possible., I have written this Solution Code: #include<bits/stdc++.h>
using namespace std;
 
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL);
#define int long long
#define pb push_back
#define ff first
#define ss second
#define endl '\n'
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
 
using T = pair<int, int>;
 
typedef long long ll;
const int mod = 1e9 + 7;
const int INF = 1e9;
 
void solve(){
   int n;
   cin >> n;
   vector<int> a(n);
   int sum = 0;
   for(auto &i : a) cin >> i, sum += i;
   int ans = 0;
   int cur = 0;
   sort(all(a));
   for(int i = 0; i < n; i++){
       cur += a[i];
       ans += sum/cur;
   }
   cout << ans;
}
 
signed main(){
   fast
   int t = 1;
   // cin >> t;
   for(int i = 1; i <= t; i++){
       solve();
       if(i != t) cout << endl;
   }
}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?