Submission #338358

#TimeUsernameProblemLanguageResultExecution timeMemory
338358mayflyyhPacking Biscuits (IOI20_biscuits)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #define ll long long ll dp[70]; ll b[170]; ll count_tastiness(ll x, std::vector<ll> a){ int end=62; int SZ=a.size(); for(int i=0;i<SZ;++i) b[i]=a[i]; for(int i=SZ;i<=end;++i) b[i]=0; for(int i=end;i+1;--i){ if(i==end){ dp[i]=1; } else{ dp[i]=0; for(int j=end;j>=i+1;--j){ ll min=0,max=(1ll<<(j-i))-1,ai=0; for(int k=j-1;k>=i;--k){ ai=ai*2+b[k]; ll y_=0; if(k>i){ y_=(ai/x+1)<<(k-i); if(y_>min) min=y_; } else{ y_=ai/x; if(y_<max) max=y_; } } if(min<=max) dp[i]+=dp[j]*(max-min+1); } } } return dp[0]; } int main(){ std::vector<ll> a; for(int i=1;i<=50;++i){ a.push_back(894*i); } std::cout<<count_tastiness(6*rand()+,a); return 0; }

Compilation message (stderr)

biscuits.cpp: In function 'int main()':
biscuits.cpp:46:38: error: expected primary-expression before ',' token
   46 |  std::cout<<count_tastiness(6*rand()+,a);
      |                                      ^