Generation of Combinatorial Objects · ILP solvers (Optional)
Lesson 4
Programming problem.
Write a program that reads integers \(2 \le n,m \le 11\) and outputs the maximum number of diagonals that can be placed on an \(n \times m\) grid so that no two of them share any points (remember this puzzle).
Public samples
Input
3 3
Expected output
6