목록C++/CodingTest (4)
class : Design Code
https://school.programmers.co.kr/learn/courses/30/lessons/42576 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 1. map을 사용하여 풀었다, #include #include #include #include using namespace std; map people; string answer = ""; void insertMap(const vector& participant){ for(auto i: participant){ if(people.find(i)!= people.end()) (people.find(..
https://school.programmers.co.kr/learn/courses/30/lessons/81301 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 1.string의 기능들을 사용하여 풀었다. #include #include #include //find로 문자 찾고 index 반환받고 문자열 지우고 숫자 insert using namespace std; vector alpha={"zero","one","two","three","four","five","six","seven","eight","nine"}; int solution(string s..
https://school.programmers.co.kr/learn/courses/30/lessons/42889 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 1. first try : vector_pair_sort를 사용하여 문제를 풀었다. #include #include #include #include using namespace std; // second_내림차순 정렬 bool compare(pair a, pair b) { if(a.second == b.second) return a.first < b.first; else return a.secon..
https://school.programmers.co.kr/learn/courses/30/lessons/118666?language=cpp 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 1) first try : 단순 array로 문제 해결. 보완 필요. #include #include #include using namespace std; int scoreArr[2][4]; int choiceScore(int num){ if(num==1 || num ==7) return 3; else if (num==2 || num ==6) return 2; else i..