会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
frankM
天下武功,唯快不破。
博客园
|
首页
|
新随笔
|
新文章
|
联系
|
订阅
|
管理
上一页
1
···
6
7
8
9
10
11
12
13
14
···
18
下一页
2014年7月26日
HDU 3371 Connect the Cities
摘要: 链接:http://acm.hdu.edu.cn/showproblem.php?pid=3371跟畅通工程基本上一模一样。注意有重边的情况#include #include#include#define MAX_N 505using namespace std;int par[MAX_N];int...
阅读全文
posted @ 2014-07-26 16:28 frankM
阅读(157)
评论(0)
推荐(0)
编辑
HDU 3466 Proud Merchants
摘要: 链接:http://acm.hdu.edu.cn/showproblem.php?pid=3466本来以为就是一个普通的01背包.. 在购买商品时,条件不单单是拥有的钱大于商品的售价P,还要大于商品的另一个属性Q 。而且Q>=P..因为动态规划的后效性,要先按Qi-Pi排序,在按01背包做注意,so...
阅读全文
posted @ 2014-07-26 15:33 frankM
阅读(131)
评论(0)
推荐(0)
编辑
2014年7月23日
POJ 3255 Roadblocks
摘要: 链接:http://poj.org/problem?id=3255题目要求1~N的次短路径.代码来自《挑战程序设计竞赛》#include #include#include#define MAX_N 100005#define INF 1000000using namespace std;struct...
阅读全文
posted @ 2014-07-23 15:10 frankM
阅读(125)
评论(0)
推荐(0)
编辑
2014年7月19日
KMP算法的前缀next数组最通俗的解释
摘要: 转载自:http://blog.csdn.net/yearn520/article/details/6729426我们在一个母字符串中查找一个子字符串有很多方法。KMP是一种最常见的改进算法,它可以在匹配过程中失配的情况下,有效地多往后面跳几个字符,加快匹配速度。当然我们可以看到这个算法针对的是子串...
阅读全文
posted @ 2014-07-19 16:53 frankM
阅读(777)
评论(2)
推荐(0)
编辑
2014年7月18日
HDU 1829 A Bug's Life
摘要: 链接:http://acm.hdu.edu.cn/showproblem.php?pid=1829用二分图做的,,,,,,刚学图,,以为这道题有向图跟无向图都没影响,,,贡献了N次WA。。调试了好久才找到原因,,贡献一组测试数据:89 1142 243 523 5412 5576 333 8989 ...
阅读全文
posted @ 2014-07-18 16:30 frankM
阅读(106)
评论(0)
推荐(0)
编辑
2014年7月16日
HDU 1879 继续畅通工程
摘要: 链接:http://acm.hdu.edu.cn/showproblem.php?pid=1879并查集+优先队列...用cin会超时...TLE了好几次#include #include#include#define MAX_N 105using namespace std;class rode{...
阅读全文
posted @ 2014-07-16 16:45 frankM
阅读(143)
评论(0)
推荐(0)
编辑
2014年7月6日
课程设计:学生管理系统(c++)
摘要: #include #include #include #include #include #include #include #include using namespace std;class score //分数{public: int s_total; int s_...
阅读全文
posted @ 2014-07-06 17:04 frankM
阅读(922)
评论(0)
推荐(0)
编辑
2014年6月27日
HDU 1016 Prime Ring Problem
摘要: 链接:http://acm.hdu.edu.cn/showproblem.php?pid=1016DFS的经典题#include#includeusing namespace std;int ring[25];bool prime[45];bool visit[25];void isprime(in...
阅读全文
posted @ 2014-06-27 22:38 frankM
阅读(121)
评论(0)
推荐(0)
编辑
2014年6月25日
HDU 4310 Hero
摘要: 链接:http://acm.hdu.edu.cn/showproblem.php?pid=4310按比值排序:dps/hp...为了避免小数出现cmp函数写成相乘的形式#include #includeusing namespace std;class hero{public: int hp;...
阅读全文
posted @ 2014-06-25 11:11 frankM
阅读(151)
评论(0)
推荐(0)
编辑
2014年6月21日
素数筛选法<单向链表实现>
摘要: #include using namespace std;struct note{ int data; note *next;};class listprime{private: note *head;public: listprime(int n); void Del...
阅读全文
posted @ 2014-06-21 01:30 frankM
阅读(310)
评论(0)
推荐(0)
编辑
上一页
1
···
6
7
8
9
10
11
12
13
14
···
18
下一页
公告