Submission #684530

# Submission time Handle Problem Language Result Execution time Memory
684530 2023-01-21T13:28:13 Z Konti2 Catfish Farm (IOI22_fish) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
#include "fish.h"

using namespace std;

using int64 = long long;

int64 DP[301][301][301];
int64 DPMAX[301][301];
int64 CAT[301][301];

int64 max_weights(int N, int M, vector<int> x, vector<int> y, vector<int> w){
	  int64 ans = 0;
	  if (N <= 300){
		  for (int i = 0; i < M; i++){
			  ans += W[i];
		  }
	  }
	  return ans;
  }
	
	
/*int main(){
	int n;
	cin >> n;
	int m;
	cin >> m;
	int x[m];
	int y[m];
	int w[m];
	for (int i = 0; i < m; i++){
		cin >> x[i];
		cin >> y[i];
		cin >> w[i];
	}
	cout << max_weights(n, m, x, y, w);
	return 0;
}
		  
*/ 

Compilation message

fish.cpp: In function 'int64 max_weights(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
fish.cpp:16:13: error: 'W' was not declared in this scope
   16 |      ans += W[i];
      |             ^