Cornering at Poles

Time Limit : 3 sec, Memory Limit : 262144 KB

Problem statement is available from here.


Source: ACM International Collegiate Programming Contest , Asia Regional Tokyo, Tokyo, Japan, 2014-10-19
http://icpc.iisf.or.jp/2014-waseda/