- 博客(9)
- 收藏
- 关注
原创 Addition Chains ZOJ - 1937 详细的解释
Addition Chains ZOJ - 1937An addition chain for n is an integer sequence <a0, a1,a2,…,am> with the following four properties:a0 = 1am = na0 < a1 < a2 < … < am-1 < amFor each ...
2019-07-21 20:19:00
357
原创 Watering Grass UVA - 10382 详细的解释
Watering Grass UVA - 10382题目链接题意:有一个草坪长l米,宽w米,每个洒水器安在草坪的水平中心线上,题目给出数据n个喷水器,l,w,接下来给出每一个洒水器距中心线左端的距离以及其工作半径,求灌溉整个草条所需的最小洒水器数量。思路:首先,这道题有点坑,一直过不去,我就把所有数定义成double型,就过了。(听大佬说有精度误差,就算强制转换也不行。)好气啊。。。。。...
2019-07-21 19:58:15
159
原创 Channel Allocation POJ - 1129 详细题解
Channel Allocation POJ - 1129When a radio station is broadcasting over a very large area, repeaters are used to retransmit the signal so that every receiver has a strong signal. However, the channels...
2019-07-21 19:43:44
389
1
原创 Sticks UVA - 307 剪枝 (超详细的题解)
Sticks UVA - 307题目链接题目大意:有等长木棒,将木棒随意砍成几段,直到每段木棍的长度都不超过50.现在将木棍拼接成原来的样子,但是不记得最开始有多少木棒和它们的分别长度。给出每根小木棍的长度,编程找出原始木棒的最小可能长度。ps:木棒和木棍是不一样的。思路:这道题非常经典,有多个剪枝,把剪枝用到了极致。第一个剪枝:我们首先要枚举原来木棒的长度,那么该从几开始,到几结束呢?范...
2019-07-21 19:24:03
431
原创 Eight HDU - 1043
Eight HDU - 1043The 15-puzzle has been around for over 100 years; even if you don’t know it by that name, you’ve seen it. It is constructed with 15 sliding tiles, each with a number from 1 to 15 on i...
2019-07-21 18:24:28
136
原创 Maximum Sum UVA - 108
题目链接思路:这道题目乍一看,无从下手,感觉暴力的话会爆,但是还是尝试了一下,竟然过了?!首先把只看这个矩形的第一行遍历第一行的所有区间,然后每个区间都向下扩展,扩展的时候如果出现小于零,就把他们的和重置为零,(题目已经提示Given a 2-dimensional array of positive and negative integers,给定一个由正整数和负整数组成的二维数组),否则的...
2019-07-21 16:41:14
128
原创 代码高亮以及加入图片
#include <stdio.h>#include <stdlib.h>int main(){int i;for(i =0;i<5;i++)printf("%d******************\n",i);//getchar();system("cls");return 0;}
2019-06-04 21:58:54
180
原创 Reward HDU - 2647 详解
Reward HDU - 2647欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入...
2019-04-08 16:01:59
1306
原创 Dating with girls(2) HDU - 2579
**Dating with girls(2) HDU - 2579**If you have solved the problem Dating with girls(1).I think you can solve this problem too.This problem is also about dating with girls. Now you are in a maze and...
2019-04-08 00:02:16
303
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人