| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 10100 | Bell Triangle |
|
| 10152 | wave |
|
| 10171 | Chinese Words |
|
Description
As described in Wikipedia,
Bell triangle is a triangle of numbers analogous to Pascal's triangle, whose values count partitions of a set in which a given element is the largest singleton.
Construction of the Bell triangle:
Bell(1,1) = 1
Bell(n,1) = Bell(n-1,n-1), for n = 2, 3, 4, ...
Bell(n,k) = Bell(n-1,k-1) + Bell(n,k-1), for n = 2, 3, ... and k = 2, 3, ...
Or you can do step by step as follow:




.jpg)
.jpg)

Given a postive integer N,
display the Bell’s triangle from row 1 to row N.
Use '%11d' to print each row element and print a newline at the end of each row.
Input
Given a postive number N and the range of N is 1 ≦ N ≦ 15.
Output
Print the Bell triangle from row 1 to row N,
and all elements of Bell triangle are smaller than 231-1.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Give a character C , a length L and number N.
Input
Description
In traditional chinese, people write words from right top to left down.
Now you have a grid paper which contains N words. N will not bigger than 4096.
The size of the grid paper is H * W (height * width). The size of H and W are between 1 to 64.
Each grid only write a character.
You have to implement two parts :
- You have to rewrite an article from right top to left down.
- If the word is a space, namely ' ', then you have to skip it.
[Note]The blanks at the left down should be filled with ' '.
Hint:

Input
There are 3 input.
1. The number of characters (N) in the article. 0<=N<=4096
2. The size of the grid paper : H (height) and W (width). 1<=H<=64, 1<=W<=64
3. The contents of the article
Output
Rewrite the article which is height H and width W from right top to left down.
There is a newline at the end of the output.