Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124

# Chef On Date CodeChef Solution

## Problem – Chef On Date CodeChef Solution

Chef and his girlfriend go on a date. Chef took X dollars with him, and was quite sure that this would be enough to pay the bill. At the end, the waiter brought a bill of Y dollars. Print "YES" if Chef has enough money to pay the bill, or "NO" if he has to borrow from his girlfriend and leave a bad impression on her.

#### Input Format

• The first line of input will contain a single integer T, denoting the number of test cases.
• Each test case consists of a single line of input, containing two space-separated integers X and Y.

#### Output Format

For each test case, output on a new line "YES" if Chef has enough money to pay the bill and "NO" otherwise.

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

#### Constraints

• 1 \leq T \leq 1001≤T≤100
• 1 \leq X, Y \leq 1001≤X,Y≤100

Input: 4
1 1
1 2
2 1
50 100
Output: YES
NO
YES
NO

#### Explanation:

Test case 1: Since the money Chef has is equal to the bill, he will be able to pay the bill.

Test case 2: Since the money Chef has is less than the bill, he will have to borrow from his girlfriend and leave a bad impression on her.

Test case 3: Since the money Chef has is greater than the bill, he will be able to pay the bill.

Test case 4: Since the money Chef has is less than the bill, he will have to borrow from his girlfriend and leave a bad impression on her.

### Chef On Date CodeChef Solution in C++17

#include <iostream>
using namespace std;
typedef long long ll;
int main() {
ll t;
cin>>t;
while(t--)
{
ll x,y;
cin>>x>>y;
if(x>=y)
{
cout<<"yes"<<"\n";
}
else
{
if(x<y)
{
cout<<"no"<<"\n";
}
}

}
return 0;
}

### Chef On Date CodeChef Solution in Python3

n=int(input())
for i in range(n):
l=list(map(int,input().split()))
if l[0]>=l[1]:
print('YES')
else:
print('NO')

### Chef On Date 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 sc = new Scanner(System.in);
int T = sc.nextInt();
for(int i=0;i<T;i++){
int a = sc.nextInt();
int b = sc.nextInt();
if(a>=b){
System.out.println("YES");
}
else{
System.out.println("NO");
}
}
}
}
##### Chef On Date CodeChef Solution Review:

In our experience, we suggest you solve this Chef On Date 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 Chef On Date CodeChef Solution

Find on CodeChef

##### Conclusion:

I hope this Chef On Date 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