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

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

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

rrlrlr 6 1 2

Output- 7

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