Submission #800582

#TimeUsernameProblemLanguageResultExecution timeMemory
800582FEDIKUSPacking Biscuits (IOI20_biscuits)C++17
0 / 100
1 ms340 KiB
#include "biscuits.h" #include<bits/stdc++.h> using namespace std; using ll = long long; ll count_tastiness(ll x, vector<ll> a){ map<ll,ll> da; da[0]=1; for(int i=0;i<a.size();i++){ map<ll,ll> nov; for(auto j:da){ nov[(j.first+a[i])/2]+=j.second; if(j.first+a[i]>=x) nov[(j.first+a[i]-x)/2]+=j.second; } da=nov; } ll ret=0; for(auto i:da) ret+=i.second; return ret; }

Compilation message (stderr)

biscuits.cpp: In function 'll count_tastiness(ll, std::vector<long long int>)':
biscuits.cpp:10:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   10 |  for(int i=0;i<a.size();i++){
      |              ~^~~~~~~~~
#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...