Mock CCC '20 Contest 1 J2 - Tie

View as PDF

Submit solution

Points: 3 (partial)
Time limit: 2.0s
Memory limit: 128M

Author:
Problem type

A tie in a game occurs when you have an equal number of wins as losses.

Given a series of wins and losses, can you determine if there is a tie or not?

Input Specification

The first line will contain the integer N, the number of events that occur. There will be between 1 and 100 events, inclusive.

The next N lines will each contain an integer, d, followed by either L or W. This means that you lost or won d times, where L is loss and W is win. d will be between 0 and 100, inclusive.

Output Specification

Output two integers on one line: The number of losses followed by the number of wins.

Sample Input

4
3 L
2 W
4 W
0 L

Sample Output

3 6

Comments

There are no comments at the moment.