# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1162668 | spongb | Tropical Garden (IOI11_garden) | C++20 | 1385 ms | 29800 KiB |
#include "garden.h"
#include "gardenlib.h"
#include <bits/stdc++.h>
#define v vector
#define pii pair<int,int>
#define ll long long
#define pli pair<long long, int>
#define fi first
#define se second
using namespace std;
const int LIMIT = 29;
void dfs(v<v<int>> &adj, int node, int dist, v<int> &dists) {
if (dists[node] != -1) return;
dists[node] = dist;
for (int nex : adj[node]) {
dfs(adj, nex, dist + 1, dists);
}
}
void count_routes(int N, int M, int P, int R[][2], int Q, int G[]) {
v<int> first(N, -1), second(N, -1), next(2 * N, -1);
for (int i = 0; i < M; i++) {
int a = R[i][0], b = R[i][1];
if (first[a] == -1) first[a] = b;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |