이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "biscuits.h"
#include<bits/stdc++.h>
using namespace std;
map<long long,long long> dp,dp2;
long long count_tastiness(long long x, std::vector<long long> a) {
dp.clear();
dp2.clear();
dp[0]=1;
long long ans=0;
for(auto k:a){
dp2.clear();
for(auto[i,j]:dp){
long long l=i+k;
if(l>=x) dp2[(l-x)/2]+=j;
dp2[l/2]+=j;
}
swap(dp,dp2);
}
for(auto i:dp)
ans+=i.second;
return ans;
}
# | 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... |