There’s probably a tutorial regarding my question, if so please point me to it.
I just completed my first successful submission on codechef. Yay me. But when I compare the run time and memory usage to the other submissions, I feel like a bit of a failure.
Can someone please take a look at http://www.codechef.com/viewsolution/4556527 and explain to me why my time and memory figures are so dismal. And perhaps what I might do to improve the situation.
One thought I had, perhaps it has something to do with the language of choice. Is that a factor?