You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
559 B

#include <cstdlib>
#include <ctime>
#include <vector>
#include "dummy_lib.hpp"
std::vector<int> generate_random_numbers(int n, int min, int max)
{
std::srand(std::time(nullptr));
std::vector<int> v(n);
for (int i = 0; i < n; ++i)
v[i] = min + std::rand() / ((RAND_MAX + 1u)/max);
return v;
}
int main(int /*argc*/, char* /*argv*/[])
{
std::vector<int> v = generate_random_numbers(10000, 0, 100);
// How many times does the smallest element occurst in the vector?
int r = performance_measuring::compute(v);
(void)r;
return EXIT_SUCCESS;
}