[C++] Simple Backtracking Solution
```\nint res = 0;\n    \nvoid countScore(vector >& mentors, vector >& students) {\n\tint count = 0;\n\tfor(int i = 0; i<students.size(); i++) {\n\t\tfor(int j =
```\nint res = 0;\n    \nvoid countScore(vector<vector<int> >& mentors, vector<vector<int> >& students) {\n\tint count = 0;\n\tfor(int i = 0; i<students.size(); i++) {\n\t\tfor(int j = 0; j<students[i].size(); j++) {\n\t\t\tif(students[i][j] == mentors[i][j]) count++;\n\t\t}\n\t}\n\tres = max(res, count);\n}\n\nvoid permute(vector<vector<int> >& mentors, vector<vector<int> >& students, int j) {\n\tif(j == mentors.size()-1) {\n\t\tcountScore(mentors, students);\n\t\treturn;\n\t}\n\n\tfor(int i = j; i<mentors.size(); i++) {\n\t\tswap(mentors[j], mentors[i]);\n\t\tpermute(mentors, students, j+1);\n\t\tswap(mentors[j], mentors[i]); //Backtracking\n\t}\n}\nint maxCompatibilitySum(vector<vector<int>>& students, vector<vector<int>>& mentors) {\n\tpermute(mentors, students, 0);\n\treturn res;\n}\n\n
[]