Wednesday, March 30, 2022

Course Registration

 There is a group of 

friends who wish to enroll in a course together. The course has a maximum capacity of students that can register for it. If there are other students who have already enrolled in the course, determine if it will still be possible for all the

friends to do so or not.

Input Format

  • The first line contains a single integer
  • - the number of test cases. Then the test cases follow.
  • Each test case consists of a single line containing three integers
  • , and
    • - the size of the friend group, the capacity of the course and the number of students already registered for the course.

    Output Format

    For each test case, output Yes if it will be possible for all the

    friends to register for the course. Otherwise output No.

    You may print each character of Yes and No in uppercase or lowercase (for example, yes, yEs, YES will be considered identical).

    Constraints

    Sample Input 1

    3
    2 50 27
    5 40 38
    100 100 0
    

    Sample Output 1

    Yes
    No
    Yes
    

    Explanation

    Test Case 1: The

    friends can enroll in the course as it has enough seats to accommodate them and the

    other students at the same time.

    Test Case 2: The course does not have enough seats to accommodate the

    friends and the other students at the same time.

    No comments:

    Post a Comment

    मुझे दिल में बसाना आसान नहीं....

    पता है Recently i realised की मुझे दिल में बसाना आसान नहीं है बात-बात पे चिढ़ जाती हूं मैं दिल लगा लूं एक बार तो फिर ज़िद पे अड़...