| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 303431 | qiangbao | 비스킷 담기 (IOI20_biscuits) | C++14 | 20 ms | 896 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <vector>
#include "biscuits.h"
using namespace std;
typedef long long ll;
ll ways[63];
ll ct[63];
ll pow2[63];
ll count_tastiness(ll x, vector<ll> a)
{
ll tot=0;
ll i, j;
pow2[0]=ways[0]=1;
for(i=1;i<=62;i++)
pow2[i]=pow2[i-1]*2;
a.resize(64);
for(i=0;i<62;i++){
ll way=0;
tot+=a[i]*pow2[i], ct[i]=tot;
ll tot2=tot;
for(j=i;j>=0;j--){
tot2=min(tot2, ct[j]);
if(pow2[62]/x>=pow2[j] && tot2>=x*pow2[j])
tot2-=x*pow2[j], way+=ways[j];
}
ways[i+1]=way+1;
}
return ways[62];
}| # | 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... | ||||
