#include <iostream>
#include <sstream>
#include <vector>
#include <iterator>
#include <algorithm>
int main() {
std::string numbers = "1 2 3.4 5.6e7";
std::istringstream in(numbers);
std::vector<double> result;
std::copy(std::istream_iterator<double>(in), std::istream_iterator<double>(), std::back_inserter(result));
for (auto x : result) {
std::cout << x << std::endl;
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3N0cmVhbT4KI2luY2x1ZGUgPHZlY3Rvcj4KI2luY2x1ZGUgPGl0ZXJhdG9yPgojaW5jbHVkZSA8YWxnb3JpdGhtPgoKaW50IG1haW4oKSB7CiAgICBzdGQ6OnN0cmluZyBudW1iZXJzID0gIjEgMiAzLjQgNS42ZTciOwogICAgc3RkOjppc3RyaW5nc3RyZWFtIGluKG51bWJlcnMpOwogICAgc3RkOjp2ZWN0b3I8ZG91YmxlPiByZXN1bHQ7CiAgICAKICAgIHN0ZDo6Y29weShzdGQ6OmlzdHJlYW1faXRlcmF0b3I8ZG91YmxlPihpbiksIHN0ZDo6aXN0cmVhbV9pdGVyYXRvcjxkb3VibGU+KCksIHN0ZDo6YmFja19pbnNlcnRlcihyZXN1bHQpKTsKICAgIAogICAgZm9yIChhdXRvIHggOiByZXN1bHQpIHsKICAgICAgICBzdGQ6OmNvdXQgPDwgeCA8PCBzdGQ6OmVuZGw7CiAgICB9Cn0=