# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
376365 | 2021-03-11T10:07:23 Z | Jarif_Rahman | Packing Biscuits (IOI20_biscuits) | C++17 | 1000 ms | 1051092 KB |
#include "biscuits.h" #include <bits/stdc++.h> #define pb push_back #define f first #define sc second using namespace std; typedef unsigned long long int ll; typedef string str; const int kk = 100; long long count_tastiness(long long x, vector<long long> aa){ vector<ll> a(kk); int k = aa.size(); for(int i = 0; i < k; i++) a[i] = aa[i]; ll ans = 0; vector<ll> s(kk, 0); for(int i = 0; i < kk; i++){ if(i != 0) s[i] = s[i-1]; s[i]+=a[i]*(1LL<<i); } vector<ll> v; v.pb({0}); for(int i = 0; i < kk; i++){ ll mx = s[i]/x, p = 1; p<<=i; mx-=p; int in = upper_bound(v.begin(), v.end(), mx) - v.begin(); for(int j = 0; j < in; j++) v.pb(v[j]+p); } return v.size(); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1107 ms | 940704 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1150 ms | 1025452 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1134 ms | 1051092 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1166 ms | 984816 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1107 ms | 940704 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |