티스토리 뷰
#include <vector>
#include <algorithm>
string solution(vector<string> participant, vector<string> completion) {
string answer = "";
sort(participant.begin(), participant.end());
sort(completion.begin(), completion.end());
for(int i=0; i<participant.size(); i++){
if(participant[i] != completion[i]){
answer = participant[i];
break;
}
}
return answer;
}
'알고리즘 > C++' 카테고리의 다른 글
[C++] 프로그래머스 모의고사 (0) | 2020.02.25 |
---|---|
[C++] 프로그래머스 문자열 압축 (2020 카카오 공채) (0) | 2020.02.25 |
[C++] 프로그래머스 체육복 (탐욕법(Greedy)) (0) | 2020.02.25 |
[C++] Special Sort (버블 정렬) (0) | 2020.02.24 |
[C++] 3의 개수 (시간 제한) (0) | 2020.02.24 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- pythonanywhere배포방법
- CellForRowAt 호출안됨
- Realtime Database
- Firebase 데이터베이스 추천
- python 웹 배포
- iOS 검은 화면
- django 태그
- django 게시판
- ModelForm Form 차이
- 장고 게시판
- iOS UITableView 출력안됨
- UITableViewController Not Working
- iOS 화면 안나옴
- django pythoneverywhere
- 알파벳 카운팅
- iOS 데이터베이스
- 테이블출력안됨
- django 로그인접근
- django tag
- 장고 태그달기
- 까만 화면
- django 개발일지
- django clean
- cleaned_data
- Django
- 데이터베이스 추천
- CellForRowAt Not Called
- 실시간 데이터베이스
- 웹 배포
- pythonanywhere배포
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
글 보관함