Arrested Development
면접 대비시간 제한2초메모리 제한2048 MB
각 업무를 두 인턴이 처리하는 데 걸리는 시간이 주어질 때, 두 사람의 총 작업 시간 중 큰 값이 최소가 되도록 업무를 나누는 문제입니다.
문제
You are now in charge of two programming interns, and you must develop a large system. There are a number of tasks that need to be completed by the end of the summer. You know how long each intern will take to complete each task, in minutes.
Compute the minimum number of minutes it will take to complete all tasks for development of the system, assuming that the two interns are the only developers, that they work independently and concurrently, that they do not share tasks, and that the amount of time it takes an intern to complete all their tasks is the sum of the number of minutes it takes to do each task one after the other.
입력
The first line of input contains a single integer (), which is the number of tasks.
Each of the next lines contains two integers and (). Each line represents a single task, where is the number of minutes it will take the first intern to complete the task, and is the number of minutes it will take the second intern to complete the task.
출력
Output a single integer, which is the minimum number of minutes needed to complete the development project.