#include <iostream>
#include <random>
#include <vector>
//for c++11 and later!
int main(){
static const int Rolls = 100000;
std::random_device rd;
std::mt19937 mt(rd());
std::discrete_distribution<> dist{ 1, 2, 1, 2, 1, 2 };//this is important!
std::vector<int> vec;
vec.resize(6);
for (auto& o : vec) o = 0;
for (int i = 0; i < Rolls; i++) vec[dist(mt)]++;
int j = 1;
for (auto& i : vec) std::cout << j++ << ':' << i << std::endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8cmFuZG9tPgojaW5jbHVkZSA8dmVjdG9yPgoKLy9mb3IgYysrMTEgYW5kIGxhdGVyIQoKaW50IG1haW4oKXsKCglzdGF0aWMgY29uc3QgaW50IFJvbGxzID0gMTAwMDAwOwoKCXN0ZDo6cmFuZG9tX2RldmljZSByZDsKCXN0ZDo6bXQxOTkzNyBtdChyZCgpKTsKCXN0ZDo6ZGlzY3JldGVfZGlzdHJpYnV0aW9uPD4gZGlzdHsgMSwgMiwgMSwgMiwgMSwgMiB9Oy8vdGhpcyBpcyBpbXBvcnRhbnQhCgoJc3RkOjp2ZWN0b3I8aW50PiB2ZWM7Cgl2ZWMucmVzaXplKDYpOwoJZm9yIChhdXRvJiBvIDogdmVjKSBvID0gMDsKCglmb3IgKGludCBpID0gMDsgaSA8IFJvbGxzOyBpKyspIHZlY1tkaXN0KG10KV0rKzsKCglpbnQgaiA9IDE7Cglmb3IgKGF1dG8mIGkgOiB2ZWMpIHN0ZDo6Y291dCA8PCBqKysgPDwgJzonIDw8IGkgPDwgc3RkOjplbmRsOwoKCXJldHVybiAwOwp9