Posts

Showing posts from August, 2022

There are three people sitting in a room - Alice, Bob, and Charlie. They need to decide on the temperature to set on the air conditioner. Everyone has a demand each:

  Problem There are three people sitting in a room - Alice, Bob, and Charlie. They need to decide on the temperature to set on the air conditioner. Everyone has a demand each: Alice wants the temperature to be at least  A A  degrees. Bob wants the temperature to be at most  B B  degrees. Charlie wants the temperature to be at least  C C  degrees. Can they all agree on some temperature, or not? Input Format The first line of input will contain a single integer  T T , denoting the number of test cases. Each test case consists of a single line which contains three integers -  A, B, C A , B , C . Output Format For each test case, output on a new line, "Yes" or "No". "Yes", if they can decide on some temperature which fits all their demands. Or "No", if no temperature fits all their demands. You may print each character of the string in either uppercase or lowercase (for example, the strings  NO ,  nO ,  No , and  no  will...

Chef has recently introduced a feature which allows you to open any user’s submitted code (not just your own), and ask an AI to explain that code in English. For example, you can go to https://www.codechef.com/viewsolution/70530506 and click on "Analyse This Code".

  Problem Chef has recently introduced a  feature  which allows you to open any user’s submitted code (not just your own), and ask an AI to explain that code in English. For example, you can go to  https://www.codechef.com/viewsolution/70530506  and click on "Analyse This Code". But there is a restriction that the feature works only on codes which are at most  1000 1000  characters long. Given the number of characters,  C C , in a particular code, output whether the feature is available on this code or not. Input Format The only line of input will contain a single integer  C C , denoting the number of characters in the code. Output Format Output a single line which contains either "Yes", if the feature is available on this code, or "No", if not. You may print each character of the string in either uppercase or lowercase (for example, the strings  NO ,  nO ,  No , and  no  will all be treated as identical). Constraints...