CF41A Translation(洛谷水题记)

35 篇文章 0 订阅
3 篇文章 0 订阅

题目描述

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, it's easy to make a mistake during the «translation». Vasya translated word ss from Berlandish into Birlandish as tt . Help him: find out if he translated the word correctly.

输入格式

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

输出格式

If the word tt is a word ss , written reversely, print YES, otherwise print NO.

题意翻译

题面描述

Berland 和 Birland 两地均有各自的语言,Berlandish 和 Birlandish。V 是一个翻译员,负责将 Berlandish 翻译成 Birlandish。将 Berlandish 翻译成 Birlandish 其实非常简单,只需把这个单词倒过来。比如单词code翻译过来就是edoc。但是粗心的 V 还是会犯一些错误。现在请你帮她判断一下他翻译的是否正确。

输入格式

两行,分别是一个 Berlandish 单词和 V 翻译的 Birlandish 单词。单词中所有字母均为小写拉丁字母(其实就是英文字母);单词长度均不超过 100100 字符,单词中不包含任何多余空格。

输出格式

一行,如果 V 的翻译是正确的,输出YES。否则输出NO

输入输出样例

输入 #1

code
edoc

输出 #1

YES

输入 #2

abb
aba

输出 #2

NO

输入 #3

code
code

输出 #3

NO

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值