제출 #306851

#제출 시각아이디문제언어결과실행 시간메모리
306851baluteshih비스킷 담기 (IOI20_biscuits)C++14
0 / 100
1 ms384 KiB
#include "biscuits.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; typedef pair<ll,ll> pll; #define X first #define Y second #define ALL(v) v.begin(),v.end() #define pb push_back #define SZ(a) ((int)a.size()) vector<ll> arr; ll ans,X; void dfs(int u,ll hv) { if(u==SZ(arr)) return ++ans,void(); hv+=arr[u],dfs(u+1,hv/2); if(hv>=X) dfs(u+1,(hv-X)/2); } ll count_tastiness(ll x, vector<ll> a) { ans=0,X=x; arr.swap(a); dfs(0,0); return ans; }
#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...