#include <iostream>
#include <vector>
#include<string>
#include<algorithm>
using namespace std;
struct Compare {
std::string str;
Compare(const std::string& x) : str(x) {
std::sort(str.begin(),str.end()); std::transform(str.begin(),
str.end(),str.begin(), ::toupper);}
bool operator ()(const std::string& t)
{
std::string s= t;
std::transform(s.begin(), s.end(),s.begin(), ::toupper);
std::sort(s.begin(),s.end());
return s == str;
}
};
int main(int argc, char *argv[]) {
std::vector<std::string> words {"Vile","Veil", "Live"};
int count = std::count_if(words.begin(), words.end(), Compare("Evil"));
cout << count << endl;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZTxzdHJpbmc+CiNpbmNsdWRlPGFsZ29yaXRobT4KCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgpzdHJ1Y3QgQ29tcGFyZSB7CnN0ZDo6c3RyaW5nIHN0cjsKQ29tcGFyZShjb25zdCBzdGQ6OnN0cmluZyYgeCkgOiBzdHIoeCkgeyAKICAgIHN0ZDo6c29ydChzdHIuYmVnaW4oKSxzdHIuZW5kKCkpOyBzdGQ6OnRyYW5zZm9ybShzdHIuYmVnaW4oKSwgCiAgICBzdHIuZW5kKCksc3RyLmJlZ2luKCksIDo6dG91cHBlcik7fQoKICAgIGJvb2wgb3BlcmF0b3IgKCkoY29uc3Qgc3RkOjpzdHJpbmcmIHQpCiAgICB7CiAgICAgICAgc3RkOjpzdHJpbmcgcz0gdDsKICAgICAgICBzdGQ6OnRyYW5zZm9ybShzLmJlZ2luKCksIHMuZW5kKCkscy5iZWdpbigpLCA6OnRvdXBwZXIpOwogICAgICAgIHN0ZDo6c29ydChzLmJlZ2luKCkscy5lbmQoKSk7CgogICAgcmV0dXJuIHMgPT0gc3RyOwogICAgfQp9OwoKCgoKaW50IG1haW4oaW50IGFyZ2MsIGNoYXIgKmFyZ3ZbXSkgeyAgCgpzdGQ6OnZlY3RvcjxzdGQ6OnN0cmluZz4gd29yZHMgeyJWaWxlIiwiVmVpbCIsICAiTGl2ZSJ9OwoKaW50IGNvdW50ID0gc3RkOjpjb3VudF9pZih3b3Jkcy5iZWdpbigpLCB3b3Jkcy5lbmQoKSwgQ29tcGFyZSgiRXZpbCIpKTsKCmNvdXQgPDwgY291bnQgPDwgZW5kbDsKfQ==