上一页 1 ··· 4 5 6 7 8
摘要: It is very hard to wash and especially to dry clothes in winter. But Jane is a very smart girl. She is not afraid of this boring process. Jane has dec 阅读全文
posted @ 2017-08-21 16:48 #Egoist# 阅读(338) 评论(0) 推荐(0) 编辑
摘要: 恢复内容开始 说起二分,最基础的二分搜索算法就不用了吧(最难的还际应用啊感觉)……实现起来很简单,搜索区间不断减半……唔……嘛……简单甩个模板好了(●'◡'●) 下面开始学习二分的几种应用啦~~ 1.假定一个解并判断是否可行 一般用于求解判断条件较为简单的最大化和最小化的问题,不断缩小答案的区间。 阅读全文
posted @ 2017-08-20 22:25 #Egoist# 阅读(391) 评论(0) 推荐(0) 编辑
摘要: 连连看 HDU - 1175 “连连看”相信很多人都玩过。没玩过也没关系,下面我给大家介绍一下游戏规则:在一个棋盘中,放了很多的棋子。如果某两个相同的棋子,可以通过一条线连起来(这条线不能经过其它棋子),而且线的转折次数不超过两次,那么这两个棋子就可以在棋盘上消去。不好意思,由于我以前没有玩过连连看 阅读全文
posted @ 2017-08-19 22:49 #Egoist# 阅读(174) 评论(0) 推荐(0) 编辑
摘要: Monkey and Banana HDU - 1069 A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a b 阅读全文
posted @ 2017-08-19 17:11 #Egoist# 阅读(214) 评论(0) 推荐(0) 编辑
摘要: B. Godsend Leha somehow found an array consisting of n integers. Looking at it, he came up with a task. Two players play the game on the array. Player 阅读全文
posted @ 2017-08-19 15:56 #Egoist# 阅读(283) 评论(0) 推荐(0) 编辑
摘要: A. Generous Kefa One day Kefa found n baloons. For convenience, we denote color of i-th baloon as si — lowercase letter of the Latin alphabet. Also Ke 阅读全文
posted @ 2017-08-19 15:39 #Egoist# 阅读(226) 评论(0) 推荐(0) 编辑
摘要: HDU 1024 Max Sum Plus Plus 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 mor 阅读全文
posted @ 2017-08-18 21:59 #Egoist# 阅读(323) 评论(0) 推荐(0) 编辑
摘要: 1.背包问题 (1)01背包 从n个重量和价值分别为wi,vi的物品,从中选出不超过W的物品,每种物品仅有一件,求所有方案中V的最大值。 最朴素最简单也最费时的方法:O(2^n) int rec(int i,int j)//从第i个开始挑选总重小于j的部分 递归 递归终止条件:i==n return 阅读全文
posted @ 2017-08-18 18:35 #Egoist# 阅读(219) 评论(0) 推荐(0) 编辑
摘要: skiing 时间限制:3000 ms | 内存限制:65535 KB 难度:5 描述 Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二 阅读全文
posted @ 2017-08-18 18:33 #Egoist# 阅读(190) 评论(0) 推荐(0) 编辑
摘要: DP 阅读全文
posted @ 2017-08-18 16:59 #Egoist# 阅读(201) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8