yusuke
1/11/2020 - 12:46 PM

Permutation

  std::vector<int> v(N);
  std::iota(v.begin(), v.end(), 0);
  do {
    for (int x : v) std::cout << x; std::cout<<std::endl;
  } while(next_permutation(v.begin(), v.end()));