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: | 398 Weeks Ago, 2 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
Alex, Will, Joel, Neha, and George are having a poker night to celebrate a successful hackathon. However, the last poker night they had was ruined when one of their guests cheated making his hands the best, regardless of what the rules actually said. In other words, he said that his pair of 2s beat Will's royal flush. This time, they have decided to let a computer decide who wins. Write a program that will take a person's name and their hand, and output who wins.
.
Â
Â
Â
A list of Ids and their hands terminating with -1.
Each id will be an int. Each hand will have 5 cards. Each card will be represented with a letter and number. H1 = Ace of hearts, D5 = 5 diamonds, C10 = Club Jack, etc
Â
Â
The id of the winner.
Â
Tips:
Â
Â
Â
Input: 1 H1 D1 S1 C1 D6 2 H1 D3 C5 D7 S8 3 H1 D1 S1 D8 C8 4 H3 H4 H5 H6 H7 -1 Output: 4
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