웅재의 코딩세상
[프로그래머스] 할 일 목록 본문
- 풀이
#include <string>
#include <vector>
using namespace std;
vector<string> solution(vector<string> todo_list, vector<bool> finished) {
vector<string> answer;
for(int i=0; i<todo_list.size(); i++){
if(!finished[i]) answer.push_back(todo_list[i]);
}
return answer;
}
반응형
'코딩테스트 > 프로그래머스 - LV 0' 카테고리의 다른 글
[프로그래머스] 수 조작하기 2 (0) | 2024.01.26 |
---|---|
[프로그래머스] 마지막 두 원소 (0) | 2024.01.26 |
[프로그래머스] 문자열 정수의 합 (0) | 2024.01.25 |
[프로그래머스] 배열의 원소만큼 추가하기 (0) | 2024.01.25 |
[프로그래머스] 뒤에서 5등까지 (1) | 2024.01.25 |