Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- bool check(int a,int b,int c,int d,int e){
- if ( a == b ){return true;}else
- if ( a == c ){return true;}else
- if ( a == d ){return true;}else
- if ( a == e ){return true;}else
- if ( b == a ){return true;}else
- if ( b == c ){return true;}else
- if ( b == d ){return true;}else
- if ( b == e ){return true;}else
- if ( c == a ){return true;}else
- if ( c == b ){return true;}else
- if ( c == d ){return true;}else
- if ( c == e ){return true;}else
- if ( d == a ){return true;}else
- if ( d == b ){return true;}else
- if ( d == c ){return true;}else
- if ( d == e ){return true;}else
- if ( e == a ){return true;}else
- if ( e == b ){return true;}else
- if ( e == c ){return true;}else
- if ( e == d ){return true;}else{return false;}
- return false;
- }
- int main(){
- int x=0;
- std::vector<char> test= {'M','U','R','P','T'};
- for (int i1=0;i1<5;i1++){
- for (int i2=0;i2<5;i2++){
- for (int i3=0;i3<5;i3++){
- for (int i4=0;i4<5;i4++){
- for (int i5=0;i5<5;i5++){
- if (!check(i1,i2,i3,i4,i5)){x++;
- std::cout << x << ":"<< test[i1] << test[i2] << test[i3] << test[i4] << test[i5] << std::endl;
- }
- }
- }
- }
- }
- }
- return 0;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement