codinghangover.wordpress.com
Codeforces #252 (Div.2) C. Valera and Tubes
Problem link: The logic is very simple. Test cases might be misleading. Each tube has to be of length>=2. So first find the points in zig zag path of the table.(i.e move from left to right and …