// Main program
/*
Array: a [1] ~ A [5] indicates the judgment made by the current person of a, B, c, d, e on others,
B [1] ~ B [5] indicates that the current person is able to determine the launch status.
Values [1] ~ Values [5] is the number of white spaces described in a, B, c, d, and e.
1, 0 indicates white, black, that is, a [1] = 1, white, B [1] = 1, white
Judging from A to D, take four rounds. Each time, based on your own description, judge the status of another person a [], then infer the status of the person B [] before it, and modify its status.
*/
# Include <stdio. h>
# Include <papers. h>
Void main (){
Unsigned char j;
For (j = 1; j <= 4; j ++ ){
Judge (j );
}
}
Void judge (unsigned char num ){
Unsigned char I;
White_number = 0;
For (I = 1; I <= 4; I ++) {// do not consider e first
If (values [I] = values [num]) & (B [I] = 1) & (values [I]> = 1 )) {a [I] = 1;} // if it matches the current description, it is regarded as "white"
If (values [I] = values [num]) & (B [I] = 0) {B [num] = 0 ;} // same as the description already set as "", it is regarded as "" directly"
Else if (values [I] = 1) & (values [num] = 0) {a [I] = 0; B [num] = 0 ;} // The description of the conflict is regarded as "black"
Else {a [I] = 0 ;}
White_number = white_number + a [I];
}
White_number = white_number-a [num];
If (white_number = values [num]) {} // tentatively set to whitelist
Else if (white_number = 1) & (values [num] = 0) {B [5] = 1 ;}// separate e
Else {B [num] = 0 ;}
Print (num );&
<