| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 620072 | sofapuden | 비스킷 담기 (IOI20_biscuits) | C++14 | 61 ms | 1364 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "biscuits.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
map<ll,ll> dp;
ll A[61];
ll x;
ll f(ll n){
if(n <= 0)return 0;
if(n == 1)return 1;
if(dp.find(n) != dp.end())return dp[n];
ll a = __lg(n-1);
return dp[n] = f(1ll<<a) + f(min(n,1+A[a]/x)-(1ll<<a));
}
ll count_tastiness(ll k, vector<ll> a) {
x = k;
dp.clear();
while(a.size() <= 60)a.push_back(0);
A[0] = a[0];
for(int i = 1; i <= 60; ++i)A[i] = A[i-1] + (a[i]<<i);
return f(A[60]+1);
}
| # | 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... | ||||
