Redistributing Chocolates Codechef Starters 76 (Rated till 5-Stars) problem solution
This post is all about the solution of the Redistributing Chocolates Codechef Starters 76 (Rated till 5-Stars) problem solution.
Problem Statement:
Alice, Bob, and Charlie each have X, Y, X, Y, and ZZ chocolates.
Determine whether you can redistribute the chocolates in such a way that: each person has at least one chocolate; no two people have the same number of chocolates; and no chocolate remains after redistribution.
Format of Input :
The number of cases will be indicated by a single integer TT in the first line of input.
Each test case's first and only line includes 2 space-separated integers NN and MM — the number of apples and oranges, respectively.
Format of the Output :
For every test case, output YES if the group is perfect and NO or else on a new line.
Each character can be printed in either uppercase or lowercase. The strings YES, yes, Yes, and yES, for example, are all considered identical.


0 Comments