|
|
вернуться в форумPLEASE SIR READ THIS AND HELP ME OUT Послано sultan 21 авг 2002 02:41 thanks u sir for your kind email i have understadn the prob fully by your kindness but please sir there is a bit confusion here please sir remove this confusiion by aswering theese questinons and please sir expalin one of them please please 1) 1 2 2 3 2) 1 2 3 4 3 3) 1 1 0 3 4 Re: PLEASE SIR READ THIS AND HELP ME OUT The first test 1 2 2 3: The answer is "YES". For example, first Nick takes the card with numbers 0 and 1(it is lexicografically the first card) and reas the number 1, after that he take the card with numbers 1 and 2 (the second card) and reads number 2, after that he takes the card with numbers 2 and 3(the 3-rd card) and again reads number 2 and on the end he takes the card with numbers 3 and 4 and reads number 3. So, he has tooken 4 different cards, and the answer is "YES". The second test 1 2 3 4 3 The answer again is "YES" For example: First Nick takes the card with numbers 0 and 1(the 1-st card) and reads number 1, after that the card with numbers 1 and 2(the second) and reads number 2, after that he takes the card with numbers 2 and 3 (the 3-rd card) and reads number 3, after that the card with numbers 4 and 5 (THE FIFTH CARD) and reads number 4 and on the end the card with numbers 3 and 4(the 4-th card) and reads number 3. So all the cards are different, and the answer is "YES" The third test: 1 1 0 3 4: The answer is "NO" As Nick has read number 0, that is right the first card(with numbers 0 and 1) as there's no other card with numbers 0 written on it. So there are exactly 2 cards with number 1 on it:the first(with numbers 0 and 1) and the second (with numbers 1 and 2).As Nick has olready tooken the first, there could be only one card with number 1 on it and so only one "1" in the input - so this case is not possible 1 1 0...... the answer is NOT. Hope this will help :) Thanks!I have got AC. Послано Tony 30 май 2003 20:21 Re: Thanks!I have got AC. Thanks also. I've got ac,too. |
|
|