Hi,
I was thinking of writing constraint in an efficient manner, but could not get one .
Problem statement is -
I have a q type , suppose input_array[int][$] . This is initialised for some values like
input_array[50][0] = 30 , input_array[50][1] = 25 , input_array[27][0] = 10 , input_array[27][1] = 11
I want to randomize another array output_array[int] such that —
- output_array first index should take every value of input_array first index .
- output_array[50].size = 2 * input_array[50].size … for every first index .
- fill values in output_array[50] such that every value of input_array[50] occurs 2 times in any order . …for every first index.