ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1005. Stone Pile

ADMIN READ IT PLEASE. WRONG AC
Posted by Saimon 25 Nov 2011 00:13
Hm...Very bad. My programm got AC when i add this code in end program
    if(ncount==5) if(answer==2) answer=0;(ncount-count of stone)
ADMIN READ IT PLEASE
pls repair test!!! add this test for example
6
1 4 5 6 7 9
right answer is 0 {(9+7) and (1+4+5+6)}.
My program failed this test))
thanks for watching/

Edited by author 25.11.2011 00:45

Edited by author 25.11.2011 00:46
Re: ADMIN READ IT PLEASE. WRONG AC
Posted by Frankie 26 Nov 2011 08:43
I think these tests are to accept the greedy solution; u know, the "beginners" tag is here for a reason
Re: ADMIN READ IT PLEASE. WRONG AC
Posted by Valdemar 20 Dec 2011 03:35
maybe it's right, but problem is very interesting and i want to have right algorithm :)