| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 11129 | Alphabet Diamond |
|
| 11567 | Hexadecimal to Binary |
|
| 11593 | Mexican Wave |
|
Description
The input is a positive integer x, and you should print a alphabet diamond which has x layers. The alphabet diamond is in increasing alphabet order (A B C ... Z) from the outer to the inner. (x <= 26 )
Before the first alphabet, you should use only spaces to align the alphabet and, any other types of indentation is not acceptable.
Please note that there is no need to print space after the last alphabet in each line and, you only need to print a newline.
Input
One positive integer x, x<=26.
Output
An alphabet diamond (please refer to the output sample)
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Please try to add 2 hexadecimal numbers, and give the answer as binary number.
EX: Given A and B, we know that A represents 10 and B represents 11 in decimal, 10 + 11 = 21.
21 is 10101 in binary form , so the answer is 10101.
Hint: You can use %x to read hexadecimal numers :)
(Reference) Below is Acsii Table:

Input
Two hexadecimal numbers X and Y.
Output
The sum of X and Y in binary form.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
James, a pro photographer, recently went to a baseball game. He was very interested in Mexican wave, so he decided to take some photos of it.
Image that there are n spectators in the stadium, labelled from 1 to n. The maximum length of the wave is m. The spectators start the Mexican wave at time 0.
- At time 1, the first spectator stands.
- At time 2, the second spectator stands.
- ...
- At time m, the m-th spectator stands.
- At time m + 1, the (m + 1)-th spectator stands and the first spectator sits.
- At time m + 2, the (m + 2)-th spectator stands and the second spectator sits.
- ...
- At time n, the n-th spectator stands and the (n - m)-th spectator sits.
- At time n + 1, the (n + 1 - m)-th spectator sits.
- ...
- At time n + m, the n-th spectator sits.
Now, James prints out T pictures he took and wants to play a game with you. For each picture, James will give you n, m, and the time t he took the picture. Can you predict how will picture looks like?
If you win the game, maybe James will teach you some tips about shooting an astonishing picture.
Input
The first line contains one integer number T, representing the numbers of photos.
The next T lines contain three integers n, m, t, representing the number of spectators, the maximum length of the wave, and the time James took the picture.
1 <= T <= 100
1 <= m <= n <= 100
0 <= t <= 100
Output
For each picture please output a line contains n characters, representing the states of the n spectators. If a spectator is sitting, please print '-', otherwise please print '^'. You can find out more information in sample output.