tDoes anyone know the evil behind pharaoh's test case #3?
I've run out of ideas.
AWell i used backtracking , and passed all tests.
ghe isn't asking for the solution of problem..but for some tricky case..
anyway, I have problem with this task too..I'm getting WA on 4th case constantly
DMy code passes for now only the 4-th case :P
o@thocevar
Cascade of floating stairs. Several ups and falls.
o@Daniel. Always look above Your head.
b@gates: When you are stepping at the next level, are you checking is there free space one level above your current position?
AInput:
99
50
50 1 0
....
Removed
...
49 14 -3
Output:
-4
If my solution is correct . . .
g@boba5551: yes, that was the problem..thank you very much
DHmm. I have tried some tricky cases but still don't passing the grading tests. Can someone give me a test case please?
o@Amtrix: Yes, Your solution is OK.
tIs it possible to let me know whether my solution returns an answer which is too big or is my answer too small?
oEmail me on odule[at]sbb.rs and put Your solution in mail.
tThanks for the input, it helped.
There's a small problem with test case 3. Pedja starts on coordinates ((n+1)/2, 1, 0), but the block ((n+1)/2, 1, -1) is stolen, so he has nothing to stand on at the beginning.
By my logic Pedja started falling down even before he could make his first step. Just take into account that Pedja can fly at the start before he makes his first move. :)
oThanks to You for this post. Somehow this happen, but I don't wont this. It was described that counting start after Pedja make his first move so I did not think that this can be problem. Anyway You right. (Your Pedja miss first floating stairs and stay trapped on lowest level I suppose)
I fixed this.
c@oduleodule
What's so tricky about case #4?
oas Boba says
When you are stepping at the next level, are you checking is there free space one level above your current position?
cThanks... My code checked for this condition but I wrote cur.h instead of cur.h+1.