과정
1. dp2차원 배열 생성
2. 행 -> input a, 열 -> input b
3. a[i]==b[j]이면, dp[i][j] = 그 전까지의 수열인 dp[i-1][j-1]+1
4. a[i]!=b[j]이면, dp[i][j] = max(dp[i-1][j],dp[i][j-1])
a=input()
b=input()
ans=-1
dp=[[0 for i in range(len(b)+1)] for j in range(len(a)+1)]
for i in range(1,len(a)+1):
for j in range(1,len(b)+1):
if a[i-1]==b[j-1]:
dp[i][j]=dp[i-1][j-1]+1
else:
dp[i][j]=max(dp[i-1][j],dp[i][j-1])
ans=max(ans,dp[i][j])
print(ans)
time: 80분
resolved:x