# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
831369 | Trumling | 비스킷 담기 (IOI20_biscuits) | C++14 | 1075 ms | 340 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 "biscuits.h"
#include<bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define all(x) x.begin(),x.end()
typedef long long ll;
#define pb push_back
#define INF 9999999999999999
long long count_tastiness(long long x, vector<long long> a)
{
ll ans=1;
for(int i=1;i<=100000;i++)
{
vector<ll>curr(60,0);
for(int j=0;j<a.size();j++)
curr[j]=a[j];
bool tf=1;
for(int j=0;(1<<j)<=i;j++)
{
if((1<<j)&i && curr[j]<x)
{
tf=0;
break;
}
if((1<<j)&i)
curr[j]-=x;
curr[j+1]+=curr[j]/2;
}
if(tf)
ans++;
}
return ans;
}
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... |