I used BFS to solve this problem.
but...I don't know how to explain it. (my English is not quite good ^^|||)
so...how can I do to explain my thought for you?
hmm.....|||
can someone help ? I can't find the mistake that caused the problem... THANK YOU!! and here's my code: #include <stdio.h> #include <stdlib.h> int map[32][32][32]; /* wall=9 walked=9 space=0 target=100 start=1*/ int L,R,C,si,sj,sk,check; int qui[30000],quj[30000],quk[30000],now,end; int time[30000]; ...
I've tried many datas And all got correct. Or is my way wrong? Here is my code: (say thanks to you first :D ) #include <stdio.h> #include <stdlib.h> int main(void) { int m,n; char **map,ch; int i,j,total,count=1,a,b; while(scanf("%d %d",&n,&m)) { if(m==0&&n==0) break; map=(...
thanks for your reply... ^^
I've found my mistake: if the syllables in three parts are 4/6/2,
I should print "1" instead of 123 !!
(thanks again~~ )[/c]
I don't know what's the matter with my code.... I've used Dev-C++ to compile my code but I got Compile Error... can somebody tells me what happened?? thanks... [code] #include <stdio.h> int main(void) { char ch[205]; int i,count,q,check; while(gets(ch)) { if(strcmpi(ch,"e/o/i")==0) break; ...