# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
124099 | HassenAissa | Ice Hockey World Championship (CEOI15_bobek) | C++14 | 90 ms | 508 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n,m,d;
scanf("%lld%lld",&n,&m);
vector<long long> tab;
int pluss=0;
int moins=0;
for(int i=0; i<n; i++)
{
scanf("%lld",&d);
if(d<=m)
tab.push_back(d);
}
long long res=0;
for(long long i=0; i<(1<<tab.size()); i++)
{
long long total=0;
long long nomb=0;
for(long long j=0; j<=tab.size(); j++)
{
if((i&(1<<j))==0)
{
total+=tab[j];
}
}
if(total<=m)
{
res++;
}
}
printf("%lld\n",res);
return 0;
}
Compilation message (stderr)
# | 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... |
# | 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... |