# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
920658 | Macker | Game (IOI14_game) | C++17 | 1066 ms | 13144 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 "game.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define all(v) v.begin(), v.end()
vector<set<int>> adj;
set<int> active;
int n;
bool dfs(int a, int f){
bool ret = 0;
//if(adj[a].size() < active.size()){
for (auto &b : adj[a]) {
if(active.find(b) != active.end()){
active.erase(b);
if(b == f) return 1;
if(dfs(b, f)) return 1;
}
}
/*
}
else{
set<int> tmp = active;
for (auto &b : tmp) {
if(adj[a].find(b) != adj[a].end()){
active.erase(b);
if(b == f) return 1;
if(dfs(b, f)) return 1;
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... |