# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
376347 | 2021-03-11T09:58:07 Z | Jarif_Rahman | Packing Biscuits (IOI20_biscuits) | C++17 | 1000 ms | 1051392 KB |
#include "biscuits.h" #include <bits/stdc++.h> #define pb push_back #define f first #define sc second #define __int128 long long using namespace std; typedef long long int ll; typedef string str; const int kk = 125; ll count_tastiness(ll x, vector<ll> aa){ vector<__int128> a(kk); int k = aa.size(); for(int i = 0; i < k; i++) a[i] = aa[i]; ll ans = 0; vector<__int128> 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<__int128> v; v.pb({0}); for(int i = 0; i < kk; i++){ __int128 mx = s[i]/x-mx, 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 | 1134 ms | 1051112 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1116 ms | 1011692 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1103 ms | 612692 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1130 ms | 1051392 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1134 ms | 1051112 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |