[Solution] Bucket and Water Flow CodeChef Solution | CodeChef Problem Solution 2022
Alice has a bucket of water initially having litres of water in it. The maximum capacity of the bucket is liters.
Alice turned on the tap and the water starts flowing into the bucket at a rate of litres/hour. She left the tap running for exactly hours. Determine whether the bucket has been overflow,
Solution Click:- CLICK HERE
filled exactly, or is still left unfilled.
Input Format
- The first line of input will contain a single integer , denoting the number of test cases. The
Solution Click:- CLICK HERE
- description of the test cases follows.
- Each test case consists of a single line of input containing four space-separated integers .
Output Format
For each test case, print the answer on a new line:
- If the bucket has overflown print
overflow
- If it is exactly filled print
filled
- If it is still unfilled, print
unfilled
You may print each character of the string in uppercase or lowercase (for example, the strings filled
, FIlled
, fiLLed
, and FILLED
will all be treated as identical).
Constraints
Subtasks
- Subtask 1 (100 points):
- Original constraints.
Join Now for Solution:-
No comments:
Post a Comment