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

Автор pal550, история, 2 года назад, По-английски

Hi all, Problem

Constraint:

1 <= N <= 100000
 1 <= A[i] <= 10^9

Please help me in this problem. Thanks in advance.

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

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

Calculate the total number of distinct elements in the array. Let it be $$$X$$$. The answer is simply $$$N choose X$$$ because we can simply distribute in the order of increasing values and there is one such distribution only