10156 - Sala-ma-Sond, A Nice Little Pond
Moderator: Board moderators
10156 - Sala-ma-Sond, A Nice Little Pond
Seems like a relatively easy task and yet there are many wa's on this problem. Is there something here that I am not seeing ?
WA :
Can you elaborate a little further
Suman.
Suman.
10156 Sala-ma-Sond, A Frustrating Little Pond
This problem seems to be a straight forward one and the problem statement seems to be well written..
.. but I keep getting WA.... around 20 submissions so far.
-- and the AC % seems to be low as well, so there must be something that I have missed out.
I just check whether a command takes a turtle to a position in the grid that is not occupied by some other turtle and move it there correspondingly .. otherwise I ignore the command.
Some help or clarification will be greatly appreciated.
.. but I keep getting WA.... around 20 submissions so far.

-- and the AC % seems to be low as well, so there must be something that I have missed out.
I just check whether a command takes a turtle to a position in the grid that is not occupied by some other turtle and move it there correspondingly .. otherwise I ignore the command.
Some help or clarification will be greatly appreciated.
-
- Guru
- Posts: 1080
- Joined: Thu Dec 19, 2002 7:37 pm
Yeah,
I do remove trailing spaces at the end.
I considered top-left point as (0, 0) to the right x increases and to the bottom y increases.
Suppose a turtle is at (5,3) then a SE command will move it to (6,4), right... ( provided the latter coordianate is valid ).
Another thing: if there are 10 rows and only row 1 and 2 contains turtle, then do you print 2 rows or 10 rows.
One last thing : Can there be invalid inputs.
I do remove trailing spaces at the end.
I considered top-left point as (0, 0) to the right x increases and to the bottom y increases.
Suppose a turtle is at (5,3) then a SE command will move it to (6,4), right... ( provided the latter coordianate is valid ).
Another thing: if there are 10 rows and only row 1 and 2 contains turtle, then do you print 2 rows or 10 rows.
One last thing : Can there be invalid inputs.
-
- Guru
- Posts: 1080
- Joined: Thu Dec 19, 2002 7:37 pm
-
- Guru
- Posts: 1080
- Joined: Thu Dec 19, 2002 7:37 pm
yeaaaahh...
Finally got AC. 
The problem was, in the judge's input.. there were cases where two turtles have the same id. In that case, you have to process the very last one when a command is given on that id..
.. but about the other turtles with the same id, they do occupy a position.
Just assume that these turtles are there with a different id and no command will be imposed on them.
So strictly speaking, the judge's input is wrong as the problem statement does not clarify about this matter.

The problem was, in the judge's input.. there were cases where two turtles have the same id. In that case, you have to process the very last one when a command is given on that id..
.. but about the other turtles with the same id, they do occupy a position.
Just assume that these turtles are there with a different id and no command will be imposed on them.
So strictly speaking, the judge's input is wrong as the problem statement does not clarify about this matter.
10156 --> Still getting WA!
No trailing spaces, blank line after every single case (even the last one). I'm doing all that already.
For turtles with the same id I'm only considerating the last one given, even though the first ones occupy a position on the grid, and therefore appear as turtles on the solution as well.
Am i missing anything? I'm still getting WA!!
Thank you so much
For turtles with the same id I'm only considerating the last one given, even though the first ones occupy a position on the grid, and therefore appear as turtles on the solution as well.
Am i missing anything? I'm still getting WA!!
Thank you so much