This is wrong because of the last empty cell in the first column will never
get filled as there is no 0 surrounding it.

--
Mohamed Sayed Ghoneim


On Sun, Apr 13, 2014 at 8:18 AM, Dhruva Sagar <[email protected]>wrote:

> I get the following :
> *****
> ....*
> c...*
> ....*
> .****
>
>
> On Sun, Apr 13, 2014 at 11:07 AM, Mohamed Ghoneim 
> <[email protected]>wrote:
>
>> What will you output for 5 5 12 ?
>>
>> --
>> Mohamed Sayed Ghoneim
>>
>>
>> On Sun, Apr 13, 2014 at 7:32 AM, Dhruva Sagar <[email protected]>wrote:
>>
>>> The problem does not state anything about placing the mines so I assumed
>>> we are free to choose that to try and get the optimal result.
>>>
>>> I decided to go with a spiral algorithm to place the mines until M mines
>>> are placed, from there I went ahead to calculate the weights for each of
>>> the remaining cells based on how many neighbors have mines and I selected
>>> the first mine with weight 0 as 'c' if present, if not then the answer
>>> would be impossible.
>>>
>>> However my answer seems to be rejected so if someone would be kind
>>> enough to throw some light on what I might be doing wrong it would be great!
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Google Code Jam" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>>
>>> To post to this group, send email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/google-code/898c6f4b-1dca-499c-9af4-78126f3fe5f0%40googlegroups.com
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Google Code Jam" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/google-code/u8Zlclt-W6k/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>>
>> To post to this group, send email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/google-code/CAGihN_kNuj3QfgXG9N4mxyXWgngr%2BrV3tkneHgJinq86D3L-Kg%40mail.gmail.com<https://groups.google.com/d/msgid/google-code/CAGihN_kNuj3QfgXG9N4mxyXWgngr%2BrV3tkneHgJinq86D3L-Kg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Thanks & Regards,
> Dhruva Sagar <http://dhruvasagar.net>
>
>    - g-talk : [email protected]
>    - y! : [email protected]
>    - github : github.com/dhruvasagar
>    - work : dhruva.sagar@ac 
> <[email protected]>tivesphere.com<[email protected]>
>
> ----------------------------
> Senior Ruby/Rails/Node.js Consultant
> ActiveSphere <http://www.activesphere.com/>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Code Jam" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-code/CAAJXOCCN4B_2b1Pa1%2B8fLS5E0L%2BG0hoW3KrY-HGtXrY%3Dm4AzRw%40mail.gmail.com<https://groups.google.com/d/msgid/google-code/CAAJXOCCN4B_2b1Pa1%2B8fLS5E0L%2BG0hoW3KrY-HGtXrY%3Dm4AzRw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/CAGihN_njrX__VDiJ7y3OTBSmSce%3DPzs5AK0ee_9n9nL36vOc4g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to