Submission #642362

#TimeUsernameProblemLanguageResultExecution timeMemory
642362lis05stPacking Biscuits (IOI20_biscuits)C++17
0 / 100
2 ms340 KiB
#ifdef LIS05ST #define _GLIBCXX_DEBUG #define _GLIBCXX_DEBUG_PEDANTIC #endif //#pragma GCC optimize("O3") //#pragma GCC target("avx2,popcnt,lzcnt,bmi,bmi2") #include"bits/stdc++.h" using namespace std; typedef long long ll; typedef long double ld; typedef __int128_t i128; #define int long long long long count_tastiness(long long x, std::vector<long long> a){ int k=a.size(); ll res=0; for(int i=0;i<k-1;i++){ if(a[i]>=3){ if(a[i]&1)a[i+1]+=a[i]/2,a[i]=1; else a[i+1]+=(a[i]-2)/2,a[i]=2; } } ll can=1; for(int i=0;i<k;i++){ if(a[i])can+=can; } return can; } #define MULTITESTS false void solve(int testCase){ } void precalc(){ } /* signed main(){ ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); precalc(); int t=1; if(MULTITESTS)cin>>t; for(int i=1;i<=t;i++){ auto t1=clock(); solve(i); auto t2=clock(); float delta=t2-t1; delta/=CLOCKS_PER_SEC; #ifdef LIS05ST cout<<"("<<i<<")------------"<<fixed<<setprecision(2)<<delta<<"s\n"; #endif } }*/

Compilation message (stderr)

biscuits.cpp: In function 'long long int count_tastiness(long long int, std::vector<long long int>)':
biscuits.cpp:17:8: warning: unused variable 'res' [-Wunused-variable]
   17 |     ll res=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...