#include <iostream>
#include <algorithm>
#include <vector>
#include <functional>
using namespace std;
int main() {
vector<int> v;
int counter = -3;
generate_n(back_inserter(v), 10 , [&counter] () -> int { return counter++; });
for (int i=0;i!=v.size();i++) cout << v[i] << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8YWxnb3JpdGhtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8ZnVuY3Rpb25hbD4KCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKICAgIHZlY3RvcjxpbnQ+IHY7CiAgICBpbnQgY291bnRlciA9IC0zOwogICAgZ2VuZXJhdGVfbihiYWNrX2luc2VydGVyKHYpLCAxMCAsIFsmY291bnRlcl0gKCkgLT4gaW50IHsgcmV0dXJuIGNvdW50ZXIrKzsgfSk7CiAgICBmb3IgKGludCBpPTA7aSE9di5zaXplKCk7aSsrKSBjb3V0IDw8IHZbaV0gPDwgZW5kbDsKICAgIHJldHVybiAwOwp9