#include<bits/stdc++.h>
using namespace std;
const int N=1e6+10;
int a[N];
int main()
{
int t,num=0;
ios::sync_with_stdio(false);
cin >> t;
for(int i = 1;i <= t;i++)
cin >> a[i];
sort(a + 1,a + 1 + t);
while(t > 0) {
t -= a[t];
num++;
}
cout << num << endl;
return 0;
}
80分 WA在1,2点
求助