풀이 : DP로 해결해야 함 -> N (1 ≤ N ≤ 1,000) dp 배열을 만들고 그떄의 최대 길이를 저장하면서 max를 갱신해야함. ( dp를 쓰면, 이전에 했던 최대 길이 구하는 과정을 중복 안할 수 있음 ) Code public class Solution3307 { static int[] arr; static int[] dp; static int max, N; public static void main(String args[]) throws Exception { Scanner sc = new Scanner(System.in); int T = sc.nextInt(); for(int tc = 1; tc