KartRider: Drift
Time limit1sMemory limit1024 MB
Given each of 8 racers' finish times and teams in a Speed Race, print which team, Red or Blue, has the higher total rank points.
- Level
Easy2 of 10
- Topics
- Sorting, Implementation
- Solved
- No attempts yet
Problem
KartRider: Drift is a casual racing game by Nexon released on January 12, 2023. It is the follow-up to Crazy Racing KartRider, which launched in 2004 and ran for 18 years. It supports cross-platform play across PC, console, and mobile, and customization lets players use their own kart body and distinctive characters. It keeps the gameplay of the original KartRider with sharper graphics, which drew wide attention.

Figure 1. KartRider: Drift
KartRider: Drift has two main modes, Item Race and Speed Race. Item Race lets players use a variety of items, and its core is strategic play through team cooperation. Speed Race has players collect boosters by drifting and then use them, so players can enjoy a thrilling sense of speed.
You are in charge of finding the winning team in a Speed Race squad. A squad is a mode in which 8 racers play, on the Red team and on the Blue team. In Speed Race, the team whose members' rank points add up to the higher total wins. If the totals are equal, the team with the higher best rank wins. As the score table below shows, if all racers finish at different times, the point totals are always different.
In the original game, a racer who does not finish within seconds after the first place racer finishes is retired. In this problem, all racers are skilled enough that nobody retires. Also, all racers finish at different times. Given the finish time and team of each of the racers in a Speed Race squad, use the score table below to decide which team wins.
Input
The first line through the eighth line each give one racer's finish time and team, separated by a space, with one racer per line.
- The finish time is in the form
M:SS:sss. - M is an integer from 0 to 9, SS is an integer from 0 to 59, and sss is an integer from 0 to 999. A field with fewer digits is padded with leading zeros.
- All racers finish at different times between 0:00:001 and 9:59:999. Input never includes a retirement.
- Team is R for Red or B for Blue.
Output
Print Red if the Red team wins, or Blue if the Blue team wins.
Hint
The Red team gets 2nd, 4th, 5th, and 6th place for a total of points. The Blue team gets 1st, 3rd, 7th, and 8th place for a total of points.

