UKROBOT - Editorial

There was an announcement regarding the same in the middle of the contest.
I missed the change too :confused:

Statement of UKROBOT had 1 <= X <= C, 1 <= Y <= R, instead of 1 <= X <= R, 1 <= Y <= C, it is fixed now.

this is from announcements.

So I think question was correct but after announcement it got wrong.

1 Like

Yeah… I have considered it will be immobile after it find an obstacle, That’s why I was not able to figure out why I am getting WA

Shit! I misunderstood this problem

1 Like

Exactly!

Okay, to be honest, that announcement is actually tripping me up. Sorry that it ended up so confusing, we probably should have just made it rows/columns instead of Cartesian coordinates.

3 Likes

Hey man! Don’t worry. You are good.

That’s not an issue. It’s okay.
Question quality is what matters which was quite good.

i really wonder how the tester tests these kind of problems

This checker actually seems like it would be simple. The constraints R, C \leq 20 are there for a reason - so the checker can brute-force all possible obstacle locations and compute the exact outcome for each one. If each outcome is different, then the solution is valid, otherwise, it may be possible that you can’t tell the difference, so the solution is wrong.

3 Likes

so if generate random routes to nowhere each time ( ensuring they are distinct final ), still it would be accepted?

No, because the route has to be the same regardless of the obstacle’s position.

1 Like

my bad. Thanks for the reponse tho !!

which software you used to make this grid ?
please do tell me .

i think the question should be much more clear

The announcement and change in statement has to be wrong, right?

ok i am not getting it so let say if we have a grid (top left at 0,0) and obstacle at (1,1) and command is “DRRRD” (D is down as (x,y)=>(x+1,y) and same others) so will the final pos will be (0,2) or not ??? if not then what will be the final position.

I can’t find why my approach is giving WA.
my code.
I think my code is mapping unique co-ordinate for each possible coordinate of obstacle.
From my approach let final coordinate of robot be (x,y).
Then, obstacle’s x co-ordinate will be= x and obstacle’s y co-ordinate will be = (y-r).
Help!

And one more thing :sweat_smile:, can solution for r=1 and c=20 be DRRR…(R repeated 19 times) ??? here (0,0) is assumed at top left and r is row and c is col ,
D move make (x,y)=>(x+1,y)
and R make(x,y)=>(x,y+1)
because in this case all the final positions will be different for ex. let r=1 and c=3
the DRR
if obstacle at (1,1) final pos is (1,0)
if (1,2) -> final (1,1)
if (1,3)-> final (1,2)
as all are different so we have the answer and same for r=1 and c=20

or am i wrong somewhere ?

I was using the same approach. But still I didn’t understand it why it is not the valid solution