#include <iostream>
#include <random>
using namespace std;

static std::random_device __randomDevice;
static std::mt19937 __randomGen(__randomDevice());
static std::normal_distribution<float> __normalDistribution(0.5, 1);

// Get a normally distributed float value in the range [0,1].
inline float GetNormDistrFloat()
{
    float val = -1;
    do { val = __normalDistribution(__randomGen); } 
    while(val < 0.0f || val > 1.0f);

    return val;
}

int main() {
	int count1=0;
	int count2=0;
	int count3=0;
	int count4=0;
	for (int i =0; i< 1000000; i++) {
		float val = GetNormDistrFloat();
		if (val<0.25){ count1++; continue;}
		if (val<0.5){ count2++; continue;}
		if (val<0.75){ count3++; continue;}
		if (val<1){ count4++; continue;}
	}
	std::cout<<count1<<", "<<count2<<", "<<count3<<", "<<count4<<std::endl;
	return 0;
}