| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 9015 | Palindrome |
|
| 10769 | Two-dimensional array rotation |
|
| 12898 | Enola |
|
Description
Palindrome is a string that is identical to its reverse, like "level" or "aba". Check whether a given string is a palindrome or not.
Input
The input consists of multiple lines. Each line contains a string. The length of each string is less than 100000. The number of test case is less than 1000.
Output
For each test case, output "Yes" if it's a palindrome or "No" if it's not a palindrome in a line.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Given an NxN two-dimensional array M, you are asked to rotate M clockwise by 45 degrees and print out the content of M.
Consider the following 2D array:

After being rotated 45 degrees clockwise, it will become:

In this case, you should print:
1
4 2
7 5 3
8 6
9
Input
The first line has N (2<=N<=20), which means the size of the 2D array. The total number of elements in the 2D array is thus N x N.
For the next N lines, each contains N integers, specifying the elements of the 2D array. All of the integers in the same line are separated by a space.
Output
Print out all elements of the rotated 2D array row-by-row.
All of the integers in the same line are separated by a space, and there is a '\n' at the end of each line.
Sample Input Download
Sample Output Download
Tags
Discuss
Description

Enola's mom leaves Enola a secrete encrypted message! The message seems to be a nonsense combination of lower case alphabets. However, clever Enola soon finds out that the message can be decrypted into a meaningful vocabulary by rearranging the positions of the alphabets. Enola comes up with a vocabulary, can you tell her whether the message can be decrypted into her vocabulary?
Input
The input consists of multiple test case, terminated with EOF (end of file).
On the first line of the test case are two integers n and m, being the length of the encrypted message and the length of a vocabulary.
On the next line are two strings a and b, being the encrypted message and a vocabulary.
-
1 <= n, m <= 1000
-
a, b only contains lower case alphabets (i.e. a-z).
Output
For each test case, if a can be decrypted into b by rearranging the positions of alphabets, print "YES" in one line, otherwise print "NO".