Here is an algorithm, assuming that you have a method rand(i) to generate a random integer in [1...i] with equal probability. First, generate the first ...
確定! 回上一頁