原创 1103 Integer Factorization(30 分)(cj)

1103 Integer Factorization(30 分) The K−P factorization of a positive integer N is to write N as the sum of the P-th pow

原创 1110 Complete Binary Tree(25 分)(cj)

1110 Complete Binary Tree(25 分) Given a tree, you are supposed to tell if it is a complete binary tree. Input Specifica

原创 1106 Lowest Price in Supply Chain(25 分)(cj)

1106 Lowest Price in Supply Chain(25 分) A supply chain is a network of retailers(零售商), distributors(經銷商), and suppliers

原创 1102 Invert a Binary Tree(25 分)(cj)

1102 Invert a Binary Tree(25 分) The following is from Max Howell @twitter: Google: 90% of our engineers use the softwa

原创 1105 Spiral Matrix(25 分)(cj)

1105 Spiral Matrix(25 分) This time your job is to fill a sequence of N positive integers into a spiral matrix in non-in

原创 1108 Finding Average(20 分)(cj)

1108 Finding Average(20 分) The basic task is simple: given N real numbers, you are supposed to calculate their average.

原创 1101 Quick Sort(25 分)(cj)

1101 Quick Sort(25 分) There is a classical process named partition in the famous quick sort algorithm. In this process

原创 1104 Sum of Number Segments(20 分)(cj)

1104 Sum of Number Segments(20 分) Given a sequence of positive numbers, a segment is defined to be a consecutive subseq

原创 1095 Cars on Campus(30 分)(cj)

1095 Cars on Campus(30 分) Zhejiang University has 8 campuses and a lot of gates. From each gate we can collect the in/o

原创 1080 Graduate Admission(30 分)

1080 Graduate Admission(30 分) It is said that in 2011, there are about 100 graduate schools ready to proceed over 40,00

原创 1091 Acute Stroke(30 分)(cj)

1091 Acute Stroke(30 分) One important factor to identify acute stroke (急性腦卒中) is the volume of the stroke core. Given t

原创 1086 Tree Traversals Again(25 分)

1086 Tree Traversals Again(25 分) An inorder binary tree traversal can be implemented in a non-recursive way with a stac

原创 1096 Consecutive Factors(20 分)(cj)

1096 Consecutive Factors(20 分) Among all the factors of a positive integer N, there may exist several consecutive numbe

原创 1092 To Buy or Not to Buy(20 分)

1092 To Buy or Not to Buy(20 分) Eva would like to make a string of beads with her favorite colors so she went to a smal

原创 1090 Highest Price in Supply Chain(25 分)(cj)

1090 Highest Price in Supply Chain(25 分) A supply chain is a network of retailers(零售商), distributors(經銷商), and supplier