|
|
вернуться в форумWhen a branch contains 0 apples... I've found that when there is a branch containing 0 apples, both Lintao's program and the judge-data think it's not a branch, so the tree may be smaller than n nodes; and the result is calculated from taking away n-q-1 branches from this smaller tree, not from preserving q branches. It's a quite subtle error. :) You are RightAnswer. I agree with you. > I've found that when there is a branch containing > 0 apples, both Lintao's program and the judge-data > think it's not a branch, so the tree may be smaller > than n nodes; and the result is calculated from taking away > n-q-1 branches from this smaller tree, not from preserving > q branches. > It's a quite subtle error. :) > Why does this happen? Послано AOY++ 12 авг 2001 13:41 > I've found that when there is a branch containing > 0 apples, both Lintao's program and the judge-data > think it's not a branch, so the tree may be smaller > than n nodes; and the result is calculated from taking away > n-q-1 branches from this smaller tree, not from preserving > q branches. > It's a quite subtle error. :) > My program just had an "accepted". But I think the judge- program is wrong. |
|
|