728x90 시간초과1 [C++] 그리디 알고리즘 예시 코딩 문제 작업의 수 N(1~100,000), 제한시간 D(1~10,000,000) 작업을 다수의 컴퓨터로 수행할 시 작업을 최소의 컴퓨터로 수행하는 컴퓨터의 수를 구하시오. 예시 1 10 14 7 5 4 6 1 2 3 5 2 3 computer1 : 7 3 2 computer2 : 5 1 2 5 computer3 : 4 6 3 #include #include // 작업목록을 담을 work 벡터 #include // 가까운 시간대를 찾기위한 우선순위 큐 #include // 배열 초기화 memset사용 using namespace std; int main(void) { ios_base::sync_with_stdio(false); cout.tie(); cin.tie(); int TC, N, D, input; i.. 2021. 8. 21. 이전 1 다음 728x90