![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
HDU
文章平均质量分 90
xiaohuihuicb
分享快乐
展开
-
HDU1565—方格取数(1)——状压DP
Problem Description给你一个n*n的格子的棋盘,每个格子里面有一个非负数。从中取出若干个数,使得任意的两个数所在的格子没有公共边,就是说所取的数所在的2个格子不能相邻,并且取出的数的和最大。Input包括多个测试实例,每个测试实例包括一个整数n 和n*n个非负数(nOutput对于每个测试实例,输出可能取得的最大的和Sample原创 2015-07-30 19:59:32 · 519 阅读 · 0 评论 -
HDU --1157 Who's in the Middle——nth_element
DescriptionFJ is surveying his herd to find the most average cow. He wants to know how much milk this 'median' cow gives: half of the cows give as much or more than the median; half give as much o原创 2015-07-29 22:54:42 · 550 阅读 · 0 评论 -
HDU1950-Bridging signals-最长上升子序列
Description'Oh no, they've done it again', cries the chief designer at the Waferland chip factory. Once more the routing designers have screwed up completely, making the signals on the chip connec原创 2015-08-02 02:04:59 · 1221 阅读 · 0 评论 -
欧拉回路
http://acm.hdu.edu.cn/showproblem.php?pid=1878对于无向图存在欧拉回路的两个条件:1)所有的度为偶数2)连通图对于有向图:1)所有的顶点入度等于出度2)连通图代码如下:#includeusing namespace std;const int maxn = 1005;vectorG[maxn];int vis[ma原创 2016-03-31 00:49:03 · 587 阅读 · 0 评论 -
hdu 3874 树状数组 离线处理
hdu 3874 /*题意:此题的大意思说有一串珠子,每个珠子都有自己的欣赏值value,现在给你一 串珠子每个的欣赏值,并给出一些询问,查询某个区间内部总欣赏值是多少,但是有 一个约定就是如果这个区间内部有两个珠子的欣赏值是一样的,那么他们就视为一个。 其实也就是求某个区间内部不同的数的和。采用离线操作离线 通常情况下对一种固定的序列,进行多种不同原创 2016-07-29 14:41:25 · 450 阅读 · 0 评论