# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
68463 | ekrem | Bank (IZhO14_bank) | C++98 | 313 ms | 129916 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 st first
#define nd second
#define mp make_pair
#define pb push_back
#define N 1100005
using namespace std;
int n, m, ans, a[30], b[30], dp[30][N];
vector < int > g[30];
void dfs(int node, int top, int x, int yap){
if(node > m){
if(top == a[yap])
g[yap].pb(x);
return;
}
x *= 2;
dfs(node + 1, top + b[node], x + 1, yap);
dfs(node + 1, top, x, yap);
}
bool bul(int node, int bit){
// cout << node << " -> " << bit << endl;
int &r = dp[node][bit];
if(r != -1)
return r;
if(node > n)
return r = 1;
for(int i = 0; i < g[node].size(); i++)
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... |