# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
399014 | Pichon5 | Tropical Garden (IOI11_garden) | C++17 | 323 ms | 83116 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>
#include "garden.h"
#include "gardenlib.h"
#define lcm(a,b) (a/__gcd(a,b))*b
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define ll long long int
#define vi vector<int>
#define vll vector<ll>
#define pb push_back
#define F first
#define S second
#define mp make_pair
using namespace std;
const int tam=200000;
const int MA=30;
int up[tam][MA];
int up2[tam][MA];
int last[tam][MA];
int last2[tam][MA];
vector<pair<int,int> > G[tam];
void count_routes(int N, int M, int P, int R[][2], int Q, int g[])
{
int n=N;
for(int i=0;i<M;i++){
int a=R[i][0],b=R[i][1];
if(G[a].size()<2)G[a].pb({b,i});
if(G[b].size()<2)G[b].pb({a,i});
}
for(int i=0;i<n;i++){
if(G[i].size()<2)G[i].pb(G[i][0]);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |