O(n^3)

Contests