Description
Solutions
Submission
The Three Knights 🎠
🤘 INTERN

Given a grid with n rows and m columns, count the number of possible placements for three knights on the grid such that no two knights' placements counter each other. Note that no two knights can be placed in the same cell.

It is known that a knight in chess can counter another piece in cell (a2, b2) from the cell (a1, y1) if either (|a1 - a2| = 1 and |b1 - b2| = 2), or (|a1 - a2| = 2 and |b1 - b2| = 1).

Find the number of possible placements for the three knights on the grid such that no two knights can counter each other.

Example 1:

Input:  n = 2, m = 3
Output: 20
Explanation:
There are 20 possible placements for the three knights. (That is all for now) 👉🥹👈
Constraints:
    Unknown myth for now 🦉 (As always, will add once find out)
Thumbnail 0
Testcase

Result
Case 1

input:

output: