I used same approach and it worked for large dataset. At first glance I can see following differences: long lastPow = Math.floor(lastPowDouble) long dx = ((N-K) /lastPow) - 1 Ls = dx/2 Rs = dx - Ls
If this changes wont help I can post my solution. In general I avoided using doubles and all my division where integral. For calculation of `lastPow` I used bitwise shift and comparison to 1. -- 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/d2294325-5f39-411b-8d9c-433adf0e788b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
