|시간 제한||메모리 제한||제출||정답||맞힌 사람||정답 비율|
|1 초||256 MB||284||189||175||69.444%|
The Natural Wildlife Federation is trying to determine the dominant species in several different areas in the United States. They have sent researchers out to record the current population of four different predators (Bobcat, Coyote, Mountain Lion, and Wolf). They will use this information to determine which species dominates a particular ecological location. Because the animals differ in size, weight, and hunting ability each species has been given a weighted value as follows:
Thus, one Mountain Lion is equivalent to two Bobcats and one Wolf is equivalent to three Coyotes. The researchers have recorded animal sightings by writing a B for bobcat, C for coyote, M for mountain lion, and W for wolf. For example, if the researcher at Saguaro saw 5 wolves, 10 coyotes, 2 bobcats, and no mountain lions they might record this with the string “Saguaro WCCCBCCCCWWBCCWWC”
They need your help to process the raw data and determine the dominant species.
The first line of input will be a positive integer, n, indicating the number of problem sets to follow. Each problem set is comprised of one line of text. Each line will contain two “words”. The first word will be the location and the second word will be the species count as described above. The second word will have no blanks and only contain the letters ‘B’, ‘C’, ‘M’, and ‘W’. The length of word does not exceed 100.
For each problem set print one of the two followings statements:
<x>: The <y> is the dominant species <x>: There is no dominant species
In the lines above the place holder <x> should be replaced with the location, and the place holder <y> should be replace with either Bobcat, Coyote, Mountain Lion, or Wolf, where the species selected is the dominant species.
3 Saguaro WCCCBCCCCWWBCCWWC Sequoia CMCCWMWBMCC Yellowstone MCCBWB
Saguaro: The Wolf is the dominant species Sequoia: The Mountain Lion is the dominant species Yellowstone: There is no dominant species
High School > PLU High School Programming Contest > PLU 2014 > Novice 6번