acmsguru |
---|
Закончено |
C is A(
'srelation)*
father,
mother,
son,
daughter,
husband,
wife,
brother,
sister,
grandfather,
grandmother,
grandson,
granddaughter,
uncle,
aunt,
nephew,
niece. An asterisk denotes zero or more occurance of portion surrounded by the parentheses. The number of relations is at most ten.
sample input | sample output |
C is A's father's brother's son's aunt | 5 3 |
sample input | sample output |
C is A's mother's brother's son's aunt | 5 1 |
sample input | sample output |
C is A's son's mother's mother's son | 2 2 |
sample input | sample output |
C is A's aunt's niece's aunt's niece | 6 0 |
sample input | sample output |
C is A's father's son's brother | 2 0 |
sample input | sample output |
C is A's son's son's mother | 1 1 |
sample input | sample output |
C is A | 0 0 |
Название |
---|