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: ms
Memory limit: 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 beams, while laser sends is to compute the number of resulting areas.
Standard input
The first line contains three integers and representing the size of the parking lot, the number of beams sent by laser A and the number of beams sent by laser respectively. coordinate of the intersection point. Similarly, the character R specifies that the beam intersects the right side, and is the coordinate of the intersection point. coordinate of the intersection point. Similarly, the character L specifies that the beam intersects the left side, and is the coordinate of the intersection point.Standard output
Print a single integer representing the number of resulting areas.
Constraints and notes
The input does not contain identical laser beams
Input
Output
Explanation
This test case corresponds the image the statement.
There are areas:Laser Defense
Time limit: ms
Memory limit: 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 beams, while laser sends is to compute the number of resulting areas.
Standard input
The first line contains three integers and representing the size of the parking lot, the number of beams sent by laser A and the number of beams sent by laser respectively. coordinate of the intersection point. Similarly, the character R specifies that the beam intersects the right side, and is the coordinate of the intersection point. coordinate of the intersection point. Similarly, the character L specifies that the beam intersects the left side, and is the coordinate of the intersection point.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
