会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Why not now
不努力就被血虐。
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
···
19
下一页
2015年7月29日
2015 多校第三场
摘要: 1002求max(f(a),f(b)), f为不重复的素因子个数, 在数据要求以内 , 每个数最多有7个,可以打表。 1 /*Author :usedrose */ 2 /*Created Time :2015/7/29 11:32:09*/ 3 /*File Name :2.cpp*/ 4 #i...
阅读全文
posted @ 2015-07-29 19:50 UsedRose
阅读(122)
评论(0)
推荐(0)
2015年7月27日
最小费用最大流入门
摘要: poj 3281学会建图啊。。 啊。。 啊。。S(0)-食物(2n+i)-牛1(i)-牛2(n+i)-饮料(2n+F+i)-T(2n+F+D+1) 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #...
阅读全文
posted @ 2015-07-27 11:21 UsedRose
阅读(215)
评论(0)
推荐(0)
poj 3057 Evacuation
摘要: 占位置。。 1 /*Author :usedrose */ 2 /*Created Time :2015/7/27 0:51:12*/ 3 /*File Name :2.cpp*/ 4 #include 5 #include 6 #include 7 #include 8 ...
阅读全文
posted @ 2015-07-27 10:11 UsedRose
阅读(200)
评论(0)
推荐(0)
2015年7月26日
zoj 月赛
摘要: E题 1 /*Author :usedrose */ 2 /*Created Time :2015/7/26 22:29:35*/ 3 /*File Name :2.cpp*/ 4 #include 5 #include 6 #include 7 #include 8 #i...
阅读全文
posted @ 2015-07-26 22:46 UsedRose
阅读(139)
评论(0)
推荐(0)
KM匹配模板
摘要: 1 int G[N][N]; 2 int lx[N], ly[N]; 3 int slack[N]; 4 int match[N]; 5 bool visitx[N], visity[N]; 6 int n; 7 8 bool Hungary(int u) 9 {10 visitx[u]...
阅读全文
posted @ 2015-07-26 21:48 UsedRose
阅读(157)
评论(0)
推荐(0)
BestCoder 1st Anniversary 1002-1005
摘要: 1002 Hidden String这个题怎么暴力怎么搞就好了. 可以枚举最长匹配前缀, 和最长匹配后缀, 中间暴力for. 1 /*Author :usedrose */ 2 /*Created Time :2015/7/25 19:05:28*/ 3 /*File Name :2.cpp*/ ...
阅读全文
posted @ 2015-07-26 16:34 UsedRose
阅读(133)
评论(0)
推荐(0)
任务
摘要: zoj Tree of Tree 1 /*Author :usedrose */ 2 /*Created Time :2015/7/26 1:06:37*/ 3 /*File Name :2.cpp*/ 4 #include 5 #include 6 #include 7 #include ...
阅读全文
posted @ 2015-07-26 09:44 UsedRose
阅读(235)
评论(0)
推荐(0)
2015年7月25日
SGU 106 The equation
摘要: 分情况讨论扩展欧几里得代码是按别人的思路改的。。 1 /*Author :usedrose */ 2 /*Created Time :2015/7/25 14:51:42*/ 3 /*File Name :2.cpp*/ 4 #include 5 #include 6 #inclu...
阅读全文
posted @ 2015-07-25 15:55 UsedRose
阅读(150)
评论(0)
推荐(0)
sgu 104 Little shop of flowers
摘要: DP题意很简单, 直接DP就可以了, 打印路径的时候我是从后向前遍历,每次dp[i][j-1] 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 #include 13 #inc...
阅读全文
posted @ 2015-07-25 14:09 UsedRose
阅读(145)
评论(0)
推荐(0)
2015年7月24日
SGU Magic Pairs
摘要: A0x + B0y = knAx + By = k'n左差得(A - A0)x + (B -B0)y = 0(mod n)所以只要枚举A0, B0的倍数就行了。。公式就是 ( (i*a)%n, (i*b)%n ), i =0, 1, ... , n-1i*a, i*b如果大于n的话 不会影响结果, ...
阅读全文
posted @ 2015-07-24 16:08 UsedRose
阅读(150)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
···
19
下一页
公告