# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
583096 | gustavoleal | Tropical Garden (IOI11_garden) | C++17 | 2706 ms | 25804 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>
using namespace std;
const int N=400100;
typedef long long ll;
vector<int> lista[N];
int pass[N],grau[N],d0[N],d1[N];
void answer(int X);
void count_routes(int N, int M, int P, int R[][2], int Q, int G[])
{
for(int i=0;i<M;i++)
grau[R[i][0]]++,grau[R[i][1]]++;
for(int i=0;i<M;i++)
{
int u0=2*R[i][0],v0=2*R[i][1];
if(pass[R[i][0]]<=1)
{
if(!pass[R[i][1]]){
if(grau[R[i][0]]==1){
lista[v0+1].push_back(u0);
lista[v0+1].push_back(u0+1);
}else
lista[v0+1].push_back(u0+pass[R[i][0]]);
}else
{
if(grau[R[i][0]]==1){
lista[v0].push_back(u0);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |