Where is the problem in my code?

my code compile fine but none of the test cases run…
please find the problem in my code and tell me

@Amre-8800,

Can you please share your code?

@Amre-8800,

https://ide.codingblocks.com/s/227156 corrected code.

You have to take separate inputs of array size for each test case. You had taken the same input, that’s why the error.

			int n = sc.nextInt();
			int[] arr = new int[n];

The above lines should be inside the while loop in the main method.