c:c_shuffle
C - C++ Shuffle
#include <iostream> #include <algorithm> #include <cassert> #include <functional> using namespace std; int main() { int a[100]; int i; for (i = 0; i < 100; ++i) a[i] = i; random_shuffle(&a[0], &a[100]); for (i = 0; i < 100; ++i) cout << a[i] << " "; return 0; }
c/c_shuffle.txt · Last modified: 2020/07/15 09:30 by 127.0.0.1