GUPTA MECHANICAL

IN THIS WEBSITE I CAN TELL ALL ABOUT TECH. TIPS AND TRICKS APP REVIEWS AND UNBOXINGS ALSO TECH. NEWS .............

Friday, 10 June 2022

[Solution] Alternate Additions CodeChef Solution

[Solution] Alternate Additions CodeChef Solution | CodeChef Problem Solution 2022

Chef has 2 numbers A and B (A<B).

Chef will perform some operations on A.

In the ith operation:

  • Chef will add 1 to A if i is odd.
  • Chef will add 2 to A if i is even.

Solution Click Below:-  CLICK HERE




    Chef can stop at any instant. Can Chef make A equal to B?

    Input Format

    • The first line contains a single integer T — the number of test cases. Then the test cases follow.

    • The first and only line of each test case contains two space separated integers A and B.

    Output Format

    For each test case, output YES if Chef can make A and B equal, NO otherwise.

    Note that the checker is case-insensitive. So, YESYesyEs are all considered same.

    Constraints

    • 1T1000

    No comments:

    Post a Comment