#include <iostream>
#include <algorithm>
#include <vector>
#include <random>
int main()
{
std::random_device rd;
std::mt19937 rng(rd());
std::uniform_int_distribution<> dist(1,20);
// populatle vector with random number of random numbers
std::vector<int> data;
std::generate_n(std::back_inserter(data), dist(rng), [&](){ return dist(rng);});
for (auto x : data)
std::cout << x << '\n';
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8YWxnb3JpdGhtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8cmFuZG9tPgoKCmludCBtYWluKCkKewogICAgc3RkOjpyYW5kb21fZGV2aWNlIHJkOwogICAgc3RkOjptdDE5OTM3IHJuZyhyZCgpKTsKICAgIHN0ZDo6dW5pZm9ybV9pbnRfZGlzdHJpYnV0aW9uPD4gZGlzdCgxLDIwKTsKICAgIAogICAgLy8gcG9wdWxhdGxlIHZlY3RvciB3aXRoIHJhbmRvbSBudW1iZXIgb2YgcmFuZG9tIG51bWJlcnMKICAgIHN0ZDo6dmVjdG9yPGludD4gZGF0YTsKICAgIHN0ZDo6Z2VuZXJhdGVfbihzdGQ6OmJhY2tfaW5zZXJ0ZXIoZGF0YSksIGRpc3Qocm5nKSwgWyZdKCl7IHJldHVybiBkaXN0KHJuZyk7fSk7CiAgICAKICAgIGZvciAoYXV0byB4IDogZGF0YSkKICAgICAgICBzdGQ6OmNvdXQgPDwgeCA8PCAnXG4nOwogICAgCiAgICByZXR1cm4gMDsKfQ==