can someone please tell what it wrong with my code , it is giving output as 0 in all test casses.
the link to the problem is CodeChef: Practical coding for everyone
#include<iostream>
using namespace std;
int main(){
int t;
cin>>t;
while(t--){
int n,m,i,j,p;
int cnt=0;
cin>>n;
cin>>m;
int coll[n][m];
for(i=0;i<n;i++)
for(j=0;j<m;j++)
cin>>coll[i][j];
for(i=0;i<n-1;i++)
for(p=i+1;p<n;p++)
for(j=0;j<m;j++)
{
if(coll[i][j]==1 && coll[p][j]==1)
cnt++;
}
cout<<cnt<<endl;
}
return 0;
}