#include <stdio.h>
int isPalindrome(char s[]) {
int i = 0;
int j = 0;
while (s[j] != '\0') {
j++;
}
j--;
while (i < j) {
if (s[i] != s[j]) {
return 0;
}
i++;
j--;
}
return 1;
}
int main() {
char s[100];
printf("%s -> %d\n", s
, isPalindrome
(s
)); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgaXNQYWxpbmRyb21lKGNoYXIgc1tdKSB7CiAgICBpbnQgaSA9IDA7CiAgICBpbnQgaiA9IDA7CiAgICB3aGlsZSAoc1tqXSAhPSAnXDAnKSB7CiAgICAgICAgaisrOwogICAgfQogICAgai0tOyAKICAgIHdoaWxlIChpIDwgaikgewogICAgICAgIGlmIChzW2ldICE9IHNbal0pIHsKICAgICAgICAgICAgcmV0dXJuIDA7ICAKICAgICAgICB9CiAgICAgICAgaSsrOwogICAgICAgIGotLTsKICAgIH0KICAgIHJldHVybiAxOyAKfQoKaW50IG1haW4oKSB7CiAgICBjaGFyIHNbMTAwXTsKICAgIHNjYW5mKCIlcyIsIHMpOwogICAgcHJpbnRmKCIlcyAtPiAlZFxuIiwgcywgaXNQYWxpbmRyb21lKHMpKTsKICAgIHJldHVybiAwOwp9