• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
ACM s1124yy
守りたいものが 強くさせること
博客园    首页    新随笔    联系   管理     
05 2017 档案
RMQ模板

摘要:RMQ模板 c++ include include include include include include include include include include using namespace std; define INF 0x3f3f3f3f define ll long lo 阅读全文
posted @ 2017-05-28 11:12 s1124yy 阅读(169) 评论(0) 推荐(0)
Codeforces 799D Field expansion(随机算法)

摘要:Field expansion 【题目链接】 " Field expansion " 【题目类型】 随机化算法 &题解: 参考自:http://www.cnblogs.com/Dragon Light/p/6843866.html 这种想法简直让我大开眼界啊, 原来这题还可以这么写!! &代码: c 阅读全文
posted @ 2017-05-14 16:19 s1124yy 阅读(386) 评论(0) 推荐(0)
HDU 3033 分组背包(至少选一个)

摘要:分组背包(至少选一个) 我真的搞不懂为什么,所以现在就只能当作是模板来用吧 如果有大牛看见 希望评论告诉我 &代码: c++ include include include include include include include include include include using n 阅读全文
posted @ 2017-05-13 20:31 s1124yy 阅读(191) 评论(0) 推荐(0)
(转)搞ACM的你伤不起

摘要:(转)搞ACM的你伤不起 转载自:http://www.cnblogs.com/13224ACMer/p/4637516.html 劳资六年前开始搞ACM啊!!!!!!!!!! 从此踏上了尼玛不归路啊!!!!!!!!!!!! 谁特么跟劳资讲算法是程序设计的核心啊!!!!!! 尼玛除了面试题就没见过用 阅读全文
posted @ 2017-05-13 19:51 s1124yy 阅读(208) 评论(2) 推荐(0)
HDU 3535 AreYouBusy(分组背包)

摘要:AreYouBusy 【题目链接】 " AreYouBusy " 【题目类型】 分组背包 &题意: 给你n个工作集合,给你T的时间去做它们。给你m和s,说明这个工作集合有m件事可以做,它们是s类的工作集合(s=0,1,2,s=0说明这m件事中最少得做一件,s=1说明这m件事中最多只能做一件,s=2说 阅读全文
posted @ 2017-05-13 16:22 s1124yy 阅读(202) 评论(0) 推荐(0)
HDU 1712 分组背包

摘要:分组背包 【题目链接】https://cn.vjudge.net/problem/HDU 1712 【题目类型】 分组背包 &题解: 3层for 第一层:循环分成组的组数 第二层:倒着循环你有的钱数 第三层:循环每个组里面的个数 【时间复杂度】$O(n^3)$ &代码: c++ include in 阅读全文
posted @ 2017-05-13 09:25 s1124yy 阅读(200) 评论(0) 推荐(0)
输入挂

摘要:输入挂 转载自:http://www.cnblogs.com/qscqesze/p/5736748.html &fread读入挂: &一般读入挂: c++ namespace fastIO{ define BUF_SIZE 100000 define OUT_SIZE 100000 define l 阅读全文
posted @ 2017-05-13 03:41 s1124yy 阅读(157) 评论(0) 推荐(0)
Treap仿set 模板

摘要:Treap仿set 模板 蓝书232 &代码: c++ include include include include include include include include include include using namespace std; define INF 0x3f3f3f3f 阅读全文
posted @ 2017-05-11 14:26 s1124yy 阅读(246) 评论(0) 推荐(0)
线段树(区间更改,区间查最值)模板

摘要:线段树(区间更改,区间查最值)模板 主要重在理解线段树,理解了怎么改都可以,还有以后不要直接抄模板,要写出自己想的一份代码 &代码: c++ include include include include include include include include include include 阅读全文
posted @ 2017-05-11 00:31 s1124yy 阅读(1323) 评论(3) 推荐(0)
UVA 12345 Dynamic len(带修莫队)

摘要:Dynamic len 【题目链接】 " Dynamic len " 【题目类型】 带修莫队 &题解: 莫队可以单点更改,只要再多加一维,代表查询次数,排序的时候3个关键字. 之后循环离线的时候,先暴力时间指针(oi大佬说的),之后l,和r就随便了.还有要会用vis数组. 【时间复杂度】$O(n^{ 阅读全文
posted @ 2017-05-06 17:31 s1124yy 阅读(494) 评论(0) 推荐(0)
bzoj 2308 小Z的袜子(莫队算法)

摘要:小Z的袜子 【题目链接】 " 小Z的袜子 " 【题目类型】 莫队算法 &题解: 莫队算法第一题吧,建议先看 "这个" 理解算法,之后在参考 "这个" 就可以写出简洁的代码 我的比第2个少了一次sort,他的跑了1600ms,我的跑了800ms. 【时间复杂度】$O(n^{1.5})$ &代码: c+ 阅读全文
posted @ 2017-05-05 16:43 s1124yy 阅读(203) 评论(0) 推荐(0)
LA 4992 Jungle Outpost(半平面交)

摘要:Jungle Outpost 【题目链接】 " Jungle Outpost " 【题目类型】 半平面交 &题解: 蓝书282 我自己写的代码居然AC了!!! 刘汝佳的说要right要 3什么的,还要特判3,我感觉就不需要,所以我就没写,交了一发,想着应会wa吧,结果居然tmA了!!! &代码: 阅读全文
posted @ 2017-05-04 21:12 s1124yy 阅读(335) 评论(0) 推荐(0)
LA 2218 Triathlon(半平面交)

摘要:Triathlon 【题目链接】 " Triathlon " 【题目类型】 半平面交 &题解: 做了2道了,感觉好像套路,都是二分答案,判断半平面交是否为空. 还有刘汝佳的代码总是写const +& 但是我今天试了6次,3次const +& 和3次直接参数传值,发现时间只差了5ms左右,所以我觉得以 阅读全文
posted @ 2017-05-03 01:57 s1124yy 阅读(208) 评论(0) 推荐(0)
参数方程下直线交点公式(蓝书257)

摘要:参数方程下直线交点公式(蓝书257) &理解: 这块不是很懂,但书上写的却是过程略 = = ,在贴吧群里问了q巨,给了一张证明的图,感觉理解了好多.图如下: 阅读全文
posted @ 2017-05-02 15:52 s1124yy 阅读(532) 评论(0) 推荐(0)
LA 3890 Most Distant Point from the Sea(半平面交)

摘要:Most Distant Point from the Sea 【题目链接】 " Most Distant Point from the Sea " 【题目类型】 半平面交 &题解: 蓝书279 二分答案,判断平移后的直线的半平面交是否为空. 模板是照着敲的,还有一些地方不是很懂, 应该还要慢慢体会 阅读全文
posted @ 2017-05-02 01:48 s1124yy 阅读(208) 评论(0) 推荐(0)

博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3