Transferred from:
Http://topic.csdn.net/t/20060814/13/4948089.html
Http://www.blogjava.net/feelyou/archive/2005/11/16/20133.aspx
......
There are many online posts I don't know.
One interview question with a monthly salary of 30 thousand --- look at your IQ
Both Xiao Ming and Xiao Qiang are students of Mr. Zhang. The birthday of Miss Zhang is m month N. Both of them know the birthday of Miss Zhang.
It was one day in the following 10 groups. Mr. Zhang told James the m value and John the N value. Mr. Zhang asked them if they knew his birthday was that day?
March 4 March 5
June 4
September 1
December 1 December 2
1) James said: I don't know. I certainly don't know Xiaoqiang either.
2) Xiaoqiang said: I didn't know either, but now I know.
3) James said: Oh, then I know.
Determine the day of Miss Zhang's birthday Based on the conversation above.
The following is my inference process:
1) James said: I don't know. I certainly don't know Xiaoqiang. Remove the values that can be determined by N, that is, those with separate dates.
March 4 March 5
June 4
September 1
December 1 December 2
According to M, James can know that N cannot be used to determine, indicating that there is no separate date in the row corresponding to M, that is, 1 3 rows.
[March, September]
June 4
[March September 1, September 5]
December 1
2) In one row and three rows, Xiaoqiang can determine the date to indicate that the day is not a public item in the two rows.
This is not 5.
[March 4, March 8]
September 1]
3) James said: Oh, then I know.
At this time, one row is the only one that can be determined by m in September 1.
Extension
If 3) James said: Oh, I still don't know.
Then we can only judge that M is 3, and N is only known by Xiaoqiang.