#C3204. Diet Adherence Verification
Diet Adherence Verification
Diet Adherence Verification
Chef has several food containers, each with a specified number of calories. For each test case, you are given a maximum allowed calorie intake ( C ) and a list of calorie counts for ( N ) containers. Your task is to determine whether Chef can choose at least one container such that its calorie count does not exceed ( C ). If such a container exists, print "DietSuccess", otherwise, print "DietFail".
Problem Details:
- You will be given \( T \), the number of test cases.
- Each test case consists of two lines. The first line contains two integers \( C \) (maximum allowed calories) and \( N \) (number of containers). The second line contains \( N \) space-separated integers representing the calorie count of each container.
- For each test case, output the result in a new line.
inputFormat
The first line of input contains a single integer ( T ) denoting the number of test cases. For each test case, the first line contains two integers ( C ) and ( N ). The second line contains ( N ) space-separated integers representing the calorie counts.
outputFormat
For each test case, output a single line containing either "DietSuccess" if at least one container has calories ( \leq C ), or "DietFail" otherwise.## sample
3
500 3
600 400 300
200 2
250 300
100 5
90 85 80 95 100
DietSuccess
DietFail
DietSuccess
</p>