# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
124079 | HassenAissa | Ice Hockey World Championship (CEOI15_bobek) | C++14 | 72 ms | 504 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()
{
int n,m,d;
scanf("%d%d",&n,&m);
vector<int> tab;
int pluss=0;
int moins=0;
for(int i=0; i<n; i++)
{
scanf("%d",&d);
tab.push_back(d);
}
int res=0;
for(int i=0; i<(1<<n); i++)
{
int total=0;
int nomb=0;
for(int j=0; j<=n-1; j++)
{
if((i&(1<<j))==0)
{
//nothing
}
else
{
total+=tab[j];
}
}
if(total<=m)
{
res++;
}
}
printf("%d\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... |