Editorial for DMOPC '15 Contest 4 P6 - Alarms


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.

Brute force all possible configurations of placing alarms and check if they're valid.

Time Complexity: \mathcal{O}(N!)


Comments


  • 2
    r3mark  commented on Jan. 16, 2016, 3:29 a.m. edited

    How can you tell if a question should be brute forced or not? I guess you can calculate the time complexity and check if it would pass or not, but how can you tell whether or not there is another, easier to code solution?