Welcome to Yumao′s Blog.
ZOJ Problem Set – 1003 Crashing Balloon
, 2010年04月04日 , C Language , 评论 在〈ZOJ Problem Set – 1003 Crashing Balloon〉中留言功能已關閉 ,
Crashing Balloon


Time Limit: 1 Second      Memory Limit: 32768 KB


On every June 1st, the Children's Day, there will be a game named “crashing balloon” on TV.   The rule is very simple.  On the ground there are 100 labeled balloons, with the numbers 1 to 100.  After the referee shouts “Let's go!” the two players, who each starts with a score of  “1”, race to crash the balloons by their feet and, at the same time, multiply their scores by the numbers written on the balloons they crash.  After a minute, the little audiences are allowed to take the remaining balloons away, and each contestant reports his\her score, the product of the numbers on the balloons he\she's crashed.  The unofficial winner is the player who announced the highest score.

Inevitably, though, disputes arise, and so the official winner is not determined until the disputes are resolved.  The player who claims the lower score is entitled to challenge his\her opponent's score.  The player with the lower score is presumed to have told the truth, because if he\she were to lie about his\her score, he\she would surely come up with a bigger better lie.  The challenge is upheld if the player with the higher score has a score that cannot be achieved with balloons not crashed by the challenging player.  So, if the challenge is successful, the player claiming the lower score wins.

ZOJ Problem Set – 1002 Fire Net(C Language)
, 2010年04月04日 , C Language , 评论 在〈ZOJ Problem Set – 1002 Fire Net(C Language)〉中留言功能已關閉 ,
Fire Net


Time Limit: 1 Second      Memory Limit: 32768 KB


Suppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a street or a piece of wall.

A blockhouse is a small castle that has four openings through which to shoot. The four openings are facing North, East, South, and West, respectively. There will be one machine gun shooting through each opening.

Here we assume that a bullet is so powerful that it can run across any distance and destroy a blockhouse on its way. On the other hand, a wall is so strongly built that can stop the bullets.

The goal is to place as many blockhouses in a city as possible so that no two can destroy each other. A configuration of blockhouses is legal provided that no two blockhouses are on the same horizontal row or vertical column in a map unless there is at least one wall separating them. In this problem we will consider small square cities (at most 4×4) that contain walls through which bullets cannot run through.

The following image shows five pictures of the same board. The first picture is the empty board, the second and third pictures show legal configurations, and the fourth and fifth pictures show illegal configurations. For this board, the maximum number of blockhouses in a legal configuration is 5; the second picture shows one way to do it, but there are several other ways


ZOJ Problem Set – 1163 The Staircases(C Language)
, 2010年04月03日 , C Language , 评论 在〈ZOJ Problem Set – 1163 The Staircases(C Language)〉中留言功能已關閉 ,
The Staircases
Time Limit: 1 Second      Memory Limit: 32768 KB


One curious child has a set of N little bricks. From these bricks he builds different staircases. Staircase consists of steps of different sizes in a strictly descending order. It is not allowed for staircase to have steps equal sizes. Every staircase consists of at least two steps and each step contains at least one brick. Picture gives examples of staircase for N=11 and N=5:

Your task is to write a program that reads from input numbers N and writes to output numbers Q – amount of different staircases that can be built from exactly N bricks.


Numbers N, one on each line. You can assume N is between 3 and 500, both inclusive. A number 0 indicates the end of input.

Zoj2965________糾結的Wrong Answer
, 2010年03月29日 , C Language , 评论 在〈Zoj2965________糾結的Wrong Answer〉中留言功能已關閉 ,

但是上傳到服務器測試就Wrong Answer
他們都說沒錯阿= =ll   VC++也編譯通過
好吧  windows的編譯器就是這麽的不可靠
OMG阿OMG   我的一個小時….~~~~~

分页 (4): « 1 2 3 4