brute force

POJ1006

Written by  on February 1, 2016

POJ1006 Biorhythms Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 124772 Accepted: 39392 Description Some people believe that there are three cycles in a person’s life that start the day he or she is born. These three cycles are the physical, emotional, and intellectual cycles, and they have periods of lengths 23, 28, and 33 days, respectively. There is one peak in each period of a cycle. At the peak of a cycle, a person performs at his or her best in the corresponding field (physical, emotional or mental). For example, if it is the mental curve, thought processes will be sharper and concentration will be easier.

[Read more...]

UVAOJ11198

Written by  on March 26, 2015

UVA11198 Rujia Liu的神题啊,虽然AC率有40%,但是AC的人数只有两三百个。。随便搞一搞就前150了 Orz。。。 题意就是给一个序列,只有当两个元素异号且绝对值之和是质数才可以移动到彼此的左右边,即ai可以移动到aj的左边或者右边,aj也可以移动到ai的左边或者右边,问最少移动多少次就可以使整个序列递增排列。

[Read more...]