# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
29501 | osmanorhan | Tropical Garden (IOI11_garden) | C++14 | 1642 ms | 32204 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 "garden.h"
#include "gardenlib.h"
#include <bits/stdc++.h>
#define pb push_back
using namespace std;
const int maxn = 150020;
typedef pair<int,int> ii;
vector<int> best[maxn];
vector<ii> w[maxn][2];
int mark[maxn], went[maxn], cycle;
int ans[maxn], p, L;
void dfs( int n, int s, int deep ) {
if( n == p && s == L && deep != 0 ) {
cycle = deep;
return;
}
if( s == 0 ) mark[n] = deep, went[n] = 1;
for(int i=0;i<w[n][s].size();i++)
dfs( w[n][s][i].first, w[n][s][i].second, deep+1 );
}
void count_routes(int N, int M, int P, int R[][2], int Q, int G[]) {
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... |