841 - Snake

All about problems in Volume 8. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
minskcity
Experienced poster
Posts: 199
Joined: Tue May 14, 2002 10:23 am
Location: Vancouver

841 - Snake

Post by minskcity »

Could anybody who solved the problem give me a hint on how to do that? I doubt that it can be solved for *any* input of size 20 within UVA's time limit . :-?

Vexorian
Learning poster
Posts: 100
Joined: Sat Aug 26, 2006 5:50 am

Post by Vexorian »

10 seconds is actually pretty high considering all the pathing engines out there wich can solve things like this in enough time to do not cause an slow framerate. Then 20 is actually a very small limit .

I didn't solve it but I would say it is certainly possible, I suggest you look for pathing algorithms out there. Just to learn cause none of the implemented will really help much for this specific snake related question.

Vexorian
Learning poster
Posts: 100
Joined: Sat Aug 26, 2006 5:50 am

PE

Post by Vexorian »

Talking about this problem, I am getting a Presentation Error, maybe I missunderstood the description of the output?

This is an example output:

Code: Select all

11
NO
77
I tried with and without the last line break.

Edit: Nevermind, for some reason I didn't read the bold text saying that a blank line should separate each output case.

serur
A great helper
Posts: 251
Joined: Thu Feb 23, 2006 11:30 pm

Post by serur »

Any hints on how to store the snake?

Post Reply

Return to “Volume 8 (800-899)”