알고리즘/프로그래머스
Programsers 구명보트
https://school.programmers.co.kr/learn/courses/30/lessons/42885 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 프로그래머스 구명보트 아이디어 Greedy문제입니다. 한번에 두명밖에 못탄다는 점을 캐치하지 못했다면 어마어마하게 삽질 할 문제입니다. 문제를 정확하게 읽어내는 연습이 필요합니다. #include #include #include using namespace std; int solution(vector people, int limit) { int answer = 0; sort(people.begin..
2022. 7. 26.