제출 #618847

#제출 시각아이디문제언어결과실행 시간메모리
618847asdfasdfasdfasdf비스킷 담기 (IOI20_biscuits)C++14
42 / 100
60 ms39608 KiB
#include "biscuits.h" #include <bits/stdc++.h> using namespace std; using namespace std; long long count_tastiness(long long x, vector<long long> a) { long long dp[222][11111]; for(int i=0;i<222;i++) for(int j=0;j<11111;j++) dp[i][j]=0; a.resize(126); for(int i=0;i<125;i++) { long long t=max(0LL,a[i]-x); t-=t&1; a[i]-=t; a[i+1]+=t/2; } dp[0][0]=1; for(int i=0;i<126;i++) for(int r=0;r<10001;r++) { dp[i+1][(a[i]+r)/2]+=dp[i][r]; if(a[i]+r>=x) dp[i+1][(a[i]+r-x)/2]+=dp[i][r]; } return dp[126][0]; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...