웅재의 코딩세상

[프로그래머스] 할 일 목록 본문

코딩테스트/프로그래머스 - LV 0

[프로그래머스] 할 일 목록

웅드 2024. 1. 25. 18:13

 

 

  • 풀이
#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;
}
반응형