# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1041386 | vjudge1 | Packing Biscuits (IOI20_biscuits) | C++17 | 1067 ms | 885472 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>
#pragma GCC optimize(3)
using namespace std;
long long count_tastiness(long long x, std::vector<long long> a) {
long long ans=0;
while(a.size()<60)
a.push_back(0);
queue<pair<int,int>> q;
q.push({0,0});
while(q.front().second<60){
auto[i,j]=q.front();
q.pop();
long long l=i+a[j];
if(l>=x)
q.push({l-x>>1,j+1});
q.push({l>>1,j+1});
}
return q.size();
}
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... |