\n
## Technical Document: Problem Specification
### Overview
The image displays a single page from a technical document, specifically a programming problem specification. The page is titled "1. Problem Specification" and contains a detailed description of a programming task related to counting votes in a contested school board election. The document is structured with a main heading, a bordered specification box, and explanatory annotations on the right side.
### Components/Axes
The document is composed of the following visual and textual components:
1. **Main Heading:** "1. Problem Specification" in a large, bold, sans-serif font at the top-left.
2. **Specification Box:** A rectangular box with a thin black border containing the core problem description. It has its own internal heading "Specification" in bold.
3. **Explanatory Annotations:** Text placed to the right of the specification box, providing meta-instructions for the reader.
* "Each page starts with a specification of what the program should do."
* "Begin by carefully reading the problem specification." (This line is in blue text).
4. **Footer Note:** A line of italicized text at the very bottom of the specification box.
### Detailed Analysis / Content Details
All text within the image is in English. Below is a precise transcription of the textual content, preserving structure and formatting.
**From the Specification Box:**
**Specification**
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 only alphanumeric characters and/or 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 $100000$ 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).
-----Examples-----
Sample Input:
Penny Franklin
Barbara Skinner
Connie Froggatt
Joseph Ivers
Connie Froggatt
Penny Franklin
Connie Froggatt
Connie Froggatt
Connie Froggatt
Barbara Skinner
Barbara Skinner
***
Sample Output:
Connie Froggatt
*Remember: all input/output of the program should be handled through stdin and stdout.*
**From the Right-Side Annotations:**
* Each page starts with a specification of what the program should do.
* Begin by carefully reading the problem specification. (in blue)
### Key Observations
1. **Document Structure:** The page uses a clear two-column layout for presentation: the formal specification on the left and pedagogical guidance on the right.
2. **Problem Type:** This is a classic "majority vote" or "plurality" algorithm problem, common in introductory programming courses or competitions.
3. **Input Format:** The input is a stream of names (strings) terminated by a sentinel value (`***`). The constraint is up to 100,000 votes.
4. **Output Logic:** The program must determine if any single candidate received more than 50% of the votes (an absolute majority). If yes, print that candidate's name. If no candidate has a majority (which would happen in a multi-candidate race where the top vote-getter has less than 50%), the program must output "Runoff!".
5. **Sample Case:** The provided example has 11 valid votes (excluding the `***` line). "Connie Froggatt" receives 5 votes, which is 5/11 ≈ 45.5%. This is *not* a majority (>50%). However, the sample output is "Connie Froggatt". This indicates a potential discrepancy or that the problem defines "simple or absolute majority" as "more than any other candidate" (a plurality), not necessarily >50%. The text explicitly states: "more than any other candidate". This is a critical detail for implementation.
6. **Technical Requirement:** The footer note emphasizes that standard input/output (`stdin`/`stdout`) must be used, which is typical for automated judging systems.
### Interpretation
This document defines a programming challenge that tests a candidate's ability to process streaming text data, count frequencies, and implement conditional logic based on a specific voting rule.
The core task is to parse a list of names, tally the votes for each unique candidate, and then apply the winning condition. The key investigative point is the precise definition of "majority." The specification clarifies it as "more than any other candidate," which is the definition of a **plurality** (or "first-past-the-post") system, not an absolute majority (>50%). The sample output confirms this interpretation, as Connie Froggatt wins with a plurality (5 votes) despite not having over 50% of the total (11 votes).
The problem includes realistic constraints (handling multi-word names, a large number of votes up to 100,000) and a clear termination condition (`***`). The "Runoff!" output case would occur in a scenario where the top two or more candidates are tied for the highest number of votes, or if the voting rule were changed to require >50%. Given the stated rule, a tie for first place would likely also result in "Runoff!" as no single candidate has "more than any other."
The annotations on the right suggest this page is part of a tutorial or guided assignment, instructing the learner on how to approach such problem statements methodically. The blue, emphasized text highlights the first and most crucial step: careful reading to avoid misinterpretation of the requirements—a lesson underscored by the potential confusion between "plurality" and "majority."