- 博客(4)
- 收藏
- 关注
原创 C - Humble Numbers HDU - 1058
A number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, … shows the first 20 humble numbers. Writ
2017-09-16 10:25:25 275
原创 H - Post Office POJ - 1160
There is a straight highway with villages alongside the highway. The highway is represented as an integer axis, and the position of each village is identified with a single integer coordinate. There ar
2017-09-09 23:51:38 343
原创 G - To the Max POJ - 1050
Given a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater located within the whole array. The sum of a rectangle is the sum of
2017-09-09 13:01:17 296
原创 湖南省2017省赛A题
题目大意,给你n个数,要求你给出任意一个排列,要求一个数与左右的数的差值的绝对值大小大于d。 直接递推,设第一个数为a,则第二个数显然最大为n,那么可以推出a = n - d - 1,第三个数为a - 1,第四个数为a + d。 以此可递推出第i个数大小为,分奇偶性,i为奇数时,其为a - (i - 1) / 2,偶数时,a + d - (i - 4) / 2。 考虑到一点,这样递推保证了
2017-09-05 20:13:46 320
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人