Nội dung Bài tập
Mã:
OLP19.Cau2.PokerHand
Tên:
Cau2.Poker Hand
Dạng thi:
oi
Thang điểm:
100 điểm
Giới hạn thời gian:
1 giây
Giới hạn bộ nhớ:
256 MB
Được tạo bởi:
thuthq


You're given a ve-card hand drawn from a standard 52-card deck. Each card has a rank (one of
A, 2, 3, . . . , 9, T, J, Q, K), and a suit (one of C, D, H, S).
The strength of your hand is de ned as the maximum value k such that there are k cards in your
hand that have the same rank.
Find the strength of your hand.

Input
The input consists of a single line, with ve two-character strings separated by spaces.
The rst 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.
It is guaranteed that all ve strings are distinct.

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

Sample Input and Output

Input

Output

AC AD AH AS KD

4





Input

Output

2C 4D 4H 2D 2H

3







    Quảng cáo
       Ngôn ngữ : 

       Theme : 
Mời bạn soạn code



		



      Ai có thể xem bài này : 

Thông tin



Phần thảo luận