Editorial for DMOPC '14 Contest 6 P3 - Streetcars


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: Phoenix1369

The author's (intended) solution was to manually adjust the number of passengers in each streetcar for every stop, adding more to the fleet when necessary. Be sure to round down when calculating the percentage of people that get off.

Time Complexity: \mathcal{O}(N^2)


Comments


  • 1
    Beautiful_Times  commented on May 28, 2019, 5:56 p.m. edited

    How would the time complexity of simulation be \mathcal{O}(N^2)?