Computer Science, asked by greeshmareddy929, 9 months ago

program to find the length of street coveed with light if there are total L lights and each light covers from Xi to Yi distance??​

Answers

Answered by navya7267
0

Answer:

There is a street of length n and as we know it has two sides. Therefore a total of 2 * n spots are available. In each of these spots either a house or an office can be built with following 2 restrictions:

1. No two offices on the same side of the street can be adjacent.

2. No two offices on different sides of the street can be exactly opposite to each other i.e. they can’t overlook each other.

There are no restrictions on building houses and each spot must either have a house or office.

Given length of the street n, find total number of ways to build the street.

Similar questions