#include <iostream>
#include <algorithm>
#include <string>
bool endsWith(const std::string& str, const std::string& ending) {
if (ending.size() > str.size()) {
return false;
}
return std::equal(ending.rbegin(), ending.rend(), str.rbegin());
}
int main() {
std::string str = "c c++ java python";
std::string tofind = "python";
std::cout << endsWith(str, tofind) << std::endl;
}
/*
run:
1
*/