백준 1758 알바생(c++) https://www.acmicpc.net/problem/1758 #include #include #include #include using namespace std; int main() { int n; cin>>n; vectorv; for(int i=0;i>a; v.push_back(a); } sort(v.begin(),v.end(),greater()); long long sum = 0; for(int i=0;i PS/그리디 알고리즘[Greedy] 2022.07.17