Problems with tag O(n^2 * n!)