JMU SP19 Wk 4

#### Start

2019-01-30 20:30 UTC

## JMU SP19 Wk 4

#### End

2019-02-02 04:59 UTC
The end is near!
Contest is over.
Not yet started.
Contest is starting in -290 days 13:49:00

56:29:00

0:00:00

# Problem ARecount

The recent schoolboard elections were hotly contested: a proposal to swap school start times for elementary and high school students, a controversial new dress code proposal that bans athletic clothes in school, and a proposal to raise real-estate taxes to pay for a new football practice facility, and the list goes on and on. It is now hours after the polls have closed and a winner has yet to emerge!

In their desperation, the election officials turn to you and ask you to write a program to count the vote!

## Input

The input consists of a single test case, which is a list of votes cast. Each line in the input contains the name of a candidate for whom a vote was cast. A name may consist of multiple words, separated by spaces. Words contain letters or hyphens, but no other punctuation characters. There will be at least $2$ votes on the list. The list of votes ends with a single line containing the characters ***. This line should not be counted. There can be up to $100\, 000$ valid votes.

## Output

If a candidate obtained a simple or absolute majority of all votes cast (that is, more than any other candidate), output the name of this candidate! If no candidate obtained a simple majority, output: “Runoff!” (don’t forget to include the exclamation mark!)

Sample Input 1 Sample Output 1
Penny Franklin
Marti Graham
Connie Froggatt
Joseph Ivers
Connie Froggatt
Penny Franklin
Connie Froggatt
Bruce Stanger
Connie Froggatt
Barbara Skinner
Barbara Skinner
***

Connie Froggatt

Sample Input 2 Sample Output 2
Penny Franklin
Connie Froggatt
Barbara Skinner
Connie Froggatt
Jose Antonio Gomez-Iglesias
Connie Froggatt
Bruce Stanger
Barbara Skinner
Barbara Skinner
***

Runoff!