# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
169059 | AlexLuchianov | Tropical Garden (IOI11_garden) | C++14 | 2496 ms | 33268 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 <vector>
#include <queue>
#include <iostream>
using namespace std;
using ll = long long;
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#define MAX(a, b) (((a) < (b)) ? (b) : (a))
int const nmax = 300000;
int const inf = 1000000000;
int f[1 + nmax], scount[1 + nmax];
int dist[1 + nmax], dist2[1 + nmax];
vector<int> graph[1 + nmax];
vector<int> invg[1 + nmax];
void count_routes(int N, int M, int P, int R[][2], int Q, int G[])
{
for(int i = 0; i < 2 * N; i++)
f[i] = -1;
for(int i = 0; i < M; i++){
int x = R[i][0], y = R[i][1];
graph[x].push_back(i);
graph[y].push_back(i);
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... |