fish.cpp: In function 'long long int max_weights(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
fish.cpp:8:10: error: 'i' was not declared in this scope
8 | fore(i,0,M) {
| ^
fish.cpp:8:5: error: 'fore' was not declared in this scope
8 | fore(i,0,M) {
| ^~~~
fish.cpp:26:15: error: 'max' was not declared in this scope; did you mean 'std::max'?
26 | ans = max(sum1,sum2);
| ^~~
| std::max
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from fish.cpp:3:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: 'std::max' declared here
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
fish.cpp:41:18: error: 'n' was not declared in this scope
41 | ans = dp[n-1];
| ^