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. dubbo之多版本

    当一个接口实现,出现不兼容升级时,可以用版本号过渡,版本号不同的服务相互间不引用. 可以按照以下的步骤进行版本迁移: 在低压力时间段,先升级一半提供者为新版本 再将所有消费者升级为新版本 然后将剩下的 ...

  2. tp实现多语言支持测试

    用tp框架实现网页多种语言切换 时间:2016-11-11 浏览次数:1120 编辑:youjiejie   网页如何设计多种语言切换,本文用tp框架实现网页多种语言切换方法结合实例形式较为详细的分析 ...

  3. 安卓桌布显示的dip和px

    安卓程序设计界面显示设置图像大小,在layout.xml里面有dip和px选项,dip为 什么 暂时还不知道,或许是设计桌布的设定像素比率,px为像素值: 比如我的手机是 Lenovo K920,屏幕 ...

  4. 【技术累积】【点】【java】【19】访问权限

    java中的四种访问权限 范围如下表 权限 类内 同包 不同包子类 不同包非子类 Public ✔️ ✔️ ✔️ ✔️ 默认(Default) ✔️ ✔️ ️ Protected ✔️ ✔️ ✔️ P ...

  5. EF MySql:Specified key was too long; max key length is 767 bytes解决方案

    [DbConfigurationType(typeof(MySqlEFConfiguration))]//添加特性 public partial class Model1 : DbContext { ...

  6. pycharm,右键执行run unittests in xx.py后,__main__:后的代码没执行

    如图所示:执行py文件后,打印__name__的名是模块名,而非__main__ 查了好久,发现这个问题跟unittest这个类有关系,执行单元测试的py脚本时,不要右键run unittest,在p ...

  7. 【转载】CentOS 安装rz和sz命令 lrzsz

    lrzsz在linux里可代替ftp上传和下载.lrzsz 官网入口:http://freecode.com/projects/lrzsz/ lrzsz是一个unix通信套件提供的X,Y,和ZMode ...

  8. js-2018-11-09 关于Array中的srot()方法和compare()方法

    Array中的srot()方法 sort()方法是用来重排序的方法.在默认情况下,sort()方法按升序排列数组项----即最小的值位于最前面,最大的值排在最后面. 我们看看官方是怎么说的: arra ...

  9. python网络编程系列

    计算机基础 网络基础 套接字 socket模块 TCP协议和UDP协议 struct 模块简介 struct 模块解决 TCP黏包问题 socket 客户端的认证 socketserver模块初识 客 ...

  10. Spring MVC-表单(Form)处理示例(转载实践)

    以下内容翻译自:https://www.tutorialspoint.com/springmvc/springmvc_form_handling.htm 说明:示例基于Spring MVC 4.1.6 ...