# include <stdio.h>
# include <ctype.h>
int isPalindrome(char s[]){
int i=0, count=0;
char copy[100],dec[100];
while(s[i] != '\0'){
i++;
}
copy[i] = '\0';
count = i;
for(i=0; i<count; i--){
dec[i] = copy[count - i - 1];
}
dec[count] = '\0';
for(i=0; i<count; i++){
if(copy[i] != dec[i])return 0;
}
return 1;
}
int main(){
char s[100];
printf("%s -> %d\n",s
,isPalindrome
(s
)); return 0;
}
IyBpbmNsdWRlIDxzdGRpby5oPgojIGluY2x1ZGUgPGN0eXBlLmg+CgppbnQgaXNQYWxpbmRyb21lKGNoYXIgc1tdKXsKICAgIGludCBpPTAsIGNvdW50PTA7CiAgICBjaGFyIGNvcHlbMTAwXSxkZWNbMTAwXTsKCXdoaWxlKHNbaV0gIT0gJ1wwJyl7CiAgICAgICAgY29weVtpXSA9IHRvbG93ZXIoc1tpXSk7CiAgICAgICAgaSsrOwogICAgfQogICAgY29weVtpXSA9ICdcMCc7CiAgICBjb3VudCA9IGk7CiAgICBmb3IoaT0wOyBpPGNvdW50OyBpLS0pewogICAgICAgIGRlY1tpXSA9IGNvcHlbY291bnQgLSBpIC0gMV07CiAgICB9CiAgICBkZWNbY291bnRdID0gJ1wwJzsKICAgIGZvcihpPTA7IGk8Y291bnQ7IGkrKyl7CiAgICAgICAgaWYoY29weVtpXSAhPSBkZWNbaV0pcmV0dXJuIDA7CiAgICB9CiAgICByZXR1cm4gMTsKfQppbnQgbWFpbigpewogICAgY2hhciBzWzEwMF07CiAgICBzY2FuZigiJXMiLHMpOwogICAgcHJpbnRmKCIlcyAtPiAlZFxuIixzLGlzUGFsaW5kcm9tZShzKSk7CiAgICByZXR1cm4gMDsKfQ==