How do I solve question 1 of ZIO 2009. http://www.iarcs.org.in/inoi/2009/zio2009/zio2009-qpaper.pdf
I calculated the first part by counting all permutations but it is time consuming. I’m sure a more elegant solution exists. With my current method calculating parts 2 and 3 are not possible within time limit.
Solution - http://www.iarcs.org.in/inoi/2009/zio2009/zio2009-solutions.pdf