[프로그래머스] 완전탐색 - 모의고사
C++로 해결하였다. 1. Solution #include #include #include using namespace std; int stu1[5] = {1, 2, 3, 4, 5}; int stu2[8] = {2, 1, 2, 3, 2, 4, 2, 5}; int stu3[10] = {3, 3, 1, 1, 2, 2, 4, 4, 5, 5}; vector solution(vector answers) { vector answer; int score[3]; fill(score, score + 3, 0); // 문제 체점 for(int i = 0; i < answers.size(); i++){ if(answers[i] == stu1[i % 5]) score[0] += 1; if(answers[i] == stu2[i..
2022. 4. 3.