| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 (추가 시간 없음) | 1024 MB | 157 | 127 | 113 | 83.088% |
A new county has been created on artificially created land out from the coast, with code name "Built Anew Peninsula County", but the final name still needs to be chosen. To establish a new name, the cities within the county get to vote on the individual letters of the name.
As it happens, all cities in the county have a name with exactly $m$ letters, and so they decide the name of the county will also have exactly $m$ letters. Naturally, each city prefers their own name, and thus votes that the $i$th letter of the county name should match theirs. For each of the $m$ positions, the letter that received the most votes across all cities gets picked. In case of a tie between multiple letters, the one occurring earliest in the English alphabet gets picked.
Given the list of the city names, determine the result of the vote for the new county's name.
The input consists of:
The city names only consist of lowercase English letters (a-z).
Output the name of the new county.
3 5 apple maple alpha
aaple
3 4 icpc back laps
bapc
ICPC > Regionals > Europe > Northwestern European Regional Contest > Benelux Algorithm Programming Contest > BAPC 2023 D번