# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
16984 | erdemkiraz | Tropical Garden (IOI11_garden) | C++98 | 4623 ms | 40484 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>
#include "garden.h"
#include "gardenlib.h"
using namespace std;
#define type(x) __typeof((x).begin())
#define foreach(it, x) for(type(x) it = (x).begin(); it != (x).end(); it++)
typedef long long ll;
typedef pair < int, int > ii;
const int inf = 1e9 + 333;
const ll linf = 1e18 + inf;
const int N = 3e5 + 5;
int n, m, p;
bool was[N], h[N];
int go[N];
vector < int > come[N];
vector < ii > v[N];
vector < int > cycle;
int findCycle(int x) {
h[x] = 1;
cycle.push_back(x);
if(!h[go[x]])
return findCycle(go[x]);
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... |