# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
739745 | Nonoze | Catfish Farm (IOI22_fish) | C++17 | 90 ms | 13912 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.
#include "fish.h"
#include <bits/stdc++.h>
using namespace std;
long long max_weights(int n, int m, vector<int> X, vector<int> Y, vector<int> W) {
#define int long long
bool tacha=true, tachb=true, tachc=true;
for (int i = 0; i < m; ++i)
{
if (X[i]%2) tacha=false;
if (X[i]>1) tachb=false;
if (Y[i]) tachc=false;
}
if (tacha)
{
int ans=0;
for (int i = 0; i < m; ++i) ans+=W[i];
return ans;
}
if (tachb)
{
int sommegauche=0, sommedroite=0;
for (int i = 0; i < m; ++i)
{
if (X[i]==0) sommegauche+=W[i];
else sommedroite+=W[i];
}
return max(sommegauche, sommedroite);
}
#undef int
return 0;
}
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... |