The Generator Never Repeats

Your solution gets Wrong Answer. You write a stress test against a brute force you trust and leave it running overnight. It completes about 200,000 iterations and reports no mismatch, yet the judge still says WA.

import random

def gen():
    n = random.randint(1000, 2000)
    a = random.sample(range(1, 10**9), n)   # n values from the range
    return n, a

More than one property of this script explains the wasted night: two keep the bug out of the generator's reach, one would leave you stuck even on a mismatch. Select every property that applies.

A

A failing case of 1000 to 2000 elements is too large to read, so even a mismatch would not immediately tell you what is wrong.

B

random.seed is never called, so the run is not reproducible.

C

random.sample draws without replacement, so a never contains a repeated value. Any bug that only appears with duplicates is unreachable.

D

n is never below 1000, so the boundary sizes named in the checklist, n=0n = 0, n=1n = 1, n=2n = 2, are never generated.

E

The values run up to 10910^9, which is large enough to overflow 32-bit arithmetic during the comparison.