#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>

double wtime();
int getrand(int min, int max);
void fill_rand(int *arr, int n);

int main(void){
    int sn = 50000;
    int en = 1000000;
    int step = 50000;    
    srand(123);

    FILE *f = fopen("res.dat", "w");


}


double wtime() {
    struct timeval t;
    gettimeofday(&t, NULL);
    return (double)t.tv_sec + (double)t.tv_usec * 1E-6;
}

int getrand(int min, int max) {
    return (double)rand() / (RAND_MAX + 1.0) * (max - min) + min;
}

void fill_rand(int *arr, int n) {
    for (int i = 0; i < n; i++)
        arr[i] = getrand(1, 1000001);
}
