Problem description

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 s from Berlandish into Birlandish as t. Help him: find out if he translated the word correctly.

Input

The first line contains word s, the second line contains word t. 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.

Output

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

Examples

Input

code
edoc

Output

YES

Input

abb
aba

Output

NO

Input

code
code

Output

NO
解题思路:检查第一个字符串反转之后是否和第二个字符串相等,是为"YES",否则为"NO"。
AC代码:
 #include<bits/stdc++.h>
using namespace std;
int main(){
string s,t;
cin>>s>>t;
reverse(s.begin(),s.end());
if(t==s)cout<<"YES"<<endl;
else cout<<"NO"<<endl;
return ;
}

A - Translation的更多相关文章

  1. Introduction to Neural Machine Translation - part 1

    The Noise Channel Model \(p(e)\): the language Model \(p(f|e)\): the translation model where, \(e\): ...

  2. Datatypes translation between Oracle and SQL Server

    Datatypes translation between Oracle and SQL Server part 1: character, binary strings Datatypes tran ...

  3. Network Address Translation(转载)

    Network Address Translation  来源:http://alexanderlaw.blog.hexun.com/9791596_d.html       地址转换用来改变源/目的 ...

  4. [Google Translation API v2 for Java]

    Reference:https://cloud.google.com/translate/docs/reference/libraries#java-resources QuickstartSampl ...

  5. Translation Lookaside Buffer

    COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION In principle, then, e ...

  6. 数据结构与算法课程作业--1014. Translation

    这道题思想很简单,就是用map将foreign的作为键值,english的值作为对应的映射值,然后通过直接用foreign作为map对象的下标直接查找. 本题比较烦人的一点就是输入数据,我使用了get ...

  7. Translation perface: <<Professional JavaScript for Web Developers, 3rd Edition>>

    It is a huge pitty to breaking translating this book. Sincerly speaking, I am striken by this great ...

  8. Windows资源文件里VarFileInfo的Translation(EXE的语言描述信息)

    /* The following line should only be modified for localized versions. */ /* It consists of any numbe ...

  9. Phases of translation

    Phases of translation--翻译阶段 The C++ source file is processed by the compiler as if the following pha ...

  10. 全面学习理解TLB(Translation Look-aside Buffer)地址变换高速缓存

    全面学习理解TLB(Translation Look-aside Buffer)地址变换高速缓存 前言: 本文学习思路是:存在缘由   --> 存在好处 --> 定义性质 --> 具 ...

随机推荐

  1. svn命令行批量删除和批量添加

    svn命令行批量删除和批量添加 如果使用svn的命令行,例如在linux下的终端中使用,svn的添加命令是svn add,删除命令是svn del,但是缺乏批量的操作,如果我在资源管理器中,手动添加了 ...

  2. Eclipse 插件ibeetl

    启动Eclipse 打开菜单栏按一下菜单路径依次打开 Help -> Install New Softwave… ->点击Add按钮弹出一个对话框 弹出的对话框中Name随意填写,如填写“ ...

  3. PAT_A1137#Final Grading

    Source: PAT A1137 Final Grading (25 分) Description: For a student taking the online course "Dat ...

  4. 分布式系列文章 —— 从 ACID 到 CAP / BASE

    转自:https://mp.weixin.qq.com/s?amp;mid=2652037708&__biz=MzI0NDI0MTgyOA%3D%3D&idx=1&chksm= ...

  5. CentOS 7.2 安装Python3.5.2

    系统环境: CentOS 7.2 x86_64 安装相关包 (1)# yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sq ...

  6. StringUtils.isNotBlank 和StringUtils.isNotEmpty 的区别

    StringUtils.isNotBlank判断某字符串是否不为空且长度不为0且不由空白符(whitespace)构成下面是示例:StringUtils.isNotBlank(null) = fals ...

  7. 学习EXTJS6(5)基本功能-进度条组件

    Ext.ProgressBar有二种模式:手动和自动:手动:自己控制显示.进度.更新.清除.自动只需要调用Wait方法即可. 配置项:   配置项 类型 说明 renderTo String 指定页面 ...

  8. UVALive Archive - 6196 - Party Games

    题目: You've been invited to a party. The host wants to divide the guests into 2 teams for party games ...

  9. Column注解的的RetentionPolicy的属性值是RUTIME,这样注解处理器可以通过反射,获取到该注解的属性值,从而去做一些运行时的逻辑处理

    1.Column注解的的RetentionPolicy的属性值是RUTIME,这样注解处理器可以通过反射,获取到该注解的属性值,从而去做一些运行时的逻辑处理 2. 自定义注解: 使用@interfac ...

  10. HDU 4617

    题目多读几次就明白了.主要是求异面直线的距离,然后用距离和两圆半径之和作比较. 空间直线的距离d=|AB*n| / |n| (AB表示异面直线任意2点的连线,n表示法向量,法向量为两条异面直线方向向量 ...