1 2 3 4 5 6 7 |
// this is much slower than uniform_distribution in C, but it's fun for (int i = 0; i < n; ++i) { if (rand() % (n - i) < m) { printf("%d", i); --m; } } |
1 2 3 4 5 6 7 |
// this is much slower than uniform_distribution in C, but it's fun for (int i = 0; i < n; ++i) { if (rand() % (n - i) < m) { printf("%d", i); --m; } } |
This afternoon, I participated in the MSR Intern Fitness Group Training event. It was an one-hour exercise without break which enables us to work out almost every muscle in the body. First, rope jumping for 10min as a warm up. Next, jump grids. Ickey shuffle & Boogie Woogie & Sideways Skedaddle & Lateral High Step…