# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
837708 | Baytoro | Catfish Farm (IOI22_fish) | C++17 | 22 ms | 4296 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>
//#include "grader.cpp"
using namespace std;
#define ll long long
#define sc second
#define fr first
#define pb push_back
long long max_weights(int n, int m, vector<int> x, vector<int> y, vector<int> w){
bool sb1=1,sb2=1,sb3=1;
for(int i=0;i<n;i++){
sb1&=(x[i]%2==0);
sb2&=(x[i]<=1);
sb3&=(y[i]==0);
}
if(sb1){
ll sum=0;
for(int i=0;i<n;i++) sum+=w[i];
return sum;
}
if(sb2){
ll a=0,b=0;
for(int i=0;i<n;i++){
if(x[i]==0) a+=w[i];
else b+=w[i];
}
return max(a,b);
}
if(sb3){
}
}
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... |