*** MOVED ***

NOTE: I have merged the contents of this blog with my web-site. I will not be updating this blog any more.



Yet another miserable performance from yours truly. The first problem was to find out the task finally left from a set of tasks after the n-th task (assuming the list is circular) is removed and the process repeatedly applied till there is only one left. I took too much time on this one, all because of a rather silly off-by-one error. The second problem was to find the n-th smallest Hamming number given a set of factors. If X1,..,Xn are the given factors, a Hamming number is X1^P1 * ... * Xn^Pn, where Pi >= 0. For example, for 2 and 3, the Hamming numbers are 1,2,3,4,6,8,9,.... My brute-force solution was too slow and timed out for large values. I could not finish this one before the deadline and thus could not attempt the third problem.

Naturally, my rating fell yet again, but the good thing is that I'm back in Division 2 where I should at least get easier problems.

(Originally posted on Advogato.)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.