@@ -0,0 +1,1998 @@
+import java.io.*;%0Aimport java.math.*;%0Aimport java.security.*;%0Aimport java.text.*;%0Aimport java.util.*;%0Aimport java.util.concurrent.*;%0Aimport java.util.regex.*;%0A%0Apublic class Solution %7B%0A%0A    // Complete the acmTeam function below.%0A    static int%5B%5D acmTeam(String%5B%5D topic) %7B%0A        int n = topic.length;%0A        Hashtable%3CInteger,Integer%3E hm = new Hashtable%3CInteger,Integer%3E();%0A        int max = 0;%0A        for(int i=0;i%3Cn;i++)%7B%0A            for(int j=i+1;j%3Cn;j++)%7B%0A                char%5B%5D str1 = topic%5Bi%5D.toCharArray();%0A                char%5B%5D str2 = topic%5Bj%5D.toCharArray();%0A                int count = 0;%0A                for(int k=0;k%3Cstr1.length;k++)%7B%0A                    if(str1%5Bk%5D=='1' %7C%7C str2%5Bk%5D=='1') count++;%0A                %7D%0A                if(count%3Emax) max=count;%0A                if(hm.containsKey(count))%7B%0A                    int m = hm.get(count);%0A                    hm.put(count,++m);%0A                %7D%0A                else %7B%0A                    hm.put(count,1);%0A                %7D%0A            %7D%0A        %7D%0A        int%5B%5D fin = %7Bmax,hm.get(max)%7D;%0A        return fin;%0A    %7D%0A%0A    private static final Scanner scanner = new Scanner(System.in);%0A%0A    public static void main(String%5B%5D args) throws IOException %7B%0A        BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(System.getenv(%22OUTPUT_PATH%22)));%0A%0A        String%5B%5D nm = scanner.nextLine().split(%22 %22);%0A%0A        int n = Integer.parseInt(nm%5B0%5D);%0A%0A        int m = Integer.parseInt(nm%5B1%5D);%0A%0A        String%5B%5D topic = new String%5Bn%5D;%0A%0A        for (int i = 0; i %3C n; i++) %7B%0A            String topicItem = scanner.nextLine();%0A            topic%5Bi%5D = topicItem;%0A        %7D%0A%0A        int%5B%5D result = acmTeam(topic);%0A%0A        for (int i = 0; i %3C result.length; i++) %7B%0A            bufferedWriter.write(String.valueOf(result%5Bi%5D));%0A%0A            if (i != result.length - 1) %7B%0A                bufferedWriter.write(%22%5Cn%22);%0A            %7D%0A        %7D%0A%0A        bufferedWriter.newLine();%0A%0A        bufferedWriter.close();%0A%0A        scanner.close();%0A    %7D%0A%7D%0A

add AcmIcpcTeam.java