Codeforces и Polygon могут быть недоступны в период с 23 мая, 7:00 (МСК) по 23 мая, 11:00 (МСК) в связи с проведением технических работ. ×

How to solve this problem ?

Правка en1, от mike_wasabi, 2019-06-11 15:24:40

Give integer ranges A1, A2, .., AN. Number Ai is called the K-random number of the sequence if in K terms Any sequence of a sequence has at least one term equal to Ai and K is the smallest integer that satisfies this condition. Example: Range 1,2,3,1,2,2. Number 1 is a 3-random number; number 2 is a 3-random number; number 3 is a 4-random number Conditions: N <= 100000 and | Ai | <= 1000.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский mike_wasabi 2019-06-11 15:24:40 425 Initial revision (published)