https://www.acmicpc.net/problem/14501 시간 2초, 메모리 512MB input : N (1 ≤ N ≤ 15) Ti Pi(1 ≤ Ti ≤ 5, 1 ≤ Pi ≤ 1,000) output : 백준이가 얻을 수 있는 최대 이익을 출력