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. Git更新代码

    此次更新,创建新的文件与文件夹,并且删除了原有文件 通过“git status” 命令查看当前变更.通过变更信息可以看出,删除了test_case.py文件.这个删除只是在项目目录下进行删除,Git对 ...

  2. python sqlalthemy 总结

    orm 数据状态的预知识 瞬时状态:刚创建的对象还没有被Session持久化.缓存中不存在这个对象的数据并且数据库中没有这个对象对应的数据为瞬时状态这个时候是没有OID. 持久状态:对象经过Sessi ...

  3. Codeforces Round #406 (Div. 2) 787-D. Legacy

    Rick and his co-workers have made a new radioactive formula and a lot of bad guys are after them. So ...

  4. 【JavaScript框架封装】自己动手封装一个涵盖JQuery基本功能的框架及核心源码分享(单文件版本)

    整个封装过程及阅读JQuery源码的过程基本上持续了一个月吧,最终实现了一个大概30%的JQuery功能的框架版本,但是里面涉及的知识点也是非常多的,总共的代码加上相关的注释大概在3000行左右吧,但 ...

  5. 57.query phase

    主要知识点: query phase步骤 query phase如何提升性能     一.query phase步骤 一次query phase一般包括以下三个步骤     The query pha ...

  6. Java基础之 HelloWorld

    1. Java发展史 参考: https://www.cnblogs.com/guoqingyan/p/5667064.html 2. Java中 JDK, JRE, JVM之间的关系 参考: htt ...

  7. 权值线段树&线段树合并

    权值线段树 所谓权值线段树,就是一种维护值而非下标的线段树,我个人倾向于称呼它为值域线段树. 举个栗子:对于一个给定的数组,普通线段树可以维护某个子数组中数的和,而权值线段树可以维护某个区间内数组元素 ...

  8. BZOJ 1396 识别子串 (后缀自动机、线段树)

    手动博客搬家: 本文发表于20181221 00:58:26, 原地址https://blog.csdn.net/suncongbo/article/details/85150962 嗯,以后博客内容 ...

  9. 【codeforces 793D】Presents in Bankopolis

    [题目链接]:http://codeforces.com/contest/793/problem/D [题意] 给你n个点, 这n个点 从左到右1..n依序排; 然后给你m条有向边; 然后让你从中选出 ...

  10. 洛谷 P2534 [AHOI2012]铁盘整理

    P2534 [AHOI2012]铁盘整理 题目描述 输入输出格式 输入格式: 共两行.第一行为铁盘个数N(1<=N<=50),第二行为N个不同的正整数,分别为从上到下的铁盘的半径R.(1& ...