-
Notifications
You must be signed in to change notification settings - Fork 0
/
41A - Translation.cpp
58 lines (56 loc) · 1.51 KB
/
41A - Translation.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include<bits/stdc++.h>
#define nl '\n'
#define _time_ clock_t tStart = clock();
#define _show_ printf("Time taken: %.6fs\n", (double)(clock() - tStart)/CLOCKS_PER_SEC);
#define ll long long int
#define loop(i,a,b) for(int i=a;i<b;++i)
#define count_1(n) __builtin_popcountll(n)
#define pb push_back
#define F first
#define S second
#define mp make_pair
#define clr(x) x.clear()
#define MOD 1000000007
#define itoc(c) ((char)(((int)'0')+c))
#define vi vector<int>
#define pll pair<ll,ll>
#define pii pair<int,int>
#define all(p) p.begin(),p.end()
#define mid(s,e) (s+(e-s)/2)
#define tcase() ll t; scanf("%lld",&t); while(t--)
#define iscn(num) scanf("%d",&num);
using namespace std;
void FAST_IO();
int main()
{
FAST_IO();
// _time_
string w1,w2;
cin>>w1>>w2;
bool flag=1;
int n=min(w1.size(),w2.size());
for(int i=0;i<n;i++){
if(w1[i]==w2[n-i-1])
continue;
flag=0;
break;
}
if(flag)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
// _show_
return 0;
}
void FAST_IO()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
//cout.setf(ios::fixed);
//cout.precision(20);
#ifndef _offline
freopen("input.txt", "r", stdin);
//freopen("output.txt", "w", stdout);
#endif
}