Editorial for WC '18 Contest 1 J2 - Making the Cut


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.

We can create a loop which runs 5 times. On each iteration, we should input a name, and if it's equal to N, then we should output Y and stop. If the loop finishes and we still haven't found a matching name by the end, we should then output N instead.


Comments


  • 0
    izzyb  commented on Nov. 27, 2024, 4:44 p.m.

    are the 5 other names an input by the user or are they embedded in the code?