|
|
back to boardWhat if one of them is outside the trap? Do they still need to keep contact (have at least one common corner)? Edited by author 20.10.2012 18:13 Yes, what's the answer for this test: 1 2 +.+-+ |1|2. +-+-+ ? UPD: i got accepted, answer for this test is 2. Too bad it doesn't clarify anything about original question, so I'll answer it: yes, they have to be in adjacent rooms even after one of them got out. Edited by author 23.10.2012 23:34 So the first one out must remain in contact with the other, but if the other can step out on the very next turn, and by stepping out they become separated, it's OK...? In my solution what you said is not allowed, but it seems like in optimal solution this situation can't happen. > In my solution what you said is not allowed Then shouldn't the answer to your example be 3 instead of 2 as your wrote? 1 up 1 right 2 right Your answer of 2 requires: 1 up 2 right But this separates them. Edited by author 25.10.2012 11:25 Yes, but there are no walls outside the given rectangle, so while executing "1 right" command you don't pass through thin wall and thus the answer isn't increased ;D Doh. Right you are. I did not read the problem statement properly. I was thinking it was "number of moves." I think yes.Because I got WA5 if no.But AC if yes. My English is very bad.Sorry. |
|
|