lamp.cpp: In function 'bool is_subseq(std::string, std::string)':
lamp.cpp:49:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
49 | for (int i = 0; i < b.size(); i++) {
| ~~^~~~~~~~~~
lamp.cpp:50:14: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
50 | while (pos < a.size() && b[i] != a[pos]) pos++;
| ~~~~^~~~~~~~~~
lamp.cpp:51:11: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
51 | if (pos < a.size()) pos++;
| ~~~~^~~~~~~~~~
lamp.cpp: In function 'int cst(int, int)':
lamp.cpp:70:20: warning: comparison of integer expressions of different signedness: 'int' and 'const long unsigned int' [-Wsign-compare]
70 | for (int i = 0; i < min(sa.size(), sb.size()); i++)
| ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
lamp.cpp: At global scope:
lamp.cpp:76:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
76 | main() {
| ^~~~
lamp.cpp: In function 'int main()':
lamp.cpp:95:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
95 | for (int b = 0; b < vec.size(); b++) {
| ~~^~~~~~~~~~~~
lamp.cpp:97:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
97 | for (int nb = 0; nb < vec.size(); nb++)
| ~~~^~~~~~~~~~~~
lamp.cpp:98:72: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
98 | if (apply(A[i], nb) == B[i]) dp[i & 1][b] = min(dp[i & 1][b], dp[i & 1 ^ 1][nb] + cst(b, nb));
| ~~^~~