Logo
(追記) (追記ここまで)

15233번 - Final Score 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB55043035580.866%

문제

We have had a problem with one of our hard disks and we lost the final score of some football matches. However, we have been able to recover the names of the players that scored and found the members of each team on Wikipedia.

입력

The first line will contain three integers A, B and G representing the number of players in team A and team B and the number of goals scored in the match.

The second line will contain A strings separated by spaces. The names of the players of team A.

The third line will contain B strings separated by spaces. The names of the players of team B.

The fourth line will contain G strings. The names of the players that scored.

There will be at most 20 players in each team and at most 100 goals.

The names of the players are lowercase latin letters and they will have at most 20 characters each.

출력

Print "A" if the team A scored more than team B.

Print "B" if the team B scored more than team A.

Print "TIE" if both scored the same number of goals.

제한

예제 입력 1

3 3 5
messi neymar suarez
ronaldo bale james
messi messi messi bale james

예제 출력 1

A

예제 입력 2

4 1 5
jordan pippen oneal bryant
villa
villa villa villa villa villa

예제 출력 2

B

예제 입력 3

3 3 4
messi neymar suarez
ronaldo bale james
bale messi ronaldo suarez

예제 출력 3

TIE

힌트

출처

Olympiad > All-Ireland Programming Olympiad > 2017 AIPO Preliminary Round 2번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /