# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
354367 | ogibogi2004 | Bank (IZhO14_bank) | C++14 | 156 ms | 1516 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;
const int MAXN=22;
const int MAXM=(1<<MAXN);
bool dp[MAXM];
int a[MAXN],n,m;
int b[MAXN], pref[MAXN];
int main()
{
cin>>n>>m;
for(int i=1;i<=n;i++)
{
cin>>a[i];
pref[i]=pref[i-1]+a[i];
}
for(int j=1;j<=m;j++)
{
cin>>b[j];
}
dp[0]=1;
for(int mask=0;mask<(1<<m);mask++)
{
if(!dp[mask])continue;
//cout<<mask<<endl;
int i=0;
int sum=0;
for(int j=0;j<m;j++)
{
if(mask&(1<<j))
{
# | 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... |