Dynamic Problem ZigZag

TopCoder Question:
http://community.topcoder.com/stat?c=problem_statement&pm=1259&rd=4493