Question: Laser Defense Time limit: 2 0 0 0 ms Memory limit: 2 5 6 MB A group of thieves has decided to steal the statements

Laser Defense
Time limit: 2000 ms
Memory limit: 256 MB
A group of thieves has decided to steal the statements of this year's IEEEXtreme. In order to do so, they need to cross a parking lot in front of the IEEE headquarters. lasers that send several beams of light which can detect movement. Check out the image below for a better understandine. example above, laser A sends 3 beams, while laser B sends 2. is to compute the number of resulting areas.
Standard input
The first line contains three integers L,N and M, representing the size of the parking lot, the number of beams sent by laser A and the number of beams sent by laser B, respectively. coordinate of the intersection point. Similarly, the character R specifies that the beam intersects the right side, and C is the y coordinate of the intersection point. coordinate of the intersection point. Similarly, the character L specifies that the beam intersects the left side, and C is the y coordinate of the intersection point.Standard output
Print a single integer representing the number of resulting areas.
Constraints and notes
2L109
0N,M105
0
The input does not contain identical laser beams
Input
Output
Explanation
11
This test case corresponds to the image in the statement.
14
There are 14 areas:Laser Defense
Time limit: 2000 ms
Memory limit: 256 MB
A group of thieves has decided to steal the statements of this year's IEEEXtreme. In order to do so, they need to cross a parking lot in front of the IEEE headquarters. lasers that send several beams of light which can detect movement. Check out the image below for a better understandine. example above, laser A sends 3 beams, while laser B sends 2. is to compute the number of resulting areas.
Standard input
The first line contains three integers L,N and M, representing the size of the parking lot, the number of beams sent by laser A and the number of beams sent by laser B, respectively. coordinate of the intersection point. Similarly, the character R specifies that the beam intersects the right side, and C is the y coordinate of the intersection point. coordinate of the intersection point. Similarly, the character L specifies that the beam intersects the left side, and C is the y coordinate of the intersection point.
Laser Defense Time limit: 2 0 0 0 ms Memory

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!