title: Counting ways to select numbers from N lists
body: <p>Given N lists which can have numbers between 1 to 100.</p>
  
  <p>I want the numbers of ways to select numbers ,one from each of the different lists without allowing repetition.</p>
  
  <p>Note : Two ways are different if any of the number selected is different.</p>
  
  <p>Example : </p>
  
  <pre><code>List 1 : 5, 100, 1
  List 2 : 2
  List 3 : 5, 100
  List 4 : 2, 5, 100
  </code></pre>
  
  <p>As I want to select 1 number from each,without repetition.</p>
  
  <p>Answer in this case will be : 2 (1,2,5,100 and 1,2,100,5).</p>
  
  <p><strong>My Approach :</strong>  I tried solving it using principle of inclusion and exclusion.But how to find all intersections ?</p>
  
  <p>I was thinking can it be solved using matching while taking lists in 1 set and corresponding mapping numbers in other.?</p>
  
  <p>N can be upto 10 and each of the list can have numbers between 1-100 .</p>
  
  <p>Also each list will have a number only once in it.</p>