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>
#ifndef EVAL
#include"grader.cpp"
#endif
#define DEBUG(x) cout<<#x<<"="<<x<<endl;
using namespace std;
typedef long long ll;
ll count_tastiness(ll x,vector<ll>A){
ll cnt=0;
A.resize(62);
for(ll y=0;y<100001;y++){
vector<ll>a=A;
bool flag=1;
for(int i=0;i<61;a[i+1]+=a[i]>>1,i++)
if(y>>i&1){
if(a[i]<x){
flag=0;
break;
}
a[i]-=x;
}
cnt+=flag;
}
return cnt;
}
# | 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... |