The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 399 Weeks Ago, 1 Day Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
Do you like Treasure Hunts? I like treasure hunts. Love ‘em. And TROIKA 2013 has the best one ever in ‘MIST’ (apps.facebook.com/mist_troika).
Just like a normal treasure hunt, you are given several clues and you have to get the right answer to progress to the next level and so on, until you reach the ultimate prize! But the organizers have learnt that a lot of users are not progressing even after figuring out the correct answer; it seems ‘someone’ forgot to code in ‘possible variants of the correct answer’ for each level. For example, if “Sachin Tendulkar” happened to be the answer to a particular level, “Tendulkar” or “tendulkar” or “sachin tendulkar” wasn’t accepted as correct. This is what you have to rectify.
Given the expected answer ‘S’, your job is to modify the answer-verification-system to be able to allow acceptable variants of ‘S’.
If the user enters an acceptable variant ,terminate the program. You can assume that the user is intelligent enough so that he will enter the answer in an order specified by the string S i.e he will not enter anything like “Tendulkar Sachin” if the answer is “Sachin Tendulkar” however he can enter “Tendulkar”.
The first line of the input contains a string S.
The next few lines contain the input string P entered by the user.
For every line entered by the user output “Yes” if the string is acceptable and “No” if it is not. (quotes only for clarity).
1
Input 1: Sachin Ramesh Tendulkar Sach Ram sAcH Tendul sach Tendulkar Sachin Ram Tendulkar SAChin TENduLkaR Output 1: No No No No No Yes Input 2: Sachin Ramesh Tendulkar Sach Ram sAcH Tendul sach Tendulkar Sachin Ram Tendulkar Ramesh TENduLkaR Output 2: No No No No No Yes
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll