Submission #625846

#TimeUsernameProblemLanguageResultExecution timeMemory
625846kkkkkkkkCatfish Farm (IOI22_fish)C++17
3 / 100
109 ms7280 KiB
#include <bits/stdc++.h> using namespace std; long long max_weights(int n,int m,vector<int> x,vector<int> y,vector<int> w) { long long vk=0; bool first=true; for (int i=0;i<m;i++) if (w[i]%2==1) { first=false; break; } if (first) { for (int i=0;i<m;i++) vk+=w[i]; } else { long long kaj_nula=0,kaj_eden=0; for (int i=0;i<m;i++) { if (x[i]==0) kaj_nula+=w[i]; else kaj_eden+=w[i]; } vk=max(kaj_nula,kaj_eden); } return vk; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...