1122 Hamiltonian Cycle (25 分) The "Hamilton cycle problem" is to find a simple cycle that contains every vertex in a graph. Such a cycle is called a "Hamiltonian cycle". In this problem, you are supposed to tell if a given cycle is a H…
1085 Perfect Sequence (25 分) Given a sequence of positive integers and another positive integer p. The sequence is said to be a perfect sequence if M≤m×p where M and m are the maximum and minimum numbers in the sequence, respectively. Now given a seq…
1036 Boys vs Girls (25分) This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the female students. Input Specification: Each input file contains one test case. Each case conta…
01-复杂度2 Maximum Subsequence Sum (25分) Given a sequence of K integers { N1,N2, ..., NK }. A continuous subsequence is defined to be { Ni,Ni+1, ..., Nj } where 1≤i≤j≤K. The Maximum Subsequence is the continuous subsequence which has…