Company: Infosys_12july
Difficulty: medium
Tranquil Pairs Problem Description In the Gala kingdom, there are two special types of communities: the Tom community (array Tom) and the Jerry community (array Jerry). These communities reside in two rows of equal length N (there are N members as well), with each member of the community assigned a unique position in its row. Mammy Two Shoes wants to stop the disagreement between the two communities. To achieve this, she wants to count the number of tranquil pairs of positions (i, j) (where 0 ≤ i < j < N) such that: The product of the strengths of the two Tom community members at positions i and j is equal to the sum of the strengths of the two Jerry community members at the same positions. Here: Tom array represent the strengths of the Tom community members at positions from i=0 to n-1, respectively. Jerry array represent the strengths levels of the Jerry community members at positions from i=0 to n-1, respectively. Help Mammy Two Shoes count the number of tranquil pairs. Inp