摘要:
To seek candies for Maomao, Dudu comes to a maze. There are nn rooms numbered from 11 to nn and mmundirected roads. There are two kinds of rooms in th 阅读全文
摘要:
You are given a number of case-sensitive strings of alphabetic characters, find the largest string X, such that either X, or its inverse can be found 阅读全文
摘要:
You may have wondered why most extraterrestrial life forms resemble humans, differing by superficial traits such as height, colour, wrinkles, ears, ey 阅读全文
摘要:
The repetition number of a string is defined as the maximum number R such that the string can be partitioned into R same consecutive substrings. For e 阅读全文
摘要:
Given a sequence, {A1, A2, ..., An} which is guaranteed A1 > A2, ..., An, you are to cut it into three sub-sequences and reverse them separately to fo 阅读全文
摘要:
Problem Description You have a directed weighted graph with n vertexes and m edges. The value of a path is the sum of the weight of the edges you pass 阅读全文
摘要:
BaoBao has just found a rooted tree with n vertices and (n-1) weighted edges in his backyard. Among the vertices, m of them are red, while the others 阅读全文