Please help with this problem

Правка en1, от __Nutella__, 2022-02-13 14:27:27

Given a string S consisting of characters 'r' and 'l' and N where N is length of road.

Determine the number of unique subsequences of those moves that lead from a given house x to end at another house y. Moves will be given as a sequence of l and r instructions where l indicates you need to move left and r indicates you need to move right. Return answer modulo 10^9+7

Input format- String (S) N — Length of road x — starting point y — Ending point Example-

rrlrlr 6 1 2

Output- 7

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский __Nutella__ 2022-02-13 14:30:33 9 Tiny change: 'ding point\nExample-\n\nrrlrlr' -> 'ding point \n\n\nrrlrlr'
en1 Английский __Nutella__ 2022-02-13 14:27:27 561 Initial revision (published)