That's some typing ability you've got there. Respect. Don't avoid loops. The overhead of a loop is miniscule; it'll never make a difference in codejam. What's more, your compiler can unroll loops if necessary to optimize the target code. Have a look here: http://en.wikipedia.org/wiki/Loop_unwinding
By trying to do this manually, you're just getting in the compiler's way. Instead, try and think about how many operations you're asking your program to do for a given input of size n. Is it n, nlogn, n^2, ...? Don't try and micro-optimize to the level of individual operations. -- 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/msg/google-code/-/7Wf-7cTMnvEJ. For more options, visit https://groups.google.com/groups/opt_out.
