there survey consist n question question answer 0 1 yesthe survey give m student number 0 m 1 m mentor number 0 m 1 the answer student represent 2D integer array student studentsi integer array contain answer ith student 0indexe the answer mentor represent 2D integer array mentor mentorsj integer array contain answer jth mentor 0indexedeach student assign mentor mentor student assign the compatibility score studentmentor pair number answer student mentorfor example student answer 1 0 1 mentor answer 0 0 1 compatibility score 2 second answer sameyou task find optimal studentmentor pairing maximize sum compatibility scoresgiven student mentor return maximum compatibility score sum achieve Example 1input student 110101001 mentor 100001110output 8explanation we assign student mentor follow way student 0 mentor 2 compatibility score 3 student 1 mentor 0 compatibility score 2 student 2 mentor 1 compatibility score 3the compatibility score sum 3 2 3 8example 2input student 000000 mentor 111111output 0explanation the compatibility score studentmentor pair 0 Constraintsm studentslength mentorslengthn studentsilength mentorsjlength1 m n 8studentsik 0 1mentorsjk 0 1