Advertisement
chopical

MURPT

Jul 28th, 2019
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.18 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. bool check(int a,int b,int c,int d,int e){
  5.     if ( a == b ){return true;}else
  6.     if ( a == c ){return true;}else
  7.     if ( a == d ){return true;}else
  8.     if ( a == e ){return true;}else
  9.     if ( b == a ){return true;}else
  10.     if ( b == c ){return true;}else
  11.     if ( b == d ){return true;}else
  12.     if ( b == e ){return true;}else
  13.     if ( c == a ){return true;}else
  14.     if ( c == b ){return true;}else
  15.     if ( c == d ){return true;}else
  16.     if ( c == e ){return true;}else
  17.     if ( d == a ){return true;}else
  18.     if ( d == b ){return true;}else
  19.     if ( d == c ){return true;}else
  20.     if ( d == e ){return true;}else
  21.     if ( e == a ){return true;}else
  22.     if ( e == b ){return true;}else
  23.     if ( e == c ){return true;}else
  24.     if ( e == d ){return true;}else{return false;}
  25.     return false;
  26. }
  27.  
  28. int main(){
  29. int x=0;
  30. std::vector<char> test= {'M','U','R','P','T'};
  31.  
  32. for (int i1=0;i1<5;i1++){
  33.     for (int i2=0;i2<5;i2++){
  34.         for (int i3=0;i3<5;i3++){
  35.             for (int i4=0;i4<5;i4++){
  36.                 for (int i5=0;i5<5;i5++){
  37.                     if (!check(i1,i2,i3,i4,i5)){x++;
  38.                         std::cout << x << ":"<< test[i1]  << test[i2] << test[i3] << test[i4] << test[i5] << std::endl;
  39.                     }
  40.                 }
  41.             }
  42.         }
  43.     }
  44. }
  45.    
  46.  
  47. return 0;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement