Editorial for Valentine's Day '18 J3 - Are they cute?


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.

Author: kipply

The key phrase in this problem is "they must be cuter than more than half of the people present".

Thus the solution can be coded to iterate through all the people, and per person count the number of people who are cuter. With just that, one would have to compare it to n / 2 which leaves room for error, thus the solution below simply adds 2 for each cuter person.


Comments


  • 2
    Mohab_Osman13  commented on Oct. 14, 2019, 11:28 p.m.

    what language is this


    • 3
      Aaeria  commented on Oct. 15, 2019, 4:19 a.m.

      You probably shouldn't try to submit the editorial as your solution though