You are viewing a single comment's thread. Return to all comments →
javascript solution
var max = [0,0]; for(var i=0; i<n-1; i++){ for(var j=i+1; j<n; j++){ //check topics var sum = 0; for(var t=0; t<m; t++){ if(topic[i][t]|topic[j][t]){ sum++; } } if(sum > max[0]){ max[0] = sum; max[1] = 1; } else if(sum === max[0]){ max[1]++; } } } console.log(max[0]); console.log(max[1]);
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 →
javascript solution