Counting Liars 1s 1024MB
Problems
Bessie the cow is hiding somewhere along the number line. Each of Farmer John's N
other cows (
Unfortunately, it is possible that no hiding location is consistent with the answers of all of the cows, meaning that not all of the cows are telling the truth. Count the minimum number of cows that must be lying.
Input
The first line contains
The next
Output
The minimum number of cows that must be lying.
Example #1
2
G 3
L 5
0
Example #2
2
G 3
L 2
1