Problem B
Guillaume
Languages
en
is

Guillaume has a unique ability to forget events before a
certain point in time, only to look better in his memory.
Guillaume and Arnar play pool quite often and you have a log of
results from their matches. Guillaume only counts the last
A draw occurs in pool if both players decide the match is invalid and want to restart the match. If a match ends in a draw, then the match has no winner.
What’s the score according to Guillaume?
Input
Input consists of two lines. The former line has one integer
Output
Output a single line in the format g-a where
Scoring
Group |
Score |
Constraints |
1 |
10 |
|
2 |
30 |
|
3 |
20 |
|
4 |
40 |
|
Sample Input 1 | Sample Output 1 |
---|---|
1 G |
1-0 |
Sample Input 2 | Sample Output 2 |
---|---|
29 AAAGAGAGAAGAAAGADGAAAGGGGGGGA |
7-1 |
Sample Input 3 | Sample Output 3 |
---|---|
12 AGAGDDDDGAGA |
3-2 |
Sample Input 4 | Sample Output 4 |
---|---|
55 GGAAAAAGAAGGAAGGGGAAGGGDDAGGGGGGGGAAGAAAGGGGGGGGGAGGGAA |
12-3 |