I need help in building my algorithm skills and logical skills almost from scratch. Thanks in advance
On Sunday, August 12, 2012 2:26:29 PM UTC+5:30, rs wrote: > > optimizing the solution a little bit more: > > For N = 9 (3*3*3) = 27 > For N= 12 (3^4) = 81 > For N= 15 (3^5) = 243 > > and generalizing the solution it looks that if we are going to divide the > given N the solution is: 3^(N/3)*3^(N%3). I think we can also prove it. > > I hope it helps u. Could u plz explain...which kind of question are u > looking for mathematical, algorithmic or riddle. As internet is full of all > these problems....being specific will help us to suggest better > > -rspr > http://techie-rs.blogspot.in/ > > > > On Friday, 10 August 2012 16:03:52 UTC+5:30, Sajal Jain wrote: >> >> For the first case, >> you have 9 circles (set S). Break them into two sets s1 and s2 such that >> s1 U s2 = S with |s1| = 4 circles and |s2| = 5 circles. >> For the first set s1, you will come back to the original configuration at >> times 4,8,12,16,*20*,24... multiple of 4. Similarly for set s2 you will >> come back to the original configuration at times 5,10,15*,20*,25.. multiples >> of >> 5. You can infer from this that the answer should be lcm(|s1|,|s2|). >> >> So for a general case, the solution should be the max{lcm of >> (|s1|,|s2|,...)} with s1 U s2 U s3.. =S and intersection is null. >> >> I hope you get the explanation. >> Read Kristofer's solution again once or twice and you will get it surely. >> He also suggests on what shall be done to calculate the answer for a >> general case. >> >> -- >> Cheers, >> Sajal Jain >> >> >> >> On Thu, Aug 9, 2012 at 11:40 PM, Bonethug <[email protected]> wrote: >> >>> Ppl pls look at this question and help me out here, pls!!!! I need a >>> better explanation, didn't get a hang of the answer kristofer wrote! >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Google Code Jam" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msg/google-code/-/IGdhuaqaeM0J. >>> >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> >> -- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msg/google-code/-/w-aZfpcpTJwJ. For more options, visit https://groups.google.com/groups/opt_out.
