#include <cstdarg>
#include <iostream>
#include <vector>
template <typename T>
std::vector<T> initVector (int len, ...)
{
std::vector<T> v;
va_list vl;
va_start(vl, len);
//v.push_back(va_arg(vl, T));
for (int i = 0; i < len; ++i)
v.push_back(va_arg(vl, T));
va_end(vl);
return v;
}
int main ()
{
std::vector<int> v = initVector<int> (7,702,422,631,834,892,104,772);
for(std::vector<int>::const_iterator it = v.begin() ; it != v.end(); ++it)
std::cout << *it << std::endl;
return 0;
}
I2luY2x1ZGUgPGNzdGRhcmc+CiNpbmNsdWRlIDxpb3N0cmVhbT4KI2luY2x1ZGUgPHZlY3Rvcj4KCnRlbXBsYXRlIDx0eXBlbmFtZSBUPgpzdGQ6OnZlY3RvcjxUPiBpbml0VmVjdG9yIChpbnQgbGVuLCAuLi4pCnsKICBzdGQ6OnZlY3RvcjxUPiB2OwogIHZhX2xpc3Qgdmw7CiAgdmFfc3RhcnQodmwsIGxlbik7CiAgLy92LnB1c2hfYmFjayh2YV9hcmcodmwsIFQpKTsKICBmb3IgKGludCBpID0gMDsgaSA8IGxlbjsgKytpKQogICAgdi5wdXNoX2JhY2sodmFfYXJnKHZsLCBUKSk7CiAgdmFfZW5kKHZsKTsKICByZXR1cm4gdjsKfQoKaW50IG1haW4gKCkKewogIHN0ZDo6dmVjdG9yPGludD4gdiA9IGluaXRWZWN0b3I8aW50PiAoNyw3MDIsNDIyLDYzMSw4MzQsODkyLDEwNCw3NzIpOwogIGZvcihzdGQ6OnZlY3RvcjxpbnQ+Ojpjb25zdF9pdGVyYXRvciBpdCA9IHYuYmVnaW4oKSA7IGl0ICE9IHYuZW5kKCk7ICsraXQpCiAgICBzdGQ6OmNvdXQgPDwgKml0IDw8IHN0ZDo6ZW5kbDsKICByZXR1cm4gMDsKfQ==