摘要:
The harmonic value of the permutation p1,p2,⋯pn is ∑i=1n−1gcd(pi.pi+1) Mr. Frog is wondering about the permutation whose harmonic value is the strictl 阅读全文
摘要:
Given a decimal integer number you will have to find out how many trailing zeros will be there in itsfactorial in a given number system and also you w 阅读全文
摘要:
frog is now a editor to censor so-called sensitive words (敏感词). She has a long text (p). Her job is relatively simple -- just to find the first occure 阅读全文
摘要:
Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes from Irrever 阅读全文
摘要:
Ignatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline of handing in the ho 阅读全文
摘要:
ACM (ACMers' Chatting Messenger) is a famous instant messaging software developed by Marjar Technology Company. To attract more users, Edward, the bos 阅读全文
摘要:
Now I think you have got an AC in Ignatius.L's "Max Sum" problem. To be a brave ACMer, we always challenge ourselves to more difficult problems. Now y 阅读全文
摘要:
As we all know, Coach Gao is a talented chef, because he is able to cook M dishes in the same time. Tonight he is going to have a hearty dinner with h 阅读全文
摘要:
N (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, are participating in a programming contest. As we all know, some cows code better than others. Each 阅读全文
摘要:
Several currency exchange points are working in our city. Let us suppose that each point specializes in two particular currencies and performs exchang 阅读全文
摘要:
Problems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the national debt 阅读全文
摘要:
An encoding of a set of symbols is said to be immediately decodable if no code for one symbol is the prefix of a code for another symbol. We will assu 阅读全文
摘要:
Joe works in a maze. Unfortunately, portions of the maze have caught on fire, and the owner of the maze neglected to create a fire escape plan. Help J 阅读全文