Add solution for #11782 Optimal Cut