Proof of quadratic time (oops)