A - Translation

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

codeedoc

Output

YES

Input

abbaba

Output

NO

Input

codecode

Output

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

原文地址:https://www.cnblogs.com/acgoto/p/9141475.html

时间: 2024-10-05 23:24:08

A - Translation的相关文章

Datatypes translation between Oracle and SQL Server

Datatypes translation between Oracle and SQL Server part 1: character, binary strings Datatypes translation is one of the most important things you need to consider when migrate your application from one database to the other. This is an article in t

NAT (Network Address Translation)

NAT Introduction NAT: Provides the translation of private address to public address. ? NAT has many uses, but its primary use is to conserve public IPv4 addresses. It does this by allowing networks to use private IPv4 addresses internally and providi

translation.js

/** * Global Config variables */supportLanguage1 = "en-US";supportLanguage1Alias = encodeURI("English Version"); supportLanguage2 ="zh-CN";supportLanguage2Alias = encodeURI("中文版"); var cookie = new JSCookie(); /** *

神秘的Flash Translation Layer (FTL)

如果仅仅是SSD的使用者,一定不会在意在SSD内部居然还存在一个复杂的软件层Flash Translation Layer(FTL).其实就是这个FTL才是SSD固态硬盘的软件核心技术.正因为有了FTL,NAND Flash才能被当成硬盘来使用:文件系统才可以直接把SSD当成普通块设备来使用.由于FTL是SSD设计厂商最为重要的核心技术,因此,没有一家厂商愿意透露这方面的技术信息,并且也一直没有业内的技术规范.标准存在. FTL的重要程度在于决定了一个SSD的使用寿命.性能和可靠性.一旦FTL出

[学点英语]扎克伯格给女儿的信,translation of zucherber&#39;s letter to her daughter( Chinese version)

A letter to our daughter 扎克伯格写给女儿的信 Mark Zuckerberg·Tuesday, December 1, 2015 Dear Max, 亲爱的玛克斯 Your mother and I don't yet have the words to describe the hope you give us for the future. Your new life is full of promise, and we hope you will be happy

瞎翻译啊 CodeForces 41A - Translation

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

CISCO_CVoice – 005:Translation Rule 和命中法则

1.    TranslationRule : 转换规则用来对入向和出向号码进行转换,用在dial-peer的出口,voice-port的入口,以及voip-incoming (全局配置),如图:dial-peer 出口R1(config)#dial-peer voi 1000 voip R1(config-dial-peer)#translat? translate-outgoing  translation-profile voip-incoming (全局配置)R1(config)#voi

ORA-00980:synonym translation is no longer valid

今天要把测试环境DB的数据更新成最新Production环境的数据,期间发生了一些问题: 1.首先从正式环境exp出想要用户的dmp档 2.drop掉测试环境底下相应用户 3.create测试环境底下相应用户 4.imp 正式环境导出的dmp档 5.在测试环境底下explain plan sql时报:ORA-00980: synonym translation is no longer valid 用以下语句查下失效的synonym select 'drop '        || decode

Linear to physical address translation with support for page attributes

Embodiments of the invention are generally directed to systems, methods, and apparatuses for linear to physical address translation with support for?page attributes. In some embodiments, a system receives an instruction to translate a memory pointer

DKLang Translation Editor

https://yktoo.com/en/software/dklang-traned Features Translation using a dictionary (so-called Translation Repository). Automatic tracking of source and translation mismatches. A difference log is generated when you open a project. This log shows you