Company: mastercard_1aug
Difficulty: hard
Count Edge-Deleted Subgraphs Let G be the complete undirected graph on N labelled vertices. Delete at least one edge from G . Count how many distinct resulting edge sets have exactly K connected components, and print the count modulo M . Input Three lines contain N , K , and M , respectively. Output Print the required count modulo M . Constraints 1 <= N <= 100 1 <= K <= N 1 <= M <= 1000000000 Examples Input: 3 1 5 Output: 3 Input: 4 3 10 Output: 6 Notes Vertices are labelled, so edge sets that differ only by relabelling are still distinct. When K=1 , the original complete graph is excluded because at least one edge must be deleted.