[BOJ] 11055. 14002, 가장 긴 증가하는 부분 수열4 (DP 기초, LIS)
#. Problemhttps://www.acmicpc.net/problem/11055* The copyright in this matter is in BOJ #. Solve전형적인 DP, LIS 문제이다.자세한 동작 설명은 문제를 참고해보자. #. Python Code12345678910import copyN, A = int(input()), list(map(int, input().split()))dp = copy.deepcopy(A) for i in range(1, N): for j in range(i): if A[i] > A[j]: dp[i] = max(dp[i], dp[j] + A[i]) print(max(dp))Colored by Color Scriptercs line 3) 자기 자신이 가장 긴 ..
PS/Problem_Solving
2020. 6. 4. 17:40