UVA 401 - Palindromes UVA • Sep 1, 2020 Problem PDFSolution:/*-----------------------------------------------*/ //Problem Name : Palindromes //Uva Problem No: 401 //Type : Ad hoc, Strings, Palindromes. //Author : Shipu Ahamed //University : BUBT //E-mail : [email protected] /*-----------------------------------------------*/ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define ll long long #define sc scanf #define pf printf #define pi 2*acos(0.0) using namespace std; int main() { string s,a,b; char m[3000]; memset(m,NULL,sizeof(m)); m['A']='A'; m['E']='3'; m['H']='H'; m['I']='I'; m['J']='L'; m['L']='J'; m['M']='M'; m['O']='O'; m['S']='2'; m['T']='T'; m['U']='U'; m['V']='V'; m['W']='W'; m['X']='X'; m['Y']='Y'; m['Z']='5'; m['1']='1'; m['2']='S'; m['3']='E'; m['5']='Z'; m['8']='8'; while(cin>>s){ a=b=""; int len=s.size(); for(int i=len-1;i>=0;i--) { a+=s[i]; b+=m[s[i]]; } // cout<https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/401/401.cpp Tags UVA Competitive Programming Shipu Ahamed Recommended for you UVA UVA 913 - Joana and the Odd Numbers 4 years ago • 1 min read UVA UVA 871 - Counting Cells in a Blob 4 years ago • 3 min read UVA UVA 866 - Intersecting Line Segments 4 years ago • 3 min read