# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
685697 | Jovan26 | Catfish Farm (IOI22_fish) | C++17 | 103 ms | 13908 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#pragma once
#include <bits/stdc++.h>
using namespace std;
#define ll long long
long long max_weights(int N, int M, std::vector<int> X, std::vector<int> Y, std::vector<int> W){
bool st1 = true;
for(int i=0;i<M;i++){
if(X[i]%2==1) st1 = false;
}
if(st1){
long long o = 0;
for(int i=0;i<M;i++) o+=W[i];
return o;
}
ll o1 = 0;
ll o2 = 0;
for(int i=0;i<M;i++){
if(X[i]==0) o1+=W[i];
else o2+=W[i];
}
ll o = max(o1,o2);
return o;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |