Submission #1076650

#TimeUsernameProblemLanguageResultExecution timeMemory
1076650vjudge1Catfish Farm (IOI22_fish)C++17
3 / 100
56 ms7504 KiB
#include <bits/stdc++.h> #include "fish.h" #define fastio ios_base::sync_with_stdio(0); cin.tie(0); #define ll long long using namespace std; const int MAX=3e3+5; ll max_weights(int n, int m, vector<int> x, vector<int> y, vector<int> w){ bool par=0; ll ans=0; ll res=0; for(int i=0;i<m;i++){ ans+=w[i]; if(x[i]%2){ par=1; res+=w[i]; } } return max(res,ans-res); }

Compilation message (stderr)

fish.cpp: In function 'long long int max_weights(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
fish.cpp:10:10: warning: variable 'par' set but not used [-Wunused-but-set-variable]
   10 |     bool par=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...