1931 c++
[백준 1931번][C++] 회의실 배정
그리디 알고리즘 이용 -> 끝나는 시간이 제일 작은 순으로 정렬하여 풀었습니다 #include #include #include #include using namespace std; //회의들을 순으로 저장 vector consel; //끝나는 시간이 빠른 순으로 정렬하되 같으면 먼저 시작하는 순으로 정렬 bool cmp(pair a, pair b) { if (a.second == b.second) return a.first > test; //회의 시간을 입력받아 저장 for (int i = 0; i < ..