| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 12038 | Alphabet Triangle |
|
| 12039 | Full House 2018 |
|
Description
Given a single capital letter (大寫字母), you need to build an Alphabet Triangle.
The first row only exists ‘A’ in the middle, while the second row exists “ABA” in the middle, and so on. (You need to fill the empty position with space)
The last row should have input single capital letter in the middle.
Ex. An 'E' Alphabet Triangle (The first row consists of 4 spaces + 'A' + 4 spaces)

Input
A single capital letter.
Output
An alphabet triangle.
(Please refer to sample output. You can download to see it clearly.)
(Need to printf "\n" at the end)
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Copyright © 11622 - pF - Full House
The "Mannulus" casino is now celebrating its grand opening in Canterlot! The owner, Lightyear, introduces the cutting-edge technology to the casino : Farseer Cards Auto Detect System. If it works well, the casino will no longer need to employ any dealer!
The question is : the system cannot automatically rank the cards in the correct order. So Lightyear decides to hire a group of programmers to improve the whole system. You, as a beginning programmer, is assigned to write a program to check whether a set of five cards forms a full house or not. Lightyear will then give you T sets of cards to verify the correctness of your program.
Do not disappoint him.
Definition of ful house: A poker hand contains three cards of one rank and two cards of another rank.
For example:

P.S. The first two testcases, cards only consist of numbers from 2 to 9. And the last two testcases have respectively 1000, 10000 card sets to test your code's robustness.
Input
The first line contains an integer T, representing the number of sets Lightyear gives to you.
The next T lines contain 5 cards in each given set, separated by whitespaces.
The cards would range from : {A, 2, 3, 4, 5, 6, 7, 8 ,9 ,10, J, Q, K}.
(In this problem, you don't need to consider the suit of each card.)
-
1 ≤ | T | ≤ 10000
Output
For each set of card, please print 'YES' if the set is a full house, otherwise please print 'NO'.
Remember to print '\n' after each answer.