Construct Arrays (constarr)

34 teams scored 920 points on this task, for a maximum score of 100, an average score of 27 and a median score of 20.

Highlights

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

Statement

Mihnea is in some serious trouble! He forgot to turn in his homework which is crucial to his final grade. He was tasked to find an array of length N, such that L < a_i < R for every element in the array, and the sum of all elements in the array modulo M is equal to K (0 < K < M). After he bargains with the teacher, in order for him to pass he is now tasked to find the number of different arrays that satisfy this property, since this value can be too big output it modulo 10^9+7. Because of his laziness, he asked you to solve this problem for him.