Codeforces Beta Round #40 (Div. 2) A. Translation

http://codeforces.com/problemset/problem/41/A

题意:2个单词翻转是否等于另一个。

代码:

1
2
3
4
5
6
7
8
9
10
11
#include <bits/stdc++.h>
using namespace std;

int main() {
string s, t;
cin >> s >> t;
reverse(t.begin(), t.end());
if (s == t) cout << "YES\n";
else cout << "NO\n";
return 0;
};