SP15851 PSERVICE - Permutations

Description

A website provides its users with a variety of services. There are a total of **K** services available on that website. At present there are **M** users/clients registered to the website. Now each client of this service provider firm is to be allocated a project by the website which makes use of a string **A1,A2,A3.............An** of **N** services all of which the website is providing. The order in which the services are executed **matters** (compiling and then linking is different from linking and then compiling). Also, in a particular project, the same services cannot be executed twice in succession. For example, compiling → linking → compiling is allowed, but linking → linking → compiling is not allowed because 'linking' comes twice in succession. All the M clients will start working at the same time and the time taken for the execution of all services is equal. At a time, one service can be accessed by only one client as there is only one server. For eg. If there are 3 clients with projects – **A1,A2...An** ; **B1,B2....Bn** and **C1,C2....Cn** , then **Ai**, **Bi**, **Ci** are pairwise distinct for 1

Input Format

N/A

Output Format

N/A