摘要:
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 labe... 阅读全文
摘要:
Problem DescriptionAs a poor, tuition-ridden student, you've decided to take up a part time job as a paperboy/papergirl.You've just been handed your p... 阅读全文
摘要:
You are given a chessboard made up of N squares by N squares with equal size. Some of the squares are colored black, and the others are colored white. Please write a program to calculate the number of rectangles which are completely made up of white squares. InputThere are multiple test cases. Each. 阅读全文
摘要:
DescriptionFarmer John's N (1 ≤ N ≤ 10,000) cows are lined up to be milked in the evening. Each cow has a unique "grumpiness" level in the range 1...100,000. Since grumpy cows are more likely to damage FJ's milking equipment, FJ would like to reorder the cows in line so they are li 阅读全文
摘要:
DescriptionCompared to wildleopard's wealthiness, his brother mildleopard is rather poor. His house is narrow and he has only one light bulb in his ho... 阅读全文
摘要:
DescriptionGiven a series of n numbers a1, a2, ..., an, the partial sum of the numbers is defined as the sum of ai, ai+1, ..., aj.You are supposed to calculate how many partial sums of a given series of numbers could be divided evenly by a given number m.InputThere are multiple test, each contains 2 阅读全文
摘要:
Description There are n single boys and m single girls. Each of them may love none, one or several of other people unrequitedly and one-sidedly. For the coming q days, each night some of them will come together to hold a single party. In the party, if someone loves all the others, but is not loved b 阅读全文
摘要:
DescriptionGiven N stations, you want to carry goods from station 1 to station N. Among these stations, we use M tubes to connect some of them. Each t... 阅读全文
摘要:
DescriptionA tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edges between nodes satisfying the following properties. There is exactly one node, called the root, to which no directed edges point. Every node except 阅读全文