# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
415505 | MKopchev | Packing Biscuits (IOI20_biscuits) | C++14 | 1090 ms | 43456 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;
const int nmax=64;
long long inp[nmax],mem_x;
unordered_map<long long,long long> seen[nmax];
long long rec(int bit,long long high)
{
if(bit==60)return 1;
high=high+inp[bit];
if(seen[bit].count(high))return seen[bit][high];
long long ret=0;
//0
ret=ret+rec(bit+1,high/2);
//1
if(high>=mem_x)ret=ret+rec(bit+1,(high-mem_x)/2);
seen[bit][high]=ret;
//cout<<"f "<<bit<<" , "<<high<<" = "<<ret<<endl;
return ret;
}
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... |