CF41A.Translation

入门

通过率:0%

时间限制:1.00s

内存限制:256MB

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

The translation from the Berland language into the Birland language is not an easy task. Those languages are very similar: a Berlandish word differs from a Birlandish word with the same meaning a little: it is spelled (and pronounced) reversely. For example, a Berlandish word code corresponds to a Birlandish word edoc. However, making a mistake during the "translation" is easy. Vasya translated the word s from Berlandish into Birlandish as t. Help him: find out if he translated the word correctly.

从贝尔兰语翻译成比尔兰语并不是一件容易的事。这两种语言非常相似:具有相同含义的贝尔兰语单词与比尔兰语单词仅有细微差别——其拼写(及发音)是彼此的反转。例如,贝尔兰语单词 code 对应的比尔兰语单词为 edoc。然而,在进行这种“翻译”时很容易出错。瓦夏将贝尔兰语单词 ss 翻译成了比尔兰语单词 tt。请帮助他判断:该翻译是否正确?

输入格式

The first line contains word s, the second line contains word t. The words consist of lowercase Latin letters. The input data do not contain unnecessary spaces. The words are not empty and their lengths do not exceed 100 symbols.

第一行包含字符串 ss,第二行包含字符串 tt。字符串由小写拉丁字母组成。输入数据中不含多余的空格。字符串非空,且长度均不超过 100 个字符。

输出格式

If the word t is a word s, written reversely, print YES, otherwise print NO.

如果单词 tt 是单词 ss 的逆序,则输出 YES,否则输出 NO。

输入输出样例

  • 输入#1

    code
    edoc

    输出#1

    YES
  • 输入#2

    abb
    aba

    输出#2

    NO
  • 输入#3

    code
    code

    输出#3

    NO

输入解题思路,AI测评打分。不知道怎么写?

首页