제출 #132994

#제출 시각아이디문제언어결과실행 시간메모리
132994tinjyu열대 식물원 (Tropical Garden) (IOI11_garden)C++14
0 / 100
43 ms6528 KiB
#include "garden.h" #include "gardenlib.h" #include <iostream> using namespace std; long long int ans,n,m,p,map[1005][1005],tag[10005],ta; int find(int x,int pe) { if(pe==ta) { if(x==p)ans++; return 0; } int tmp=0,now=-1; for(int i=0;i<n;i++) { if(map[x][i]!=-1) { if(now==-1) { if(tag[map[x][i]]==1)tmp=n; else tmp=map[x][i]; now=i; } else if(map[x][i]<tmp && tag[map[x][i]]==0) { now=i; tmp=map[x][i]; } } } tag[tmp]=1; find(now,pe+1); } void count_routes(int N, int M, int P, int R[][2], int Q, int G[]) { n=N,m=M,p=P,ta=G[0]; for(int i=0;i<n;i++) { for(int j=0;j<n;j++)map[i][j]=-1; } for(int i=0;i<m;i++) { map[R[i][0]][R[i][1]]=i; map[R[i][1]][R[i][0]]=i; } for(int i=0;i<n;i++) { for(int j=0;j<m;j++)tag[j]=0; find(i,0); } answer(ans); }

컴파일 시 표준 에러 (stderr) 메시지

garden.cpp: In function 'int find(int, int)':
garden.cpp:34:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...