now why is this not able to pass all the test cases?
#include
using namespace std;
int main()
{
int row, col;
cin>>row>>col;
int arr[row][col];
for (int i=0; i<row; i++)
{
for (int j=0; j<col; j++)
{
cin>>arr[i][j];
}
}
int key;
cin>>key;
int x=0;
for (int i=0; i<row; i++)
{
for (int j=0; j<col; j++)
{
if (arr[i][j]==key)
{
x=1;
cout<<1;
break;
}
}
}
if (x=0)
{
cout <<0;
}
return 0;
}