biochips.cpp: In function 'int main()':
biochips.cpp:48:6: error: invalid types 'int[int]' for array subscript
48 | g[p[i]].pb(i); g[i].pb(p[i]);
| ^
biochips.cpp:48:27: error: invalid types 'int[int]' for array subscript
48 | g[p[i]].pb(i); g[i].pb(p[i]);
| ^
biochips.cpp:61:9: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
61 | if (i!=svi.size()-1) dp[i][j]=max(dp[i][j], dp[i+1][j]);
| ~^~~~~~~~~~~~~~
biochips.cpp:63:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
63 | if (r[svi[i]]<svi.size()) dp[i][j]=max(dp[i][j], dp[r[svi[i]]][j-1]+w[svi[i]]);
| ~~~~~~~~~^~~~~~~~~~~
biochips.cpp:69:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
69 | for (int i=0; i<svi.size(); i++) ress=max(ress, dp[i][m]);
| ~^~~~~~~~~~~