Max Compatibility Score

Given two matrices of equal dimensions representing student answers and mentor answers, find the maximum sum of compatibility scores by bijectively matching each student to a mentor. The compatibility score between a student and a mentor is the number of matching entries.

Examples
Input: [[[1,1,0],[1,0,1],[0,0,1]],[[1,0,0],[0,0,1],[1,1,0]]]
Output: 8
Hints

Max Compatibility Score

Given two matrices of equal dimensions representing student answers and mentor answers, find the maximum sum of compatibility scores by bijectively matching each student to a mentor. The compatibility score between a student and a mentor is the number of matching entries.