Submission #448422

#TimeUsernameProblemLanguageResultExecution timeMemory
448422fuad27Ice Hockey World Championship (CEOI15_bobek)C++14
40 / 100
1091 ms284 KiB
#include<bits/stdc++.h> using namespace std; #define int long long int n; vector<int> v; int solve(int i,int rem) { if(rem<0) return 0; if(i==n) return 1; return solve(i+1,rem) + solve(i+1,rem-v[i]); } int32_t main() { cin>>n; int w; cin>>w; v.resize(n); for(int i=0;i<n;i++) cin>>v[i]; cout<<solve(0,w)<<endl; }
#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...
#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...