백준 1931 회의실 배정 [c++]


백준 1931 회의실 배정 [c++]

#include #include #include using namespace std; int n;//회의의 수 int t1, t2; int result = 1;//회의의최대개수 첫번째경우 int result2 = 1;//회의의최대개수 두번째경우 vectorv;//회의시작 종료시간 저장할 vector bool cmp(pair p1, pairp2)//비교함수, 회의의 시작시간을 기준으로 오름차순정렬, 같은 경우 종료시간 비교 { if (p1.first == p2.second) return p1.second < p2.second; else return p1.first < p2.first; } bool cmp2(pair p1, pairp2)//회의의 종료시간 기준으로 오름차순 정렬 { if (p1.second ..


원문링크 : 백준 1931 회의실 배정 [c++]