#include <iostream>
#include <algorithm>
#include <iterator>
#include <cstdlib>
#include <ctime>
using namespace std;
int main()
{
int m[49];
srand(time(nullptr));
generate(begin(m), end(m), [](){ return rand()%30; });
copy(begin(m), end(m), ostream_iterator<decltype(m[0])>(cout, " "));
cout << endl << count(begin(m), end(m), 5);
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8YWxnb3JpdGhtPgojaW5jbHVkZSA8aXRlcmF0b3I+CiNpbmNsdWRlIDxjc3RkbGliPgojaW5jbHVkZSA8Y3RpbWU+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpCnsKICAgIGludCBtWzQ5XTsKICAgIHNyYW5kKHRpbWUobnVsbHB0cikpOwogICAgZ2VuZXJhdGUoYmVnaW4obSksIGVuZChtKSwgW10oKXsgcmV0dXJuIHJhbmQoKSUzMDsgfSk7CgogICAgY29weShiZWdpbihtKSwgZW5kKG0pLCBvc3RyZWFtX2l0ZXJhdG9yPGRlY2x0eXBlKG1bMF0pPihjb3V0LCAiICIpKTsKICAgIGNvdXQgPDwgZW5kbCA8PCBjb3VudChiZWdpbihtKSwgZW5kKG0pLCA1KTsKfQo=