title: Multiplication in a range of numbers while ignoring duplicates
body: <p>Given an array and some q range queries .</p>
  
  <p>In a single query i want to print the product the numbers in a range of indexes while ignoring duplicates , indexing start from 1 .</p>
  
  <p>For example provided the numbers are : </p>
  
  <p>8 
  1 3 2 4 1 3 3 1</p>
  
  <p>For a range query from index 1 to 8 : product will be 1*2*3*4 .i.e 24 .
  For a range query from index 6 to 7 : product will be 3 .</p>
  
  <p>Is it possible to answer range queries in log(n) using segment tree or any pre processing or are there any tricks for this using xor or anyother method . </p>