#include <algorithm>
#include <fstream>
#include <string>
#include <vector>

void ReadWords(const std::string& filename)
{
    std::ifstream f { filename };
    std::vector<std::string> words;
    std::copy(std::istream_iterator<std::string> { f }, {}, std::back_inserter(words));
    f.close();
}