#include <algorithm>
#include <iostream>
#include <iterator>
using namespace std;
int main()
{
int Array[] = {3,6,9,5,10,21,3,25,14,12,32,41,3,24,15,26,7,8,11,4};
int *overwrite_start = remove_if(std::begin(Array), std::end(Array), [](int n){ return n>9; });
fill(overwrite_start, std::end(Array), -1);
copy(std::begin(Array), std::end(Array), ostream_iterator<int>(cout, " "));
}
I2luY2x1ZGUgPGFsZ29yaXRobT4KI2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8aXRlcmF0b3I+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpCnsKICAgIGludCBBcnJheVtdID0gezMsNiw5LDUsMTAsMjEsMywyNSwxNCwxMiwzMiw0MSwzLDI0LDE1LDI2LDcsOCwxMSw0fTsKICAgIGludCAqb3ZlcndyaXRlX3N0YXJ0ID0gcmVtb3ZlX2lmKHN0ZDo6YmVnaW4oQXJyYXkpLCBzdGQ6OmVuZChBcnJheSksIFtdKGludCBuKXsgcmV0dXJuIG4+OTsgfSk7CiAgICBmaWxsKG92ZXJ3cml0ZV9zdGFydCwgc3RkOjplbmQoQXJyYXkpLCAtMSk7CiAgICBjb3B5KHN0ZDo6YmVnaW4oQXJyYXkpLCBzdGQ6OmVuZChBcnJheSksIG9zdHJlYW1faXRlcmF0b3I8aW50Pihjb3V0LCAiICIpKTsKfQ==