#include <stdio.h>
#include <string.h>
int isPalindrome(char s[]) {
for (int i=0;i<l/2;i++) {
if (s[i]!=s[l-i-1]) {
return 0; // 回文ではない場合
}
}
return 1; // 回文である場合
}
int main() {
char s[100];
printf("%s -> %d\n", s
, isPalindrome
(s
)); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KCmludCBpc1BhbGluZHJvbWUoY2hhciBzW10pIHsKICAgIGludCBsPXN0cmxlbihzKTsKICAgIGZvciAoaW50IGk9MDtpPGwvMjtpKyspIHsKICAgICAgICBpZiAoc1tpXSE9c1tsLWktMV0pIHsKICAgICAgICAgICAgcmV0dXJuIDA7ICAvLyDlm57mlofjgafjga/jgarjgYTloLTlkIgKICAgICAgICB9CiAgICB9CiAgICByZXR1cm4gMTsgIC8vIOWbnuaWh+OBp+OBguOCi+WgtOWQiAp9CgppbnQgbWFpbigpIHsKICAgIGNoYXIgc1sxMDBdOwogICAgc2NhbmYoIiVzIiwgcyk7CiAgICBwcmludGYoIiVzIC0+ICVkXG4iLCBzLCBpc1BhbGluZHJvbWUocykpOwogICAgcmV0dXJuIDA7Cn0=