func_code_string: #include <bits/stdc++.h>   const double EPS = 1e-24;   const long long int MOD = 1000000007ll;   const double PI = 3.14159265359;   int INF = 2147483645;   long long int INFINF = 9223372036854775807;   template <class T>   T Max2(T a, T b) {     return a < b ? b : a;   }   template <class T>   T Min2(T a, T b) {     return a < b ? a : b;   }   template <class T>   T Max3(T a, T b, T c) {     return Max2(Max2(a, b), c);   }   template <class T>   T Min3(T a, T b, T c) {     return Min2(Min2(a, b), c);   }   template <class T>   T Max4(T a, T b, T c, T d) {     return Max2(Max2(a, b), Max2(c, d));   }   template <class T>   T Min4(T a, T b, T c, T d) {     return Min2(Min2(a, b), Max2(c, d));   }   using namespace std;   int n;   int a[110];   int main() {     std::ios::sync_with_stdio(false);     cin.tie(NULL);     cin >> n;     for (int i = 0; i < n; i++) cin >> a[i];     sort(a, a + n);     reverse(a, a + n);     int sum = 0, cur = 0;     for (int i = 0; i < n; i++) sum += a[i];     int cnt = 0;     while (cur <= sum / 2) cur += a[cnt++];     cout << cnt;     return 0;   }   