variantwrite program that takes as input an array of integers and an integer tand returns -tuple ( [ ] [ ] [ ]where pqr are all distinctminimizing | ( [pa[qa[ ])|and [ < [ < [svariantwrite program that takes as input an array of integers and an integer tand returns the number of -tuples (pqrsuch that [pa[qa[ < and [ < [ < [