What is the problem in my code it compiles fine and result is same still one test case fail

import java.util.*;
public class Main {
static int searchElement(int[][] arr , int element) {
int result=0;
for (int i = 0; i < arr.length; i++) {
for (int j = 0; j < arr.length; j++) {
if(arr[i][j]==element) {
result=1;
}

		}
	}
	return result;
	
}
public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int rowsize = sc.nextInt();
	int colsize = sc.nextInt();
	
	int[][] arr = new int[rowsize][colsize];
	for (int row = 0; row < arr.length; row++) {
		for (int col = 0; col < arr.length; col++) {
			arr[row][col] = sc.nextInt();
		}
	}
	
	
	int element = sc.nextInt();
	int result = searchElement(arr, element);
	System.out.println(result);
}

}

@nigamshubham1998,
Input:
1 6
0 3 9 20 37 49
37
Correct Answer:
1
Your Answer:
0

There is a mistake in your input format of the array.