There are many ways you could do this, but simplest would be to use a.shuffle(), then pick a[0] and a[1].
You could also do
int val1, val2;
std::randomize(val1,val2) with {unique {val1,val2}; val1 inside {a}; val2 inside {a};};
There are many ways you could do this, but simplest would be to use a.shuffle(), then pick a[0] and a[1].
You could also do
int val1, val2;
std::randomize(val1,val2) with {unique {val1,val2}; val1 inside {a}; val2 inside {a};};