## LCC/Moose '19 Contest 2 J4 - Missing Missiles

View as PDF

Points: 5 (partial)
Time limit: 2.0s
Memory limit: 64M

Author:
Problem types

After realizing that DMOJistan has the answers to next month's LCC questions, the army of the Incorporated States of MCPT has launched missiles at DMOJistan at random locations all in a by grid centered at in the hopes that the solution would be destroyed.

Unfortunately, none of them hit anything, and even worse, the head of the DMOJistan army sent back a taunting message detailing where each missile hit in relation to the solutions to the LCC problems represented as follows:

• U meaning that missile had a higher coordinate than the LCC solutions.
• D meaning that missile had a lower coordinate than the LCC solutions.
• L meaning that missile had a lower coordinate than the LCC solutions.
• R meaning that missile had a higher coordinate than the LCC solutions.

The MCPT army only has one missile left, so this one can't miss. They decide to ask you the following:

What is the most probable location of the LCC solutions?

#### Input Specification

The first line will contain an integer , the number of missiles fired.

The next lines will contain a single character, the location of the missile in relation to the problem solutions.

It is guaranteed that there will be at least 1 missile on each side of the problem solutions.

#### Output Specification

Two lines, the first one containing the coordinate of the object, the second line containing the coordinate of the object. Your answer will be considered correct if it has an absolute or relative error of at most .

#### Sample Input 1

4
U
D
L
R

#### Sample Output 1

0
0

#### Sample Input 2

7
U
D
L
R
U
R
U

#### Sample Output 2

-33.333
-50