Page 1 of 1

626 - Ecosystem

Posted: Fri Dec 19, 2003 7:01 pm
by Observer
Looks like I'm the only one in this board who has trouble on this task... :)

I would like to ask a simple little question: could any species possibly eat itself? I mean, would cases like this exists:
1 1 1
1 1 1
1 1 1
If so, how should I deal with such cases? Would anyone who got Accepted in this quesion give me some help, please......

Furthermore, I sure need some test cases for this problem. Please help!! :wink:

Posted: Sat Dec 20, 2003 6:03 am
by junjieliang
My output:

1 2 3
3 2 1

The three numbers on each line should be different from each other.

Posted: Sat Dec 20, 2003 8:12 am
by Observer
Thanks a lot!!! Got Accepted now :P :P :P
junjieliang wrote:The three numbers on each line should be different from each other.
Where can this statement be found? I still couldn't see it....

Posted: Sun Dec 21, 2003 1:25 pm
by junjieliang
I don't think the statement is found anywhere. The problem setter probably thought it obvious that a species cannot consume itself. Of course test cases on the OJ rarely fit into actual real life conditions, but I guess this problem does. :lol:

Posted: Wed Apr 07, 2004 1:33 pm
by Dominik Michniewski

Code: Select all

edited and cutted
Never mind , I found my mistake ...

Best regards

Re: 626 - Ecosystem

Posted: Mon May 07, 2012 7:32 pm
by mostafiz93
I'm getting WA in this problem.
I used complete search to find all possible food chain and printed only the valid ones according to lexicographic order.
can anyone find any bug in my code?

Code: Select all

removed after AC

Re: 626 - Ecosystem

Posted: Mon May 07, 2012 9:14 pm
by mostafiz93
the algorithm was ok. got a rank within 20. :)

Re: 626 - Ecosystem

Posted: Sat Jan 10, 2015 9:40 pm
by matheusdallrosa
AFf the PDF format version has not the statement: Output a blank line after each test case.
But the HTML format has.

Re: 626 - Ecosystem

Posted: Fri Mar 13, 2015 8:07 am
by uDebug
Just to make things clear: Species can consume themselves. The judge's input has test cases like Observer shared. So make sure your code handles this.