Algorithm
Problem
Chef categorises an instagram account as spam, if, the following count of the account is more than times the count of followers.
Given the following and follower count of an account as and respectively, find whether it is a spam account.
Input Format
- The first line of input will contain a single integer , denoting the number of test cases.
- Each test case consists of two space-separated integers and — the following and follower count of an account, respectively.
Output Format
For each test case, output on a new line, YES
, if the account is spam and NO
otherwise.
You may print each character of the string in uppercase or lowercase. For example, the strings YES
, yes
, Yes
and yES
are identical.
Constraints
Sample 1:
4 1 10 10 1 11 1 97 7
NO NO YES YES
Explanation:
Test case : The following count is while the follower count is . Since the following count is not more than times the follower count, the account is not spam.
Test case : The following count is while the follower count is . Since the following count is not more than times the follower count, the account is not spam.
Test case : The following count is while the follower count is . Since the following count is more than times the follower count, the account is spam.
Test case : The following count is while the follower count is . Since the following count is more than times the follower count, the account is spam.
Code Examples
AdvertisementsDemonstration
CodeChef solution SIXFRIENDS - Six Friends CodeChef solution in C, C++