Problem | lcs |
---|---|
User | christal |
Submission Time | 2023-12-23 16:07:23 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
lcs.cpp: In function ‘int main()’:
lcs.cpp:7:14: error: cannot convert ‘std::__cxx11::basic_string<char>::length’ from type ‘std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept’ {aka ‘long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept’} to type ‘int’
7 | int n1 = s1.length, n2 = s2.length;
| ^~~~~~
lcs.cpp:7:30: error: cannot convert ‘std::__cxx11::basic_string<char>::length’ from type ‘std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept’ {aka ‘long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept’} to type ‘int’
7 | int n1 = s1.length, n2 = s2.length;
| ^~~~~~
lcs.cpp:12:11: error: invalid types ‘int[int]’ for array subscript
12 | dp[i,j] = dp[i-1][j-1]+1;
| ^
lcs.cpp:12:21: error: invalid type