原创 1096. Consecutive Factors (20)

Among all the factors of a positive integer N, there may exist several consecutive numbers. For example, 630 can be fa

原创 1104. Sum of Number Segments (20)

Given a sequence of positive numbers, a segment is defined to be a consecutive subsequence. For example, given the seq

原创 1128. N Queens Puzzle (20)

The "eight queens puzzle" is the problem of placing eight chess queens on an 8×8 chessboard so that no two queens thre

原创 1112. Stucked Keyboard (20)

On a broken keyboard, some of the keys are always stucked. So when you type some sentences, the characters correspond

原创 1081. Rational Sum (20)

Given N rational numbers in the form "numerator/denominator", you are supposed to calculate their sum. Input Specifi

原创 1100. Mars Numbers (20)

People on Mars count their numbers with base 13: Zero on Earth is called "tret" on Mars. The numbers 1 to 12 on Earc

原创 1116. Come on! Let's C (20)

"Let's C" is a popular and fun programming contest hosted by the College of Computer Science and Technology, Zhejian

原创 1065. A+B and C (64bit) (20)

Given three integers A, B and C in [-263, 263], you are supposed to tell whether A+B > C.Input Specification:The first

原创 1046. Shortest Distance (20)

The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest

原创 1105. Spiral Matrix (25)

This time your job is to fill a sequence of N positive integers into a spiral matrix in non-increasing order. A spiral

原创 1134. Vertex Cover (25)

A vertex cover of a graph is a set of vertices such that each edge of the graph is incident to at least one vertex of t

原创 1120. Friend Numbers (20)

Two integers are called "friend numbers" if they share the same sum of their digits, and the sum is their "friend ID".

原创 1015. Reversible Primes (20)

A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For exampl

原创 1069. The Black Hole of Numbers (20)

For any 4-digit integer except the ones with all the digits being the same, if we sort the digits in non-increasing

原创 1129. Recommendation System (25)

Recommendation system predicts the preference that a user would give to an item. Now you are asked to program a very si