Codeforces : 41A

Problem Id: 41A

#Source Code


 

#include <stdio.h>
#include<string.h>
int main()
{
char n[20],m[20],c=0,temp;
scanf(“%s”,n);int i,j,l2;
int l=strlen(n);
scanf(“%s”,m);l2=strlen(m);
for(i=0,j=(l-1);i<l/2;i++,j–)
{
temp=n[i];
n[i]=n[j];
n[j]=temp;

}
if(l==l2){
for(i=0;i<l;i++)
{
if(m[i]==n[i])
c++;
}
if(c==l)
printf(“YES\n”);
else
printf(“NO\n”);c=0;
}
else
printf(“NO\n”);c=0;
}

Advertisements

About waprogramming

I am in CSE,from CUET
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s