| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 9015 | Palindrome |
|
| 11133 | String Reverse |
|
| 11151 | rectangle intersection |
|
| 11533 | Christmas tree |
|
Description
Palindrome is a string that is identical to its reverse, like "level" or "aba". Check whether a given string is a palindrome or not.
Input
The input consists of multiple lines. Each line contains a string. The length of each string is less than 100000. The number of test case is less than 1000.
Output
For each test case, output "Yes" if it's a palindrome or "No" if it's not a palindrome in a line.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
Given a string S, output the reverse of S.
Input
The input consists of many lines. Each line is a string S with length <= 1000.
The string S does not contain any spaces.
Output
Output the the reverse of S. One in each line.
Print '\n' at the end of each line.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
According to Wikipedia, the definition of rectangle is as follows: "In Euclidean plane geometry, a rectangle is a quadrilateral(四邊形) with four right angles(直角). It can also be defined as an equiangular quadrilateral, since equiangular means that all of its angles are equal (360°/4 = 90°)."
In this problem, you are asked to calculate the number of rectangle pairs that intersect to each other among a set of given rectangles. All rectangles are located in a 2-dimensional euclidean space(二維空間), and all their edges are parallel to either the X- or the Y-axis.
Input
The first line contains one number N, where 2 <= N <= 128, standing for the number of given rectangles.
Each of the following N lines describes a rectangle and has 4 integers separated by space, representing
- the x coordinate of the bottom-left vertex
- the y coordinate of the bottom-left vertex
- the width (the length of the edge that is parallel to the x-axis), positive
- the height (the length of the edge that is parallel to the y-axis), positive
Notice that each of the 4 numbers is representable by an int type in C language.
Output
The output should contain only one number, representing the number of rectangle pairs that intersect to each other.
Notice that if the area of overlapping part is zero, then the pair should NOT count.
Sample Input Download
Sample Output Download
Tags
Discuss
Description
請印出聖誕樹
Input
會給3個數字level, width, height
level: 表示樹葉部份的層數,每層為上一層加2(e.g. 1 3 5 7 ...), 1 <= level <= 20
width: 表示樹木的寬度,寬度只會是奇數, 1 <= width <= 39
height: 表示樹木的高度,0 <= height <= 9
Output
請參考sample IO (可以載下來觀看),樹木的寬度可能會超過樹葉部份的寬度,請以最寬的部份為基準,碰在畫面最左邊(如果height是0,不影響畫的位置),樹木的中心點會剛好對應整棵樹的中心點(整棵樹左右會對稱)
每行最右邊的'*'號,請接換行符號('\n'),不要輸出多餘的符號如空白' '
sample IO共有4個例子,用'---'做區隔,實際的IO只會有三個數字,並且只需要輸出一次聖誕樹即可