fork download
  1. #include <iostream>
  2. #include <algorithm>
  3. #include <string>
  4. #include <random>
  5. int main(){
  6. std::string A = "the star light are fall!";
  7. std::string B = A;
  8.  
  9. std::random_device RD;
  10. std::mt19937 mtr(RD());
  11.  
  12. while (A == B){
  13. std::shuffle(A.begin(), A.end(), mtr);
  14. }
  15. std::cout << B << " <to> "<< A << std::endl;
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0s 3432KB
stdin
Standard input is empty
stdout
the star light are fall! <to> haaia tg shllre!l ft ter