# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
105938 | tincamatei | Tropical Garden (IOI11_garden) | C++14 | 5027 ms | 9336 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>
using namespace std;
const int MAX_N = 150000;
const int MAX_M = 150000;
struct Edge {
int a, b;
inline int other(int x) {
return a ^ b ^ x;
}
} edges[MAX_M];
vector<int> graph[MAX_N];
vector<int> realgraph[MAX_N];
int rushnode(int nod, int x, int lastedge) {
if(x == 0)
return nod;
for(auto it: realgraph[nod])
if(it != lastedge)
return rushnode(edges[it].other(nod), x - 1, it);
return rushnode(edges[realgraph[nod][0]].other(nod), x - 1, realgraph[nod][0]);
}
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... |