Full threadkuszi·The official contest is over but you can try out here: http://www.spoj.pl/HSPLARCH/problems/HS11CNSM/View on HN