Look at this great blog explaining the solutions of qualification round of Hacker Cup. Double Squares: http://itbhu.ac.in/codefest/blog/?p=159...
Separate names with a comma.