#include <iostream>
#include <sstream>
#include <string>
#include <vector>
std::vector<std::string> SplitWords(std::string s)
{
std::istringstream iss (s);
std::vector<std::string> v;
while(iss >> s)
{
v.push_back(s);
}
return v;
}
int main()
{
std::vector<std::string> v {SplitWords("This is a much simpler and more proper version.")};
for(auto const&s : v)
{
std::cout << s << std::endl;
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3N0cmVhbT4KI2luY2x1ZGUgPHN0cmluZz4KI2luY2x1ZGUgPHZlY3Rvcj4KCnN0ZDo6dmVjdG9yPHN0ZDo6c3RyaW5nPiBTcGxpdFdvcmRzKHN0ZDo6c3RyaW5nIHMpCnsKICAgIHN0ZDo6aXN0cmluZ3N0cmVhbSBpc3MgKHMpOwogICAgc3RkOjp2ZWN0b3I8c3RkOjpzdHJpbmc+IHY7CiAgICB3aGlsZShpc3MgPj4gcykKICAgIHsKICAgICAgICB2LnB1c2hfYmFjayhzKTsKICAgIH0KICAgIHJldHVybiB2Owp9CgppbnQgbWFpbigpCnsKICAgIHN0ZDo6dmVjdG9yPHN0ZDo6c3RyaW5nPiB2IHtTcGxpdFdvcmRzKCJUaGlzIGlzIGEgbXVjaCBzaW1wbGVyIGFuZCBtb3JlIHByb3BlciB2ZXJzaW9uLiIpfTsKICAgIGZvcihhdXRvIGNvbnN0JnMgOiB2KQogICAgewogICAgICAgIHN0ZDo6Y291dCA8PCBzIDw8IHN0ZDo6ZW5kbDsKICAgIH0KfQ==