#include #include #include using namespace std; int main(){ int N,cost=0; cin >> N; vector A(N); for(int i=0;i> A[i]; sort(A.begin(),A.end()); for(int k=0;k