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.

Reply via email to