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).
This problem can only be submitted at Cogniterra.
Public sample 1
Public samples
Input
3 3
Expected output
6