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

Please suggest the DP transition.

Правка en1, от Naaz, 2023-09-07 19:10:24

I recently encountered a DP question at least that's what i could make up for it. It goes :

You are given two numbers N, P, find the number of tuple of size N such that the product of adjacent numbers are at most P. Two tuples are considered different if the order of elements are different in them. Since the number can be large output it modulo 1e9+7.

Constraints : 2 <= N <=100 1 <= P <=1e9

Please help me with this problem and suggest some problems like this, if you can. Thanks.

Теги dp, help, beginner, dynamic programming

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Naaz 2023-09-07 19:10:24 531 Initial revision (published)