# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
978043 | BentoOreo | Bank (IZhO14_bank) | C++14 | 316 ms | 86708 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;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<long long, long long>;
const ll INF = numeric_limits<ll>::max();
const int inf = numeric_limits<int>::max();
const char nl = '\n', sp = ' ';
ll cantor_hash(ll x, ll y){
return (((x + y) * (x + y + 1)) >> 1) + y;
}
unordered_map<ll, vector<ll> > ks;
unordered_map<ll, bool> vis;
int pathexists(int node, int mask,vector<ll> &salary, vector<ll> &billz, vector<vector<int> > &dp){
// cout << node << sp << mask << nl;
if(node == salary.size()){
return 1;
} else {
// cout << salary[node] << nl;
if(dp[node][mask] != -1){
return dp[node][mask];
}
int flag = 0;
for(int kbitmask: ks[salary[node]]){
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... |