0_0_17303141_29017.cpp: In function 'int main()':
0_0_17303141_29017.cpp:16:6: error: 'dp' was not declared in this scope
dp[i][j] = 1;
^
0_0_17303141_29017.cpp:20:32: error: 'str' was not declared in this scope
while(t1 >= 0 && t2 < n && str[t1][j] == str[i][t2]) {
^
0_0_17303141_29017.cpp:25:14: error: 'dp' was not declared in this scope
if(t1 >= dp[i - 1][j + 1] + 1) dp[i][j] = dp[i - 1][j + 1] + 1;
^
0_0_17303141_29017.cpp:27:20: error: 'dp' was not declared in this scope
ans = max(ans, dp[i][j]);
^
|