会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Showson
——蒟蒻的代码仓库
博客园
首页
新随笔
管理
上一页
1
···
4
5
6
7
8
9
10
11
12
···
14
下一页
2016年1月3日
UVa11925 Generating Premutations
摘要: 留坑(p.254) 1 #include 2 #include 3 #include 4 #include 5 #include 6 7 using namespace std; 8 9 void setIO(const string& s) {10 freopen((s + ".in"...
阅读全文
posted @ 2016-01-03 21:16 Showson
阅读(144)
评论(0)
推荐(0)
2015年12月31日
UVa1608 UVaLive6258 Non-boring sequences
摘要: 填坑系列(p.248)比较神从两端枚举最坏复杂度就成O(nlogn)了 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 8 using namespace std; 9 10 void setIO(const ...
阅读全文
posted @ 2015-12-31 11:36 Showson
阅读(329)
评论(0)
推荐(0)
斜率优化小结
摘要: 看网上的斜率优化都比较玄。。。gerw给出了一种比较好的理解方式简单的有两种形式一、形如dp(i) = min / max {f(j) + g(i) * h(j) + c(i)} (j < i) //h() 一般是有单调性的显然c(i)是可以拿出来的,就变成了dp(i) = min / max {f...
阅读全文
posted @ 2015-12-31 09:25 Showson
阅读(201)
评论(0)
推荐(0)
UVa1607 poj1435 UVaLive1686 Gates
摘要: 填坑系列(p.246)由函数连续性得满足二分性 1 #include 2 #include 3 #include 4 #include 5 #include 6 7 using namespace std; 8 9 void setIO(const string& s) {10 freo...
阅读全文
posted @ 2015-12-31 09:07 Showson
阅读(239)
评论(0)
推荐(0)
2015年12月30日
bzoj3675: [Apio2014]序列分割
摘要: 留坑为什么别人家的斜率优化跟我一点都不一样!为什么斜率都要变成正的。。。为什么要那么推式子为什么不能直接做啊。。。。。为什么不把0去掉去秒WA啊为什么叉积去了0也过不了啊woc啊 1 #include 2 #include 3 #include 4 #include 5 #include ...
阅读全文
posted @ 2015-12-30 21:33 Showson
阅读(275)
评论(0)
推荐(0)
bzoj1010: [HNOI2008]玩具装箱toy
摘要: 窝只是来留坑的qwq 为毛别人家的乘积式可以过? updated2016.3.23 把向量判断的又写了一遍 就过了
阅读全文
posted @ 2015-12-30 11:48 Showson
阅读(188)
评论(0)
推荐(0)
2015年12月29日
UVa1606 UVaLive3259 FZU1309 HDU1661 POJ2280 ZOJ2390 Amphiphilic Carbon Molecules
摘要: 填坑系列考虑所有经过两个点的直线,一定有最优解。再考虑确定一个点,按极角顺序枚举所有直线,从而O(1)转移信息。还有代码实现技巧 1 #include 2 #include 3 #include 4 #include 5 #include 6 7 const int N = 1000 + 10; ...
阅读全文
posted @ 2015-12-29 09:34 Showson
阅读(332)
评论(0)
推荐(0)
2015年12月27日
UVa1572 UVaLive6393 Self-Assembly
摘要: 填坑系列(p.172)注意“可以旋转和翻转”然后将每个字母看成点不然边数就是n^2级的 1 #include 2 #include 3 #include 4 #include 5 #include 6 7 using namespace std; 8 9 void setIO(const str...
阅读全文
posted @ 2015-12-27 22:26 Showson
阅读(137)
评论(0)
推荐(0)
UVa12171 hdu2771 UVaLive4291 Sculpture
摘要: 填坑系列(p.171)orz rjl代码基本和rjl的一样 1 #include 2 #include 3 #include 4 #include 5 #include 6 7 template Q read(Q& x) { 8 static char c, f; 9 ...
阅读全文
posted @ 2015-12-27 21:53 Showson
阅读(264)
评论(0)
推荐(0)
bzoj3230: 相似子串
摘要: 这里给出了统计有效子串以及确定其第一次出现位置的方式 1 #include 2 #include 3 #include 4 #include 5 #include 6 7 using namespace std; 8 9 void setIO(const string& s) ...
阅读全文
posted @ 2015-12-27 20:23 Showson
阅读(159)
评论(0)
推荐(0)
上一页
1
···
4
5
6
7
8
9
10
11
12
···
14
下一页
公告