You are viewing a single comment's thread. Return to all comments →
If it's not too late.... I shamelessly stole adityangt's C++ and "sharpened" it. Worked first try. Here you go:
static int[] acmTeam(string[] topic) { int count = 1, max = int.MinValue; for(int i=0; i < topic.Length-1; i++){ for(int j = i+1; j < topic.Length; j++){ int temp = 0; for(int k = 0; k < topic[i].Length; k++) if(topic[i][k] == '1' || topic[j][k] == '1') temp++; if (temp > max){ max = temp; count = 1; } else if (temp == max) count++; } } int[] ar = {max, count}; return ar; }
Seems like cookies are disabled on this browser, please enable them to open this website
ACM ICPC Team
You are viewing a single comment's thread. Return to all comments →
If it's not too late.... I shamelessly stole adityangt's C++ and "sharpened" it. Worked first try. Here you go: