1753 - Numbersrebmun 1753 - Numbersrebmun 1753 - Numbersrebmun

Estatísticas Env: 1087 | AC: 509 | %AC: 46,83 | Pontoação: 0,40
Criado por 2007 Waterloo Local Contest - Ondřej Lhotak
Adicionado por ymondelo20 (2012-03-20)
Límiteis
Tempo Total: 2000 MS |Memória: 62 MB | Saída límite (mb): 64 MB | Tamanho: 29 KB
Lenguagens activados
Disponivel em

Descripção

Anna and Bob are starting up a new high-tech company. Of course, one of their key considerations is choosing a good name for the company. Palindromes are cool (A palindrome is a word that is the same when reversed, like the names of our two entrepreneurs). They would really the name of their company to be a palindrome. Unfortunately, they cannot think of a nifty company name that is also a palindrome.

Maybe at least the telephone number of their company could be a palindrome. However, they really want their customers to be able to call them, so they want to choose the company name so that, when it is typed using the letters printed on a phone keypad, the result is also their phone number.

On a standard phone keypad, the following keys contain the corresponding letters:


2: ABC, 3: DEF, 4: GHI, 5: JKL, 6: MNO, 7: PQRS, 8: TUV, 9: WXYZ.

;jsessionid=A8333ECA0B72A3CA93BF989BE5CBAEDE
Anna and Bob are starting up a new high-tech company. Of course, one of their key considerations is choosing a good name for the company. Palindromes are cool (A palindrome is a word that is the same when reversed, like the names of our two entrepreneurs). They would really the name of their company to be a palindrome. Unfortunately, they cannot think of a nifty company name that is also a palindrome.

Maybe at least the telephone number of their company could be a palindrome. However, they really want their customers to be able to call them, so they want to choose the company name so that, when it is typed using the letters printed on a phone keypad, the result is also their phone number.

On a standard phone keypad, the following keys contain the corresponding letters:


2: ABC, 3: DEF, 4: GHI, 5: JKL, 6: MNO, 7: PQRS, 8: TUV, 9: WXYZ.

;jsessionid=A8333ECA0B72A3CA93BF989BE5CBAEDE
Anna and Bob are starting up a new high-tech company. Of course, one of their key considerations is choosing a good name for the company. Palindromes are cool (A palindrome is a word that is the same when reversed, like the names of our two entrepreneurs). They would really the name of their company to be a palindrome. Unfortunately, they cannot think of a nifty company name that is also a palindrome.

Maybe at least the telephone number of their company could be a palindrome. However, they really want their customers to be able to call them, so they want to choose the company name so that, when it is typed using the letters printed on a phone keypad, the result is also their phone number.

On a standard phone keypad, the following keys contain the corresponding letters:


2: ABC, 3: DEF, 4: GHI, 5: JKL, 6: MNO, 7: PQRS, 8: TUV, 9: WXYZ.

;jsessionid=A8333ECA0B72A3CA93BF989BE5CBAEDE

Especificação de entrada

The first line of input contains a single integer, the number of lines to follow. Each following line contains a company name, which is a string of at most 20 letters, which may be either uppercase or lowercase.
;jsessionid=A8333ECA0B72A3CA93BF989BE5CBAEDE
The first line of input contains a single integer, the number of lines to follow. Each following line contains a company name, which is a string of at most 20 letters, which may be either uppercase or lowercase.
;jsessionid=A8333ECA0B72A3CA93BF989BE5CBAEDE
The first line of input contains a single integer, the number of lines to follow. Each following line contains a company name, which is a string of at most 20 letters, which may be either uppercase or lowercase.
;jsessionid=A8333ECA0B72A3CA93BF989BE5CBAEDE

Especificação de saída

For each company name, print a single line of output, containing the word YES if the phone number is a palindrome, or NO if it is not.
For each company name, print a single line of output, containing the word YES if the phone number is a palindrome, or NO if it is not.
The first line of input contains a single integer, the number of lines to follow. Each following line contains a company name, which is a string of at most 20 letters, which may be either uppercase or lowercase.
;jsessionid=A8333ECA0B72A3CA93BF989BE5CBAEDE

Exemplo de entrada

2
ANBOBNA
iAmACoolCompany

Exemplo de saída

YES
NO

Sugestões(s)

http://coj.uci.cu/24h/
http://coj.uci.cu/24h/
http://coj.uci.cu/24h/

Recomendação

Temos seleccionado cuidadosamente varios problemas similares: 3376 | 2769 | 1873 | 2441 | 2534 | 2141