Regional check on computer science

    My sister in the 11th grade wrote a regional control on computer science. I learned about one task and its solution ...

    Task: An
    array of numbers is given. It is necessary to write (in Russian) an algorithm for finding the sum of positive elements of an array that are located after the maximum element.


    The solution , which, in fact, was rated at ZERO points:


    Going through all the elements:
    If the current is greater than zero, we add it to the "sum".
    If the current largest of those that have already been sorted, then zero the "amount".

    I wonder how it was checked, evaluated and by whom?
    It seems that this answer simply did not coincide with the template school decision, which, in the opinion of the inspection commission, is the only true one.

    Also popular now: