09/06/27 16:01:45
>>107
眠りながら適当に書いた
#include<iostream>
#include<algorithm>
#include<string>
#include<cctype>
#include<functional>
int main(){
std::string line;
getline(std::cin,line);
std::string tmp = line;
tmp.erase(std::remove_if(tmp.begin(),tmp.end(),std::not1(std::ptr_fun(std::isalpha))),tmp.end());
std::transform(tmp.begin(),tmp.end(),tmp.begin(),std::toupper);
std::cout << (std::equal(tmp.begin(),tmp.end(),tmp.rbegin()) ? "回文です" : "回文じゃないです") << std::endl;
}