Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

lelbaba Mar 31st, 2020 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. bool taken[21];
  4. vector <char> V;
  5. int pos=1;
  6. int n;
  7. void generate(int i)
  8. {
  9.     for(int j=0;j<=n;j++)
  10.     {
  11.         if(taken[j]==0)
  12.         {
  13.             taken[j]=1;
  14.             cout<<j;
  15.             if(i==n)
  16.             {
  17.                 cout <<endl;
  18.                 //return;
  19.             }
  20.             generate(i+1);
  21.             taken[j]=0;
  22.         }
  23.     }
  24. }
  25. int main()
  26. {
  27.     memset(taken,0,sizeof(taken));
  28.     n=2;
  29.     generate(0);
  30.     return 0;
  31. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top