import java.io.*; import java.math.*; import java.security.*; import java.text.*; import java.util.*; import java.util.concurrent.*; import java.util.regex.*; public class Solution { static int rowSum[] = new int[n]; static int colsum[] = new int[n]; static int rowDiff[] = new int[n]; static int colDiff[] = new int[n]; static boolean f = false; // Complete the formingMagicSquare function below. static int formingMagicSquare(int[][] s) { int n = s.length; int sum = n*((n*n) +1)/2; f = calcDiff(s); while(!f) { for(int i = 0;i