Help in Problem 7E , defining macro , of codeforces beta round.
Can anyone who solved problem 7E share his ideas , how to solve it.
http://codeforces.com/contest/7/problem/E