sort

알고리즘 문제 풀이/1DP_과제(~180615)

180423_1026_보물

//https://www.acmicpc.net/problem/1026 #include #include #include using namespace std; bool cmp(int a, int b){ return a>b;}int main(){ int n; cin>> n; vector A; vector B; for(int i=0; i> a; A.push_back(a); } for(int i=0; i> b; B.push_back(b); } sort(B.begin(), B.end()); sort(A.begin(), A.end(), cmp); int ans=0; for(int i=0; i

bong sue
'sort' 태그의 글 목록 (2 Page)