# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
7882 | dohyun0324 | Tropical Garden (IOI11_garden) | C++98 | 3763 ms | 16428 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<algorithm>
#include<string.h>
using namespace std;
int sw,sx,sp,x,y,top,w,n,m,p,con[300010][2],cnt,g[300010],q,d[300010][2],leng[300010][2],ch[300010][2],dap[2010];
struct data2{
int x,p;
}sav[300010];
struct data{
int x,y,c;
bool operator<(const data&r)const
{
if(x==r.x) return c<r.c;
return x<r.x;
}
}arr[300010];
void dfs(int x,int k)
{
int i;
if(ch[x][k]==cnt){sw=1; sx=x; sp=k; return;}
if(ch[x][k]!=cnt && ch[x][k]!=0){sw=2; sx=x; sp=k; return;}
ch[x][k]=cnt;
top++; sav[top].x=x; sav[top].p=k;
if(con[con[x][k]][1]==0) dfs(con[x][k],0);
else if(con[con[x][k]][0]==x) dfs(con[x][k],1);
else dfs(con[x][k],0);
}
void put(int t)
{
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... |