1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #include <string> #include <iostream> // for the demo only std::string concat(std::string const& a) { return a; } template <typename... Items> std::string concat(std::string const& a, std::string const& b, Items&&... args) { return concat(a + b, args...); } int main() { std::cout << concat("0", "1", "2", "3") << "\n"; } |
ICAgICNpbmNsdWRlIDxzdHJpbmc+CiAgICAjaW5jbHVkZSA8aW9zdHJlYW0+IC8vIGZvciB0aGUgZGVtbyBvbmx5CgogICAgc3RkOjpzdHJpbmcgY29uY2F0KHN0ZDo6c3RyaW5nIGNvbnN0JiBhKSB7CiAgICAgIHJldHVybiBhOwogICAgfQoKICAgIHRlbXBsYXRlIDx0eXBlbmFtZS4uLiBJdGVtcz4KICAgIHN0ZDo6c3RyaW5nIGNvbmNhdChzdGQ6OnN0cmluZyBjb25zdCYgYSwgc3RkOjpzdHJpbmcgY29uc3QmIGIsIEl0ZW1zJiYuLi4gYXJncykgewogICAgICByZXR1cm4gY29uY2F0KGEgKyBiLCBhcmdzLi4uKTsKICAgIH0KCiAgICBpbnQgbWFpbigpIHsKICAgICAgc3RkOjpjb3V0IDw8IGNvbmNhdCgiMCIsICIxIiwgIjIiLCAiMyIpIDw8ICJcbiI7CiAgICB9
-
upload with new input
-
result: Success time: 0s memory: 2964 kB returned value: 0
0123


