Submission #1079082

#TimeUsernameProblemLanguageResultExecution timeMemory
1079082asdasdqwerCatfish Farm (IOI22_fish)C++17
3 / 100
60 ms13908 KiB
#include "fish.h" #include <bits/stdc++.h> using namespace std; long long max_weights(int N, int M, std::vector<int> X, std::vector<int> Y, std::vector<int> W) { // first subtask bool s1 = true, s2=true; for (int i=0;i<M;i++) { if (X[i] % 2 != 0) s1=false; if (X[i] > 1) s2=false; } if (s1) { long long sm = 0; for (int i=0;i<M;i++) sm += W[i]; return sm; } if (s2) { long long sm1=0,sm2=0; for (int i=0;i<M;i++) { if (X[i] == 0) sm1 += W[i]; else sm2 += W[i]; } return max(sm1, sm2); } return 0; }
#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...