A dice game called "Greed" This game is a variation of the Greed dice game. Imagine we have 5 dice. We roll, them, and jot down the results. Then, based on this chart:

Three 1's =&gt; 1000 points
Three 6's =&gt;  600 points
Three 5's =&gt;  500 points
Three 4's =&gt;  400 points
Three 3's =&gt;  300 points
Three 2's =&gt;  200 points
One   1   =&gt;  100 points
One   5   =&gt;   50 point


We calculate the score. This program exactly does that. It has two functions, one is greed() which takes a vector of 5 integers between 1 and 6 and calculates the score, and the other is greed_rand() which first generates the vector randomly, and then calculates the score.

#include &lt;iostream&gt;
#include &lt;vector&gt;
#include &lt;random&gt;
#include &lt;map&gt;

std::random_device seeder;
std::mt19937 engine(seeder());
std::uniform_int_distribution&lt;int&gt; dist(1, 6);

typedef std::vector&lt;int&gt; list_type;

int greed(list_type die_rolls)
{
    int ret = 0;
    std::map&lt;int, int&gt; cnt;

    for (int i = 1; i &lt;= 6; ++i)
    {
        cnt[i] = 0;
    }

    for (auto &amp;d : die_rolls)
    {
        ++cnt[d];
    }

    if (cnt[1] == 3)
    {
        ret += 1000;
    }
    if (cnt[1] == 2)
    {
        ret += 200;
    }
    if (cnt[1] == 1)
    {
        ret += 100;
    }
    if (cnt[1] == 4)
    {
        ret += 1100;
    }
    if (cnt[1] == 5)
    {
        ret += 1200;
    }
    if (cnt[2] == 3)
    {
        ret += 200;
    }
    if (cnt[3] == 3)
    {
        ret += 300;
    }
    if (cnt[4] == 3)
    {
        ret += 400;
    }
    if (cnt[5] == 1)
    {
        ret += 50;
    }
    if (cnt[5] == 2)
    {
        ret += 100;
    }
    if (cnt[5] == 3)
    {
        ret += 500;
    }
    if (cnt[5] == 4)
    {
        ret += 550;
    }
    if (cnt[5] == 5)
    {
        ret += 600;
    }
    if (cnt[6] == 3)
    {
        ret += 600;
    }


    return ret;

}


int greed_rand()
{
    list_type rolls_rand;

    for (int i = 1; i &lt;= 5; ++i)
    {
        rolls_rand.push_back(dist(engine));
    }

    return greed(rolls_rand);
}


int main() {

    list_type rolls = {1, 1, 1, 5, 5};
    std::cout &lt;&lt; greed(rolls) &lt;&lt; std::endl;
    std::cout &lt;&lt; greed_rand() &lt;&lt; std::endl;

    return 0;
}


The output of this program is:

1100
150


Note: If you're on Windows, change the random seeder to time(NULL).
Style
You're not being charged by the character; there's no need to abbreviate "count", or "ret" (which I would call "score" instead).  Also, main has inconsistent brackets with the rest of the program.  Other than that, it looks good.

Globals
The globals are only being used by greed_rand, and would be better created within main and passed as parameters to greed_rand.

Counting Logic
Currently you're checking each possible quantity of '1's (and other numbers) separately, and not in order either, which makes it harder to ensure you're not missing a case and will fail if you change the number of total dice.  An improvement would be to check for the larger combinations first and just continue scoring as long as possible.  For example:  

for(; count[1] &gt;= 3; count[1] -= 3) 
{
    score += 1000;
}
for(; count[1] &gt; 0; --count[1]) 
{
    score += 100;
}


This also matches the score chart more clearly.

Output
You're outputting the end result of greed_rand, but not what list generated that result - which means you can't really tell if it was correct.  It would probably be better to replace greed_rand with a method that makes a random list, and pass that to greed yourself, so you can also output it:

std::vector&lt;int&gt; roll_dice(int count, std::mt19937 &amp;engine)


Use of Templates (Optional)
While not required for this usage, greed would be a good candidate for taking a pair of generic iterators instead of requiring a std::vector:

template&lt;typename Iterator&gt;
int greed(Iterator begin, Iterator end) 
{
   ...
   for (auto it = begin; it != end; ++it)
   {
       ++cnt[*it];
   }