You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#include<bits/stdc++.h>
|
|
using namespace std;
|
|
|
|
int main() {
|
|
int A,B,C,D;
|
|
for(A=1; A<=4; A++)
|
|
for(B=1; B<=4; B++)
|
|
if(A!=B) {
|
|
for(C=1; C<=4; C++)
|
|
if(A!=C && B!=C) {
|
|
D=1+2+3+4-A-B-C;
|
|
if((A==3)^(B==4) &&(B==1)^(D==4) && (C==4)^(D==3) &&(D==2)^(A==1))
|
|
cout<<A<<B<<C<<D;
|
|
}
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
|