#C1353. Robot Task Scheduler
Robot Task Scheduler
Robot Task Scheduler
You are given a list of robots along with their battery levels (in percentage) and a task that consumes a fixed amount of battery. A robot can perform the task only if its current battery level is at least the sum of the task's consumption and 20% (i.e., the robot's battery level is at least \(consumption + 20\)).
Your task is to read the input from standard input and output the names of all robots that are capable of performing the task. The names should be printed in the order of input and separated by a single space. If no robot is able to perform the task, output an empty line.
Note: The formula to check if a robot can perform the task is given by:
\[ \text{battery} \geq \text{consumption} + 20 \]
inputFormat
The input is read from standard input and has the following format:
- The first line contains two integers \(n\) and \(consumption\), where \(n\) (\(0 \leq n \leq 10^5\)) is the number of robots and \(consumption\) is the battery percentage consumed by performing the task.
- The next \(n\) lines each contain a robot's name (a string without spaces) and its battery level (an integer between 0 and 100), separated by a space.
outputFormat
Output a single line containing the names of the robots that can perform the task, separated by a single space. If no robot qualifies, print an empty line.
## sample3 10
Alpha 50
Beta 40
Gamma 60
Alpha Beta Gamma