# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
834693 | 2023-08-22T17:14:08 Z | GordonRemzi007 | Catfish Farm (IOI22_fish) | C++17 | 0 ms | 0 KB |
#include <iostream> #include <vector> #define ll long long using namespace std; ll max_weights(int n, int m, vector<int>& x, vector<int>& y, vector<int>& w) { ll r0 = 0, r1 = 0; for(int i = 0; i < m; i++) { //cout << y[i] << " "; if(x[i]) r1+=w[i]; else r0+=w[i]; } return max(r0, r1); }