You are given a bipartite graph G=(U,V,E), and an integer K. U and V are the two bipartitions of the graph such that |U| = |V| = N , and E is the edge set. The vertices of U are {1,2,...,N } and that of V are {N+1,N+2,...,2N }. You need to find out whether the total number of different perfect matchings in G is strictly greater than K or not. Recall that a perfect matching is a subset of E such that every vertex of the graph belongs to exactly one edge in the subset. Two perfect matchings are considered to be different even if one edge is different. Write a program in C++ programming language that prints a single line containing “Perfect” if the number of perfect matchings is greater than K, and “Not perfect” in other cases.Sample Input:3 5 21 42 62 53 53 5Output:Not Perfect
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here