Submission #432439

#TimeUsernameProblemLanguageResultExecution timeMemory
432439HazemPacking Biscuits (IOI20_biscuits)C++14
0 / 100
1 ms332 KiB
#include "biscuits.h" #include <bits/stdc++.h> #define LL long long using namespace std; LL x; vector<LL>a; LL bt(int i,LL cur){ if(i==a.size()) return 1; LL ret = 0; ret += bt(i+1,(cur+a[i])/2); if(cur+a[i]>=x) ret += bt(i+1,(cur+a[i]-x)/2); return ret; } long long count_tastiness(long long X, std::vector<long long> A) { x = X;a = A; return bt(0,0); }

Compilation message (stderr)

biscuits.cpp: In function 'long long int bt(int, long long int)':
biscuits.cpp:12:6: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   12 |  if(i==a.size())
      |     ~^~~~~~~~~~
#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...