BETA
School Problem's Submission isn't counted in score!

Total Submissions: 516 Accuracy:

47.29%

Palindromic Array (Function Problem)
     

Given a Integer array A[] of n elements. Your task is to complete the function PalinArray. Which will return 1 if all the elements of the Array are palindrome otherwise it will return 0.

Input:
The first line of input contains an integer denoting the no of test cases. Then T test cases follow. Each test case contains two lines. The first line of input contains an integer n denoting the size of the arrays. In the second line are N space separated values of the array A[].

Output:
For each test case in a new line print the required result.

Constraints:
1<=T<=50
1<=n<=20
1<=A[]<=10000

Example:
Input:

2
5
111 222 333 444 555
3
121 131 20

Output:
1
0

Explanation:
For First test case.
n=5;
A[0]=111    //which is a palindrome number.
A[1]=222   //which is a palindrome number.
A[2]=333   //which is a palindrome number.
A[3]=444  //which is a palindrome number.
A[4]=555  //which is a palindrome number.
As all numbers are palindrome so This will return 1.

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Saksham Raj Seth


					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.