Company: Optiver
Difficulty: medium
Message Requirement Fulfillment During the processing of messages in a system, a requirement is set for each message based on its price and the number of available seats. The system needs to determine whether each message fulfills the requirement and send appropriate responses. Input Format The first line contains an integer n , the number of messages. The second line contains the requirement in the format: REQUIREMENT id price seats . The next n lines contain the messages in the format: DATA id price . Output Format For each message, output a single integer: 0 if the message does not fulfill the requirement. The number of seats requested if the requirement is fulfilled. Constraints 1 ≤ n ≤ 100 1 ≤ price ≤ 1000 1 ≤ seats ≤ 10 Examples Input: 10 REQUIREMENT 1 100 3 DATA 1 1 DATA 1 110 DATA 1 3 DATA 0 0 DATA 2 1 DATA 2 2 DATA 2 90 DATA 2 4 DATA 0 0 DATA 0 0 Output: 0 3 0 0 0 0 0 0 0 0 The message with id 1 does not fulfill the requirement because the price of 110 is higher than the requi