会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
都说了这是NanoApe的博客啦
ENE一生推>_<~【貌似跟OI没关系→_→
首页
新随笔
联系
订阅
管理
上一页
1
···
4
5
6
7
8
9
10
11
12
···
16
下一页
2015年3月17日
HDU-2236 无题II
摘要: 选取不同列不同行的N个数。。。明摆着叫你二分匹配二分答案,然后枚举边的范围并跑匈牙利,以此判断答案范围。#include #include #include #include #include #include #include #define rep(i, l, r) for(int i=l; i...
阅读全文
posted @ 2015-03-17 21:05 NanoApe
阅读(191)
评论(0)
推荐(0)
2015年3月16日
HDU-2444 The Accomodation of Students
摘要: 先用染色法判断是否存在奇数环,也就是方案是否可行。然后二分匹配。#include #include #include #include #include #include #include #define rep(i, l, r) for(int i=l; i=r; i--)#define N 23...
阅读全文
posted @ 2015-03-16 20:37 NanoApe
阅读(199)
评论(0)
推荐(0)
HDU-1281 棋盘游戏
摘要: 行列二分匹配。位于重要点的判断,删边后再判断最大匹配是否变小。#include #include #include #include #include #include #include #define rep(i, l, r) for(int i=l; i=r; i--)#define N 123...
阅读全文
posted @ 2015-03-16 20:35 NanoApe
阅读(199)
评论(0)
推荐(0)
BZOJ-1211 树的计数
摘要: Prufer编码的应用。懒的写质因数分解,直接高精度。注意当n=1的特殊情况的处理。#include #include #include #include #include #include #include #define rep(i, l, r) for(int i=l; i=r; i--)#d...
阅读全文
posted @ 2015-03-16 20:31 NanoApe
阅读(155)
评论(0)
推荐(0)
BZOJ-1430 小猴打架
摘要: 还是Prufer编码的应用。这次我们不再限制各个点的度数,那么在Prufer编码中每个位置都用N中选择,Prufer编码的种类就有n^(n-2)可能,再加上每棵树有(n-1)!的交友顺序,相乘就是答案了。其实前者的n^(n-2)也叫做Cayley定理。#include #define rep(i, ...
阅读全文
posted @ 2015-03-16 20:20 NanoApe
阅读(146)
评论(0)
推荐(0)
BZOJ-1005 明明的烦恼
摘要: Prufer编码练习题,这个编码是跟树的生成计数有关系的。推荐这篇博文:http://www.cnblogs.com/zhj5chengfeng/archive/2013/08/23/3278557.html介绍地挺全面+生动形象会了Prufer之后这道题还要用上组合数学来高精度计算。#includ...
阅读全文
posted @ 2015-03-16 20:16 NanoApe
阅读(160)
评论(0)
推荐(0)
2015年3月15日
HDU-1529 Cashier Employment
摘要: 据网上说这是到差分约束四星题。。。可我觉得难吗?比推DP方程容易。。。两种约束方式,当然实现到程序就变成六种了。。。#include #include #include #include #include #include #include #include #define rep(i, l, r)...
阅读全文
posted @ 2015-03-15 00:10 NanoApe
阅读(227)
评论(0)
推荐(0)
HDU-3666 THE MATRIX PROBLEM
摘要: 很容易发现约束条件:L#include #include #include #include #include #include #include #define rep(i, l, r) for(int i=l; i=r; i--)#define N 456#define MAX 1'9') { ...
阅读全文
posted @ 2015-03-15 00:07 NanoApe
阅读(191)
评论(0)
推荐(0)
HDU-1534 Schedule Problem
摘要: 四种约束条件。。照做就行了。。最长路建图。#include #include #include #include #include #include #include #include #define rep(i, l, r) for(int i=l; i=r; i--)#define N 1000...
阅读全文
posted @ 2015-03-15 00:02 NanoApe
阅读(141)
评论(0)
推荐(0)
2015年3月14日
HDU-3592 World Exhibition
摘要: 差分约束。很容易看出两种约束方式,然后建图。而且题目要求排序不能乱,于是加上第三种约束。求最长就跑一遍最短路啊就行了。#include #include #include #include #include #include #include #include #define rep(i, l, r...
阅读全文
posted @ 2015-03-14 23:57 NanoApe
阅读(202)
评论(0)
推荐(0)
上一页
1
···
4
5
6
7
8
9
10
11
12
···
16
下一页
公告