Highway's Speed Limits (speeding)

21 teams scored 1840 points on this task, for a maximum score of 100, an average score of 88 and a median score of 100.

Highlights

  1. Galileo Galilei, Trento is the institute with the most points (200).
  2. Lombardia is the region with the most points (500).

Statement

On a nice sunny day, Alice was driving through a long highway. She was enjoying the weather so much that she didn't pay attention to the speed limits… Can she get away without having to pay a fine? There are N checkpoints on the highway where the speed of the cars is measured. At the i-th checkpoint, the maximum allowed speed is A_i. Alice's speed has been measured at each checkpoint. Due to a bug in the computer system of the police, the order of these measurements (i.e., which measurement belongs to which checkpoint) is unknown. The police officers are wondering, in how many out of all the possible orders would Alice not have to pay a fine, i.e. satisfy the speed limit constraint at all the checkpoints? Since this number can be very large, you should output the result modulo 10^9+7.