# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
560503 | AlperenT | Packing Biscuits (IOI20_biscuits) | C++17 | 2 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;
long long count_tastiness(long long x, vector<long long> a){
vector<long long> prv, cur;
while(!a.empty() && a.back() == 0) a.pop_back();
cur.push_back(0);
for(int k = 0; k < a.size(); k++){
prv = cur; cur.clear();
for(auto i : prv){
cur.push_back(i / 2 + a[k]);
if(i / 2 + a[k] >= x) cur.push_back(i / 2 + a[k] - x);
}
}
return cur.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... |