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

16408번 - Poker Hand 다국어

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

문제

You are given a five-card hand drawn from a standard 52-card deck. The strength of your hand is the maximum value k such that there are k cards in your hand that have the same rank.

Compute the strength of your hand.

입력

The input will consist of a single line, with five two-character strings separated by spaces.

The first character in each string will be the rank of the card, and will be one of A23456789TJQK. The second character in the string will be the suit of the card, and will be one of CDHS.

You may assume all the strings are distinct.

출력

Output, on a single line, the strength of your hand.

제한

예제 입력 1

AC AD AH AS KD

예제 출력 1

4

예제 입력 2

2C 4D 4H 2D 2H

예제 출력 2

3

예제 입력 3

AH 2H 3H 4H 5H

예제 출력 3

1

힌트

출처

ICPC > Regionals > North America > Mid-Central Regional > 2018 Mid-Central Regional Programming Contest D번

ICPC > Regionals > North America > Pacific Northwest Regional > 2018 Pacific Northwest Region Programming Contest > Division 2 Q번

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

출처

대학교 대회

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

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