| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1356762 | Sacharlemagne | 비스킷 담기 (IOI20_biscuits) | C++20 | 1095 ms | 420 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);
a[ind+1] -= a[ind]/2;
}
ll count_tastiness(ll x, vll a) {
ans = 0;
if (a.size() < 62) a.resize(62);
backtrack(0, x, a);
return ans + 1;
}
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
