(UPD: 2024-12-04 14:48 UTC) Judge is not working due to Cloudflare incident. (URL) We can do nothing about it, sorry. After the incident is resolved, we will grade all submissions.

Submission #1054585

#TimeUsernameProblemLanguageResultExecution timeMemory
1054585LittleOrangePacking Biscuits (IOI20_biscuits)C++17
0 / 100
0 ms600 KiB
#include "biscuits.h" #include<bits/stdc++.h> using namespace std; using ll = long long; long long count_tastiness(long long x, std::vector<long long> a) { ll k = a.size(); ll tot = 0; for(ll i= 0 ;i<k;i++) tot += a[i]<<i; if (x>tot) return 0; if (x==1){ ll lf = 0; vector<ll> v; ll cur = 0; for(ll i = 0;i<k;i++){ if (a[i]){ ll z = 1<<(i-lf); if (z<=cur+1){ cur += z*a[i]; }else{ v.push_back(cur); cur = a[i]; lf = i; } } } v.push_back(cur); ll ans = 1; for(ll i : v) ans *= i+1; return ans; } return 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...