| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 604479 | rrrr10000 | Packing Biscuits (IOI20_biscuits) | C++14 | 117 ms | 3540 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef pair<ll,ll> P;
typedef vector<P> vp;
typedef vector<vp> vvp;
typedef vector<bool> vb;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define REP(i,k,n) for(ll i=(ll)(k);i<(ll)(n);i++)
#define all(a) a.begin(),a.end()
#define fi first
#define se second
#define pb emplace_back
template<class T> void out(T a){cout<<a<<endl;}
ll vec[200005];
ll count_tastiness(ll K,vi v){
ll n=61;
while(v.size()<n)v.pb(0);
vi rui(n);
rep(i,n)rui[i]=v[i]<<i;
rep(i,n-1)rui[i+1]+=rui[i];
rep(i,n)rui[i]/=K;
vec[0]=0;
ll cnt=1;
rep(i,n){
ll k=1ll<<i,l=lower_bound(vec,vec+cnt,rui[i]-k+1)-vec;
rep(j,l)vec[cnt++]=vec[j]+k;
}
return cnt;
}Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
