For a = [10, 20, 5, 12], t = [2, 3, 3, 1], the output should be array2(a, t) = 42.
Explanation: The order of the customers is: the 4th person -> the 1st person -> the 2nd person (1-based indexing)
I mean pretty much in a way that it's almost inaccurate