Computer Science, asked by gavinollameghana, 3 months ago

Problem Statement
Let S be a binary string (a binary string only consists of only 'O's and '1's). Let's define
the list X to be the pairs (1,r) where the substring s[l..r] consists of only '1's. Moreover if
(11, r1) and (12, r2) are two different elements in X, then 11 != 12 and r1 != r2.
Let Q be the number of '1's in S and M be the length of X. The cost of a binary string S
defined as follows: cost(s) = Q - M.
You are given a positive integer n and a non-negative integer k. Your task it to find the
number of different binary strings whose length is n, and whose cost is k.
Note: The string is zero-indexed.
Input Format
The first line contains an integer, n, denoting the length of the desired strings.
The next line contains an integer, k, denoting the cost of the desired strings.​

Answers

Answered by dipakvrma79
0

Answer:

the outlet fashions/customer/care //number/6289204717

Similar questions