fish.cpp:2:1: error: 'vector' does not name a type
2 | vector<pair<ll,ll> > fish;
| ^~~~~~
fish.cpp:5:37: error: 'std::vector' has not been declared
5 | long long max_weights(int N, int M, std::vector<int> X, std::vector<int> Y, std::vector<int> W) {
| ^~~
fish.cpp:5:48: error: expected ',' or '...' before '<' token
5 | long long max_weights(int N, int M, std::vector<int> X, std::vector<int> Y, std::vector<int> W) {
| ^
fish.cpp: In function 'long long int max_weights(int, int, int)':
fish.cpp:7:13: error: 'X' was not declared in this scope
7 | if (X[i] == 0) a1[Y[i]+1] += W[i];
| ^
fish.cpp:7:27: error: 'Y' was not declared in this scope
7 | if (X[i] == 0) a1[Y[i]+1] += W[i];
| ^
fish.cpp:7:38: error: 'W' was not declared in this scope
7 | if (X[i] == 0) a1[Y[i]+1] += W[i];
| ^
fish.cpp:8:17: error: 'Y' was not declared in this scope
8 | else a2[Y[i]+1] += W[i];
| ^
fish.cpp:8:28: error: 'W' was not declared in this scope
8 | else a2[Y[i]+1] += W[i];
| ^
fish.cpp:17:15: error: 'max' was not declared in this scope
17 | ans = max(ans , ps2[N]-ps2[i]+ps1[i]);
| ^~~