O(n^2) search algorithm, too slow, last sample TLE