#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
vector<string> src { "123", "456", "789" };
vector<int> res;
transform(src.begin(), src.end(), back_inserter(res), [](string s) { return stoi(s); });
for (auto& r : res)
cout << r << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8YWxnb3JpdGhtPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkKewoJdmVjdG9yPHN0cmluZz4gc3JjIHsgIjEyMyIsICI0NTYiLCAiNzg5IiB9OwoJdmVjdG9yPGludD4gcmVzOwoJdHJhbnNmb3JtKHNyYy5iZWdpbigpLCBzcmMuZW5kKCksIGJhY2tfaW5zZXJ0ZXIocmVzKSwgW10oc3RyaW5nIHMpIHsgcmV0dXJuIHN0b2kocyk7IH0pOwoJZm9yIChhdXRvJiByIDogcmVzKQoJICAgIGNvdXQgPDwgciA8PCBlbmRsOwoJcmV0dXJuIDA7Cn0=