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

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

How to solve it recursively, is it possilbe or not? I tried a long time but dint came up a solution.

Problem Link: https://cses.fi/problemset/task/1636

And what does it mean my this line "the number of distinct ordered ways". It means increaing order or decreasing order?

THanks in Advance

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

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

Number of distinct ordered ways means order does not matter. For example if sum = 4 then 1 2 1 and 1 1 2 and 2 1 1 is considered same and counted one time. Read this tutorial https://codeforces.com/blog/entry/70018

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

Can anyone give me the recursive solution of the problem?

»
13 месяцев назад, # |
Rev. 2   Проголосовать: нравится +1 Проголосовать: не нравится

To anyone else, having confusion with "the number of distinct ordered ways", it means the ordered ways to use the available coins. For example, given coins = [2,3,5] Coin 2 must be used before 3, 3 before 5 and so on. So: 2 + 3 + 5 and 2 + 2 + 3 is acceptable, But 2 + 3 +2 is Not. and you have to find distinct ways order ways to find answer this way. Hope this helps.