Olympiad · Practice · public practice problem
Innovator division (School Level 3)
Computational Engineering
Growth detective
Difficulty 4 of 510 points in 4 partsSuggested time ~20 min (never timed here)
The problem
A collision checker compares every pair of obstacles:
count = 0
for i in range(n):
for j in range(i + 1, n):
count += 1On one laptop, a pair-checking routine takes 0.8 s at n = 2000. A rewrite takes 0.8 s at n = 2000 and 3.7 s at n = 8000.
Part (a) · 3 points
What is
countwhen n = 50?(pure number)Tolerance: exactPart (b) · 2 points
If the original routine is O(n²), predict its time at n = 8000.
sTolerance: ±1 %Part (c) · 3 points
If instead it were O(n log n), predict its time at n = 8000.
sTolerance: ±1 %Part (d) · 2 points
Checked so far: 0 of 10 automatically marked points. Nothing is saved.
Stuck? Hints, then the worked solution
Written with AI assistance. Review status: technically-checked (answers recomputed independently with units verified by automated tests); not yet reviewed by an educator or judge.