41A - Translation Codeforces || Codeforces 41A - Translation Solution

Problem Name: 41A Translation
Judge: Codeforces
Problem link: 41A Translation



Codeforces 41A - Translation Solution in C++/Cpp

#include <iostream>
#include <string>

using namespace std;

int main()
{
    string s, t;
    cin >> s >> t;
    int length = s.length();
    int count = 0, j = length - 1;
    for (int i = 0; i < length; i++, j--)
    {
        if (s[i] == t[j])
        {
            count++;
        }
        else
        {
            break;
        }
    }
    if (count == length)
    {
        cout << "YES\n";
    }
    else
    {
        cout << "NO\n";
    }
    return 0;
}







Tags: Codeforces 41A - Translation solution in C C++, 41A codeforces solution in C C++, Codeforces 41A solution in C C++, Codeforces Translation solution in C C++, 41A - Translation Codeforces solution in C C++, Codeforces 41A - Translation solution in C C++

Next Post Previous Post
No Comment
Add Comment
comment url