Cunning

    In connection with the post, a small story from life was recalled.

    image

    I once participated in the Kiev Olympiad in Informatics. There were 4 tasks, 2 I pretty quickly decided as I could, and 2 something didn’t go at all.

    But I drew attention to the conditions for checking tasks ... the point was that your program should give a certain amount for each data input. The success of the participant is determined solely by the coincidence of these numbers with the reference ones, the program itself is not checked. If you don’t see that you knew the test tasks in advance, everything else is OK.

    So, in the third task it was clear that for most of the inputs the correct answer would be 0. My whole program turned out write ("0"); :)

    The fourth answer could be 1, 2, or some large number. The third is rare, but what will be more, 1 or 2 - it was not clear. My program is here: write (random (1, 2)); became ( clarification ) :)

    Honestly, I could not even believe that such an impudent approach would work ... but it worked, 2nd place, an invitation to the selection for the All-Ukrainian Olympiad :)

    Also popular now: