Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

Блог пользователя Subingbupt

Автор Subingbupt, 6 часов назад, По-английски

There are n distinct integers. a1, a2, ..., an (1 <= n <= 1e5) a1 < a2 < ... < an (1 <= ai <= 1e5) And there is an integer k (k <= 1e5) I will choose n integers. b1, b2, ..., bn, ai <= bi <= k for i = 1, 2, ..., n For each choosing method, there is a product, the product of the factorial of each number's occurence. I want to calculate the sum of these products.

For example:

n == 3

k == 4

[1, 3, 4]

Then, the answer is 18.

I don't know how to solve it.

  • Проголосовать: нравится
  • +6
  • Проголосовать: не нравится

»
6 часов назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Seems very hard. Where is this from?

  • »
    »
    45 минут назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    A problem from CCPC.

»
5 часов назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

me too. alas, difficulty is necessary as it strengthens our skills.