×

# July Cook Off CHEFIHG question

 0 I have a doubt regarding this question. It was mentioned that we can choose any non prohibited cell as the starting point. To reach C any of the U,D,L,R should be non prohibited. So, if I just start from any non prohibited cell that lies either U,or D,or L, or R of 'C' and then just take it to C using single instruction, why am I getting WA? Pardon me if I understood the question wrong. asked 25 Jul '16, 21:07 3★ksut28 31●3 accept rate: 0%

 0 Well you are considering some cells one by one and taking each of them to cell 'C' while doing this one by one , the other cells might get displaced from the original positions. answered 25 Jul '16, 21:22 439●14 accept rate: 16%
 0 No, I am just checking the cells around C. If any of them are not prohibited, then I am printing the corresponding instruction. Example 5 6 ++++++ +.C..+ ++.+++ +....+ ++++++ In this cell 2 2 is not prohibited. So, I choose my starting city as 2 2 and then just move 'R'. where + represents * answered 25 Jul '16, 23:22 3★ksut28 31●3 accept rate: 0%
 0 C should be reached in traversing path you give by ans from every'.' eg 5 6 ++++++ +.C..+ ++.+++ +....+ ++++++ you can reach C by going right 'R' from 1,1 L from 1,3 LL from 1,4 U from 2,2 and so on lets assume your ans is UDLRUDLR then for every '.' check if traversing along this path ,you travel to 'C' atleast once answered 26 Jul '16, 00:17 1 accept rate: 0%
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×2,351

question asked: 25 Jul '16, 21:07

question was seen: 539 times

last updated: 26 Jul '16, 00:17