Company: Myntra
Difficulty: medium
Tech Club Committee Formation Problem Description A group of students is planning to form a tech club and the club is open for recruitment. They are interviewing students and marking the skills level in Mathematics and Physics of the i-th student as (M, P) respectively. They will be segregating the selected students into committees, and for better efficiency they have a few conditions: * All the members of the committee should have different skill levels in Mathematics. * All the members of the committee should have different skill levels in Physics. * The difference in the skill level for Mathematics and Physics for two students should not be the same. |M1 – M2| should not be equal to |P1 – P2|. You are given an integer N representing the size of a committee and an integer K representing that K * K students are being interviewed. Your task is to return an integer value representing the number of ways in which the committees can be formed. The skill level for K students (K>1) will be (