Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
It is the final day of La Liga. Chef has a certain criteria for assessing football matches.
In particular, he only likes a match if:
Given the goals scored by both the teams as X and Y respectively, determine whether Chef will like the match or not.
For each test case, output YES if Chef will like the match, else output 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).
Input: 4
1 1
0 1
0 0
2 2
Output: YES
NO
NO
YES
Test case 1: It is a draw in which both teams have scored a goal, Chef will like this match.
Test case 2: The game is not a draw. Hence, Chef will not like this match.
Test case 3: Neither team scored a goal, so Chef will not like this match.
Test case 4: It is a draw in which both teams scored 2 goals each. Chef will like this match.
#include <iostream>
using namespace std;
int main() {
int t;
cin>>t;
while(t--){
int x, y;
cin>>x>>y;
if(x==y && x>0){
cout<<"Yes"<<endl;
}
else{
cout<<"No"<<endl;
}
}
return 0;
}
n=int(input())
for i in range(n):
a,b=list(map(int,input().split()))
if a>0 and b>0:
if a==b:
print("Yes")
else:
print("NO")
else:
print("NO")
import java.util.*;
import java.lang.*;
import java.io.*;
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner in=new Scanner(System.in);
int n=in.nextInt();
for(int i=0;i<n;i++){
int a=in.nextInt();
int b=in.nextInt();
if(a==b && a!=0 && b!=0){
System.out.println("YES");
}
else{
System.out.println("NO");
}
}
}
}
In our experience, we suggest you solve this Football Cup 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 Football Cup CodeChef Solution
I hope this Football Cup 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 >>