A unified implicit algorithm for solving the triple-hierarchical constrained optimization problem