#include <vector>
#include <iostream>
#include <string>
using namespace std;
template < typename T > ostream & print (const T & start, const T & end)
{
T tmp = start;
for (; tmp != end; ++tmp)
{
cout << *tmp << " "; // LINE I
}
return cout;
}
class A
{
public:
int a;
public:
A (int a):a (a)
{
}
};
ostream & operator<< (ostream & c, const A & o)
{
c << o.a;
return c;
}
int
main ()
{
int tab[] = { 1, 5, 3, 3, 5, 6 };
vector < A > v1 (tab, tab + 6); //LINE II
v1.insert (v1.end (), A (0));
print (v1.begin (), v1.end ()) << endl;
return 0;
}
I2luY2x1ZGUgPHZlY3Rvcj4KCiNpbmNsdWRlIDxpb3N0cmVhbT4KCiNpbmNsdWRlIDxzdHJpbmc+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKdGVtcGxhdGUgPCB0eXBlbmFtZSBUID4gb3N0cmVhbSAmIHByaW50IChjb25zdCBUICYgc3RhcnQsIGNvbnN0IFQgJiBlbmQpCnsKCiAgVCB0bXAgPSBzdGFydDsKCiAgZm9yICg7IHRtcCAhPSBlbmQ7ICsrdG1wKQoKICAgIHsKCiAgICAgICAgY291dCA8PCAqdG1wIDw8ICIgIjsgICAgICAgIC8vIExJTkUgSQoKICAgIH0KCiAgcmV0dXJuIGNvdXQ7Cgp9CgpjbGFzcyBBCnsKCnB1YmxpYzoKCiAgICAgaW50IGE7CgpwdWJsaWM6CgogICAgQSAoaW50IGEpOmEgKGEpCiAgewogIH0KCn07Cgpvc3RyZWFtICYgb3BlcmF0b3I8PCAob3N0cmVhbSAmIGMsIGNvbnN0IEEgJiBvKQp7CgogIGMgPDwgby5hOwoKICByZXR1cm4gYzsKCn0KCmludAptYWluICgpCnsKCiAgaW50IHRhYltdID0geyAxLCA1LCAzLCAzLCA1LCA2IH07CgogIHZlY3RvciA8IEEgPiB2MSAodGFiLCB0YWIgKyA2KTsgICAgLy9MSU5FIElJCgogIHYxLmluc2VydCAodjEuZW5kICgpLCBBICgwKSk7CgogIHByaW50ICh2MS5iZWdpbiAoKSwgdjEuZW5kICgpKSA8PCBlbmRsOwoKICByZXR1cm4gMDsKIAp9Cg==