Submission #448473

#TimeUsernameProblemLanguageResultExecution timeMemory
448473fuad27Ice Hockey World Championship (CEOI15_bobek)C++14
10 / 100
76 ms288 KiB
#include<bits/stdc++.h> using namespace std; #define int long long int32_t main () { int n, m, c = 0; cin >> n >> m; int v[n]; for(int i = 0;i<n;i++) { cin >> v[i]; } for (int b = 0; b < (1<<n); b++) { int sum = m; for (int i = 0; i < n; i++) { if (b&(1<<i)) sum-=v[i]; if(sum < 0)break; } if(sum <= m)c++; } cout<<c<<"\n"<<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...