package leetcode;

/**
 * https://leetcode.com/problems/maximum-compatibility-score-sum/
 */
public class Problem1947 {
    public int maxCompatibilitySum(int[][] students, int[][] mentors) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem1947 prob = new Problem1947();
        System.out.println(prob.maxCompatibilitySum(new int[][]{
            {1,1,0},{1,0,1},{0,0,1}
        }, new int[][]{
            {1,0,0},{0,0,1},{1,1,0}
        })); // 8
        System.out.println(prob.maxCompatibilitySum(new int[][]{
            {0,0},{0,0},{0,0}
        }, new int[][]{
            {1,1},{1,1},{1,1}
        })); // 0
    }
}

@@ -197,32 +197,494 @@
     
-// TODO%0A        return 0
+int%5B%5D studentArray = toArray(students);%0A        int%5B%5D mentorArray = toArray(mentors);%0A        return 0;%0A    %7D%0A%0A    private static int%5B%5D toArray(int%5B%5D%5B%5D twoDArray) %7B%0A        int%5B%5D array = new int%5BtwoDArray.length%5D;%0A        for (int i = 0; i %3C twoDArray.length; i++) %7B%0A            StringBuilder sb = new StringBuilder();%0A            for (int j : array) %7B%0A                sb.append(j);%0A            %7D%0A            array%5Bi%5D = Integer.parseInt(sb.toString(), 2);%0A        %7D%0A        return array
 ;%0A  
@@ -958,16 +958,18 @@
 ); // 8%0A
+//
         
@@ -1017,32 +1017,34 @@
 um(new int%5B%5D%5B%5D%7B%0A
+//
             %7B0,0
@@ -1053,24 +1053,26 @@
 %7B0,0%7D,%7B0,0%7D%0A
+//
         %7D, n
@@ -1075,32 +1075,34 @@
 %7D, new int%5B%5D%5B%5D%7B%0A
+//
             %7B1,1
@@ -1111,24 +1111,26 @@
 %7B1,1%7D,%7B1,1%7D%0A
+//
         %7D));

Update problem 1947