# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
590559 | 2022-07-06T06:36:45 Z | ogibogi2004 | Packing Biscuits (IOI20_biscuits) | C++14 | 1000 ms | 2097152 KB |
#include "biscuits.h" #include<bits/stdc++.h> using namespace std; #define ll long long unordered_map<ll,ll>dp; ll s[64]; ll xx; ll calc(ll n) { if(n==1)return s[0]>=xx; if(dp.count(n))return dp[n]; int t=0,pw2=1; while(pw2<n){pw2*=2ll;t++;} pw2/=2ll;t--; return dp[n]=calc(pw2)+calc(min(n,1+s[t]/xx)-pw2); } long long count_tastiness(long long x, vector<long long> a) { dp.clear(); s[0]=a[0];xx=x; for(int i=1;i<a.size();i++) { s[i]=s[i-1]+a[i]*(1ll<<i); } for(int i=0;i<=a.size();i++) { calc((1ll<<i)); } return dp[(1ll<<a.size())]; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1203 ms | 1894524 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1230 ms | 1994968 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1022 ms | 2097152 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 340 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1203 ms | 1894524 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |