import java.util.*; /** * Use dynamic programming. * Process one day at a time and try giving the task to intern A and try giving it to intern B. * dp[i][j] is the minimum number of days needed by intern A to have intern B finish on day j, * when the first i tasks are split between them. * * @author Finn Lidbetter */ public class arrested_finn { static int TASK_DAYS_MAX = 100000; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] aDays = new int[n]; int[] bDays = new int[n]; for (int i=0; idays) { days = i; } if (daysminDays) { break; } } System.out.println(minDays); } }