프로그래머스34 44] 프로그래머스 완주하지 못한 선수 정렬 먼저하고 한명만 완주를 못했으니까 두 벡터가 다른 곳의 위치의 벡터값을 반환해주면 된다, #include #include #include using namespace std; string solution(vector participant, vector completion) { string answer = ""; sort(participant.begin(), participant.end()); sort(completion.begin(), completion.end()); for(int i = 0;i 2020. 9. 14. 43] 프로그래머스 두 개 뽑아서 더하기 코딩테스트 연습 기초부터 차근차근, 직접 코드를 작성해 보세요. programmers.co.kr 벡터에 다 넣어주고 중복값을 제거해주면 된다. #include #include using namespace std; vector solution(vector numbers) { vector answer; for(int i = 0;i 2020. 9. 14. 이전 1 ··· 6 7 8 9 다음