fish.cpp:1:35: error: 'vector' has not been declared
1 | long long max_weights(int n,int m,vector <int> x,vector <int> y,vector <int> w){
| ^~~~~~
fish.cpp:1:42: error: expected ',' or '...' before '<' token
1 | long long max_weights(int n,int m,vector <int> x,vector <int> y,vector <int> w){
| ^
fish.cpp: In function 'long long int max_weights(int, int, int)':
fish.cpp:3:13: error: 'x' was not declared in this scope
3 | for (int i:x){
| ^
fish.cpp:7:21: error: 'w' was not declared in this scope
7 | return accumulate(w.begin(),w.end(),0ll);
| ^
fish.cpp:7:10: error: 'accumulate' was not declared in this scope
7 | return accumulate(w.begin(),w.end(),0ll);
| ^~~~~~~~~~
fish.cpp:9:19: error: 'x' was not declared in this scope
9 | if (*max_element(x.begin(),x.end())<=1){
| ^
fish.cpp:9:7: error: 'max_element' was not declared in this scope
9 | if (*max_element(x.begin(),x.end())<=1){
| ^~~~~~~~~~~
fish.cpp:11:37: error: 'w' was not declared in this scope
11 | for (int i=0; i<m; i++) mx[x[i]]+=w[i];
| ^
fish.cpp:12:20: error: 'max' was not declared in this scope; did you mean 'mx'?
12 | if (n==2) return max(mx[0],mx[1]);
| ^~~
| mx
fish.cpp:17:35: error: 'y' was not declared in this scope
17 | for (int i=0; i<m; i++) a[x[i]][y[i]]=w[i];
| ^
fish.cpp:17:41: error: 'w' was not declared in this scope
17 | for (int i=0; i<m; i++) a[x[i]][y[i]]=w[i];
| ^
fish.cpp:22:8: error: 'max' was not declared in this scope; did you mean 'mx'?
22 | ans=max(ans,cur);
| ^~~
| mx
fish.cpp:26:27: error: 'y' was not declared in this scope
26 | if (n<=300&&*max_element(y.begin(),y.end())<=8||*max_element(y.begin(),y.end())==0){
| ^
fish.cpp:26:15: error: 'max_element' was not declared in this scope
26 | if (n<=300&&*max_element(y.begin(),y.end())<=8||*max_element(y.begin(),y.end())==0){
| ^~~~~~~~~~~
fish.cpp:32:37: error: 'x' was not declared in this scope
32 | for (int i=0; i<m; i++) a[y[i]+1][x[i]+1]=w[i];
| ^
fish.cpp:32:45: error: 'w' was not declared in this scope
32 | for (int i=0; i<m; i++) a[y[i]+1][x[i]+1]=w[i];
| ^
fish.cpp:47:60: error: 'max' was not declared in this scope
47 | dp[i+1][k][nxt]=max(dp[i+1][k][nxt],dp[i][j][k]+(nxt>max(j,k)?s[i][nxt]-s[i][max(j,k)]:0ll)-s[i+1][min(k,nxt)]+(i+2<=n?s[i+2][nxt]:0ll));
| ^~~
fish.cpp:47:106: error: 'min' was not declared in this scope
47 | dp[i+1][k][nxt]=max(dp[i+1][k][nxt],dp[i][j][k]+(nxt>max(j,k)?s[i][nxt]-s[i][max(j,k)]:0ll)-s[i+1][min(k,nxt)]+(i+2<=n?s[i+2][nxt]:0ll));
| ^~~
fish.cpp:47:23: error: 'max' was not declared in this scope
47 | dp[i+1][k][nxt]=max(dp[i+1][k][nxt],dp[i][j][k]+(nxt>max(j,k)?s[i][nxt]-s[i][max(j,k)]:0ll)-s[i+1][min(k,nxt)]+(i+2<=n?s[i+2][nxt]:0ll));
| ^~~
fish.cpp:56:10: error: 'max' was not declared in this scope
56 | ans=max(ans,dp[i][j][k]);
| ^~~