Problem Statement
Given a list of intergers , the task is to determine whether the list is a "Palindrome". A list is said to be a "Palindrome" if the elements in the list are the same when read from left to right as well as from right to left. In other words, if the list is reversed and the resulting list is the same as the original list, then the list is a "Palindrome". If the list is a "Palindrome", output "Yes", otherwise output "No".
Input Specification
The first line of the input gives the number of test cases, , test cases follow. Each test case consists of a line. The line contains the elements of the list which seperated by space.
Limits
Memory limits: 32MB.
Time limits: 1 second.
Test Set 1
Sample Case
Test Set 2
Test Set 3
Test Set 4
Output Specification
For each test case, output one line containing Case #x: y
, where is the case number(starting from 1), and is either "Yes" or "No" indicating whether the list is a "Palindrome" or not, respectively.
Sample Input
2
1 2 30 5 4 1
2 4 4 2
Sample Output
Case #1: No
Case #2: Yes
Hint
slice operator
reversed
Comments