Ezio and Guards CodeChef Solution

Problem – Ezio and Guards CodeChef Solution

Ezio can manipulate at most X number of guards with the apple of eden.

Given that there are Y number of guards, predict if he can safely manipulate all of them.

Input Format

  • First line will contain T, number of test cases. Then the test cases follow.
  • Each test case contains of a single line of input, two integers X and Y.

Output Format

For each test case, print YES if it is possible for Ezio to manipulate all the guards. Otherwise, print NO.

You may print each character of the string in uppercase or lowercase (for example, the strings YeS, yEs, yes and YES will all be treated as identical).

Constraints

  • 1≤T≤100
  • 1≤X,Y≤100

Sample 1:

Input: 3
5 7
6 6
9 1
Output: NO
YES
YES

Explanation:

Test Case 1: Ezio can manipulate at most 5 guards. Since there are 7 guards, he cannot manipulate all of them.

Test Case 2: Ezio can manipulate at most 6 guards. Since there are 6 guards, he can manipulate all of them.

Test Case 3: Ezio can manipulate at most 9 guards. Since there is only 1 guard, he can manipulate the guard.

Ezio and Guards CodeChef Solution in Pyth 3

tcase=int(input())
for i in range(tcase):
    n,m=map(int, input().split(' '))
    if n<m:
        print("NO")
    if (n==m or n>m):
        print("YES")

Ezio and Guards CodeChef Solution in Java


import java.util.*;
import java.lang.*;
import java.io.*;

class Codechef
{
	public static void main (String[] args) throws java.lang.Exception
	{
        Scanner scn=new Scanner(System.in);
        int t=scn.nextInt();
        while(t!=0){
            int t1=scn.nextInt();
            int t2=scn.nextInt();
            if(t1>=t2){
                System.out.println("YES");
            }else {
                System.out.println("NO");
            }
            t--;
        }
    }
}

Ezio and Guards CodeChef Solution in C++17



#include<stdio.h>
int main()
{
   int t,i,x,y;
   scanf("%d",&t);
   for(i=1;i<=t;i++)
   {
     scanf("%d%d",&x,&y);
     if(x>=y)
     {
       printf("\nYes");
     }
     else
     {
       printf("\nNo");
     }
   }
   return 0;
}
Ezio and Guards CodeChef Solution Review:

In our experience, we suggest you solve this Ezio and Guards CodeChef Solution and gain some new skills from Professionals completely free and we assure you will be worth it.

If you are stuck anywhere between any coding problem, just visit Queslers to get the Ezio and Guards CodeChef Solution

Find on CodeChef

Conclusion:

I hope this Ezio and Guards CodeChef Solution would be useful for you to learn something new from this problem. If it helped you then don’t forget to bookmark our site for more Coding Solutions.

This Problem is intended for audiences of all experiences who are interested in learning about Data Science in a business context; there are no prerequisites.

Keep Learning!

More Coding Solutions >>

LeetCode Solutions

Hacker Rank Solutions

CodeChef Solutions

Leave a Reply

Your email address will not be published.