# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
305771 | daniel920712 | 비스킷 담기 (IOI20_biscuits) | C++14 | 18 ms | 512 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "biscuits.h"
#include <stdio.h>
#include <string.h>
#include <set>
using namespace std;
long long con[105]={0},N,x;
set < long long > all;
void F(int here,int c,int now)
{
if(here>=N&&c==0) return ;
if(c>=x)
{
all.insert(now+(long long) (1<<here));
F(here+1,(c-x)/2+con[here+1],now+(long long) (1<<here));
}
if(c>=2*x)
{
all.insert(now+2*(long long) (1<<here));
F(here+1,(c-2*x)/2+con[here+1],now+2*(long long) (1<<here));
}
F(here+1,c/2+con[here+1],now);
}
long long count_tastiness(long long x,vector<long long> a)
{
long long ans=1,t=0,i,now,tt=0;
N=a.size();
::x=x;
for(i=0;i<N;i++) con[i]=a[i];
all.insert(0);
F(0,0,0);
return (long long) all.size();
}
컴파일 시 표준 에러 (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... |