| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1356759 | Sacharlemagne | 비스킷 담기 (IOI20_biscuits) | C++20 | 1 ms | 1092 KiB |
#include "biscuits.h"
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
ll ans = 0;
vll A;
void backtrack(int ind, ll x, vll &a) {
if (ind == a.size()-1 && a[ind] < x) return;
if (a[ind] >= x) {
++ans;
// i must be x
ll ad = (a[ind]-x)/2;
a[ind+1] += ad;
backtrack(ind+1, x, a);
a[ind+1] -= ad;
}
a[ind+1] += a[ind]/2;
backtrack(ind+1, x, a);
return;
}
ll count_tastiness(ll x, vll a) {
ans = 0;
if (a.size() < 62) a.resize(62);
backtrack(0, x, a);
return ans + 1;
}
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
