시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 (추가 시간 없음) | 512 MB | 381 | 300 | 262 | 85.902% |
King Dragon, the king of Animal Kingdom, passed away this morning. This unfortunate news saddened every animal. Since no one sees any other living dragon nowadays, the government of Animal Kingdom cannot find any successor to King Dragon. But Animal Kingdom cannot operate without a king. The government of Animal Kingdom decided to elect a new king.
There are nine voters: Armadillo, Buffalo, Cat, Dog, Elephant, Fox, Goat, Hippo and Zebra and two candidates: Tiger and Lion.
The votes will be anonymously casted tomorrow. The government asked you to write a program to calculate the votes and announce the next king of Animal Kingdom. Note that the next king is the one who receives more than half the votes.
The input has exactly nine lines. Each of them is a string which is either Tiger or Lion, and it represents a casted vote from an anonymous voter.
Output one line containing the next king’s name.
Lion Lion Tiger Tiger Lion Lion Tiger Tiger Tiger
Tiger
ICPC > Regionals > Asia Pacific > Taiwan > Taiwan Online Programming Contest > TOPC 2019 A번