1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #include <iostream> #include <string> #include <vector> #include <iterator> #include <algorithm> int main() { std::istream_iterator<std::string> begin(std::cin), end; std::vector<std::string> data(begin, end); //printing std::copy(data.begin(), data.end(), std::ostream_iterator<std::string>(std::cout, "\n")); } |
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8aXRlcmF0b3I+CiNpbmNsdWRlIDxhbGdvcml0aG0+CgppbnQgbWFpbigpIAp7IAogICBzdGQ6OmlzdHJlYW1faXRlcmF0b3I8c3RkOjpzdHJpbmc+IGJlZ2luKHN0ZDo6Y2luKSwgZW5kOwogICBzdGQ6OnZlY3RvcjxzdGQ6OnN0cmluZz4gZGF0YShiZWdpbiwgZW5kKTsKCiAgIC8vcHJpbnRpbmcKICAgc3RkOjpjb3B5KGRhdGEuYmVnaW4oKSwgZGF0YS5lbmQoKSwgc3RkOjpvc3RyZWFtX2l0ZXJhdG9yPHN0ZDo6c3RyaW5nPihzdGQ6OmNvdXQsICJcbiIpKTsKfQ==
-
upload with new input
-
result: Success time: 0s memory: 2968 kB returned value: 0
Or you could make use of vector constructor avoiding std::copy altogether
Or you could make use of vector constructor avoiding std::copy altogether


