fish.cpp:5:9: error: 'pair' does not name a type
5 | typedef pair<ll,ll> pll;
| ^~~~
fish.cpp:6:1: error: 'set' does not name a type
6 | set<pll> a[MAX];
| ^~~
fish.cpp:7:1: error: 'set' does not name a type
7 | set<ll> b[MAX];
| ^~~
fish.cpp: In function 'long long int max_weights(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
fish.cpp:13:9: error: 'a' was not declared in this scope
13 | a[i].insert(make_pair(n-Y[i]-1,W[i]));
| ^
fish.cpp:13:21: error: 'make_pair' was not declared in this scope; did you mean 'std::make_pair'?
13 | a[i].insert(make_pair(n-Y[i]-1,W[i]));
| ^~~~~~~~~
| std::make_pair
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/vector:60,
from fish.h:1,
from fish.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:567:5: note: 'std::make_pair' declared here
567 | make_pair(_T1&& __x, _T2&& __y)
| ^~~~~~~~~
fish.cpp:14:9: error: 'b' was not declared in this scope
14 | b[i].insert(n-Y[i]-1);
| ^
fish.cpp:20:8: error: 'b' was not declared in this scope
20 | if(b[0].size()!=0){
| ^
fish.cpp:22:20: error: 'a' was not declared in this scope
22 | for(auto x:a[0]){
| ^
fish.cpp:29:12: error: 'b' was not declared in this scope
29 | if(b[i-1].size()!=0){
| ^
fish.cpp:32:15: error: 'distance' was not declared in this scope; did you mean 'std::distance'?
32 | j=distance(b[i-1].begin(),b[i-1].lower_bound(h-1));
| ^~~~~~~~
| std::distance
In file included from /usr/include/c++/10/bits/stl_algobase.h:66,
from /usr/include/c++/10/vector:60,
from fish.h:1,
from fish.cpp:1:
/usr/include/c++/10/bits/stl_iterator_base_funcs.h:138:5: note: 'std::distance' declared here
138 | distance(_InputIterator __first, _InputIterator __last)
| ^~~~~~~~
fish.cpp:39:21: error: 'a' was not declared in this scope
39 | auto it=a[i-1].begin();
| ^