#include <stdio.h>
#include <string.h> // strlen を使うために必要
int isPalindrome(char s[]) {
int i, j;
// 文字列の長さを取得
// 回文チェック
for (i = 0; i <= j / 2; i++) {
if (s[i] != s[j - i]) {
return 0; // 回文でない
}
}
return 1; // 回文である
}
int main() {
char s[100];
printf("%s -> %d\n", s
, isPalindrome
(s
)); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4gLy8gc3RybGVuIOOCkuS9v+OBhuOBn+OCgeOBq+W/heimgQoKaW50IGlzUGFsaW5kcm9tZShjaGFyIHNbXSkgewogICAgaW50IGksIGo7CgogICAgLy8g5paH5a2X5YiX44Gu6ZW344GV44KS5Y+W5b6XCiAgICBqID0gc3RybGVuKHMpIC0gMTsKCiAgICAvLyDlm57mlofjg4Hjgqfjg4Pjgq8KICAgIGZvciAoaSA9IDA7IGkgPD0gaiAvIDI7IGkrKykgewogICAgICAgIGlmIChzW2ldICE9IHNbaiAtIGldKSB7CiAgICAgICAgICAgIHJldHVybiAwOyAvLyDlm57mlofjgafjgarjgYQKICAgICAgICB9CiAgICB9CgogICAgcmV0dXJuIDE7IC8vIOWbnuaWh+OBp+OBguOCiwp9CgppbnQgbWFpbigpIHsKICAgIGNoYXIgc1sxMDBdOwogICAgc2NhbmYoIiVzIiwgcyk7CiAgICBwcmludGYoIiVzIC0+ICVkXG4iLCBzLCBpc1BhbGluZHJvbWUocykpOwogICAgcmV0dXJuIDA7Cn0K