Hey how can i solve this proplem any help please .
Proplem link : http://acm.sgu.ru/problem.php?contest=0&problem=206.