/* * ******************************************************************************************** * AUTHOR : Vijju123 * * Language: C++14 * * Purpose: - * * IDE used: Codechef IDE. * ******************************************************************************************** * Comments will be included in practice problems if it helps ^^ */ #include #include using namespace std; int n; int arr[110][110]; //Returns trace. Takes starting point, and length of square sub-matrix as input int findTrace(int i,int j,int k) { int trace=0,l; for(l=0;l<=k;l++) { trace+=arr[i+l][j+l]; } return trace; } int main() { // your code goes here #ifdef JUDGE freopen("input.txt", "rt", stdin); freopen("output.txt", "wt", stdout); #endif ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); int t; cin>>t; while(t--) { //input int i,j; cin>>n; for(int i=0;i>arr[i][j]; } int k,l,trace=0; for(i=0;i