# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
124118 | HassenAissa | Ice Hockey World Championship (CEOI15_bobek) | C++14 | 79 ms | 396 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>
#define int long long unsigned
using namespace std;
int32_t main()
{
int n,m,d;
scanf("%llu%llu",&n,&m);
vector<int> tab;
int pluss=0;
int moins=0;
for(int i=0; i<n; i++)
{
scanf("%llu",&d);
if(d<=m)
tab.push_back(d);
}
int res=0;
for(int i=0; i<(1<<tab.size()); i++)
{
int total=0;
int nomb=0;
for(int j=0; j<=tab.size(); j++)
{
if((i&(1llu<<j))==0)
{
total+=tab[j];
}
}
if(total<=m)
{
res++;
}
}
printf("%llu\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... |