|
|
back to boardHelp requested Here is my solution and used test cases. I don't understand why I always get WA. 8-( Test 1. 5 4 2 0 1 2: NO Test 2.5 4 2 0 1 5: YES Test 3. 5 4 2 0 3 5: YES Test 4. 5 4 2 0 3 4: YES Test 5. 5 5 2 0 3 4 5: YES Test 6. 5 5 2 0 2 4 5: YES Test 7. 5 6 2 1 2 4 5 0: NO Test 8. 5 4 1 2 2 3: YES Test 9. 5 5 1 2 3 4 3: YES Test 10. 5 5 1 1 0 3 4: NO Test 11. 5 3 0 0 1: NO Test 12. 5 3 0 1 1: NO Test 13. 5 3 1 2 2: YES Test 14. 5 3 1 1 2: YES Test 15. 5 3 4 4 5: NO Test 16. 5 3 3 4 4: YES Test 17. 5 3 4 5 5: NO Test 18. 5 3 3 4 5: YES Test 19. 2 2 1 1: YES Test 20. 2 2 2 2: NO Source code: [code deleted] Edited by moderator 13.02.2007 20:57 I don't know why you WA, but your Test 7 is incorrect. The first number can't be smaller than the second one. Re: I don't know why you WA, but your Test 7 is incorrect. The first number can't be smaller than the second one. If the num of cards is lower than m i think that the asnwer should be NO 2.5 4 2 0 1 5 YES? Edited by author 19.01.2007 12:34 Help requested Posted by AXIS 2 Feb 2007 19:39 I'm not very good in C, and i don't undrstand your source) But my idea is very simple. Store in array number of repeats, increment a[0] and a[n] (because it's only one card with this numbers) and find in array sequence 2 1 1 .. 1 1 2 that's all) Re: Help requested Edited by author 22.04.2009 22:45 Re: Help requested Is test 9 right? Re: Help requested i think so.i think that test#9 may be wrong.or i made mistake while reading the problem... tell the truth,i don't really understand the problem .. Re: Help requested Posted by M__A__K 13 Dec 2010 20:02 I don't understand Test 5. 5 5 2 0 3 4 5: YES Why? first 5 so take 5 or 6 second 5 so take 5 or 6 so take 5 and 6 ... last 5 so take 5 or 6 again, but 5 and 6 were taken, so NO help me, please Re: Help requested Posted by ivan145 30 Dec 2012 22:56 here are test right Edited by author 31.12.2012 02:08 Edited by author 31.12.2012 02:08 Edited by author 31.12.2012 02:08 Re: Help requested Posted by LLL 8 Nov 2016 17:36 for the 1st and the 2nd 5 means n and m without meaning the number which was took. |
|
|