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.
Sign in to answer questions and track your progress
Sign In