Under construction

Still being built. Things may change

KartRider: Drift

Time limit1sMemory limit1024 MB

Summary
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.

Figure 2. Item Race in KartRider: DriftFigure 3. Speed Race in KartRider: Drift

You are in charge of finding the winning team in a Speed Race squad. A squad is a mode in which 8 racers play, 44 on the Red team and 44 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 88 racers finish at different times, the point totals are always different.

In the original game, a racer who does not finish within 1010 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 88 racers in a Speed Race squad, use the score table below to decide which team wins.

Rank1st2nd3rd4th5th6th7th8thRetire
Points10108866554433221100

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 2020 points. The Blue team gets 1st, 3rd, 7th, and 8th place for a total of 1919 points.

Examples1

  1. Example 1

    Input
    1:52:682 B
    1:50:201 R
    1:49:003 B
    1:49:735 B
    1:50:257 R
    1:51:134 R
    1:49:236 R
    1:53:932 B
    
    Expected output
    Red